constraint handler for bound disjunction constraints \((x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)\)
Definition in file cons_bounddisjunction.c.
#include "blockmemshell/memory.h"#include "scip/cons_bounddisjunction.h"#include "scip/cons_linear.h"#include "scip/cons_logicor.h"#include "scip/cons_setppc.h"#include "scip/expr_pow.h"#include "scip/expr_var.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_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_event.h"#include "scip/scip_expr.h"#include "scip/scip_general.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_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.
Macros | |
Constraint handler properties | |
| #define | CONSHDLR_NAME "bounddisjunction" |
| #define | CONSHDLR_DESC "bound disjunction constraints" |
| #define | CONSHDLR_ENFOPRIORITY -3000000 |
| #define | CONSHDLR_CHECKPRIORITY -3000000 |
| #define | CONSHDLR_PROPFREQ 1 |
| #define | CONSHDLR_EAGERFREQ 100 |
| #define | CONSHDLR_MAXPREROUNDS -1 |
| #define | CONSHDLR_DELAYPROP FALSE |
| #define | CONSHDLR_NEEDSCONS TRUE |
| #define | CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
| #define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Event handler properties | |
| #define | EVENTHDLR_NAME "bounddisjunction" |
| #define | EVENTHDLR_DESC "event handler for bound disjunction constraints" |
Conflict handler properties | |
| #define | CONFLICTHDLR_NAME "bounddisjunction" |
| #define | CONFLICTHDLR_DESC "conflict handler creating bound disjunction constraints" |
| #define | CONFLICTHDLR_PRIORITY -3000000 |
Default parameter values | |
| #define | DEFAULT_CONTINUOUSFRAC 0.4 |
Age increase defines | |
| #define | AGEINCREASE(n) |
Comparison for two values | |
| #define | isFeasLT(scip, var, val1, val2) |
| #define | isFeasLE(scip, var, val1, val2) |
| #define | isFeasGT(scip, var, val1, val2) |
| #define | isFeasGE(scip, var, val1, val2) |
| #define CONSHDLR_NAME "bounddisjunction" |
Definition at line 74 of file cons_bounddisjunction.c.
| #define CONSHDLR_DESC "bound disjunction constraints" |
Definition at line 75 of file cons_bounddisjunction.c.
| #define CONSHDLR_ENFOPRIORITY -3000000 |
priority of the constraint handler for constraint enforcing
Definition at line 76 of file cons_bounddisjunction.c.
| #define CONSHDLR_CHECKPRIORITY -3000000 |
priority of the constraint handler for checking feasibility
Definition at line 77 of file cons_bounddisjunction.c.
| #define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 78 of file cons_bounddisjunction.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 79 of file cons_bounddisjunction.c.
| #define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 81 of file cons_bounddisjunction.c.
| #define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 82 of file cons_bounddisjunction.c.
| #define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 83 of file cons_bounddisjunction.c.
| #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST |
Definition at line 85 of file cons_bounddisjunction.c.
| #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 86 of file cons_bounddisjunction.c.
| #define EVENTHDLR_NAME "bounddisjunction" |
Definition at line 95 of file cons_bounddisjunction.c.
Definition at line 96 of file cons_bounddisjunction.c.
| #define CONFLICTHDLR_NAME "bounddisjunction" |
Definition at line 105 of file cons_bounddisjunction.c.
Referenced by SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONFLICTFREE(), SCIPincludeConshdlrBounddisjunction(), SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLinear(), SCIPincludeConshdlrLogicor(), and SCIPincludeConshdlrSetppc().
| #define CONFLICTHDLR_DESC "conflict handler creating bound disjunction constraints" |
Definition at line 106 of file cons_bounddisjunction.c.
Referenced by SCIPincludeConshdlrBounddisjunction(), SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLinear(), SCIPincludeConshdlrLogicor(), and SCIPincludeConshdlrSetppc().
| #define CONFLICTHDLR_PRIORITY -3000000 |
Definition at line 107 of file cons_bounddisjunction.c.
Referenced by SCIPincludeConshdlrBounddisjunction(), SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLinear(), SCIPincludeConshdlrLogicor(), and SCIPincludeConshdlrSetppc().
| #define DEFAULT_CONTINUOUSFRAC 0.4 |
maximal percantage of continuous variables within a conflict
Definition at line 116 of file cons_bounddisjunction.c.
Referenced by SCIPincludeConshdlrBounddisjunction().
| #define AGEINCREASE | ( | n | ) |
Definition at line 127 of file cons_bounddisjunction.c.
Referenced by processWatchedVars().
Definition at line 147 of file cons_bounddisjunction.c.
Referenced by applyGlobalBounds(), consdataCreateRedundant(), createNAryBranch(), isLiteralViolated(), and registerBranchingCandidates().
Definition at line 148 of file cons_bounddisjunction.c.
Referenced by applyGlobalBounds(), consdataCreate(), consdataCreateRedundant(), createNAryBranch(), isConsViolated(), isLiteralSatisfied(), and removeFixedVariables().
Definition at line 149 of file cons_bounddisjunction.c.
Referenced by applyGlobalBounds(), consdataCreateRedundant(), createNAryBranch(), isLiteralViolated(), and registerBranchingCandidates().
Definition at line 150 of file cons_bounddisjunction.c.
Referenced by applyGlobalBounds(), consdataCreate(), consdataCreateRedundant(), createNAryBranch(), isConsViolated(), isLiteralSatisfied(), and removeFixedVariables().
|
static |
adds rounding locks for the given variable in the given bound disjunction constraint
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| consdata | bound disjunction constraint data |
| pos | position of the variable in the constraint |
Definition at line 182 of file cons_bounddisjunction.c.
References assert(), FALSE, NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_OKAY, SCIPlockVarCons(), and TRUE.
Referenced by addCoef().
|
static |
removes rounding locks for the given variable in the given bound disjunction constraint
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| consdata | bound disjunction constraint data |
| pos | position of the variable in the constraint |
Definition at line 206 of file cons_bounddisjunction.c.
References assert(), FALSE, NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), and TRUE.
Referenced by delCoefPos().
|
static |
catches the events on a single variable of the bound disjunction constraint
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| consdata | bound disjunction constraint data |
| eventhdlr | event handler to call for the event processing |
| pos | position of the variable in the constraint |
| filterpos | pointer to store position of event filter entry, or NULL |
Definition at line 230 of file cons_bounddisjunction.c.
References assert(), NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, and SCIPcatchVarEvent().
Referenced by SCIP_DECL_CONSACTIVE(), and switchWatchedvars().
|
static |
drops the events on a single variable of the bound disjunction constraint
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| consdata | bound disjunction constraint data |
| eventhdlr | event handler to call for the event processing |
| pos | position of the variable in the constraint |
| filterpos | position of event filter entry returned by SCIPcatchVarEvent(), or -1 |
Definition at line 258 of file cons_bounddisjunction.c.
References assert(), NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, and SCIPdropVarEvent().
Referenced by SCIP_DECL_CONSDEACTIVE(), and switchWatchedvars().
|
static |
creates constraint handler data for bound disjunction constraint handler
| scip | SCIP data structure |
| conshdlrdata | pointer to store the constraint handler data |
| eventhdlr | event handler |
Definition at line 286 of file cons_bounddisjunction.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by SCIPincludeConshdlrBounddisjunction().
|
static |
frees constraint handler data for bound disjunction constraint handler
Definition at line 306 of file cons_bounddisjunction.c.
References assert(), NULL, and SCIPfreeBlockMemory.
Referenced by SCIP_DECL_CONSFREE().
|
static |
creates a bound disjunction constraint data object
| scip | SCIP data structure |
| consdata | pointer to store the bound disjunction constraint data |
| nvars | number of variables in the constraint |
| vars | variables of the literals in the constraint |
| boundtypes | types of bounds of the literals (lower or upper bounds) |
| bounds | bounds of the literals |
Definition at line 319 of file cons_bounddisjunction.c.
References assert(), bound, FALSE, isFeasGE, isFeasLE, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemory, SCIPallocBufferArray, SCIPduplicateBlockMemoryArray, SCIPfreeBufferArray, SCIPgetTransformedVars(), SCIPisConsCompressionEnabled(), SCIPisEQ(), SCIPisTransformed(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsBounddisjunction().
|
static |
creates a bound disjunction constraint data object with possibly redundant literals
| scip | SCIP data structure |
| consdata | pointer to store the bound disjunction constraint data |
| nvars | number of variables in the constraint |
| vars | variables of the literals in the constraint |
| boundtypes | types of bounds of the literals (lower or upper bounds) |
| bounds | bounds of the literals |
Definition at line 452 of file cons_bounddisjunction.c.
References assert(), isFeasGE, isFeasGT, isFeasLE, isFeasLT, NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemory, SCIPduplicateBlockMemoryArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetTransformedVars(), SCIPisConsCompressionEnabled(), SCIPisEQ(), SCIPisTransformed(), SCIPsortPtrRealInt(), SCIPswapInts(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), var, and vars.
Referenced by SCIPcreateConsBounddisjunctionRedundant().
|
static |
frees a bound disjunction constraint data
Definition at line 646 of file cons_bounddisjunction.c.
References assert(), NULL, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.
Referenced by SCIP_DECL_CONSDELETE().
|
static |
prints bound disjunction constraint to file stream
| scip | SCIP data structure |
| consdata | bound disjunction constraint data |
| file | output file (or NULL for standard output) |
| endline | should an endline be set? |
Definition at line 662 of file cons_bounddisjunction.c.
References assert(), NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIPinfoMessage(), and SCIPvarGetName().
Referenced by applyGlobalBounds(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSDEACTIVE(), and SCIP_DECL_CONSPRINT().
|
static |
stores the given variable numbers as watched variables, and updates the event processing
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| eventhdlr | event handler to call for the event processing |
| watchedvar1 | new first watched variable |
| watchedvar2 | new second watched variable |
Definition at line 691 of file cons_bounddisjunction.c.
References assert(), catchEvents(), dropEvents(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPconsIsActive().
Referenced by addCoef(), delCoefPos(), and processWatchedVars().
|
static |
check whether two intervals overlap
Definition at line 760 of file cons_bounddisjunction.c.
References assert(), FALSE, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_Real, SCIPisLE(), SCIPvarIsIntegral(), TRUE, and var.
Referenced by addCoef(), SCIP_DECL_CONFLICTEXEC(), and SCIPcreateConsBounddisjunction().
|
static |
deletes coefficient at given position from bound disjunction constraint data
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| eventhdlr | event handler to call for the event processing |
| pos | position of coefficient to delete |
Definition at line 791 of file cons_bounddisjunction.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPenableConsPropagation(), SCIPvarIsTransformed(), switchWatchedvars(), and unlockRounding().
Referenced by applyGlobalBounds(), and removeFixedVariables().
|
static |
adds literal to bound disjunction constraint data
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| eventhdlr | event handler to call for the event processing |
| var | variable in literal |
| boundtype | boundtype of literal |
| bound | bound of literal |
| redundant | flag to indicate whether constraint has been bound redundant |
Definition at line 844 of file cons_bounddisjunction.c.
References assert(), bound, isOverlapping(), lockRounding(), NULL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcalcMemGrowSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPenableConsPropagation(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPreallocBlockMemoryArray, SCIPvarGetName(), SCIPvarIsTransformed(), switchWatchedvars(), TRUE, and var.
Referenced by removeFixedVariables().
|
static |
deletes all variables with global bounds violating the literal, checks for global bounds satisfying the literal
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| eventhdlr | event handler to call for the event processing |
| redundant | returns whether a variable fixed to one exists in the constraint |
Definition at line 949 of file cons_bounddisjunction.c.
References assert(), consdataPrint(), delCoefPos(), FALSE, isFeasGE, isFeasGT, isFeasLE, isFeasLT, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcomputeVarLbGlobal(), SCIPcomputeVarUbGlobal(), SCIPconsGetData(), SCIPdebug, SCIPdebugMsg, TRUE, and var.
Referenced by SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
|
static |
returns whether literal at the given position is satisfied in the local bounds
| scip | SCIP data structure |
| consdata | bound disjunction constraint data |
| pos | position of the literal |
Definition at line 1024 of file cons_bounddisjunction.c.
References assert(), isFeasGE, isFeasLE, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_Real, SCIPcomputeVarLbLocal(), and SCIPcomputeVarUbLocal().
Referenced by createNAryBranch(), processWatchedVars(), registerBranchingCandidates(), removeFixedVariables(), and SCIP_DECL_CONSPRESOL().
|
static |
returns whether literal at the given position is violated in the local bounds
| scip | SCIP data structure |
| consdata | bound disjunction constraint data |
| pos | position of the literal |
Definition at line 1049 of file cons_bounddisjunction.c.
References assert(), isFeasGT, isFeasLT, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_Real, SCIPcomputeVarLbLocal(), and SCIPcomputeVarUbLocal().
Referenced by processWatchedVars(), removeFixedVariables(), and SCIP_DECL_CONSPRESOL().
|
static |
replace variables by their representative active (or multi-aggregated) variables
| scip | SCIP data structure |
| cons | bound disjunction constraint |
| eventhdlr | event handler |
| redundant | flag to indicate whether constraint has been bound redundant |
Definition at line 1074 of file cons_bounddisjunction.c.
References addCoef(), assert(), bound, delCoefPos(), isFeasGE, isFeasLE, isLiteralSatisfied(), isLiteralViolated(), NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), TRUE, and var.
Referenced by SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
|
static |
try to upgrade the bounddisjunction constraint
if only binary variables are left, we can upgrade a bounddisjunction to a logicor constraint(, if only two variables are left, this logicor constraint can be formulated as set-packing constraint as well)
e.g.: bounddisjunction( x1 >= 1, x2 <= 0; x3 >= 1; x4 <= 0 ) => x1 + ~x2 + x3 + ~x4 >= 1
| scip | SCIP data structure |
| cons | bound disjunction constraint that detected the conflict |
| ndelconss | pointer to store the number of delete constraint |
| naddconss | pointer to store the number of added constraint |
Definition at line 1166 of file cons_bounddisjunction.c.
References assert(), FALSE, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIPaddConsUpgrade(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLogicor(), SCIPcreateConsSetpack(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPvarIsBinary(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
analyzes conflicting assignment on given constraint, and adds conflict constraint to problem
Definition at line 1271 of file cons_bounddisjunction.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictBd(), SCIPanalyzeConflictCons(), SCIPboundtypeOpposite(), SCIPconsGetData(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), and SCIPisConflictAnalysisApplicable().
Referenced by processWatchedVars().
|
static |
disables or deletes the given constraint, depending on the current depth
Definition at line 1303 of file cons_bounddisjunction.c.
References assert(), SCIP_CALL, SCIP_OKAY, SCIPconsGetValidDepth(), SCIPdelCons(), SCIPdisableCons(), and SCIPgetDepth().
Referenced by processWatchedVars().
|
static |
checks constraint for violation only looking at the watched variables, applies bound changes if possible
| scip | SCIP data structure |
| cons | bound disjunction constraint to be processed |
| eventhdlr | event handler to call for the event processing |
| cutoff | pointer to store TRUE, if the node can be cut off |
| infeasible | pointer to store TRUE, if the constraint is infeasible in current bounds |
| reduceddom | pointer to store TRUE, if a domain reduction was found |
| mustcheck | pointer to store whether this constraint must be checked for feasibility |
Definition at line 1324 of file cons_bounddisjunction.c.
References AGEINCREASE, analyzeConflict(), assert(), CONSHDLR_NAME, cutoff, disableCons(), FALSE, isLiteralSatisfied(), isLiteralViolated(), NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddConsAge(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdisableConsPropagation(), SCIPgetDepth(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPresetConsAge(), SCIPvarGetName(), SCIPvarGetNBranchingsCurrentRun(), SCIPvarGetProbvar(), SCIPvarGetStatus(), switchWatchedvars(), TRUE, and vars.
Referenced by enforceCurrentSol(), and SCIP_DECL_CONSPROP().
checks constraint for violation, returns TRUE iff constraint is violated
| scip | SCIP data structure |
| cons | bound disjunction constraint to be checked |
| sol | primal CIP solution |
Definition at line 1577 of file cons_bounddisjunction.c.
References assert(), FALSE, isFeasGE, isFeasLE, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_Real, SCIP_REAL_MAX, SCIPconsGetData(), SCIPgetSolVal(), SCIPrelDiff(), SCIPupdateSolConsViolation(), sol, TRUE, and vars.
Referenced by enforceCurrentSol(), and SCIP_DECL_CONSCHECK().
|
static |
| scip | SCIP data structure |
| cons | bound disjunction constraint which variables should be registered for branching |
| sol | solution (NULL for LP solution) |
| cutoff | pointer to store whether the constraint cannot be made feasible by branching |
| neednarybranch | pointer to store TRUE, if n-ary branching is necessary to enforce this constraint |
Definition at line 1648 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, cutoff, FALSE, isFeasGT, isFeasLT, isLiteralSatisfied(), NULL, nvars, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPcomputeVarLbLocal(), SCIPcomputeVarUbLocal(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetSolVal(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPvarIsIntegral(), sol, TRUE, var, and vars.
Referenced by enforceCurrentSol().
|
static |
enforces the pseudo or LP solution on the given constraint
| scip | SCIP data structure |
| cons | bound disjunction constraint to be separated |
| sol | solution which should be enforced (NULL for LP solution) |
| eventhdlr | event handler to call for the event processing |
| cutoff | pointer to store TRUE, if the node can be cut off |
| infeasible | pointer to store TRUE, if the constraint was infeasible |
| reduceddom | pointer to store TRUE, if a domain reduction was found |
| registeredbrcand | pointer to store TRUE, if branching variable candidates were registered or was already true |
Definition at line 1735 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, cutoff, isConsViolated(), NULL, processWatchedVars(), registerBranchingCandidates(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsPropagationEnabled(), SCIPdebugMsg, SCIPresetConsAge(), sol, and TRUE.
Referenced by enforceConstraint(), and SCIP_DECL_CONSENFOPS().
|
static |
enforces a constraint by creating an n-ary branch consisting of a set of child nodes, each enforcing one literal
| scip | SCIP data structure |
| cons | bound disjunction constraint to branch on |
| sol | solution which should be enforced (NULL for LP solution) |
Definition at line 1789 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, isFeasGE, isFeasGT, isFeasLE, isFeasLT, isLiteralSatisfied(), NULL, nvars, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddConsNode(), SCIPcalcChildEstimate(), SCIPcalcNodeselPriority(), SCIPchgVarLbNode(), SCIPchgVarUbNode(), SCIPcomputeVarLbLocal(), SCIPcomputeVarUbLocal(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateChild(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdelConsNode(), SCIPgetSolVal(), SCIPinfinity(), SCIPreleaseCons(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIsActive(), sol, var, and vars.
Referenced by enforceConstraint(), and SCIP_DECL_CONSENFOPS().
|
static |
helper function to enforce constraints
| scip | SCIP data structure |
| conshdlr | constraint handler |
| conss | constraints to process |
| nconss | number of constraints |
| sol | solution to enforce (NULL for the LP solution) |
| result | pointer to store the result of the enforcing call |
Definition at line 1909 of file cons_bounddisjunction.c.
References assert(), c, CONSHDLR_NAME, createNAryBranch(), cutoff, enforceCurrentSol(), FALSE, NULL, nvars, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, 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 1988 of file cons_bounddisjunction.c.
References assert(), bound, FALSE, i, NULL, nvars, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphConsnode(), SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPaddSymgraphVarAggregation(), SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPgetSymActiveVariables(), SCIPisTransformed(), SYM_CONSOPTYPE_BDDISJ, SYM_CONSOPTYPE_SUM, TRUE, 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 2079 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrBounddisjunction(), TRUE, and valid.
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 2095 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, conshdlrdataFree(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconshdlrSetData().
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 2117 of file cons_bounddisjunction.c.
References applyGlobalBounds(), assert(), c, CONSHDLR_NAME, NULL, removeFixedVariables(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsAdded(), SCIPconsIsDeleted(), SCIPdebugMsg, and SCIPdelCons().
|
static |
solving process initialization method of constraint handler
Definition at line 2163 of file cons_bounddisjunction.c.
References a, assert(), b, c, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_Real, SCIPaddNlRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsLocal(), SCIPcreateExprPow(), SCIPcreateExprVar(), SCIPcreateNlRow(), SCIPinfinity(), SCIPisNLPConstructed(), SCIPreleaseExpr(), and SCIPreleaseNlRow().
|
static |
frees specific constraint data
Definition at line 2239 of file cons_bounddisjunction.c.
References assert(), consdataFree(), CONSHDLR_NAME, NULL, SCIP_OKAY, and SCIPconshdlrGetName().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 2255 of file cons_bounddisjunction.c.
References assert(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), and SCIPgetStage().
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 2288 of file cons_bounddisjunction.c.
References enforceConstraint(), NULL, result, SCIP_CALL, and SCIP_OKAY.
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 2298 of file cons_bounddisjunction.c.
References enforceConstraint(), result, SCIP_CALL, SCIP_OKAY, and sol.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 2308 of file cons_bounddisjunction.c.
References assert(), c, CONSHDLR_NAME, createNAryBranch(), cutoff, enforceCurrentSol(), FALSE, NULL, nvars, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPdebugMsg.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 2372 of file cons_bounddisjunction.c.
References assert(), c, CONSHDLR_NAME, isConsViolated(), NULL, result, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPprintCons(), SCIPvarGetName(), and sol.
|
static |
domain propagation method of constraint handler
Definition at line 2422 of file cons_bounddisjunction.c.
References assert(), c, CONSHDLR_NAME, cutoff, FALSE, NULL, processWatchedVars(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), and SCIPconshdlrGetName().
|
static |
presolving method of constraint handler
Definition at line 2466 of file cons_bounddisjunction.c.
References applyGlobalBounds(), assert(), c, CONSHDLR_NAME, isLiteralSatisfied(), isLiteralViolated(), NULL, removeFixedVariables(), result, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIP_VARSTATUS_MULTAGGR, SCIPaddConsUpgrade(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdelCons(), SCIPenableConsPropagation(), SCIPinfinity(), SCIPisStopped(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and upgradeCons().
|
static |
propagation conflict resolving method of constraint handler
Definition at line 2619 of file cons_bounddisjunction.c.
References assert(), CONSHDLR_NAME, NULL, nvars, result, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIP_VARSTATUS_MULTAGGR, SCIPaddConflictBd(), SCIPboundtypeOpposite(), SCIPconsGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGT(), SCIPisLT(), SCIPvarGetStatus(), TRUE, and vars.
|
static |
variable rounding lock method of constraint handler
Definition at line 2687 of file cons_bounddisjunction.c.
References assert(), i, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocksType(), and SCIPconsGetData().
|
static |
constraint activation notification method of constraint handler
Definition at line 2714 of file cons_bounddisjunction.c.
References assert(), catchEvents(), consdataPrint(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebug, SCIPdebugMsg, and TRUE.
|
static |
constraint deactivation notification method of constraint handler
Definition at line 2751 of file cons_bounddisjunction.c.
References assert(), consdataPrint(), CONSHDLR_NAME, dropEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebug, SCIPdebugMsg, and TRUE.
|
static |
constraint display method of constraint handler
Definition at line 2790 of file cons_bounddisjunction.c.
References assert(), consdataPrint(), FALSE, NULL, SCIP_OKAY, and SCIPconsGetData().
|
static |
constraint copying method of constraint handler
Definition at line 2803 of file cons_bounddisjunction.c.
References assert(), NULL, nvars, propagate, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetName(), SCIPcreateConsBounddisjunction(), SCIPfreeBufferArray, SCIPgetBoundsBounddisjunction(), SCIPgetBoundtypesBounddisjunction(), SCIPgetNVarsBounddisjunction(), SCIPgetVarCopy(), SCIPgetVarsBounddisjunction(), separate(), TRUE, and valid.
|
static |
constraint parsing method of constraint handler
Definition at line 2845 of file cons_bounddisjunction.c.
References assert(), FALSE, NULL, nvars, propagate, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPallocBufferArray, SCIPcreateConsBounddisjunction(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPparseReal(), SCIPparseVarName(), SCIPreallocBufferArray, SCIPskipSpace(), SCIPvarGetName(), SCIPverbMessage(), separate(), TRUE, var, and vars.
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 2982 of file cons_bounddisjunction.c.
References assert(), BMScopyMemoryArray, FALSE, NULL, nvars, SCIP_OKAY, SCIPconsGetData(), TRUE, and vars.
|
static |
constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 3006 of file cons_bounddisjunction.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 3023 of file cons_bounddisjunction.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 3032 of file cons_bounddisjunction.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_SIGNPERM.
|
static |
Definition at line 3047 of file cons_bounddisjunction.c.
References assert(), EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDRELAXED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsActive(), SCIPconsIsUpdatedeactivate(), SCIPenableCons(), SCIPenableConsPropagation(), SCIPeventGetType(), and SCIPeventhdlrGetName().
|
static |
conflict processing method of conflict handler (called when conflict was found)
Definition at line 3086 of file cons_bounddisjunction.c.
References assert(), bound, CONFLICTHDLR_NAME, FALSE, i, isOverlapping(), NULL, result, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddConflict(), SCIPallocBufferArray, SCIPbdchginfoGetBoundtype(), SCIPbdchginfoGetNewbound(), SCIPbdchginfoGetVar(), SCIPboundtypeOpposite(), SCIPconflicthdlrGetData(), SCIPconflicthdlrGetName(), SCIPcreateConsBounddisjunction(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetNConflictConssApplied(), SCIPgetNRuns(), SCIPisFeasEQ(), SCIPisGE(), SCIPisGT(), SCIPisLE(), SCIPisLT(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), TRUE, var, and vars.
|
static |
free method of conflict handler
Definition at line 3228 of file cons_bounddisjunction.c.
References assert(), NULL, SCIP_OKAY, SCIPconflicthdlrGetData(), and SCIPfreeBlockMemory.