[Scip] Question about the resultant of a constraint

michael.winkler at zib.de michael.winkler at zib.de
Fri May 9 10:46:58 CEST 2014


Hi Gang,

yes, you can use the resultants of the OR-constraints in other constraints.
Note, that SCIP internally transforms ORs to ANDs since

>   r1 = x1 OR x2 OR ... OR x_m1

is equivalent to

~r1 = ~x1 AND ~x2 AND ... AND ~x_m1

while "~" indicates a negated variable (~x1 = 1 - x1). Also a constraint:

lhs <= c1*(~x1 AND ~x2 AND ... AND ~x_m1) + c2*(~x_(m1+1) ... AND ~x_m2) +
...  ck*(~x_(m_(k-1) + 1) ... AND ~x_mk) <= rhs

is called a pseudoboolean constraint, and you can also directly create
this one.(see cons_pseudoboolean)

A possible file format is the opb format, see
http://www.cril.univ-artois.fr/PB12/format.pdf for the file format
description.

> BTW, to me, cons_or is something more like an operation rather than a
> constraint. Correct me if I am wrong, please.

The constraint enforces that the resultant variable r1 (~r1) takes the
correct value of the disjunction.

Best, Michael

> Hi SCIP folks,
>
> I am pretty new to SCIP. A quick and specific question. Can I use the
> resultant of a OR constraint as a variable in another linear constraint?
>
> Adding some details, I am going to solve such a question:
>
>   r1 = x1 OR x2 OR … OR x_m1
>
>   r2  = x_(m1+1) … OR x_m2
>
>   ….
>
>   rk = x_(m_(k-1) + 1) … Or x_mk
>
>   lhs <= c1*r1 + c2*r2 +… + ck*rk <= rhs
>
> So r_i are resultants of those cons_or instances. While in the linear
> constraint, r_i are used as variables. Is it valid to
> `SCIPgetResultantOr’
> to obtain r_i and directly add it to the linear constraint?
>
> BTW, to me, cons_or is something more like an operation rather than a
> constraint. Correct me if I am wrong, please.
>
> Best regards,
>
> --
>
> Gang
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>




More information about the Scip mailing list