1

Regarding SCIP's "constraint handler for the set partitioning / packing / covering":

  1. Is it smart enough to deduce all forms that it supports without me having to call the setppc functions directly?
  2. Can it handle/detect forms of sum(x) == y where x is a list of binary variables and y is also a binary variable? Same question for less than or equal?
  3. The docs for it state that it requires a right-hand-side equal to 1. What about RHS=0?
Brannon
  • 5,324
  • 4
  • 35
  • 83

1 Answers1

1
  1. If I understand you correctly you are asking if SCIP will see that a linear constraint is a setppc constraint and automatically upgrade it? Yes.

  2. Yes, it should not matter how you write it.

  3. A sum of binary variables with rhs = 0 will just propagate and fix all variables to 0. (if only lhs is 0 then that is redundant)

If some of the coefficients are -1 instead of +1 SCIP will still try to make it work by negating all negative variables (or all positive ones and multiply by -1 afterwards). SCIP will check for any linear constraint that has only binary variables and +1/-1 coefficients if it can be upgraded in such a way.

Leon
  • 1,588
  • 1
  • 7
  • 16
  • Follow-up question: if I name my constraints, how would I see the "upgrades" on my constraints? Or how do I determine which constraints are detected as a given type? – Brannon Jul 22 '22 at 13:19
  • are you using SCIP through the interactive shell or through the API or some of the other interfaces? – Leon Jul 22 '22 at 14:44
  • I'm using pyscipopt, the Python API. – Brannon Jul 22 '22 at 14:54
  • 1
    It seems this is not wrapped in the Python API yet. If you have access to a row you can use `getConsOriginConshdlrtype`. If not you can either extend the API (you would have to to the same as in getConsOriginConshdlrtype just inside the Constraint class, or you can print out the whole problem as a `cip` file (and the constraints would have the type printed along with the name). – Leon Jul 22 '22 at 15:08