All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cons_indicator.h File Reference Detailed Descriptionconstraint handler for indicator constraints An indicator constraint is given by a binary variable and an inequality . It states that if then holds. This constraint is handled by adding a slack variable with . The constraint is enforced by fixing to 0 if .
This constraint is equivalent to a linear constraint and an SOS1 constraint on and (at most one should be nonzero). In the indicator context we can, however, separate more inequalities. The name indicator apparently comes from CPLEX. Definition in file cons_indicator.h. #include "scip/scip.h" Go to the source code of this file. Function Documentation
creates the handler for indicator constraints and includes it in SCIP
Definition at line 6125 of file cons_indicator.c. References CONFLICTHDLR_DESC, CONFLICTHDLR_NAME, CONFLICTHDLR_PRIORITY, 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, DEFAULT_ADDCOUPLING, DEFAULT_ADDCOUPLINGCONS, DEFAULT_ADDOPPOSITE, DEFAULT_BRANCHINDICATORS, DEFAULT_CONFLICTSUPGRADE, DEFAULT_DUALREDUCTIONS, DEFAULT_ENFORCECUTS, DEFAULT_FORCERESTART, DEFAULT_GENERATEBILINEAR, DEFAULT_GENLOGICOR, DEFAULT_MAXCONDITIONALTLP, DEFAULT_MAXCOUPLINGVALUE, DEFAULT_MAXSEPACUTS, DEFAULT_MAXSEPACUTSROOT, DEFAULT_NOLINCONSCONT, DEFAULT_REMOVEINDICATORS, DEFAULT_RESTARTFRAC, DEFAULT_SCALESLACKVAR, DEFAULT_SEPAALTERNATIVELP, DEFAULT_SEPACOUPLINGCUTS, DEFAULT_SEPACOUPLINGLOCAL, DEFAULT_SEPACOUPLINGVALUE, DEFAULT_TRYSOLFROMCOVER, DEFAULT_TRYSOLUTIONS, DEFAULT_UPDATEBOUNDS, DEFAULT_USEOTHERCONSS, EVENTHDLR_BOUND_DESC, EVENTHDLR_BOUND_NAME, EVENTHDLR_RESTART_DESC, EVENTHDLR_RESTART_NAME, FALSE, initConshdlrData(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_REAL_MAX, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPerrorMessage, SCIPincludeConflicthdlrBasic(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConflicthdlrFree(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrDisable(), SCIPsetConshdlrEnable(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitpre(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE. Referenced by SCIP_DECL_CONSHDLRCOPY(), and SCIPincludeDefaultPlugins().
creates and captures an indicator constraint
Definition at line 6366 of file cons_indicator.c. References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPceil(), SCIPconsAddUpgradeLocks(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsLinear(), SCIPcreateConsQuadratic(), SCIPcreateVar(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPinfinity(), SCIPisIntegral(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetType(), SCIPvarIsIntegral(), and TRUE. Referenced by createIndicatorConstraint(), readIndicators(), SCIP_DECL_CONSINITPRE(), SCIPcreateConsBasicIndicator(), and upgradeIndicatorSuperindicator().
creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
Definition at line 6562 of file cons_indicator.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsIndicator(), and TRUE.
creates and captures an indicator constraint with given linear constraint and slack variable
Definition at line 6591 of file cons_indicator.c. References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPconsAddUpgradeLocks(), SCIPconsGetHdlr(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCons(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNVarsLinear(), SCIPgetVarsLinear(), SCIPmarkDoNotMultaggrVar(), SCIPvarGetType(), and TRUE. Referenced by createSubSCIP(), readIndicators(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicIndicatorLinCons().
creates and captures an indicator constraint with given linear constraint and slack variable in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
Definition at line 6735 of file cons_indicator.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsIndicatorLinCons(), and TRUE.
adds variable to the inequality of the indicator constraint
Definition at line 6754 of file cons_indicator.c. References CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPisIntegral(), SCIPvarGetType(), and SCIPvarIsIntegral(). gets the linear constraint corresponding to the indicator constraint (may be NULL)
Definition at line 6785 of file cons_indicator.c. References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPconshdlrGetName(). Referenced by computeRanks(), createSubSCIP(), SCIP_DECL_READERWRITE(), SCIPwriteLp(), and writeOpbConstraints().
sets the linear constraint corresponding to the indicator constraint (may be NULL)
Definition at line 6802 of file cons_indicator.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdelCons(), SCIPerrorMessage, SCIPgetNVarsLinear(), SCIPgetStage(), SCIPgetVarsLinear(), SCIPreleaseCons(), SCIPvarGetType(), and TRUE.
sets binary indicator variable for indicator constraint
Definition at line 6890 of file cons_indicator.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetType(). gets binary variable corresponding to indicator constraint
Definition at line 6873 of file cons_indicator.c. References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPconshdlrGetName(). Referenced by computeRanks(), createCoveringProblem(), createSubSCIP(), getIndCandVars(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and writeOpbConstraints(). gets slack variable corresponding to indicator constraint
Definition at line 6964 of file cons_indicator.c. References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPconshdlrGetName(). Referenced by createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and writeOpbConstraints(). checks whether indicator constraint is violated w.r.t. sol
Definition at line 6981 of file cons_indicator.c. References FALSE, NULL, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetSolVal(), SCIPisFeasPositive(), and TRUE. Referenced by getIndCandVars().
Based on values of other variables, computes slack and binary variable to turn constraint feasible Based on values of other variables, computes slack and binary variable to turn constraint feasible It will also clean up the solution, i.e., shift slack variable, as follows: If the inequality is , the value of the slack variable to achieve equality is
where is the given solution. In case of , we arrive at
The typical values of in the first case is -1 and +1 in the second case. Now, let be the sign of in the first case and in the second case. Thus, if and , the inequality cannot be satisfied by a nonnegative value for the slack variable; in this case, we have to leave the values as they are. If and , the solution violates the indicator constraint (we can set the slack variable to value ). If and or and , the constraint is satisfied, and we can set the slack variable to 0.
Definition at line 7036 of file cons_indicator.c. References CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPsetSolVal(), SCIPvarGetLbLocal(), SCIPvarGetNegationVar(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetStatus(), TRUE, and varGetObjDelta(). Referenced by SCIP_DECL_CONSCHECK(), and SCIPmakeIndicatorsFeasible().
Based on values of other variables, computes slack and binary variable to turn all constraints feasible
Definition at line 7205 of file cons_indicator.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPgetStage(), and SCIPmakeIndicatorFeasible(). Referenced by SCIP_DECL_HEUREXEC().
adds additional linear constraint that is not connected by an indicator constraint, but can be used for separation adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation
Definition at line 7252 of file cons_indicator.c. References consdataEnsureAddLinConsSize(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconsIsLocal().
adds additional globally valid row that is not connected by an indicator constraint, but can be used for separation adds additional row that is not connected by an indicator constraint, but can be used for separation
Definition at line 7284 of file cons_indicator.c. References addAltLPRow(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIProwGetName(), and SCIProwIsLocal(). Referenced by SCIP_DECL_CONSINITLP(), and separatePoint(). |