Solving Constraint Integer Programs

Detailed Description

constraint handler for SOS type 2 constraints

Marc Pfetsch

Definition in file cons_sos2.h.

#include "scip/scip.h"

Go to the source code of this file.


SCIP_RETCODE SCIPincludeConshdlrSOS2 (SCIP *scip)
Specially Ordered Set (SOS) Type 2 Constraints

A specially ordered set of type 2 (SOS2) is a sequence of variables such that at most two variables are nonzero and if two variables are nonzero they must be adjacent in the specified sequence. Note that it is in principle allowed that a variable appears twice, but it then can be fixed to 0 if it is at least two apart in the sequence.

SCIP_RETCODE SCIPcreateConsSOS2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicSOS2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
SCIP_RETCODE SCIPaddVarSOS2 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
int SCIPgetNVarsSOS2 (SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSOS2 (SCIP *scip, SCIP_CONS *cons)
SCIP_RealSCIPgetWeightsSOS2 (SCIP *scip, SCIP_CONS *cons)