[SCIP] Can't use "max" in a constraint where "sum" works

Göran Uddeborg goeran at uddeborg.se
Mon Mar 17 15:57:12 CET 2025


Hello!

I'm doing my first attempts in using scip (version 9.1.1 on Fedora
41). Some simple test cases for learning the tool went fine, but when
I got to my real problem, I don't seem to be able to get the zimpl
syntax correct. If I use the "sum" function, scip accepts the code,
but if I use "max" in the same place it doesn't. I don't find any
explanation in the documentation or FAQs.

To illustrate the problem, I've cut down my example to this:

    set S := { 1..3 };
    var x[S];
    subto c:
      sum <f> in S : x[f] >= 10;
    minimize m:
      sum <f> in S : x[f];

That above code works, I do get a solution. However if I replace one
of the "sum" with "max" it doesn't work any more.

    set S := { 1..3 };
    var x[S];
    subto c:
      max <f> in S : x[f] >= 10;
    minimize m:
      sum <f> in S : x[f];

That gives a syntax error.

What am I doing wrong? What is it I miss?


More information about the Scip mailing list