
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited for depth first search).
 Author
 Tobias Achterberg

Michael Winkler
This constraint handler handles a special type of linear constraints, namely logic or constraints. These are equivalent to set covering constraints, but are handled by special algorithms which are better suited for depth first search. For a set of binary variables , a logic or constraint has the form
Definition in file cons_logicor.h.
Go to the source code of this file.

SCIP_RETCODE  SCIPincludeConshdlrLogicor (SCIP *scip) 

SCIP_RETCODE  SCIPcreateConsLogicor (SCIP *scip, SCIP_CONS **cons, const char *name, 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_RETCODE  SCIPcreateConsBasicLogicor (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars) 

SCIP_RETCODE  SCIPaddCoefLogicor (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) 

int  SCIPgetNVarsLogicor (SCIP *scip, SCIP_CONS *cons) 

SCIP_VAR **  SCIPgetVarsLogicor (SCIP *scip, SCIP_CONS *cons) 

SCIP_Real  SCIPgetDualsolLogicor (SCIP *scip, SCIP_CONS *cons) 

SCIP_Real  SCIPgetDualfarkasLogicor (SCIP *scip, SCIP_CONS *cons) 

SCIP_ROW *  SCIPgetRowLogicor (SCIP *scip, SCIP_CONS *cons) 

creates the handler for logic or constraints and includes it in SCIP
 Parameters

SCIP_RETCODE SCIPcreateConsLogicor 
( 
SCIP * 
scip, 


SCIP_CONS ** 
cons, 


const char * 
name, 


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 

) 
 
creates and captures a logic or constraint
 Note
 the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
 Parameters

scip  SCIP data structure 
cons  pointer to hold the created constraint 
name  name of constraint 
nvars  number of variables in the constraint 
vars  array with variables of constraint entries 
initial  should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. 
separate  should the constraint be separated during LP processing? Usually set to TRUE. 
enforce  should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. 
check  should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. 
propagate  should the constraint be propagated during node processing? Usually set to TRUE. 
local  is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. 
modifiable  is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. 
dynamic  is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. 
removable  should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. 
stickingatnode  should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data. 
creates and captures a logicor constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLogicor(); all flags can be set via SCIPsetConsFLAGNAMEmethods in scip.h
 See Also
 SCIPcreateConsLogicor() 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

scip  SCIP data structure 
cons  pointer to hold the created constraint 
name  name of constraint 
nvars  number of variables in the constraint 
vars  array with variables of constraint entries 
adds coefficient in logic or constraint
 Parameters

scip  SCIP data structure 
cons  logicor constraint 
var  variable to add to the constraint 
gets number of variables in logic or constraint
 Parameters

scip  SCIP data structure 
cons  constraint data 
gets array of variables in logic or constraint
 Parameters

scip  SCIP data structure 
cons  constraint data 
gets the dual solution of the logic or constraint in the current LP
 Parameters

scip  SCIP data structure 
cons  constraint data 
gets the dual Farkas value of the logic or constraint in the current infeasible LP
 Parameters

scip  SCIP data structure 
cons  constraint data 
returns the linear relaxation of the given logic or constraint; may return NULL if no LP row was yet created; the user must not modify the row!
 Parameters

scip  SCIP data structure 
cons  constraint data 
