constraint handler for indicator constraints
An indicator constraint is given by a binary variable \(y\) and an inequality \(ax \leq b\). It states that if \(y = 1\) then \(ax \leq b\) holds.
This constraint is handled by adding a slack variable \(s:\; ax - s \leq b\) with \(s \geq 0\). The constraint is enforced by fixing \(s\) to 0 if \(y = 1\).
This constraint is equivalent to a linear constraint \(ax - s \leq b\) and an SOS1 constraint on \(y\) and \(s\) (at most one should be nonzero). In the indicator context we can, however, separate more inequalities.
The name indicator apparently comes from CPLEX.
We now explain the handling of indicator constraints in more detail. The indicator constraint handler adds an inequality for each indicator constraint. We assume that this system (with added slack variables) is \( Ax - s \leq b \), where \( x \) are the original variables and \( s \) are the slack variables added by the indicator constraint. Variables \( y \) are the binary variables corresponding to the indicator constraints.
We separate inequalities by using the so-called alternative polyhedron.
We now describe the separation method of the first method in more detail.
Consider the LP-relaxation of the current subproblem:
\[\begin{array}{ll} min & c^T x + d^T z\\ & A x - s \leq b, \\ & D x + C z \leq f, \\ & l \leq x \leq u, \\ & u \leq z \leq v, \\ & 0 \leq s. \end{array} \]
As above \(Ax - s \leq b\) contains all inequalities corresponding to indicator constraints, while the system \(Dx + Cy \leq f\) contains all other inequalities (which are ignored in the following). Similarly, variables \(z\) not appearing in indicator constraints are ignored. Bounds for the variables \(x_j\) can be given, in particular, variables can be fixed. Note that \(s \leq 0\) renders the system infeasible.
To generate cuts, we construct the so-called alternative polyhedron:
\[\begin{array}{ll} P = \{ (w,r,t) : & A^T w - r + t = 0,\\ & b^T w - l^T r + u^T t = -1,\\ & w, r, t \geq 0 \}. \end{array} \]
Here, \(r\) and \(t\) correspond to the lower and upper bounds on \(x\), respectively.
It turns out that the vertices of \(P\) correspond to minimal infeasible subsystems of \(A x \leq b\), \(l \leq x \leq u\). If \(I\) is the index set of such a system, it follows that not all \(s_i\) for \(i \in I\) can be 0, i.e., \(y_i\) can be 1. In other words, the following cut is valid:
\[ \sum_{i \in I} y_i \leq |I| - 1. \]
We separate the above inequalities by a heuristic described in
Branch-And-Cut for the Maximum Feasible Subsystem Problem,
Marc Pfetsch, SIAM Journal on Optimization 19, No.1, 21-38 (2008)
The first step in the separation heuristic is to apply the transformation \(\bar{y} = 1 - y\), which transforms the above inequality into the constraint
\[ \sum_{i \in I} \bar{y}_i \geq 1, \]
that is, it is a set covering constraint on the negated variables.
The basic idea is to use the current solution to the LP relaxation and use it as the objective, when optimizing of the alternative polyhedron. Since any vertex corresponds to such an inequality, we can check whether it is violated. To enlarge the chance that we find a violated inequality, we perform a fixing procedure, in which the variable corresponding to an arbitrary element of the last IIS \(I\) is fixed to zero, i.e., cannot be used in the next IISs. This is repeated until the corresponding alternative polyhedron is infeasible, i.e., we have obtained an IIS-cover. For more details see the paper above.
Since each indicator constraint adds a linear constraint to the formulation, preprocessing of the linear constraints change the above approach as follows.
The system as present in the formulation is the following (ignoring variables that are not contained in indicator constraints and the objective function):
\[ \begin{array}{ll} & A x - s \leq b, \\ & l \leq x \leq u, \\ & s \leq 0. \end{array} \]
Note again that the requirement \(s \leq 0\) leads to an infeasible system. Consider now the preprocessing of the linear constraint (aggregation, bound strengthening, etc.) and assume that this changes the above system to the following:
\[ \begin{array}{ll} & \tilde{A} x - \tilde{B} s \leq \tilde{b}, \\ & \tilde{l} \leq x \leq \tilde{u}, \\ & s \leq 0. \\ \end{array} \]
Note that we forbid multi-aggregation of the \(s\) variables in order to be able to change their bounds in propagation/branching. The corresponding alternative system is the following:
\[ \begin{array}{ll} & \tilde{A}^T w - r + t = 0,\\ & - \tilde{B}^T w + v = 0,\\ & b^T w - l^T r + u^T t = -1,\\ & w, v, r, t \geq 0 \end{array} \qquad \Leftrightarrow \qquad \begin{array}{ll} & \tilde{A}^T w - r + t = 0,\\ & \tilde{B}^T w \geq 0,\\ & b^T w - l^T r + u^T t = -1,\\ & w, r, t \geq 0, \end{array} \]
where the second form arises by substituting \(v \geq 0\). A closer look at this system reveals that it is not larger than the original one:
Taken together, these two observations yield the conclusion that the new system is roughly as large as the original one.
Definition in file cons_indicator.c.
#include "blockmemshell/memory.h"
#include "lpi/lpi.h"
#include "lpi/type_lpi.h"
#include "scip/expr_var.h"
#include "scip/expr_product.h"
#include "scip/cons_nonlinear.h"
#include "scip/cons_indicator.h"
#include "scip/cons_linear.h"
#include "scip/cons_logicor.h"
#include "scip/cons_varbound.h"
#include "scip/heur_indicator.h"
#include "scip/heur_trysol.h"
#include "scip/pub_conflict.h"
#include "scip/pub_cons.h"
#include "scip/pub_event.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_paramset.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_conflict.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_cut.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include "scip/symmetry_graph.h"
#include "symmetry/struct_symmetry.h"
#include <string.h>
Go to the source code of this file.
#define CONSHDLR_NAME "indicator" |
Definition at line 251 of file cons_indicator.c.
#define CONSHDLR_DESC "indicator constraint handler" |
Definition at line 252 of file cons_indicator.c.
#define CONSHDLR_SEPAPRIORITY 10 |
priority of the constraint handler for separation
Definition at line 253 of file cons_indicator.c.
#define CONSHDLR_ENFOPRIORITY -100 |
priority of the constraint handler for constraint enforcing
Definition at line 254 of file cons_indicator.c.
#define CONSHDLR_CHECKPRIORITY -6000000 |
priority of the constraint handler for checking feasibility
Definition at line 255 of file cons_indicator.c.
#define CONSHDLR_SEPAFREQ 10 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 256 of file cons_indicator.c.
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 257 of file cons_indicator.c.
#define CONSHDLR_EAGERFREQ 100 |
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 258 of file cons_indicator.c.
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 260 of file cons_indicator.c.
#define CONSHDLR_DELAYSEPA FALSE |
Should separation method be delayed, if other separators found cuts?
Definition at line 261 of file cons_indicator.c.
#define CONSHDLR_DELAYPROP FALSE |
Should propagation method be delayed, if other propagators found reductions?
Definition at line 262 of file cons_indicator.c.
#define CONSHDLR_NEEDSCONS TRUE |
Should the constraint handler be skipped, if no constraints are available?
Definition at line 263 of file cons_indicator.c.
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
Definition at line 265 of file cons_indicator.c.
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 266 of file cons_indicator.c.
#define EVENTHDLR_BOUND_NAME "indicatorbound" |
Definition at line 270 of file cons_indicator.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrIndicator().
#define EVENTHDLR_BOUND_DESC "bound change event handler for indicator constraints" |
Definition at line 271 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define EVENTHDLR_LINCONSBOUND_NAME "indicatorlinconsbound" |
Definition at line 273 of file cons_indicator.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrIndicator().
#define EVENTHDLR_LINCONSBOUND_DESC "bound change event handler for lincons of indicator constraints" |
Definition at line 274 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define EVENTHDLR_RESTART_NAME "indicatorrestart" |
Definition at line 276 of file cons_indicator.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrIndicator().
#define EVENTHDLR_RESTART_DESC "force restart if absolute gap is 1 or enough binary variables have been fixed" |
Definition at line 277 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define CONFLICTHDLR_NAME "indicatorconflict" |
Definition at line 281 of file cons_indicator.c.
#define CONFLICTHDLR_DESC "replace slack variables and generate logicor constraints" |
Definition at line 282 of file cons_indicator.c.
#define CONFLICTHDLR_PRIORITY 200000 |
Definition at line 283 of file cons_indicator.c.
#define LINCONSUPGD_PRIORITY +100000 |
priority of the constraint handler for upgrading of linear constraints
Definition at line 286 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLogicor(), SCIPincludeConshdlrSetppc(), SCIPincludeConshdlrVarbound(), and SCIPincludeConshdlrXor().
#define DEFAULT_BRANCHINDICATORS FALSE |
Branch on indicator constraints in enforcing?
Definition at line 289 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_GENLOGICOR FALSE |
Generate logicor constraints instead of cuts?
Definition at line 290 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_ADDCOUPLING TRUE |
Add coupling constraints or rows if big-M is small enough?
Definition at line 291 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_MAXCOUPLINGVALUE 1e4 |
maximum coefficient for binary variable in coupling constraint
Definition at line 292 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_ADDCOUPLINGCONS FALSE |
Add initial variable upper bound constraints, if 'addcoupling' is true?
Definition at line 293 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPACOUPLINGCUTS TRUE |
Should the coupling inequalities be separated dynamically?
Definition at line 294 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPACOUPLINGLOCAL FALSE |
Allow to use local bounds in order to separate coupling inequalities?
Definition at line 295 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPACOUPLINGVALUE 1e4 |
maximum coefficient for binary variable in separated coupling constraint
Definition at line 296 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPAALTERNATIVELP FALSE |
Separate using the alternative LP?
Definition at line 297 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPAPERSPECTIVE FALSE |
Separate cuts based on perspective formulation?
Definition at line 298 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SEPAPERSPLOCAL TRUE |
Allow to use local bounds in order to separate perspectice cuts?
Definition at line 299 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_MAXSEPANONVIOLATED 3 |
maximal number of separated non violated IISs, before separation is stopped
Definition at line 300 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_TRYSOLFROMCOVER FALSE |
Try to construct a feasible solution from a cover?
Definition at line 301 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_UPGRADELINEAR FALSE |
Try to upgrade linear constraints to indicator constraints?
Definition at line 302 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_USEOTHERCONSS FALSE |
Collect other constraints to alternative LP?
Definition at line 303 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_USEOBJECTIVECUT FALSE |
Use objective cut with current best solution to alternative LP?
Definition at line 304 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_UPDATEBOUNDS FALSE |
Update bounds of original variables for separation?
Definition at line 305 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_MAXCONDITIONALTLP 0.0 |
max. estimated condition of the solution basis matrix of the alt. LP to be trustworthy (0.0 to disable check)
Definition at line 306 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_MAXSEPACUTS 100 |
maximal number of cuts separated per separation round
Definition at line 307 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludeSepaAggregation(), SCIPincludeSepaClique(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaMcf(), SCIPincludeSepaOddcycle(), and SCIPincludeSepaZerohalf().
#define DEFAULT_MAXSEPACUTSROOT 2000 |
maximal number of cuts separated per separation round in the root node
Definition at line 308 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludeSepaAggregation(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaMcf(), SCIPincludeSepaOddcycle(), and SCIPincludeSepaZerohalf().
#define DEFAULT_REMOVEINDICATORS FALSE |
Remove indicator constraint if corresponding variable bound constraint has been added?
Definition at line 309 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_GENERATEBILINEAR FALSE |
Do not generate indicator constraint, but a bilinear constraint instead?
Definition at line 310 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_SCALESLACKVAR FALSE |
Scale slack variable coefficient at construction time?
Definition at line 311 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_NOLINCONSCONT FALSE |
Decompose problem (do not generate linear constraint if all variables are continuous)?
Definition at line 312 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_TRYSOLUTIONS TRUE |
Try to make solutions feasible by setting indicator variables?
Definition at line 313 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_ENFORCECUTS FALSE |
In enforcing try to generate cuts (only if sepaalternativelp is true)?
Definition at line 314 of file cons_indicator.c.
#define DEFAULT_DUALREDUCTIONS TRUE |
Should dual reduction steps be performed?
Definition at line 315 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_ADDOPPOSITE FALSE |
Add opposite inequality in nodes in which the binary variable has been fixed to 0?
Definition at line 316 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_CONFLICTSUPGRADE FALSE |
Try to upgrade bounddisjunction conflicts by replacing slack variables?
Definition at line 317 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_FORCERESTART FALSE |
Force restart if absolute gap is 1 or enough binary variables have been fixed?
Definition at line 318 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_RESTARTFRAC 0.9 |
fraction of binary variables that need to be fixed before restart occurs (in forcerestart)
Definition at line 319 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define DEFAULT_USESAMESLACKVAR FALSE |
Use same slack variable for indicator constraints with common binary variable?
Definition at line 320 of file cons_indicator.c.
Referenced by SCIPincludeConshdlrIndicator().
#define OBJEPSILON 0.001 |
value to add to objective in alt. LP if the binary variable is 1 to get small IISs
Definition at line 324 of file cons_indicator.c.
Referenced by setAltLPObj(), and setAltLPObjZero().
#define SEPAALTTHRESHOLD 10 |
only separate IIS cuts if the number of separated coupling cuts is less than this value
Definition at line 325 of file cons_indicator.c.
Referenced by separateIndicators().
#define MAXROUNDINGROUNDS 1 |
maximal number of rounds that produced cuts in separation
Definition at line 326 of file cons_indicator.c.
Referenced by initConshdlrData().
#define SCIP_CALL_PARAM | ( | x | ) |
Definition at line 452 of file cons_indicator.c.
Referenced by checkAltLPInfeasible(), extendToCover(), initAlternativeLP(), and SCIP_DECL_CONSCHECK().
typedef enum SCIP_enfosepatype SCIP_ENFOSEPATYPE |
Definition at line 448 of file cons_indicator.c.
enum SCIP_enfosepatype |
type of enforcing/separation call
Definition at line 439 of file cons_indicator.c.
|
static |
adds symmetry information of constraint to a symmetry detection graph
scip | SCIP pointer |
symtype | type of symmetries that need to be added |
cons | constraint |
graph | symmetry detection graph |
success | pointer to store whether symmetry information could be added |
Definition at line 467 of file cons_indicator.c.
References assert(), FALSE, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphConsnode(), SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphVarAggregation(), SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetRhsLinear(), SCIPgetSymActiveVariables(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphVarnodeidx(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisEQ(), SCIPisTransformed(), SCIPisZero(), SYM_CONSOPTYPE_EQ, SYM_CONSOPTYPE_SLACK, SYM_CONSOPTYPE_SUM, SYM_SYMTYPE_SIGNPERM, TRUE, and vars.
Referenced by SCIP_DECL_CONSGETPERMSYMGRAPH(), and SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH().
|
static |
execute the event handler for getting variable bound changes
We update the number of variables fixed to be nonzero.
Definition at line 622 of file cons_indicator.c.
References assert(), EVENTHDLR_BOUND_NAME, NULL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPerrorMessage, SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetName(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetName(), and TRUE.
|
static |
execute the event handler for getting variable bound changes on variables of linear constraint
used for propagation of max activity of lincons to upper bound of slackvar; only important bounds for this purpose are catched
Definition at line 721 of file cons_indicator.c.
References assert(), EVENTHDLR_LINCONSBOUND_NAME, NULL, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIPdebugMsg, SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetName(), SCIPvarGetName(), and TRUE.
|
static |
exec the event handler for forcing a restart
There are two cases in which we perform a (user) restart:
Definition at line 754 of file cons_indicator.c.
References assert(), EVENTHDLR_RESTART_NAME, NULL, REALABS, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARTYPE_BINARY, SCIP_VERBLEVEL_NORMAL, SCIPABORT, SCIPdebugMsg, SCIPdropEvent(), SCIPerrorMessage, SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetName(), SCIPfindBranchrule(), SCIPgetDualbound(), SCIPgetPrimalbound(), SCIPgetStage(), SCIPisEQ(), SCIPisGE(), SCIPisIntegral(), SCIPisParamFixed(), SCIPisZero(), SCIPrestartSolve(), SCIPsetIntParam(), SCIPvarGetName(), SCIPvarGetType(), SCIPverbMessage(), and TRUE.
|
static |
destructor of conflict handler to free conflict handler data (called when SCIP is exiting)
Definition at line 860 of file cons_indicator.c.
References assert(), CONFLICTHDLR_NAME, NULL, SCIP_OKAY, SCIPconflicthdlrGetData(), SCIPconflicthdlrGetName(), and SCIPfreeBlockMemory.
|
static |
conflict processing method of conflict handler (called when conflict was found)
In this conflict handler we try to replace slack variables by binary indicator variables and generate a logicor constraint if possible.
Definition at line 883 of file cons_indicator.c.
References assert(), CONFLICTHDLR_NAME, CONSHDLR_NAME, FALSE, i, NULL, result, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddConflict(), SCIPallocBufferArray, SCIPbdchginfoGetBoundtype(), SCIPbdchginfoGetNewbound(), SCIPbdchginfoGetVar(), SCIPboundtypeOpposite(), SCIPconflicthdlrGetData(), SCIPconflicthdlrGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPcreateConsLogicor(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetBinaryVarIndicator(), SCIPgetNConflictConssApplied(), SCIPgetNegatedVar(), SCIPgetNRuns(), SCIPgetSlackVarIndicator(), SCIPinfoMessage(), SCIPisFeasZero(), SCIPprintCons(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsBinary(), TRUE, var, and vars.
|
static |
check whether we transfer a changed parameter to the given value
scip | SCIP data structure |
param | parameter |
name | parameter name to check |
newvalue | new value |
value | old and possibly changed value of parameter |
Definition at line 1053 of file cons_indicator.c.
References assert(), NULL, paramname, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PARAMTYPE_BOOL, SCIP_STAGE_PROBLEM, SCIPchgBoolParam(), SCIPgetStage(), SCIPparamGetName(), SCIPparamGetType(), and SCIPwarningMessage().
Referenced by SCIP_DECL_PARAMCHGD().
|
static |
called after a parameter has been changed
Definition at line 1100 of file cons_indicator.c.
References assert(), checkTransferBoolParam(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfindConshdlr().
return objective contribution of variable
Special treatment of negated variables: return negative of objective of original variable. SCIPvarGetObj() would return 0 in these cases.
var | variable |
Definition at line 1515 of file cons_indicator.c.
References assert(), NULL, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarIsBinary(), SCIPvarIsNegated(), and var.
Referenced by enforceCuts(), extendToCover(), presolRoundIndicator(), propIndicator(), SCIP_DECL_CONSINITSOL(), SCIPmakeIndicatorFeasible(), and separateIISRounding().
|
static |
ensures that the addlincons array can store at least num entries
scip | SCIP data structure |
conshdlr | constraint handler |
num | minimum number of entries to store |
Definition at line 1536 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPreallocBlockMemoryArray.
Referenced by SCIPaddLinearConsIndicator().
|
static |
initialize alternative LP
The alternative system is organized as follows:
scip | SCIP pointer |
conshdlr | constraint handler |
Definition at line 1576 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_CALL_PARAM, SCIP_LPPAR_FASTMIP, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_SCALING, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIPblkmem(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetMessagehdlr(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPlpiAddRows(), SCIPlpiCreate(), SCIPlpiSetIntpar(), and TRUE.
Referenced by addAltLPColumn().
|
static |
check whether the bounds in given (alternative) LP are set correctly (for debugging)
scip | SCIP pointer |
lp | LP for which bounds should be checked |
nconss | number of constraints |
conss | constraints |
Definition at line 1626 of file cons_indicator.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPisFeasZero(), SCIPlpiGetBounds(), SCIPlpiGetNCols(), SCIPlpiIsInfinity(), and TRUE.
Referenced by enforceCuts(), SCIP_DECL_CONSCHECK(), and separateIISRounding().
|
static |
set the alternative system objective function
We assume that the objective function coefficients of the variables other than the binary indicators are always 0 and hence do not have to be changed.
We already use the tranformation \(y' = 1 - y\).
scip | SCIP pointer |
lp | alternative LP |
sol | solution to be dealt with |
nconss | number of constraints |
conss | indicator constraints |
Definition at line 1704 of file cons_indicator.c.
References assert(), NULL, obj, OBJEPSILON, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPgetSolVal(), SCIPisFeasEQ(), SCIPlpiChgObj(), and sol.
Referenced by separateIISRounding().
|
static |
set the alternative system objective function to some small value
scip | SCIP pointer |
lp | alternative LP |
nconss | number of constraints |
conss | indicator constraints |
Definition at line 1757 of file cons_indicator.c.
References assert(), NULL, obj, OBJEPSILON, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, and SCIPlpiChgObj().
Referenced by enforceCuts(), and SCIP_DECL_CONSCHECK().
|
static |
fix variable given by S to 0
scip | SCIP pointer |
lp | alternative LP |
nconss | number of constraints |
conss | indicator constraints |
S | bitset of variables |
Definition at line 1805 of file cons_indicator.c.
References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, and SCIPlpiChgBounds().
Referenced by enforceCuts(), SCIP_DECL_CONSCHECK(), and separateIISRounding().
|
static |
fix variable ind to 0
lp | alternative LP |
ind | variable that should be fixed to 0 |
Definition at line 1864 of file cons_indicator.c.
References SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPlpiChgBounds().
Referenced by deleteAltLPConstraint(), extendToCover(), and SCIP_DECL_CONSDISABLE().
|
static |
unfix variable ind to 0
lp | alternative LP |
ind | variable that should be fixed to 0 |
Definition at line 1881 of file cons_indicator.c.
References SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPlpiChgBounds(), and SCIPlpiInfinity().
Referenced by SCIP_DECL_CONSENABLE().
|
static |
unfix variable given by S to 0
scip | SCIP pointer |
lp | alternative LP |
nconss | number of constraints |
conss | indicator constraints |
S | bitset of variables |
Definition at line 1897 of file cons_indicator.c.
References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPlpiChgBounds(), and SCIPlpiInfinity().
Referenced by enforceCuts(), SCIP_DECL_CONSCHECK(), and separateIISRounding().
|
static |
update bounds in first row to the current ones
scip | SCIP pointer |
conshdlrdata | constraint handler |
Definition at line 1956 of file cons_indicator.c.
References assert(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPdebugMsg, SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPisEQ(), SCIPlpiChgCoef(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), var, and vars.
Referenced by separateIISRounding().
|
static |
update bounds in first row to the global bounds
scip | SCIP pointer |
conshdlrdata | constraint handler |
Definition at line 2020 of file cons_indicator.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPdebugMsg, SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPlpiChgCoef(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), var, and vars.
Referenced by enforceCuts(), and SCIP_DECL_CONSCHECK().
|
static |
check whether IIS defined by vector corresponds to a local cut
scip | SCIP pointer |
conshdlrdata | constraint handler |
vector | solution to alternative LP defining IIS |
isLocal | whether the IIS uses local bounds different from the global ones |
Definition at line 2081 of file cons_indicator.c.
References assert(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPisEQ(), SCIPisFeasZero(), SCIPlpiGetNCols(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, var, and vars.
Referenced by extendToCover().
|
static |
compute scaling for first row
If the coefficients in the first row are large, a right hand side of -1 might not be adequate. Here, we replace the right hand side by the sum of the coefficients divided by the number of nonzeros.
scip | SCIP pointer |
conshdlrdata | constraint handler |
Definition at line 2170 of file cons_indicator.c.
References assert(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPlpiChgSides(), SCIPlpiGetNCols(), SCIPlpiGetRows(), and TRUE.
Referenced by enforceCuts(), SCIP_DECL_CONSCHECK(), and separateIISRounding().
|
static |
add column to alternative LP
See the description at the top of the file for more information.
scip | SCIP pointer |
conshdlr | constraint handler |
conshdlrdata | data of constraint handler |
slackvar | slack variable or NULL |
nvars | number of variables in column |
vars | variables for column |
vals | values for column |
rhscoef | coefficient for first row |
objcoef | objective in alternative LP |
sign | sign (+1,-1) for column |
colfree | whether column should be free, e.g., for equations |
colindex | index of new column (return value) |
Definition at line 2223 of file cons_indicator.c.
References assert(), FALSE, i, initAlternativeLP(), NULL, nvars, obj, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), SCIPhashmapSetImageInt(), SCIPisEQ(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiGetNCols(), SCIPlpiGetNRows(), SCIPlpiInfinity(), SCIPlpiWriteLP(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), TRUE, var, and vars.
Referenced by addAltLPConstraint(), addAltLPRow(), and addObjcut().
|
static |
add column corresponding to constraint to alternative LP
See the description at the top of the file for more information.
scip | SCIP pointer |
conshdlr | constraint handler |
lincons | linear constraint |
slackvar | slack variable or NULL |
objcoef | objective coefficient |
colindex | index of new column |
Definition at line 2495 of file cons_indicator.c.
References addAltLPColumn(), assert(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_MULTAGGR, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetProbvarSum(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetStatus(), TRUE, and var.
Referenced by consdataCreate(), and SCIP_DECL_CONSINITSOL().
|
static |
add column corresponding to row to alternative LP
See the description at the top of the file for more information.
scip | SCIP pointer |
conshdlr | constraint handler |
row | row to add |
objcoef | objective coefficient |
colindex | index of new column |
Definition at line 2596 of file cons_indicator.c.
References addAltLPColumn(), assert(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcolGetVar(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPfreeBufferArray, SCIPisEQ(), SCIPisInfinity(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIProwIsLocal(), and TRUE.
Referenced by SCIPaddRowIndicator().
|
static |
try to add objective cut as column to alternative LP
scip | SCIP pointer |
conshdlr | constraint handler |
Definition at line 2669 of file cons_indicator.c.
References addAltLPColumn(), assert(), CONSHDLR_NAME, FALSE, NULL, nvars, objval, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetVarsData(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetObj(), var, and vars.
Referenced by updateObjUpperbound().
|
static |
delete column corresponding to constraint in alternative LP
We currently just fix the corresponding variable to 0.
scip | SCIP pointer |
conshdlr | constraint handler |
cons | indicator constraint |
Definition at line 2739 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, FALSE, fixAltLPVariable(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPdebugMsg.
Referenced by SCIP_DECL_CONSDELETE().
|
static |
update upper bound in alternative LP
scip | SCIP pointer |
conshdlr | constraint handler |
conshdlrdata | constraint handler data |
Definition at line 2778 of file cons_indicator.c.
References addObjcut(), assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcutoffbounddelta(), SCIPdebugMsg, SCIPfeasCeil(), SCIPgetUpperbound(), SCIPisEQ(), SCIPisInfinity(), SCIPisLT(), SCIPisObjIntegral(), SCIPlpiChgCoef(), SCIPlpiGetCoef(), and SCIPlpiWriteLP().
Referenced by enforceCuts(), and separateIISRounding().
|
static |
check whether the given LP is infeasible
If primal is false we assume that the problem is dual feasible, e.g., the problem was only changed by fixing bounds!
This is the workhorse for all methods that have to solve the alternative LP. We try in several ways to recover from possible stability problems.
scip | SCIP pointer |
lp | LP |
maxcondition | maximal allowed condition of LP solution basis matrix |
primal | whether we are using the primal or dual simplex |
infeasible | output: whether the LP is infeasible |
error | output: whether an error occurred |
Definition at line 2854 of file cons_indicator.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CALL_PARAM, SCIP_INVALID, SCIP_LPERROR, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_SCALING, SCIP_LPSOLQUALITY_ESTIMCONDITION, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPlpiExistsPrimalRay(), SCIPlpiGetInternalStatus(), SCIPlpiGetRealSolQuality(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsPrimalUnbounded(), SCIPlpiIsStable(), SCIPlpiSetIntpar(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPwarningMessage(), and TRUE.
Referenced by extendToCover(), and SCIP_DECL_CONSCHECK().
|
static |
tries to extend a given set of variables to a cover
At each step we include a variable which covers a new IIS. The corresponding IIS inequalities are added to the LP, if this not already happened.
xVal_
should contain the current LP solution. scip | SCIP pointer |
conshdlr | constraint handler |
conshdlrdata | constraint handler data |
lp | LP |
sol | solution to be separated |
enfosepatype | type of enforcing/separating type |
removable | whether cuts should be removable |
genlogicor | should logicor constraints be generated? |
nconss | number of constraints |
conss | indicator constraints |
S | bitset of variables |
size | size of S |
value | objective value of S |
error | output: whether an error occurred |
cutoff | whether we detected a cutoff by an infeasible inequality |
nGen | number of generated cuts |
Definition at line 3001 of file cons_indicator.c.
References assert(), checkAltLPInfeasible(), checkIISlocal(), cutoff, FALSE, fixAltLPVariable(), NULL, primsol, result, SCIP_Bool, SCIP_CALL, SCIP_CALL_PARAM, SCIP_LPPAR_FROMSCRATCH, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_TYPE_ENFOLP, SCIP_TYPE_ENFOPS, SCIP_TYPE_ENFORELAX, SCIP_TYPE_SEPALP, SCIP_TYPE_SEPARELAX, SCIP_TYPE_SEPASOL, SCIPABORT, SCIPaddCons(), SCIPaddPoolCut(), SCIPaddRow(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPconsGetData(), SCIPcreateConsLogicor(), SCIPcreateEmptyRowConshdlr(), SCIPdebugMsg, SCIPenfolpCons(), SCIPenfopsCons(), SCIPenforelaxCons(), SCIPerrorMessage, SCIPfindHeur(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNegatedVar(), SCIPgetNIntVars(), SCIPgetRowSolFeasibility(), SCIPgetSolVal(), SCIPheurPassIndicator(), SCIPinfinity(), SCIPinfoMessage(), SCIPisEfficacious(), SCIPisFeasNegative(), SCIPisFeasZero(), SCIPlpiGetNCols(), SCIPlpiGetSol(), SCIPlpiSetIntpar(), SCIPprintCons(), SCIPprintRow(), SCIPreleaseCons(), SCIPreleaseRow(), SCIPsepalpCons(), SCIPsepasolCons(), SCIPsnprintf(), sol, TRUE, var, varGetObjDelta(), and vars.
Referenced by enforceCuts(), and separateIISRounding().
|
static |
creates and initializes consdata
scip | SCIP data structure |
conshdlr | constraint handler |
conshdlrdata | constraint handler data |
consname | name of constraint (or NULL) |
consdata | pointer to store constraint data |
eventhdlrrestart | event handler for handling restarts |
binvar | binary variable (or NULL) |
activeone | whether the constraint is active on 1 or not |
lessthanineq | whether the original linear constraint is a less-than-rhs (TRUE) or not |
slackvar | slack variable |
lincons | linear constraint (or NULL) |
linconsactive | whether the linear constraint is active |
Definition at line 3354 of file cons_indicator.c.
References addAltLPConstraint(), assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_VARTYPE_BINARY, SCIPallocBlockMemory, SCIPcatchVarEvent(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNegatedVar(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPinfoMessage(), SCIPisFeasPositive(), SCIPisTransformed(), SCIPmarkDoNotMultaggrVar(), SCIPprintCons(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), and var.
Referenced by SCIP_DECL_CONSTRANS(), SCIPcreateConsIndicatorGeneric(), SCIPcreateConsIndicatorGenericLinCons(), and SCIPcreateConsIndicatorGenericLinConsPure().
|
static |
create variable upper bounds for constraints
scip | SCIP pointer |
conshdlrdata | constraint handler data |
conss | constraints |
nconss | number of constraints |
ngen | number of successful operations |
Definition at line 3482 of file cons_indicator.c.
References assert(), c, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPcreateConsVarbound(), SCIPdebugMsg, SCIPdelCons(), SCIPinfinity(), SCIPisNegative(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
perform one presolving round
scip | SCIP pointer |
conshdlrdata | constraint handler data |
cons | constraint |
consdata | constraint data |
dualreductions | should dual reductions be performed? |
cutoff | whether a cutoff happened |
success | whether we performed a successful reduction |
ndelconss | pointer to store the number of deleted constraints |
nfixedvars | pointer to store the number of fixed variables |
Definition at line 3552 of file cons_indicator.c.
References assert(), bound, cutoff, FALSE, NULL, obj, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_NEGATED, SCIPaddVarLocksType(), SCIPcaptureVar(), SCIPcatchVarEvent(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelCons(), SCIPdropVarEvent(), SCIPfixVar(), SCIPisEQ(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPlockVarCons(), SCIPreleaseVar(), SCIPunlockVarCons(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetProbvarBinary(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsActive(), SCIPvarIsNegated(), TRUE, var, and varGetObjDelta().
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
propagate indicator constraint
scip | SCIP pointer |
cons | constraint |
consdata | constraint data |
conshdlrdata | constraint handler data |
dualreductions | should dual reductions be performed? |
addopposite | add opposite inequalities if binary var = 0? |
cutoff | whether a cutoff happened |
nGen | number of domain changes |
Definition at line 3858 of file cons_indicator.c.
References assert(), bound, cutoff, FALSE, NULL, nvars, obj, REALABS, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_INVALID, SCIP_LOCKTYPE_MODEL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_MULTAGGR, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddCons(), SCIPadjustedVarUb(), SCIPallocBufferArray, SCIPanalyzeConflictCons(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPfreeBufferArray, SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetStage(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPincConsAge(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinfinity(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPinRepropagation(), SCIPisConflictAnalysisApplicable(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLT(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisIntegral(), SCIPisPositive(), SCIPisZero(), SCIPreleaseCons(), SCIPresetConsAge(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRUE, var, varGetObjDelta(), and vars.
Referenced by enforceIndicators(), and SCIP_DECL_CONSPROP().
|
static |
enforcement method that produces cuts if possible
This is a variant of the enforcement method that generates cuts/constraints via the alternative LP, if possible.
scip | SCIP pointer |
conshdlr | constraint handler |
nconss | number of constraints |
conss | indicator constraints |
sol | solution to be enforced |
enfosepatype | type of enforcing/separating type |
genlogicor | whether logicor constraint should be generated |
cutoff | whether we detected a cutoff by an infeasible inequality |
nGen | number of cuts generated |
Definition at line 4244 of file cons_indicator.c.
References assert(), checkLPBoundsClean(), cutoff, extendToCover(), FALSE, fixAltLPVariables(), NULL, scaleFirstRow(), SCIP_Bool, SCIP_CALL, SCIP_LPERROR, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetSolVal(), SCIPisFeasIntegral(), SCIPisFeasZero(), setAltLPObjZero(), sol, TRUE, unfixAltLPVariables(), updateFirstRowGlobal(), updateObjUpperbound(), and varGetObjDelta().
Referenced by enforceIndicators().
|
static |
enforcement method
We check whether the current solution is feasible, i.e., if binvar = 1 implies that slackvar = 0. If not, we branch as follows:
In one branch we fix binvar = 1 and slackvar = 0. In the other branch we fix binvar = 0 and leave slackvar unchanged.
scip | SCIP pointer |
conshdlr | constraint handler |
nconss | number of constraints |
conss | indicator constraints |
sol | solution to be enforced (NULL for LP solution) |
enfosepatype | type of enforcing/separating type |
genlogicor | whether logicor constraint should be generated |
result | result |
Definition at line 4355 of file cons_indicator.c.
References assert(), branchCons(), c, cutoff, enforceCuts(), FALSE, NULL, propIndicator(), result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_VARSTATUS_MULTAGGR, SCIPallowStrongDualReds(), SCIPcalcChildEstimate(), SCIPchgVarLbNode(), SCIPchgVarUbNode(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateChild(), SCIPdebugMsg, SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasNegative(), SCIPisFeasZero(), SCIPprintCons(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), sol, and TRUE.
Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSENFORELAX().
|
static |
separate IIS-cuts via rounding
scip | SCIP pointer |
conshdlr | constraint handler |
sol | solution to be separated |
enfosepatype | type of enforcing/separating type |
nconss | number of constraints |
conss | indicator constraints |
maxsepacuts | maximal number of cuts to be generated |
cutoff | whether we detected a cutoff by an infeasible inequality |
nGen | number of domain changes |
Definition at line 4542 of file cons_indicator.c.
References assert(), checkLPBoundsClean(), cutoff, extendToCover(), FALSE, fixAltLPVariables(), NULL, scaleFirstRow(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetVarSol(), SCIPhashmapExists(), SCIPisFeasEQ(), SCIPisFeasLT(), SCIPisFeasZero(), SCIPvarGetNegatedVar(), setAltLPObj(), sol, TRUE, unfixAltLPVariables(), updateFirstRow(), updateObjUpperbound(), and varGetObjDelta().
Referenced by separateIndicators().
|
static |
separate cuts based on perspective formulation
Hijazi, Bonami, and Ouorou (2014) introduced the following cuts: We consider an indicator constraint
\[y = 1 \rightarrow \alpha^T x \leq \beta \]
and assume finite bounds \(\ell \leq x \leq u\). Then for \(I \subseteq \{1, \dots, n\}\) define
\[ \Sigma(I,x,y) = \sum_{i \notin I} \alpha_i x_i + y \Big(\sum_{i \in I, \alpha_i < 0} \alpha_i u_i + \sum_{i \in I, \alpha_i > 0} \alpha_i \ell_i + \sum_{i \notin I, \alpha_i < 0} \alpha_i \ell_i + \sum_{i \notin I, \alpha_i > 0} \alpha_i u_i - \beta\Big). \]
Then the cuts
\[\Sigma(I,x,y) \leq \sum_{i \notin I, \alpha_i < 0} \alpha_i \ell_i + \sum_{i \notin I, \alpha_i > 0} \alpha_i u_i \]
are valid for the disjunction
\[\{y = 0,\; \ell \leq x \leq u\} \cup \{y = 1,\; \ell \leq x \leq u,\; \alpha^T x \leq \beta\}. \]
These cuts can easily be separated for a given point \((x^*, y^*)\) by checking for each \(i \in \{1, \dots, n\}\) whether
\[y^*(\alpha_i\, u_i\, [\alpha_i < 0] + \alpha_i\, \ell_i\, [\alpha_i > 0]) > \alpha_i x_i^* + y^* )\alpha_i \ell_i [\alpha_i < 0] + \alpha_i u_i [\alpha_i > 0]), \]
where \([C] = 1\) if condition \(C\) is satisfied, otherwise it is 0. If the above inequality holds, \(i\) is included in \(I\), otherwise not.
scip | SCIP pointer |
conshdlr | constraint handler |
sol | solution to be separated |
nconss | number of constraints |
conss | indicator constraints |
maxsepacuts | maximal number of cuts to be generated |
nGen | number of generated cuts |
Definition at line 4754 of file cons_indicator.c.
References assert(), c, FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddRow(), SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPcreateEmptyRowCons(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetSolVal(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinfinity(), SCIPisEfficacious(), SCIPisGT(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPprintRow(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), sol, and TRUE.
Referenced by separateIndicators().
|
static |
separation method
We first check whether coupling inequalities can be separated (if required). If not enough of these could be generated, we check whether IIS inequalities can be separated.
scip | SCIP pointer |
conshdlr | constraint handler |
nconss | number of constraints |
nusefulconss | number of useful constraints |
conss | indicator constraints |
sol | solution to be separated |
enfosepatype | type of enforcing/separating type |
result | result |
Definition at line 4955 of file cons_indicator.c.
References assert(), c, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPaddRow(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateEmptyRowCons(), SCIPdebugMsg, SCIPflushRowExtensions(), SCIPgetDepth(), SCIPgetSolVal(), SCIPinfinity(), SCIPisEfficacious(), SCIPisFeasNegative(), SCIPprintRow(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsnprintf(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SEPAALTTHRESHOLD, separateIISRounding(), separatePerspective(), sol, and TRUE.
Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
|
static |
initializes the constraint handler data
scip | SCIP pointer |
conshdlrdata | constraint handler data |
Definition at line 5125 of file cons_indicator.c.
References assert(), FALSE, MAXROUNDINGROUNDS, NULL, SCIPinfinity(), and TRUE.
Referenced by SCIP_DECL_CONSINIT(), and SCIPincludeConshdlrIndicator().
|
static |
tries to upgrade a linear constraint into an indicator constraint
For some linear constraint of the form \(a^T x + \alpha\, y \geq \beta\) with \(y \in \{0,1\}\), we can upgrade it to an indicator constraint if for the residual value \(a^T x \geq \gamma\), we have \(\alpha + \gamma \geq \beta\): in this case, the constraint is always satisfied if \(y = 1\).
Similarly, for a linear constraint in the form \(a^T x + \alpha\, y \leq \beta\) with \(y \in \{0,1\}\), we can upgrade it to an indicator constraint if for the residual value \(a^T x \leq \gamma\), we have \(\alpha + \gamma \leq \beta\).
Definition at line 5179 of file cons_indicator.c.
References assert(), FALSE, NULL, nvars, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsIndicator(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetLinearConsIndicator(), SCIPgetNegatedVar(), SCIPinfinity(), SCIPinfoMessage(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), SCIPisZero(), SCIPprintCons(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), TRUE, var, and vars.
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 5408 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrIndicator(), TRUE, and valid.
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 5426 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, initConshdlrData(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPfindHeur().
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 5451 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdropVarEvent(), SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, and SCIPhashmapFree().
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 5505 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.
|
static |
solving process initialization method of constraint handler (called when branch and bound process is about to begin)
Definition at line 5538 of file cons_indicator.c.
References addAltLPConstraint(), assert(), c, CONSHDLR_NAME, FALSE, NULL, nvars, obj, REALABS, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_OPTIMAL, SCIP_STATUS_UNBOUNDED, SCIPaddNlRow(), SCIPallocBufferArray, SCIPblkmem(), SCIPcatchEvent(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetName(), SCIPconshdlrGetSepaFreq(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPconsIsTransformed(), SCIPcreateExprProduct(), SCIPcreateExprVar(), SCIPcreateNlRow(), SCIPdebugMsg, SCIPdisableCons(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetCharParam(), SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetStatus(), SCIPgetTransformedCons(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsertInt(), SCIPinfoMessage(), SCIPisGE(), SCIPisIntegral(), SCIPisNLPConstructed(), SCIPisZero(), SCIPprintCons(), SCIPreleaseExpr(), SCIPreleaseNlRow(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarIsNegated(), SCIPwarningMessage(), TRUE, varGetObjDelta(), and vars.
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 5856 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPhashmapFree(), SCIPhashmapPrintStatistics(), SCIPinfoMessage(), and SCIPlpiFree().
|
static |
frees specific constraint data
Definition at line 5928 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, deleteAltLPConstraint(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_TRANSFORMING, SCIPconsAddUpgradeLocks(), SCIPconsGetName(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPconsIsActive(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPdropVarEvent(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPgetStage(), SCIPhashmapFree(), SCIPreleaseCons(), SCIPreleaseVar(), and SCIPvarIsDeleted().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 6035 of file cons_indicator.c.
References assert(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPblkmem(), SCIPcaptureCons(), SCIPcaptureVar(), SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNOrigVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPisTransformed(), SCIPsnprintf(), and TRUE.
|
static |
presolving initialization method of constraint handler (called when presolving is about to begin)
Definition at line 6129 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STATUS_UNKNOWN, SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPgetStatus(), SCIPgetTransformedCons(), and SCIPreleaseCons().
|
static |
presolving method of constraint handler
For an indicator constraint with binary variable \(y\) and slack variable \(s\) the coupling inequality \(s \le M (1-y)\) (equivalently: \(s + M y \le M\)) is inserted, where \(M\) is an upper bound on the value of \(s\). If \(M\) is too large the inequality is not inserted. Depending on the parameter addcouplingcons we add a variable upper bound or a row (in consInitlpIndicator()).
Definition at line 6195 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, createVarUbs(), cutoff, FALSE, NULL, nvars, presolRoundIndicator(), result, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddVarImplication(), SCIPallowStrongDualReds(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsModifiable(), SCIPconsIsTransformed(), SCIPdebug, SCIPdebugMsg, SCIPgetNVarsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisInfinity(), SCIPisIntegral(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), TRUE, and vars.
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
For an indicator constraint with binary variable \(y\) and slack variable \(s\) the coupling inequality \(s \le M (1-y)\) (equivalently: \(s + M y \le M\)) is inserted, where \(M\) is an upper bound on the value of \(s\). If \(M\) is too large the inequality is not inserted.
Definition at line 6375 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPaddRow(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateConsVarbound(), SCIPcreateEmptyRowCons(), SCIPdebugMsg, SCIPflushRowExtensions(), SCIPinfinity(), SCIPisNegative(), SCIPprintRow(), SCIPreleaseCons(), SCIPreleaseRow(), SCIPsnprintf(), SCIPvarGetUbGlobal(), and TRUE.
|
static |
separation method of constraint handler for LP solutions
Definition at line 6471 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, result, SCIP_CALL, SCIP_OKAY, SCIP_TYPE_SEPALP, SCIPconshdlrGetName(), and separateIndicators().
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 6488 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, result, SCIP_CALL, SCIP_OKAY, SCIP_TYPE_SEPASOL, SCIPconshdlrGetName(), separateIndicators(), and sol.
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 6505 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, enforceIndicators(), NULL, result, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, SCIP_TYPE_ENFOLP, SCIPconshdlrGetData(), and SCIPconshdlrGetName().
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 6533 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, enforceIndicators(), NULL, result, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, SCIP_TYPE_ENFORELAX, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and sol.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 6561 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, enforceIndicators(), NULL, result, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_OKAY, SCIP_TYPE_ENFOPS, SCIPconshdlrGetName(), and TRUE.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 6589 of file cons_indicator.c.
References assert(), c, checkAltLPInfeasible(), checkLPBoundsClean(), CONSHDLR_NAME, FALSE, fixAltLPVariables(), NULL, REALABS, result, scaleFirstRow(), SCIP_Bool, SCIP_CALL, SCIP_CALL_PARAM, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_LPERROR, SCIP_LPPAR_FROMSCRATCH, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateSolCopy(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetSolVal(), SCIPgetStage(), SCIPheurPassSolTrySol(), SCIPinfoMessage(), SCIPisFeasIntegral(), SCIPisFeasZero(), SCIPlpiSetIntpar(), SCIPmakeIndicatorFeasible(), SCIPprintCons(), SCIPrelDiff(), SCIPresetConsAge(), SCIPupdateSolConsViolation(), SCIPvarGetName(), setAltLPObjZero(), sol, TRUE, unfixAltLPVariables(), and updateFirstRowGlobal().
|
static |
domain propagation method of constraint handler
Definition at line 6789 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, nvars, propIndicator(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPallocBlockMemoryArray, SCIPallowStrongDualReds(), SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinRepropagation(), SCIPisInfinity(), SCIPisTransformed(), SCIPvarGetUbLocal(), TRUE, and vars.
|
static |
propagation conflict resolving method of constraint handler
We check which bound changes were the reason for infeasibility. We use that inferinfo is 0 if the binary variable has bounds that fix it to be nonzero (these bounds are the reason). Likewise inferinfo is 1 if the slack variable has bounds that fix it to be nonzero.
Definition at line 6933 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, FALSE, NULL, result, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPallowStrongDualReds(), SCIPallowWeakDualReds(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetNVarsLinear(), SCIPgetValsLinear(), SCIPgetVarLbAtIndex(), SCIPgetVarsLinear(), SCIPgetVarUbAtIndex(), SCIPisFeasZero(), SCIPisInfinity(), and SCIPisPositive().
|
static |
variable rounding lock method of constraint handler
The up-rounding of the binary and slack variable may violate the constraint. If the linear constraint is not active, we lock all variables in the depending constraint - otherwise they will be fixed by dual presolving methods.
Definition at line 7017 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddVarLocksType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisInfinity(), SCIPisPositive(), and SCIPisZero().
|
static |
constraint display method of constraint handler
Definition at line 7093 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_OKAY, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPinfoMessage(), SCIPvarGetName(), SCIPvarGetNegatedVar(), and SCIPvarGetStatus().
|
static |
constraint copying method of constraint handler
Definition at line 7128 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, FALSE, NULL, propagate, SCIP_CALL, SCIP_OKAY, SCIP_VERBLEVEL_MINIMAL, SCIPaddCons(), SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPconsIsTransformed(), SCIPcreateConsIndicatorGenericLinCons(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPgetConsCopy(), SCIPgetTransformedCons(), SCIPgetVarCopy(), SCIPinfinity(), SCIPisTransformed(), SCIPreleaseCons(), SCIPverbMessage(), SCIPwarningMessage(), TRUE, and valid.
|
static |
constraint parsing method of constraint handler
Definition at line 7255 of file cons_indicator.c.
References assert(), FALSE, NULL, propagate, SCIP_CALL, SCIP_OKAY, SCIP_VERBLEVEL_MINIMAL, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPcreateConsIndicatorLinCons(), SCIPfindCons(), SCIPfindVar(), SCIPgetLhsLinear(), SCIPgetNegatedVar(), SCIPgetRhsLinear(), SCIPisInfinity(), SCIPsnprintf(), SCIPverbMessage(), and TRUE.
|
static |
constraint enabling notification method of constraint handler
Definition at line 7387 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, and unfixAltLPVariable().
|
static |
constraint disabling notification method of constraint handler
Definition at line 7423 of file cons_indicator.c.
References assert(), CONSHDLR_NAME, fixAltLPVariable(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPdebugMsg.
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 7459 of file cons_indicator.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetConsVars(), TRUE, and vars.
|
static |
constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 7506 of file cons_indicator.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetConsNVars(), and TRUE.
|
static |
constraint handler method to suggest dive bound changes during the generic diving algorithm
Definition at line 7550 of file cons_indicator.c.
References assert(), c, CONSHDLR_NAME, diveset, FALSE, NULL, roundup, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_DIVETYPE_INTEGRALITY, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPaddDiveBoundChange(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPgetBinaryVarIndicator(), SCIPgetDivesetScore(), SCIPgetSolVal(), SCIPisFeasIntegral(), SCIPisViolatedIndicator(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), sol, and TRUE.
|
static |
constraint handler method which returns the permutation symmetry detection graph of a constraint
Definition at line 7619 of file cons_indicator.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_PERM.
|
static |
constraint handler method which returns the signed permutation symmetry detection graph of a constraint
Definition at line 7628 of file cons_indicator.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_SIGNPERM.