All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cons_or.c File Reference Detailed DescriptionConstraint handler for "or" constraints, . This constraint handler deals with "or" constraint. These are constraint of the form:
where is a binary variable for all . Hence, is also of binary type. The variable is called resultant and the 's operators. Definition in file cons_or.c. #include <assert.h> #include <string.h> #include "scip/cons_or.h" #include "scip/cons_and.h" #include "scip/pub_misc.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 43 of file cons_or.c. Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIPcreateConsOr(), SCIPgetNVarsOr(), SCIPgetResultantOr(), SCIPgetVarsOr(), and SCIPincludeConshdlrOr().
Definition at line 44 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
priority of the constraint handler for separation Definition at line 45 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
priority of the constraint handler for constraint enforcing Definition at line 46 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
priority of the constraint handler for checking feasibility Definition at line 47 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
frequency for separating cuts; zero means to separate only in the root node Definition at line 48 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 49 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only Definition at line 50 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 52 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
should separation method be delayed, if other separators found cuts? Definition at line 53 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
should propagation method be delayed, if other propagators found reductions? Definition at line 54 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
should presolving method be delayed, if other presolvers found reductions? Definition at line 55 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
should the constraint handler be skipped, if no constraints are available? Definition at line 56 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
Definition at line 58 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
Definition at line 60 of file cons_or.c. Referenced by SCIPincludeConshdlrOr().
Definition at line 61 of file cons_or.c. Referenced by SCIPincludeConshdlrOr(). Typedef DocumentationEnumeration Type Documentation
Function Documentation
removes rounding locks for the given variable in the given or constraint
Definition at line 129 of file cons_or.c. References SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), and TRUE. Referenced by delCoefPos().
creates constraint handler data
Definition at line 143 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocMemory. Referenced by SCIPincludeConshdlrOr().
frees constraint handler data
Definition at line 163 of file cons_or.c. References NULL, SCIP_OKAY, and SCIPfreeMemory. Referenced by SCIP_DECL_CONSFREE().
gets number of LP rows needed for the LP relaxation of the constraint
Definition at line 178 of file cons_or.c. References NULL. Referenced by addRelaxation(), checkCons(), consdataFreeRows(), createRelaxation(), and separateCons().
catches events for the watched variable at given position
Definition at line 189 of file cons_or.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, and SCIPcatchVarEvent(). Referenced by consdataSwitchWatchedvars().
drops events for the watched variable at given position
Definition at line 213 of file cons_or.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, and SCIPdropVarEvent(). Referenced by consdataSwitchWatchedvars().
catches needed events on all variables of constraint, except the special ones for watched variables
Definition at line 236 of file cons_or.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_OKAY, and SCIPcatchVarEvent(). Referenced by consdataCreate().
drops events on all variables of constraint, except the special ones for watched variables
Definition at line 262 of file cons_or.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_OKAY, and SCIPdropVarEvent(). Referenced by consdataFree().
stores the given variable numbers as watched variables, and updates the event processing
Definition at line 288 of file cons_or.c. References consdataCatchWatchedEvents(), consdataDropWatchedEvents(), NULL, SCIP_CALL, and SCIP_OKAY. Referenced by consdataFree(), delCoefPos(), and propagateCons().
ensures, that the vars array can store at least num entries
Definition at line 348 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addCoef().
creates constraint data for or constraint
Definition at line 372 of file cons_or.c. References consdataCatchEvents(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPduplicateBlockMemoryArray, SCIPgetTransformedVar(), SCIPgetTransformedVars(), and SCIPisTransformed(). Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsOr().
releases LP rows of constraint data and frees rows array
Definition at line 416 of file cons_or.c. References consdataGetNRows(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemoryArray, and SCIPreleaseRow(). Referenced by consdataFree(), and SCIP_DECL_CONSEXITSOL().
frees constraint data for or constraint
Definition at line 443 of file cons_or.c. References consdataDropEvents(), consdataFreeRows(), consdataSwitchWatchedvars(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPisTransformed(). Referenced by SCIP_DECL_CONSDELETE().
prints or constraint to file stream
Definition at line 477 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPinfoMessage(), SCIPwriteVarName(), SCIPwriteVarsList(), and TRUE. Referenced by applyFixings(), and SCIP_DECL_CONSPRINT().
adds coefficient in or constraint
Definition at line 502 of file cons_or.c. References consdataEnsureVarsSize(), lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), and SCIPvarIsTransformed(). Referenced by applyFixings().
deletes coefficient at given position from or constraint data
Definition at line 556 of file cons_or.c. References consdataSwitchWatchedvars(), FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPdropVarEvent(), SCIPvarIsTransformed(), and unlockRounding(). Referenced by applyFixings().
deletes all zero-fixed variables
Definition at line 614 of file cons_or.c. References addCoef(), consdataPrint(), delCoefPos(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPdebug, SCIPdebugMessage, SCIPdebugPrintf, SCIPgetBinvarRepresentative(), SCIPisFeasEQ(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and SCIPvarIsBinary(). Referenced by SCIP_DECL_CONSPRESOL().
creates LP rows corresponding to or constraint:
Definition at line 673 of file cons_or.c. References consdataGetNRows(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddVarsToRowSameCoef(), SCIPaddVarToRow(), SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPinfinity(), and SCIPsnprintf(). Referenced by addRelaxation(), and separateCons().
adds linear relaxation of or constraint to the LP
Definition at line 716 of file cons_or.c. References consdataGetNRows(), createRelaxation(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCut(), SCIPconsGetData(), and SCIProwIsInLP(). Referenced by SCIP_DECL_CONSINITLP().
checks or constraint for feasibility of given solution: returns TRUE iff constraint is feasible
Definition at line 751 of file cons_or.c. References consdataGetNRows(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPincConsAge(), SCIPinfoMessage(), SCIPisFeasIntegral(), SCIPprintCons(), SCIPresetConsAge(), SCIProwIsInLP(), SCIPvarGetName(), and TRUE. Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFOPS().
separates current LP solution
Definition at line 850 of file cons_or.c. References consdataGetNRows(), createRelaxation(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPconsGetData(), SCIPgetRowSolFeasibility(), SCIPisFeasNegative(), SCIProwIsInLP(), and TRUE. Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
analyzes conflicting FALSE assignment to resultant of given constraint, and adds conflict constraint to problem
Definition at line 900 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictBinvar(), SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by propagateCons().
analyzes conflicting TRUE assignment to resultant of given constraint, and adds conflict constraint to problem
Definition at line 931 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictBinvar(), SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPconsIsModifiable(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by propagateCons().
propagates constraint with the following rules: (1) v_i = TRUE => r = TRUE (2) r = FALSE => v_i = FALSE for all i (3) v_i = FALSE for all i => r = FALSE (4) r = TRUE, v_i = FALSE for all i except j => v_j = TRUE
Definition at line 971 of file cons_or.c. References analyzeConflictOne(), analyzeConflictZero(), consdataSwitchWatchedvars(), FALSE, NULL, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPincConsAge(), SCIPinferBinvarCons(), SCIPinRepropagation(), SCIPisFeasEQ(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
resolves a conflict on the given variable by supplying the variables needed for applying the corresponding propagation rule (see propagateCons()): (1) v_i = TRUE => r = TRUE (2) r = FALSE => v_i = FALSE for all i (3) v_i = FALSE for all i => r = FALSE (4) r = TRUE, v_i = FALSE for all i except j => v_j = TRUE
Definition at line 1210 of file cons_or.c. References FALSE, NULL, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, PROPRULE_INVALID, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_SUCCESS, SCIPaddConflictBinvar(), SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, SCIPvarGetLbAtIndex(), SCIPvarGetUbAtIndex(), and TRUE. Referenced by SCIP_DECL_CONSRESPROP().
upgrades unmodifiable or constraint into an and constraint on negated variables
Definition at line 1296 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAnd(), SCIPdebugMessage, SCIPdelCons(), SCIPfreeBufferArray, SCIPgetNegatedVar(), and SCIPreleaseCons(). Referenced by SCIP_DECL_CONSPRESOL().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 1354 of file cons_or.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrOr(), and TRUE.
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 1370 of file cons_or.c. References conshdlrdataFree(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrSetData().
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 1388 of file cons_or.c. References consdataFreeRows(), SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
frees specific constraint data Definition at line 1406 of file cons_or.c. References consdataFree(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconshdlrGetData().
transforms constraint data into data belonging to the transformed problem Definition at line 1421 of file cons_or.c. References consdataCreate(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), and SCIPcreateCons().
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 1450 of file cons_or.c. References addRelaxation(), SCIP_CALL, SCIP_OKAY, and SCIPconsIsInitial().
separation method of constraint handler for LP solutions Definition at line 1466 of file cons_or.c. References NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, and separateCons().
separation method of constraint handler for arbitrary primal solutions Definition at line 1490 of file cons_or.c. References SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, and separateCons().
constraint enforcing method of constraint handler for LP solutions Definition at line 1514 of file cons_or.c. References checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, SCIP_SEPARATED, and separateCons().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 1541 of file cons_or.c. References checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, and TRUE.
feasibility check method of constraint handler for integral solutions Definition at line 1564 of file cons_or.c. References checkCons(), SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, and SCIP_OKAY.
domain propagation method of constraint handler Definition at line 1587 of file cons_or.c. References FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, and SCIPconshdlrGetData().
presolving method of constraint handler Definition at line 1620 of file cons_or.c. References applyFixings(), FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddVarImplication(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelCons(), SCIPdoNotAggr(), SCIPisFeasEQ(), SCIPisStopped(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and upgradeCons().
propagation conflict resolving method of constraint handler Definition at line 1740 of file cons_or.c. References resolvePropagation(), SCIP_CALL, and SCIP_OKAY.
variable rounding lock method of constraint handler Definition at line 1750 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocks(), and SCIPconsGetData().
constraint display method of constraint handler Definition at line 1773 of file cons_or.c. References consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
constraint copying method of constraint handler Definition at line 1787 of file cons_or.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetName(), SCIPcreateConsOr(), SCIPfreeBufferArray, SCIPgetNVarsOr(), SCIPgetResultantOr(), SCIPgetVarCopy(), SCIPgetVarsOr(), and TRUE.
constraint parsing method of constraint handler Definition at line 1837 of file cons_or.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPcreateConsOr(), SCIPdebugMessage, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPparseVarName(), SCIPparseVarsList(), SCIPreallocBufferArray, and SCIPstrtok().
constraint method of constraint handler which returns the variables (if possible) Definition at line 1915 of file cons_or.c. References BMScopyMemoryArray, FALSE, NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
Definition at line 1957 of file cons_or.c. References FALSE, NULL, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_OKAY, and SCIPeventGetType().
creates the handler for or constraints and includes it in SCIP
Definition at line 1983 of file cons_or.c. References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPRESOL, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, conshdlrdataCreate(), EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), and SCIPsetConshdlrTrans(). Referenced by SCIP_DECL_CONSHDLRCOPY(), and SCIPincludeDefaultPlugins().
creates and captures an or constraint
Definition at line 2031 of file cons_or.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPerrorMessage, and SCIPfindConshdlr(). Referenced by CREATE_CONSTRAINT(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicOr().
creates and captures an or constraint in its most basic variant, i. e., with all constraint flags set to their default values
Definition at line 2093 of file cons_or.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOr(), and TRUE. gets number of variables in or constraint
Definition at line 2109 of file cons_or.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_CONSCOPY(). gets array of variables in or constraint
Definition at line 2130 of file cons_or.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_CONSCOPY(). gets the resultant variable in or constraint
Definition at line 2151 of file cons_or.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_CONSCOPY(). |