Constraint handler for XOR constraints, \(rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n\).
Definition in file cons_xor.h.
|SCIP_EXPORT SCIP_RETCODE||SCIPincludeConshdlrXor (SCIP *scip)|
This constraint handler deals with "xor" constraint. These are constraint of the form:
\[ rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n \]
where \(x_i\) is a binary variable for all \(i\) and \(rhs\) is bool. The variables \(x\)'s are called operators. This constraint is satisfied if \(rhs\) is TRUE and an odd number of the operators are TRUE or if the \(rhs\) is FALSE and a even number of operators are TRUE. Hence, if the sum of \(rhs\) and operators is even.
|SCIP_EXPORT SCIP_RETCODE||SCIPcreateConsXor (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)|
|SCIP_EXPORT SCIP_RETCODE||SCIPcreateConsBasicXor (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)|
|SCIP_EXPORT int||SCIPgetNVarsXor (SCIP *scip, SCIP_CONS *cons)|
|SCIP_EXPORT SCIP_VAR **||SCIPgetVarsXor (SCIP *scip, SCIP_CONS *cons)|
|SCIP_EXPORT SCIP_VAR *||SCIPgetIntVarXor (SCIP *scip, SCIP_CONS *cons)|
|SCIP_EXPORT SCIP_Bool||SCIPgetRhsXor (SCIP *scip, SCIP_CONS *cons)|