Scippy

SCIP

Solving Constraint Integer Programs

cons_disjunction.h File Reference

Detailed Description

constraint handler for disjunction constraints

Author
Stefan Heinz
Michael Winkler

A disjunction constraint $ C $ is a constraint of the form

\[ C = C_1 \vee \dots \vee C_n \]

where all the $ C_i $ are individual constraints themselves.

Definition in file cons_disjunction.h.

#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeConshdlrDisjunction (SCIP *scip)
 
SCIP_RETCODE SCIPcreateConsDisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons, SCIP_Bool initial, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic)
 
SCIP_RETCODE SCIPcreateConsBasicDisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons)
 
SCIP_RETCODE SCIPaddConsElemDisjunction (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons)
 

Function Documentation

SCIP_RETCODE SCIPcreateConsDisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss,
SCIP_CONS relaxcons,
SCIP_Bool  initial,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic 
)

creates and captures a disjunction constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in disjunction
conssinitial constraint in disjunction
relaxconsa conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.

Definition at line 1033 of file cons_disjunction.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicDisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by SCIPcreateConsBasicDisjunction(), and SCIPincludeConshdlrDisjunction().

SCIP_RETCODE SCIPcreateConsBasicDisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss,
SCIP_CONS relaxcons 
)

creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsDisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsDisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in disjunction
conssinitial constraint in disjunction
relaxconsa conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL

Definition at line 1085 of file cons_disjunction.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemDisjunction(), SCIPcreateConsDisjunction(), and TRUE.

Referenced by SCIPcreateConsDisjunction().

SCIP_RETCODE SCIPaddConsElemDisjunction ( SCIP scip,
SCIP_CONS cons,
SCIP_CONS addcons 
)

adds constraint to the disjunction of constraints

Parameters
scipSCIP data structure
consdisjunction constraint
addconsadditional constraint in disjunction

Definition at line 1104 of file cons_disjunction.c.

References consdataAddCons(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPcreateConsBasicDisjunction().