constraint handler for linking constraints
The constraints handler stores linking constraints between a linking variable (integer or continuous) and an array of binary variables. Such a linking constraint has the form:
linkvar = sum_{i=1}^n {vals[i] * binvars[i]}
with the additional side condition that exactly one binary variable has to be one (set partitioning condition).
This constraint can be created only with the linking variable if it is an integer variable. In this case the binary variables are only created on demand. That is, whenever someone asks for the binary variables. Therefore, such constraints can be used to get a "binary representation" of the domain of the linking variable which will be dynamically created.
Definition in file cons_linking.c.
#include "blockmemshell/memory.h"
#include "scip/cons_linear.h"
#include "scip/cons_linking.h"
#include "scip/cons_setppc.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_misc_sort.h"
#include "scip/pub_var.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_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_tree.h"
#include "scip/scip_var.h"
#include "scip/symmetry_graph.h"
#include "symmetry/struct_symmetry.h"
#include <ctype.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | CONSHDLR_NAME "linking" |
#define | CONSHDLR_DESC "linking constraint x = sum_{i=1}^{n} c_i*y_i, y1+...+yn = 1, x real, y's binary" |
#define | EVENTHDLR_NAME "linking" |
#define | EVENTHDLR_DESC "event handler for linking constraints" |
#define | CONSHDLR_SEPAPRIORITY 750000 |
#define | CONSHDLR_ENFOPRIORITY -2050000 |
#define | CONSHDLR_CHECKPRIORITY -750000 |
#define | CONSHDLR_SEPAFREQ 1 |
#define | CONSHDLR_PROPFREQ 1 |
#define | CONSHDLR_EAGERFREQ 100 |
#define | CONSHDLR_MAXPREROUNDS -1 |
#define | CONSHDLR_DELAYSEPA FALSE |
#define | CONSHDLR_DELAYPROP FALSE |
#define | CONSHDLR_NEEDSCONS TRUE |
#define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
#define | CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM |
#define | HASHSIZE_BINVARSCONS 500 |
#define | DEFAULT_LINEARIZE FALSE |
#define CONSHDLR_NAME "linking" |
Definition at line 84 of file cons_linking.c.
#define CONSHDLR_DESC "linking constraint x = sum_{i=1}^{n} c_i*y_i, y1+...+yn = 1, x real, y's binary" |
Definition at line 85 of file cons_linking.c.
#define EVENTHDLR_NAME "linking" |
Definition at line 87 of file cons_linking.c.
#define EVENTHDLR_DESC "event handler for linking constraints" |
Definition at line 88 of file cons_linking.c.
#define CONSHDLR_SEPAPRIORITY 750000 |
priority of the constraint handler for separation
Definition at line 90 of file cons_linking.c.
#define CONSHDLR_ENFOPRIORITY -2050000 |
priority of the constraint handler for constraint enforcing
Definition at line 91 of file cons_linking.c.
#define CONSHDLR_CHECKPRIORITY -750000 |
priority of the constraint handler for checking feasibility
Definition at line 92 of file cons_linking.c.
#define CONSHDLR_SEPAFREQ 1 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 93 of file cons_linking.c.
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 94 of file cons_linking.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 95 of file cons_linking.c.
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 96 of file cons_linking.c.
#define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 97 of file cons_linking.c.
#define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 98 of file cons_linking.c.
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 99 of file cons_linking.c.
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
propagation timing mask of the constraint handler
Definition at line 101 of file cons_linking.c.
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM |
presolving timing of the constraint handler (fast, medium, or exhaustive)
Definition at line 102 of file cons_linking.c.
#define HASHSIZE_BINVARSCONS 500 |
minimal size of hash table in linking constraint handler
Definition at line 105 of file cons_linking.c.
Referenced by SCIPcreateConsLinking().
#define DEFAULT_LINEARIZE FALSE |
should the linking constraint be linearize after the binary variable are created
Definition at line 106 of file cons_linking.c.
|
static |
returns for a given linking variable the corresponding hash map key
var | variable to get the hash map key for |
Definition at line 146 of file cons_linking.c.
References SCIPvarGetIndex(), and var.
Referenced by SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSTRANS(), SCIPcreateConsLinking(), SCIPexistsConsLinking(), and SCIPgetConsLinking().
|
static |
consdata | linking constraint data |
Definition at line 156 of file cons_linking.c.
References SCIPsortRealPtr(), and TRUE.
Referenced by processBinvarFixings(), processRealBoundChg(), SCIPgetBinvarsDataLinking(), and SCIPgetValsLinking().
|
static |
installs rounding locks for the binary variables in the given linking constraint
scip | SCIP data structure |
cons | linking constraint |
binvars | binary variables |
nbinvars | number of binary variables |
Definition at line 172 of file cons_linking.c.
References b, nbinvars, SCIP_CALL, SCIP_OKAY, SCIPlockVarCons(), and TRUE.
Referenced by consdataCreateBinvars().
|
static |
creates constraint handler data for the linking constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to store the constraint handler data |
eventhdlr | event handler |
Definition at line 191 of file cons_linking.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by SCIPincludeConshdlrLinking().
|
static |
frees constraint handler data for linking constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to the constraint handler data |
Definition at line 214 of file cons_linking.c.
References assert(), NULL, SCIPfreeBlockMemory, and SCIPhashmapFree().
Referenced by SCIP_DECL_CONSFREE().
|
static |
prints linking constraint to file stream
scip | SCIP data structure |
consdata | linking constraint data |
file | output file (or NULL for standard output) |
Definition at line 232 of file cons_linking.c.
References assert(), FALSE, nbinvars, NULL, SCIP_CALL, SCIP_OKAY, SCIPinfoMessage(), SCIPwriteVarName(), and SCIPwriteVarsLinearsum().
Referenced by SCIP_DECL_CONSPRINT().
|
static |
catches events for variable at given position
scip | SCIP data structure |
consdata | linking constraint data |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 273 of file cons_linking.c.
References assert(), nbinvars, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPisEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and var.
Referenced by catchAllEvents().
|
static |
drops events for variable at given position
scip | SCIP data structure |
consdata | linking constraint data |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 305 of file cons_linking.c.
References assert(), nbinvars, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPdropVarEvent(), SCIPisEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and var.
Referenced by delCoefPos(), and dropAllEvents().
|
static |
catches bound change events for all variables in transformed linking constraint
scip | SCIP data structure |
consdata | linking constraint data |
eventhdlr | event handler to call for the event processing |
Definition at line 336 of file cons_linking.c.
References assert(), catchEvent(), i, NULL, SCIP_CALL, and SCIP_OKAY.
Referenced by consdataCreate(), and consdataCreateBinvars().
|
static |
drops bound change events for all variables in transformed linking constraint
scip | SCIP data structure |
consdata | linking constraint data |
eventhdlr | event handler to call for the event processing |
Definition at line 362 of file cons_linking.c.
References assert(), dropEvent(), i, NULL, SCIP_CALL, and SCIP_OKAY.
Referenced by SCIP_DECL_CONSDELETE().
|
static |
linearize the given linking constraint into a set partitioning constraint for the binary variables and a linear constraint for the linking between the linking variable and the binary variables
scip | SCIP data structure |
cons | linking constraint |
consdata | linking constraint data |
Definition at line 389 of file cons_linking.c.
References b, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLinear(), SCIPaddCons(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateConsSetpart(), SCIPdebugMsg, and SCIPreleaseCons().
Referenced by consdataCreateBinvars(), SCIP_DECL_CONSENABLE(), and SCIP_DECL_CONSINITPRE().
|
static |
creates the binary variables
scip | SCIP data structure |
cons | linking constraint |
consdata | linking constraint data |
eventhdlr | event handler for bound change events on binary variables |
linearize | should the linking constraint be linearized |
Definition at line 428 of file cons_linking.c.
References assert(), b, catchAllEvents(), consdataLinearize(), FALSE, lockRounding(), nbinvars, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPaddVar(), SCIPallocBlockMemoryArray, SCIPconvertRealToInt(), SCIPcreateVar(), SCIPdebugMsg, SCIPenableCons(), SCIPisTransformed(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIPcreateConsLinking(), and SCIPgetBinvarsLinking().
|
static |
creates consdata
scip | SCIP data structure |
eventhdlr | event handler to call for the event processing |
consdata | pointer to constraint data |
linkvar | linking variable which is linked |
binvars | binary variables |
vals | coefficients of the binary variables |
nbinvars | number of binary starting variables |
Definition at line 531 of file cons_linking.c.
References assert(), catchAllEvents(), FALSE, nbinvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPallocBlockMemory, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPgetTransformedVar(), SCIPgetTransformedVars(), SCIPisTransformed(), and SCIPvarGetType().
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsLinking().
|
static |
free consdata
scip | SCIP data structure |
consdata | pointer to consdata |
Definition at line 616 of file cons_linking.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPreleaseNlRow(), SCIPreleaseRow(), and SCIPreleaseVar().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
analyzes conflicting assignment on given constraint where reason comes from the linking variable lower or upper bound
scip | SCIP data structure |
cons | linking constraint to be processed |
linkvar | linking variable |
binvar | binary variable is the reason |
lblinkvar | lower bound of linking variable is the reason |
ublinkvar | upper bound of linking variable is the reason |
Definition at line 676 of file cons_linking.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPanalyzeConflictCons(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), and SCIPisConflictAnalysisApplicable().
Referenced by consFixLinkvar(), and processRealBoundChg().
|
static |
fix linking variable to the value of the binary variable at pos
scip | SCIP data structure |
cons | linking constraint to be processed |
pos | position of binary variable |
cutoff | pointer to store TRUE, if the node can be cut off |
Definition at line 724 of file cons_linking.c.
References analyzeConflict(), assert(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPisFeasEQ(), SCIPisFeasLE(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by processBinvarFixings().
|
static |
checks constraint for violation from the local bound of the linking variable, applies fixings to the binary variables if possible
scip | SCIP data structure |
cons | linking constraint to be processed |
cutoff | pointer to store TRUE, if the node can be cut off |
nchgbds | pointer to store the number of changes (foxed) variable bounds |
mustcheck | pointer to store whether this constraint must be checked for feasibility |
Definition at line 781 of file cons_linking.c.
References analyzeConflict(), assert(), b, consdataSort(), CONSHDLR_NAME, cutoff, FALSE, nbinvars, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_MULTAGGR, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpart(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPgetDepth(), SCIPinferBinvarCons(), SCIPisEQ(), SCIPisGT(), SCIPisLT(), SCIPreleaseCons(), SCIPvarGetAggrVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), TRUE, var, and vars.
Referenced by enforcePseudo(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPROP(), and separateCons().
|
static |
deletes coefficient at given position from the binary variable array
scip | SCIP data structure |
eventhdlr | event handler to call for the event processing |
cons | linking constraint |
pos | position of coefficient to delete |
Definition at line 981 of file cons_linking.c.
References assert(), dropEvent(), FALSE, nbinvars, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPreleaseVar(), SCIPunlockVarCons(), SCIPvarIsTransformed(), TRUE, and var.
Referenced by removeFixedBinvars().
|
static |
remove the trailing and leading binary variables that are fixed to zero
scip | SCIP data structure |
eventhdlr | event handler to call for the event processing |
cons | linking constraint |
Definition at line 1039 of file cons_linking.c.
References assert(), b, delCoefPos(), nbinvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIPconsGetData(), SCIPgetDepth(), SCIPgetStage(), SCIPinProbing(), SCIPinRepropagation(), and SCIPvarGetUbLocal().
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
tightened the linking variable due to binary variables which are fixed to zero
scip | SCIP data structure |
cons | linking constraint to be processed |
consdata | linking constraint to be processed |
cutoff | pointer to store TRUE, if the node can be cut off |
nchgbds | pointer to store the number of changed variable bounds |
Definition at line 1086 of file cons_linking.c.
References assert(), b, cutoff, FALSE, nbinvars, NULL, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_MULTAGGR, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPanalyzeConflictCons(), SCIPdebugMsg, SCIPgetStage(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE.
Referenced by processBinvarFixings(), and SCIP_DECL_CONSPRESOL().
|
static |
checks constraint for violation only looking at the fixed binary variables, applies further fixings if possible
scip | SCIP data structure |
cons | linking constraint to be processed |
cutoff | pointer to store TRUE, if the node can be cut off |
nchgbds | pointer to store the number of changed variable bounds |
addcut | pointer to store whether this constraint must be added as a cut |
mustcheck | pointer to store whether this constraint must be checked for feasibility |
Definition at line 1223 of file cons_linking.c.
References assert(), consdataSort(), consFixLinkvar(), CONSHDLR_NAME, cutoff, FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_MULTAGGR, SCIPaddConflictBinvar(), SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPgetStage(), SCIPinferBinvarCons(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), SCIPisFeasEQ(), SCIPisFeasZero(), SCIPisLT(), SCIPresetConsAge(), SCIPvarGetAggrVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), tightenedLinkvar(), TRUE, var, and vars.
Referenced by enforcePseudo(), and SCIP_DECL_CONSPROP().
returns whether the given solution is feasible for the given linking constraint
scip | SCIP data structure |
cons | linking constraint to be checked |
sol | primal solution, or NULL for current LP/pseudo solution |
Definition at line 1486 of file cons_linking.c.
References assert(), b, nbinvars, NULL, REALABS, SCIP_Bool, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPfeastol(), SCIPgetSolVal(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPrelDiff(), SCIPupdateSolLPConsViolation(), SCIPvarIsBinary(), and sol.
Referenced by enforcePseudo(), SCIP_DECL_CONSCHECK(), and separateCons().
|
static |
create two rows for the linking constraint
scip | SCIP data structure |
cons | linking constraint |
Definition at line 1661 of file cons_linking.c.
References assert(), b, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddVarsToRowSameCoef(), SCIPaddVarToRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), and SCIPsnprintf().
Referenced by addCuts().
|
static |
adds linking constraint as cut to the LP
scip | SCIP data structure |
cons | linking constraint |
cutoff | whether a cutoff has been detected |
Definition at line 1711 of file cons_linking.c.
References assert(), createRows(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIProwIsInLP(), and TRUE.
Referenced by SCIP_DECL_CONSINITLP(), and separateCons().
|
static |
adds linking constraint as rows to the NLP, if not added yet
scip | SCIP data structure |
cons | linking constraint |
Definition at line 1757 of file cons_linking.c.
References assert(), i, NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddLinearCoefToNlRow(), SCIPaddNlRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsLocal(), SCIPcreateNlRow(), SCIPfreeBufferArray, SCIPisNLPConstructed(), SCIPnlrowIsInNLP(), and SCIPsnprintf().
Referenced by SCIP_DECL_CONSACTIVE(), and SCIP_DECL_CONSINITSOL().
|
static |
checks constraint for violation, and adds it as a cuts if possible
scip | SCIP data structure |
cons | linking constraint to be separated |
sol | primal CIP solution, NULL for current LP solution |
cutoff | pointer to store TRUE, if the node can be cut off |
separated | pointer to store TRUE, if a cut was found |
nchgbds | pointer to store the number of changed variables bounds |
Definition at line 1815 of file cons_linking.c.
References addCuts(), assert(), checkCons(), CONSHDLR_NAME, cutoff, FALSE, MIN, NULL, processRealBoundChg(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetRowLPFeasibility(), SCIPincConsAge(), SCIPisFeasNegative(), SCIPresetConsAge(), SCIProwIsInLP(), sol, and TRUE.
Referenced by enforceConstraint(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
|
static |
enforces the pseudo solution on the given constraint
scip | SCIP data structure |
cons | linking constraint to be separated |
cutoff | pointer to store TRUE, if the node can be cut off |
infeasible | pointer to store TRUE, if the constraint was infeasible |
nchgbds | pointer to store the number of changed variable bounds |
solvelp | pointer to store TRUE, if the LP has to be solved |
Definition at line 1908 of file cons_linking.c.
References assert(), checkCons(), CONSHDLR_NAME, cutoff, FALSE, NULL, processBinvarFixings(), processRealBoundChg(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPhasCurrentNodeLP(), SCIPincConsAge(), SCIPresetConsAge(), and TRUE.
Referenced by SCIP_DECL_CONSENFOPS().
|
static |
helper function to enforce constraints
scip | SCIP data structure |
conshdlr | constraint handler |
conss | constraints to process |
nconss | number of constraints |
nusefulconss | number of useful (non-obsolete) constraints to process |
sol | solution to enforce (NULL for the LP solution) |
result | pointer to store the result of the enforcing call |
Definition at line 1966 of file cons_linking.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconshdlrGetName(), SCIPdebugMsg, separateCons(), and sol.
Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().
|
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 2019 of file cons_linking.c.
References assert(), i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPextendPermsymDetectionGraphLinear(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPgetSymActiveVariables(), SCIPisTransformed(), and vars.
Referenced by SCIP_DECL_CONSGETPERMSYMGRAPH(), and SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 2078 of file cons_linking.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrLinking(), TRUE, and valid.
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 2094 of file cons_linking.c.
References assert(), CONSHDLR_NAME, conshdlrdataFree(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrGetName().
|
static |
presolving initialization method of constraint handler (called when presolving is about to begin)
Definition at line 2114 of file cons_linking.c.
References assert(), c, consdataLinearize(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsAdded(), SCIPdelCons(), SCIPdisableCons(), and SCIPvarGetLbGlobal().
|
static |
solving process initialization method of constraint handler
Definition at line 2150 of file cons_linking.c.
References addNlrow(), c, SCIP_CALL, SCIP_OKAY, and SCIPisNLPConstructed().
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 2167 of file cons_linking.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPreleaseNlRow(), and SCIPreleaseRow().
|
static |
frees specific constraint data
Definition at line 2201 of file cons_linking.c.
References assert(), consdataFree(), CONSHDLR_NAME, dropAllEvents(), getHashmapKey(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPhashmapExists(), SCIPhashmapRemove(), and SCIPisTransformed().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 2233 of file cons_linking.c.
References assert(), consdataCreate(), CONSHDLR_NAME, getHashmapKey(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMsg, SCIPgetStage(), SCIPhashmapInsert(), and SCIPvarGetName().
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
Definition at line 2277 of file cons_linking.c.
References addCuts(), assert(), c, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPconsIsInitial().
|
static |
separation method of constraint handler for LP solutions
Definition at line 2303 of file cons_linking.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconshdlrGetName(), SCIPdebugMsg, and separateCons().
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 2343 of file cons_linking.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconshdlrGetName(), SCIPdebugMsg, separateCons(), and sol.
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 2383 of file cons_linking.c.
References enforceConstraint(), NULL, result, SCIP_CALL, and SCIP_OKAY.
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 2393 of file cons_linking.c.
References enforceConstraint(), result, SCIP_CALL, SCIP_OKAY, and sol.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 2403 of file cons_linking.c.
References assert(), c, CONSHDLR_NAME, cutoff, enforcePseudo(), FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SOLVELP, SCIPconshdlrGetName(), and SCIPdebugMsg.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 2452 of file cons_linking.c.
References assert(), b, c, checkCons(), CONSHDLR_NAME, NULL, result, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasEQ(), SCIPisFeasIntegral(), SCIPprintCons(), SCIProwIsInLP(), SCIPvarGetName(), SCIPvarIsBinary(), and sol.
|
static |
domain propagation method of constraint handler
Definition at line 2536 of file cons_linking.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, processBinvarFixings(), processRealBoundChg(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetName(), and SCIPdebugMsg.
|
static |
presolving method of constraint handler
Definition at line 2573 of file cons_linking.c.
References aggregateVariables(), assert(), c, CONSHDLR_NAME, cutoff, FALSE, nbinvars, NULL, processRealBoundChg(), removeFixedBinvars(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_NEGATED, SCIPaddClique(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPconsIsEnabled(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdelCons(), SCIPfixVar(), SCIPisStopped(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), tightenedLinkvar(), TRUE, and var.
|
static |
propagation conflict resolving method of constraint handler
Definition at line 2942 of file cons_linking.c.
References assert(), b, CONSHDLR_NAME, FALSE, nbinvars, NULL, result, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPdebugMsg, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPisEQ(), SCIPisFeasEQ(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), and TRUE.
|
static |
variable rounding lock method of constraint handler
Definition at line 3115 of file cons_linking.c.
References assert(), b, NULL, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), and SCIPconsGetData().
|
static |
constraint activation notification method of constraint handler
Definition at line 3139 of file cons_linking.c.
References addNlrow(), assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPgetStage(), and SCIPisNLPConstructed().
|
static |
constraint deactivation notification method of constraint handler
Definition at line 3156 of file cons_linking.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdelNlRow(), and SCIPgetStage().
|
static |
constraint enabling notification method of constraint handler
Definition at line 3182 of file cons_linking.c.
References assert(), consdataLinearize(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdelCons(), SCIPdisableCons(), and SCIPvarGetLbGlobal().
|
static |
constraint display method of constraint handler
Definition at line 3211 of file cons_linking.c.
References assert(), consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
|
static |
constraint copying method of constraint handler
Definition at line 3225 of file cons_linking.c.
References assert(), CONSHDLR_NAME, nbinvars, NULL, propagate, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPcreateConsLinking(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPgetVarCopy(), TRUE, and valid.
|
static |
constraint parsing method of constraint handler
Definition at line 3302 of file cons_linking.c.
References assert(), FALSE, nbinvars, NULL, propagate, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconvertRealToInt(), SCIPcreateConsLinking(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPisIntegral(), SCIPparseVarName(), SCIPparseVarsLinearsum(), SCIPreallocBufferArray, SCIPskipSpace(), and TRUE.
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 3399 of file cons_linking.c.
References assert(), BMScopyMemoryArray, FALSE, nbinvars, NULL, SCIP_OKAY, SCIPconsGetData(), TRUE, and vars.
|
static |
constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 3422 of file cons_linking.c.
References assert(), NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
|
static |
constraint handler method which returns the permutation symmetry detection graph of a constraint
Definition at line 3437 of file cons_linking.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 3446 of file cons_linking.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_SIGNPERM.
|
static |
execution method of event handler
Definition at line 3459 of file cons_linking.c.
References assert(), EVENTHDLR_NAME, NULL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPeventGetType(), and SCIPeventhdlrGetName().