Detailed Description
methods and files provided by the default constraint handlers of SCIP
A detailed description what a constraint handler does and how to add a constraint handler to SCIP can be found here.
Data Structures | |
struct | SCIP_ConsNonlinear_Auxexpr |
struct | SCIP_ConsNonlinear_BilinTerm |
Modules | |
Inclusion methods | |
methods to include specific constraint handlers into SCIP | |
Files | |
file | cons_abspower.h |
some API functions of removed constraint handler for absolute power constraints \(\textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs}\) | |
file | cons_and.c |
Constraint handler for AND-constraints, \(r = x_1 \wedge x_2 \wedge \dots \wedge x_n\). | |
file | cons_and.h |
Constraint handler for AND constraints, \(r = x_1 \wedge x_2 \wedge \dots \wedge x_n\). | |
file | cons_benders.h |
constraint handler for Benders' decomposition | |
file | cons_benderslp.h |
constraint handler for benderslp decomposition | |
file | cons_bounddisjunction.h |
constraint handler for bound disjunction constraints \((x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n)\) | |
file | cons_cardinality.h |
constraint handler for cardinality constraints | |
file | cons_conjunction.h |
constraint handler for conjunction constraints | |
file | cons_countsols.h |
Constraint handler for counting feasible solutions. | |
file | cons_cumulative.h |
constraint handler for cumulative constraints | |
file | cons_disjunction.h |
constraint handler for disjunction constraints | |
file | cons_indicator.h |
constraint handler for indicator constraints | |
file | cons_integral.h |
constraint handler for the integrality constraint | |
file | cons_knapsack.h |
Constraint handler for knapsack constraints of the form \(a^T x \le b\), x binary and \(a \ge 0\). | |
file | cons_linear.h |
Constraint handler for linear constraints in their most general form, \(lhs <= a^T x <= rhs\). | |
file | cons_linking.h |
constraint handler for linking binary variables to a linking (continuous or integer) variable | |
file | cons_logicor.h |
Constraint handler for logicor constraints \(1^T x \ge 1\) (equivalent to set covering, but algorithms are suited for depth first search). | |
file | cons_nonlinear.h |
constraint handler for nonlinear constraints specified by algebraic expressions | |
file | cons_or.h |
Constraint handler for "or" constraints, \(r = x_1 \vee x_2 \vee \dots \vee x_n\). | |
file | cons_orbisack.h |
constraint handler for orbisack constraints | |
file | cons_orbitope.h |
constraint handler for (partitioning/packing/full) orbitope constraints w.r.t. the full symmetric group | |
file | cons_pseudoboolean.h |
constraint handler for pseudoboolean constraints | |
file | cons_quadratic.h |
some API functions of removed constraint handler for quadratic constraints \(\textrm{lhs} \leq \sum_{i,j} a_{i,j} x_ix_j + \sum_i b_i x_i \leq \textrm{rhs}\) | |
file | cons_setppc.h |
Constraint handler for the set partitioning / packing / covering constraints \(1^T x\ \{=, \le, \ge\}\ 1\). | |
file | cons_soc.h |
some API functions of removed constraint handler for second order cone constraints \(\sqrt{\gamma + \sum_{i=1}^{n} (\alpha_i\, (x_i + \beta_i))^2} \leq \alpha_{n+1}\, (x_{n+1}+\beta_{n+1})\) | |
file | cons_sos1.h |
constraint handler for SOS type 1 constraints | |
file | cons_sos2.h |
constraint handler for SOS type 2 constraints | |
file | cons_superindicator.h |
constraint handler for indicator constraints over arbitrary constraint types | |
file | cons_symresack.h |
constraint handler for symresack constraints | |
file | cons_varbound.h |
Constraint handler for variable bound constraints \(lhs \leq x + c y \leq rhs\). | |
file | cons_xor.h |
Constraint handler for XOR constraints, \(rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n\). | |
file | cons_rpa.h |
constraint handler for ringpacking | |
file | cons_optcumulative.c |
constraint handler for cumulative constraints with optional activities | |
Abspower Constraints (deprecated) | |
SCIP_RETCODE | SCIPcreateConsAbspower (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicAbspower (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPgetNlRowAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
AND Constraints | |
This constraint handler deals with AND-constraints. These are constraint of the form: \[ r = x_1 \wedge x_2 \wedge \dots \wedge x_n \] where \(x_i\) is a binary variable for all \(i\). Hence, \(r\) is also of binary type. The variable \(r\) is called resultant and the \(x\)'s operators. | |
SCIP_RETCODE | SCIPcreateConsAnd (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicAnd (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars) |
int | SCIPgetNVarsAnd (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsAnd (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetResultantAnd (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPisAndConsSorted (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsortAndCons (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPchgAndConsCheckFlagWhenUpgr (SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag) |
SCIP_RETCODE | SCIPchgAndConsRemovableFlagWhenUpgr (SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag) |
Benders Constraints | |
Two constraint handlers are implemented for the generation of Benders' decomposition cuts. When included in a problem, the Benders' decomposition constraint handlers generate cuts during the enforcement of LP and relaxation solutions. Additionally, Benders' decomposition cuts can be generated when checking the feasibility of solutions with respect to the subproblem constraints. This constraint handler has an enforcement priority that is less than the integer constraint handler. This means that only integer feasible solutions from the LP solver are enforced by this constraint handler. This is the traditional behaviour of the branch-and-check approach to Benders' decomposition. Additionally, the check priority is set low, such that this expensive constraint handler is only called as a final check on primal feasible solutions. This constraint handler in the standard constraint handler that should be added when using Benders' decomposition. Additionally, there is a flag in SCIPincludeConshdlrBenders that permits the addition of the LP constraint handler, cons_benderslp. The use of both cons_benders and cons_benderslp allows the user to perform a multiphase Benders' decomposition algorithm. | |
SCIP_RETCODE | SCIPconsBendersEnforceSolution (SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLR *conshdlr, SCIP_RESULT *result, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint) |
Bound Disjunction Constraints | |
This constraint handler handles bound disjunction constraints of the form \[ (x_1 \{\leq,\geq\} b_1) \vee \ldots \vee (x_n \{\leq,\geq\} b_n) \] with bounds \(b_i \in Q\), decision variables \(x_i\), which can be of any type, and bound types \(\leq\) or \(\geq\). | |
SCIP_RETCODE | SCIPcreateConsBounddisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicBounddisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds) |
SCIP_RETCODE | SCIPcreateConsBounddisjunctionRedundant (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicBounddisjunctionRedundant (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds) |
int | SCIPgetNVarsBounddisjunction (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsBounddisjunction (SCIP *scip, SCIP_CONS *cons) |
SCIP_BOUNDTYPE * | SCIPgetBoundtypesBounddisjunction (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetBoundsBounddisjunction (SCIP *scip, SCIP_CONS *cons) |
Cardinality Constraints | |
This constraint handler handles cardinality constraints of the form \[ |\mbox{supp}(x)| \leq b \] with integer right-hand side \(b\). Here, \(|\mbox{supp}(x)|\) denotes the number of nonzero entries of the vector \(x\). Cardinality constraints generalize special ordered set of type one (SOS1) constraints in which \(b = 1\). | |
SCIP_RETCODE | SCIPcreateConsCardinality (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int cardval, SCIP_VAR **indvars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicCardinality (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int cardval, SCIP_VAR **indvars, SCIP_Real *weights) |
SCIP_RETCODE | SCIPchgCardvalCardinality (SCIP *scip, SCIP_CONS *cons, int cardval) |
SCIP_RETCODE | SCIPaddVarCardinality (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar, SCIP_Real weight) |
SCIP_RETCODE | SCIPappendVarCardinality (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar) |
int | SCIPgetNVarsCardinality (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsCardinality (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetCardvalCardinality (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetWeightsCardinality (SCIP *scip, SCIP_CONS *cons) |
Conjunction Constraints | |
A conjunction constraint \( C \) is a constraint of the form \[ C = C_1 \wedge \dots \wedge C_n \] where all the \( C_i \) are individual constraints themselves. | |
SCIP_RETCODE | SCIPcreateConsConjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic) |
SCIP_RETCODE | SCIPcreateConsBasicConjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss) |
SCIP_RETCODE | SCIPaddConsElemConjunction (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons) |
Constraint Handler for counting solutions | |
If this constraint handler is activated than it counts or collects all feasible solutions. We refer to How to use SCIP to count/enumerate feasible solutions for more details about using SCIP for counting feasible solutions. | |
SCIP_DECL_DIALOGEXEC (SCIPdialogExecCountPresolve) | |
SCIP_DECL_DIALOGEXEC (SCIPdialogExecCount) | |
SCIP_DECL_DIALOGEXEC (SCIPdialogExecWriteAllsolutions) | |
SCIP_RETCODE | SCIPcount (SCIP *scip) |
SCIP_Longint | SCIPgetNCountedSols (SCIP *scip, SCIP_Bool *valid) |
void | SCIPgetNCountedSolsstr (SCIP *scip, char **buffer, int buffersize, int *requiredsize) |
SCIP_Longint | SCIPgetNCountedFeasSubtrees (SCIP *scip) |
void | SCIPgetCountedSparseSols (SCIP *scip, SCIP_VAR ***vars, int *nvars, SCIP_SPARSESOL ***sols, int *nsols) |
SCIP_RETCODE | SCIPsetParamsCountsols (SCIP *scip) |
Cumulative Constraints | |
The cumulative constraint ensures that for each point in time \(t\) \(\sum_{j: S_j \leq t < S_j + p_j} d_j \leq C\) holds.
| |
SCIP_RETCODE | SCIPcreateConsCumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicCumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity) |
SCIP_RETCODE | SCIPsetHminCumulative (SCIP *scip, SCIP_CONS *cons, int hmin) |
int | SCIPgetHminCumulative (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsetHmaxCumulative (SCIP *scip, SCIP_CONS *cons, int hmax) |
int | SCIPgetHmaxCumulative (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsCumulative (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNVarsCumulative (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetCapacityCumulative (SCIP *scip, SCIP_CONS *cons) |
int * | SCIPgetDurationsCumulative (SCIP *scip, SCIP_CONS *cons) |
int * | SCIPgetDemandsCumulative (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcheckCumulativeCondition (SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool *violated, SCIP_CONS *cons, SCIP_Bool printreason) |
SCIP_RETCODE | SCIPnormalizeCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int *capacity, int *nchgcoefs, int *nchgsides) |
SCIP_RETCODE | SCIPsplitCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split) |
SCIP_RETCODE | SCIPpresolveCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int hmin, int hmax, SCIP_Bool *downlocks, SCIP_Bool *uplocks, SCIP_CONS *cons, SCIP_Bool *delvars, int *nfixedvars, int *nchgsides, SCIP_Bool *cutoff) |
SCIP_RETCODE | SCIPpropCumulativeCondition (SCIP *scip, SCIP_PRESOLTIMING presoltiming, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, int *nchgbds, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff) |
SCIP_RETCODE | SCIPrespropCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_Bool *explanation, SCIP_RESULT *result) |
SCIP_RETCODE | SCIPvisualizeConsCumulative (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsetSolveCumulative (SCIP *scip, SCIP_DECL_SOLVECUMULATIVE((*solveCumulative))) |
SCIP_RETCODE | SCIPsolveCumulative (SCIP *scip, int njobs, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Real *objvals, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Longint maxnodes, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *error) |
SCIP_RETCODE | SCIPcreateWorstCaseProfile (SCIP *scip, SCIP_PROFILE *profile, int nvars, SCIP_VAR **vars, int *durations, int *demands) |
int | SCIPcomputeHmin (SCIP *scip, SCIP_PROFILE *profile, int capacity) |
int | SCIPcomputeHmax (SCIP *scip, SCIP_PROFILE *profile, int capacity) |
#define | SCIP_DECL_SOLVECUMULATIVE(x) |
Disjunction Constraints | |
A disjunction constraint \( C \) is a constraint of the form \[ C = C_1 \vee \dots \vee C_n \] where all the \( C_i \) are individual constraints themselves. | |
SCIP_RETCODE | SCIPcreateConsDisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons, SCIP_Bool initial, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic) |
SCIP_RETCODE | SCIPcreateConsBasicDisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons) |
SCIP_RETCODE | SCIPaddConsElemDisjunction (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons) |
Indicator Constraints | |
An indicator constraint is given by a binary variable \(z\) and an inequality \(ax \leq b\). It states that if \(z = 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 \(z = 1\).
This constraint is equivalent to a linear constraint \(ax - s \leq b\) and an SOS1 constraint on \(z\) and \(s\) (at most one should be nonzero). In the indicator context we can, however, separate more inequalities. | |
SCIP_RETCODE | SCIPcreateConsIndicator (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicIndicator (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs) |
SCIP_RETCODE | SCIPcreateConsIndicatorGeneric (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool activeone, SCIP_Bool lessthanineq, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsIndicatorLinCons (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsIndicatorGenericLinCons (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool activeone, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicIndicatorLinCons (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar) |
SCIP_RETCODE | SCIPaddVarIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
SCIP_CONS * | SCIPgetLinearConsIndicator (SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsetLinearConsIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons) |
SCIP_RETCODE | SCIPsetBinaryVarIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar) |
SCIP_Bool | SCIPgetActiveOnIndicator (SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetBinaryVarIndicator (SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetBinaryVarIndicatorGeneric (SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetSlackVarIndicator (SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsetSlackVarUb (SCIP *scip, SCIP_CONS *cons, SCIP_Real ub) |
SCIP_Bool | SCIPisViolatedIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
SCIP_RETCODE | SCIPmakeIndicatorFeasible (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed) |
SCIP_RETCODE | SCIPmakeIndicatorsFeasible (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed) |
SCIP_RETCODE | SCIPaddLinearConsIndicator (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons) |
SCIP_RETCODE | SCIPaddRowIndicator (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row) |
Knapsack Constraints | |
This constraint handler handles a special type of linear constraints, namely knapsack constraints. A knapsack constraint has the form \[ \sum_{i=1}^n a_i x_i \leq b \] with non-negative integer coefficients \(a_i\), integer right-hand side \(b\), and binary variables \(x_i\). | |
SCIP_RETCODE | SCIPcreateConsKnapsack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicKnapsack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity) |
SCIP_RETCODE | SCIPaddCoefKnapsack (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Longint weight) |
SCIP_Longint | SCIPgetCapacityKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPchgCapacityKnapsack (SCIP *scip, SCIP_CONS *cons, SCIP_Longint capacity) |
int | SCIPgetNVarsKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_Longint * | SCIPgetWeightsKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualsolKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualfarkasKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_ROW * | SCIPgetRowKnapsack (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsolveKnapsackExactly (SCIP *scip, int nitems, SCIP_Longint *weights, SCIP_Real *profits, SCIP_Longint capacity, int *items, int *solitems, int *nonsolitems, int *nsolitems, int *nnonsolitems, SCIP_Real *solval, SCIP_Bool *success) |
SCIP_RETCODE | SCIPsolveKnapsackApproximately (SCIP *scip, int nitems, SCIP_Longint *weights, SCIP_Real *profits, SCIP_Longint capacity, int *items, int *solitems, int *nonsolitems, int *nsolitems, int *nnonsolitems, SCIP_Real *solval) |
SCIP_RETCODE | SCIPseparateKnapsackCuts (SCIP *scip, SCIP_CONS *cons, SCIP_SEPA *sepa, SCIP_VAR **vars, int nvars, SCIP_Longint *weights, SCIP_Longint capacity, SCIP_SOL *sol, SCIP_Bool usegubs, SCIP_Bool *cutoff, int *ncuts) |
SCIP_RETCODE | SCIPseparateRelaxedKnapsack (SCIP *scip, SCIP_CONS *cons, SCIP_SEPA *sepa, int nknapvars, SCIP_VAR **knapvars, SCIP_Real *knapvals, SCIP_Real valscale, SCIP_Real rhs, SCIP_SOL *sol, SCIP_Bool *cutoff, int *ncuts) |
SCIP_RETCODE | SCIPcleanupConssKnapsack (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible) |
Linear Constraints | |
This constraint handler handles linear constraints in their most general form. That is, \[ lhs \leq \sum_{i=1}^n a_i x_i \leq rhs \] with \(a_i \in Q, i = 1,\dots,n\), \(lhs\in Q \cup \{-\infty\}\), \(rhs\in Q \cup \{\infty\}\), and decision variables \(x_i, i = 1,\dots,n\) which can be binary, integer, or continuous. Furthermore, this header offers the upgrade functionality of a general linear constraint into a more specific constraint, such as a knapsack constraint, via SCIP_DECL_LINCONSUPGD() and SCIPincludeLinconsUpgrade() | |
typedef struct SCIP_LinConsUpgrade | SCIP_LINCONSUPGRADE |
SCIP_RETCODE | SCIPincludeLinconsUpgrade (SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname) |
SCIP_RETCODE | SCIPcreateConsLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPcopyConsLinear (SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid) |
SCIP_RETCODE | SCIPaddCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
SCIP_RETCODE | SCIPchgCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
SCIP_RETCODE | SCIPdelCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) |
SCIP_Real | SCIPgetLhsLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPchgLhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
SCIP_RETCODE | SCIPchgRhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
int | SCIPgetNVarsLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetValsLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetActivityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
SCIP_Real | SCIPgetFeasibilityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
SCIP_Real | SCIPgetDualsolLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualfarkasLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_ROW * | SCIPgetRowLinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPupgradeConsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons) |
SCIP_RETCODE | SCIPclassifyConstraintTypesLinear (SCIP *scip, SCIP_LINCONSSTATS *linconsstats) |
SCIP_RETCODE | SCIPcleanupConssLinear (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible) |
#define | SCIP_DECL_LINCONSUPGD(x) |
Linking Constraints | |
The constraints handler stores linking constraints between a linking variable (continuous or integer) and an array of binary variables. Such a linking constraint has the form: \[ y = \sum_{i=1}^n {c_i * x_i} \] with linking variable (continuous or integer) \( y \), binary variables \( x_1, \dots, x_n \) and offset \(b \in Q\), and 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. | |
SCIP_RETCODE | SCIPcreateConsLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars) |
SCIP_Bool | SCIPexistsConsLinking (SCIP *scip, SCIP_VAR *linkvar) |
SCIP_CONS * | SCIPgetConsLinking (SCIP *scip, SCIP_VAR *linkvar) |
SCIP_VAR * | SCIPgetLinkvarLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPgetBinvarsLinking (SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars) |
int | SCIPgetNBinvarsLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetValsLinking (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPgetBinvarsDataLinking (SCIP_CONS *cons, SCIP_VAR ***binvars, SCIP_Real **vals, int *nbinvars) |
Logicor Constraints | |
This constraint handler handles a special type of linear constraints, namely logic or constraints. These are equivalent to set covering constraints, but are handled by special algorithms which are better suited for depth first search. For a set of binary variables \(x_i, i=1,\dots,n\), a logic or constraint has the form \[ \sum_{i=1}^n x_i \ge 1. \] | |
SCIP_RETCODE | SCIPcreateConsLogicor (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicLogicor (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars) |
SCIP_RETCODE | SCIPaddCoefLogicor (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) |
int | SCIPgetNVarsLogicor (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsLogicor (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualsolLogicor (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualfarkasLogicor (SCIP *scip, SCIP_CONS *cons) |
SCIP_ROW * | SCIPgetRowLogicor (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcleanupConssLogicor (SCIP *scip, SCIP_Bool onlychecked, int *naddconss, int *ndelconss, int *nchgcoefs) |
OR Constraints | |
This constraint handler deals with OR constraint. These are constraint of the form: \[ r = x_1 \vee x_2 \vee \dots \vee x_n \] where \(x_i\) is a binary variable for all \(i\). Hence, \(r\) is also of binary type. The variable \(r\) is called resultant and the \(x\)'s operators. | |
SCIP_RETCODE | SCIPcreateConsOr (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicOr (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars) |
int | SCIPgetNVarsOr (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsOr (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetResultantOr (SCIP *scip, SCIP_CONS *cons) |
Orbisack Constraints | |
This constraint handler can be used to handle symmetries in certain 0/1-programs. The principle structure is that some variables can be ordered in matrix form with two columns, such that permuting both columns does not change the validity and objective function value of a solution. That is, there exists a permutation symmetry of the program that permutes the variables of the first and second column row-wise. In more mathematical terms the structure has to be as follows: There are 0/1-variables \(x_{ij}\), \(i \in \{1, \dots, n\}\), \(j \in \{1, 2\}\). Permuting columns of \(x\) does not change the validity and objective function value of any feasible solution. | |
SCIP_RETCODE | SCIPcheckSolutionOrbisack (SCIP *scip, SCIP_SOL *sol, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool printreason, SCIP_Bool *feasible) |
SCIP_RETCODE | SCIPcreateConsOrbisack (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *const *vars1, SCIP_VAR *const *vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicOrbisack (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons) |
Orbitope Constraints | |
This constraint handler can be used to handle symmetries in certain 0/1-programs. The principle structure is that some variables can be ordered in matrix form, such that permuting columns does not change the validity and objective function value of a solution. That is, the symmetry group of the program contains the full symmetric group obtained by permuting the columns of this matrix. These symmetries can be handled by so-called full orbitopes. Moreover, if the variables in each row are contained in set packing or partitioning constraint, these symmetries can be handled by specialized packing or partitioning orbitopes. In more mathematical terms the structure has to be as follows: There are 0/1-variables \(x_{ij}\), \(i \in \{1, \dots, p\}\), \(j \in \{1, \dots, q\}\). The variables may be coupled through set packing or partitioning constraints: \[ \sum_{j = 1}^q x_{ij} \leq 1 \quad \mbox{or} \quad \sum_{j = 1}^q x_{ij} = 1 \quad \mbox{for all }i = 1, \ldots, p. \] Permuting columns of \(x\) does not change the validity and objective function value of any feasible solution. We distinguish whether an orbitope is a model constraint or not. If it is a model constraint, then its information are copied to subSCIPs. Otherwise, the constraint was added just for the purpose of symmetry handling and we do not copy its information to subSCIPs. | |
SCIP_RETCODE | SCIPcreateConsOrbitope (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool usedynamicprop, SCIP_Bool mayinteract, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicOrbitope (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool usedynamicprop, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool mayinteract) |
Pseudoboolean Constraints | |
The constraint handler deals with pseudo boolean constraints. These are constraints of the form \[ \mbox{lhs} \leq \sum_{k=0}^m c_k \cdot x_k + \sum_{i=0}^n c_i \cdot \prod_{j \in I_i} x_j \leq \mbox{rhs} \] where all \(x\) are binary. | |
enum | SCIP_LinearConsType { SCIP_LINEARCONSTYPE_INVALIDCONS = -1, SCIP_LINEARCONSTYPE_LINEAR = 0, SCIP_LINEARCONSTYPE_LOGICOR = 1, SCIP_LINEARCONSTYPE_KNAPSACK = 2, SCIP_LINEARCONSTYPE_SETPPC = 3 } |
typedef enum SCIP_LinearConsType | SCIP_LINEARCONSTYPE |
SCIP_RETCODE | SCIPcreateConsPseudobooleanWithConss (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONS *lincons, SCIP_LINEARCONSTYPE linconstype, SCIP_CONS **andconss, SCIP_Real *andcoefs, int nandconss, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsPseudoboolean (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **linvars, int nlinvars, SCIP_Real *linvals, SCIP_VAR ***terms, int nterms, int *ntermvars, SCIP_Real *termvals, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicPseudoboolean (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **linvars, int nlinvars, SCIP_Real *linvals, SCIP_VAR ***terms, int nterms, int *ntermvars, SCIP_Real *termvals, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPaddCoefPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR *const var, SCIP_Real const val) |
SCIP_RETCODE | SCIPaddTermPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const vars, int const nvars, SCIP_Real const val) |
SCIP_VAR * | SCIPgetIndVarPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
SCIP_CONS * | SCIPgetLinearConsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
SCIP_LINEARCONSTYPE | SCIPgetLinearConsTypePseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
int | SCIPgetNLinVarsWithoutAndPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
SCIP_RETCODE | SCIPgetLinDatasWithoutAndPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const linvars, SCIP_Real *const lincoefs, int *const nlinvars) |
SCIP_RETCODE | SCIPgetAndDatasPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_CONS **const andconss, SCIP_Real *const andcoefs, int *const nandconss) |
int | SCIPgetNAndsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
SCIP_RETCODE | SCIPchgLhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const lhs) |
SCIP_RETCODE | SCIPchgRhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const rhs) |
SCIP_Real | SCIPgetLhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
SCIP_Real | SCIPgetRhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons) |
Set Packing/Partitioning/Covering Constraints | |
This constraint handler handles three special classes of linear constraints, namely set partitioning, set packing, and set covering constraints. For a set of binary variables \(x_i, i=1,\dots,n\), a set partitioning constraint has the form \[ \sum_{i=1}^n x_i = 1, \] a set packing constraint has the form \[ \sum_{i=1}^n x_i \le 1, \] and a set covering constraint has the form \[ \sum_{i=1}^n x_i \ge 1. \] | |
enum | SCIP_SetppcType { SCIP_SETPPCTYPE_PARTITIONING = 0, SCIP_SETPPCTYPE_PACKING = 1, SCIP_SETPPCTYPE_COVERING = 2 } |
typedef enum SCIP_SetppcType | SCIP_SETPPCTYPE |
SCIP_RETCODE | SCIPcreateConsSetpart (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSetpart (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars) |
SCIP_RETCODE | SCIPcreateConsSetpack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSetpack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars) |
SCIP_RETCODE | SCIPcreateConsSetcover (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSetcover (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars) |
SCIP_RETCODE | SCIPaddCoefSetppc (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) |
int | SCIPgetNVarsSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_SETPPCTYPE | SCIPgetTypeSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualsolSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualfarkasSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_ROW * | SCIPgetRowSetppc (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNFixedonesSetppc (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNFixedzerosSetppc (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcleanupConssSetppc (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nfixedvars) |
SOC Constraints (deprecated) | |
SCIP_RETCODE | SCIPcreateConsSOC (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *coefs, SCIP_Real *offsets, SCIP_Real constant, SCIP_VAR *rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) |
SCIP_RETCODE | SCIPcreateConsBasicSOC (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *coefs, SCIP_Real *offsets, SCIP_Real constant, SCIP_VAR *rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset) |
SCIP_RETCODE | SCIPgetNlRowSOC (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
Specially Ordered Set (SOS) Type 1 Constraints | |
A specially ordered set of type 1 (SOS1) is a sequence of variables such that at most one variable is nonzero. The special case of two variables arises, for instance, from equilibrium or complementary conditions like \(x \cdot y = 0\). Note that it is in principle allowed that a variable appears twice, but it then can be fixed to 0. | |
SCIP_RETCODE | SCIPcreateConsSOS1 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSOS1 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights) |
SCIP_RETCODE | SCIPaddVarSOS1 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight) |
SCIP_RETCODE | SCIPappendVarSOS1 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) |
int | SCIPgetNVarsSOS1 (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsSOS1 (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetWeightsSOS1 (SCIP *scip, SCIP_CONS *cons) |
SCIP_DIGRAPH * | SCIPgetConflictgraphSOS1 (SCIP_CONSHDLR *conshdlr) |
int | SCIPgetNSOS1Vars (SCIP_CONSHDLR *conshdlr) |
SCIP_Bool | SCIPvarIsSOS1 (SCIP_CONSHDLR *conshdlr, SCIP_VAR *var) |
int | SCIPvarGetNodeSOS1 (SCIP_CONSHDLR *conshdlr, SCIP_VAR *var) |
SCIP_VAR * | SCIPnodeGetVarSOS1 (SCIP_DIGRAPH *conflictgraph, int node) |
SCIP_RETCODE | SCIPmakeSOS1sFeasible (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed, SCIP_Bool *success) |
Specially Ordered Set (SOS) Type 2 Constraints | |
A specially ordered set of type 2 (SOS2) is a sequence of variables such that at most two variables are nonzero and if two variables are nonzero they must be adjacent in the specified sequence. Note that it is in principle allowed that a variable appears twice, but it then can be fixed to 0 if it is at least two apart in the sequence. | |
SCIP_RETCODE | SCIPcreateConsSOS2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSOS2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights) |
SCIP_RETCODE | SCIPaddVarSOS2 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight) |
SCIP_RETCODE | SCIPappendVarSOS2 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var) |
int | SCIPgetNVarsSOS2 (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsSOS2 (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetWeightsSOS2 (SCIP *scip, SCIP_CONS *cons) |
Superindicator Constraints | |
Superindicator constraints are constraints of the form \[ x_i = 1 \Rightarrow C(x) \] where \( x_i \) is a binary variable and \( C(\dot) \) a constraint. The superindicator constraint is satisfied if and only if x_i is zero or C is satisfied. | |
SCIP_RETCODE | SCIPcreateConsSuperindicator (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSuperindicator (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons) |
SCIP_VAR * | SCIPgetBinaryVarSuperindicator (SCIP_CONS *cons) |
SCIP_CONS * | SCIPgetSlackConsSuperindicator (SCIP_CONS *cons) |
SCIP_RETCODE | SCIPtransformMinUC (SCIP *scip, SCIP_Bool *success) |
SCIP_DECL_DIALOGEXEC (SCIPdialogExecChangeMinUC) | |
Symresack Constraints | |
Given a permutation that acts on the order of the variables of a (mixed) 0/1-program such that the permutation is a symmetry of the program, this constraint handler can be used to handle the symmetries corresponding to the permutation. The symmetries are handled by enforcing that a binary solution is lexicographically not smaller than its permutation. In a presolving step, we check whether the permutation acts only on binary points. Otherwise, we eliminate the non-binary variables from the permutation. Furthermore, we delete fixed points from the permutation. Moreover, the constraint handler checks whether each cycle of the permutation is contained in a set packing or partitioning constraint. In this case, the symresack is strengthened to a ppsymresack and strong symmetry handling inequalities are added during the initialization of the constraint handler.
| |
SCIP_RETCODE | SCIPcreateSymbreakCons (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsSymresack (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicSymresack (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons) |
Variable Bound Constraints | |
This constraint handler handles a special type of linear constraints, namely variable bound constraints. A variable bound constraint has the form \[ lhs \leq x + c y \leq rhs \] with coefficient \(c \in Q\), \(lhs\in Q \cup \{-\infty\}\), \(rhs\in Q \cup \{\infty\}\), and decision variables \(x\) (non-binary) and \(y\) (binary or integer). | |
SCIP_RETCODE | SCIPcreateConsVarbound (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicVarbound (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_Real | SCIPgetLhsVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetVarVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetVbdvarVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetVbdcoefVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualsolVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetDualfarkasVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_ROW * | SCIPgetRowVarbound (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcleanupConssVarbound (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgbds) |
XOR Constraints | |
This constraint handler deals with "xor" constraint. These are constraint of the form: \[ rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n \] where \(x_i\) is a binary variable for all \(i\) and \(rhs\) is bool. The variables \(x\)'s are called operators. This constraint is satisfied if \(rhs\) is TRUE and an odd number of the operators are TRUE or if the \(rhs\) is FALSE and a even number of operators are TRUE. Hence, if the sum of \(rhs\) and operators is even. | |
SCIP_RETCODE | SCIPcreateConsXor (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicXor (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars) |
int | SCIPgetNVarsXor (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetVarsXor (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetIntVarXor (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPgetRhsXor (SCIP *scip, SCIP_CONS *cons) |
Macro Definition Documentation
◆ SCIP_DECL_SOLVECUMULATIVE
#define SCIP_DECL_SOLVECUMULATIVE | ( | x | ) |
solves given cumulative condition as independent sub problem
- Note
- The time and memory limit should be respected.
- If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.
input:
- njobs : number of jobs (activities)
- objvals : array of objective coefficients for each job (linear objective function), or NULL if none
- durations : array of durations
- demands : array of demands
- capacity : cumulative capacity
- hmin : left bound of time axis to be considered (including hmin)
- hmax : right bound of time axis to be considered (not including hmax)
- timelimit : time limit for solving in seconds
- memorylimit : memory limit for solving in mega bytes (MB)
- maxnodes : maximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit)
input/output:
- ests : array of earliest start times for each job
- lsts : array of latest start times for each job
output:
- solved : pointer to store if the problem is solved (to optimality)
- infeasible : pointer to store if the problem is infeasible
- unbounded : pointer to store if the problem is unbounded
- error : pointer to store if an error occurred
Definition at line 356 of file cons_cumulative.h.
◆ SCIP_DECL_LINCONSUPGD
#define SCIP_DECL_LINCONSUPGD | ( | x | ) |
upgrading method for linear constraints into more specific constraints
input:
- scip : SCIP main data structure
- cons : the linear constraint to upgrade
- nvars : number of variables in the constraint
- vars : array with constraint variables
- vals : array with constraint coefficients
- lhs : left hand side of linear constraint
- rhs : right hand side of linear constraint
- nposbin : number of binary variables with positive coefficient
- nnegbin : number of binary variables with negative coefficient
- nposint : number of integer variables with positive coefficient
- nnegint : number of integer variables with negative coefficient
- nposimpl : number of implicit integer variables with positive coefficient (including implicit binary variables)
- nnegimpl : number of implicit integer variables with negative coefficient (including implicit binary variables)
- nposimplbin : number of implicit binary variables with positive coefficient
- nnegimplbin : number of implicit binary variables with negative coefficient
- nposcont : number of continuous variables with positive coefficient
- nnegcont : number of continuous variables with negative coefficient
- ncoeffspone : number of +1 coefficients
- ncoeffsnone : number of -1 coefficients
- ncoeffspint : number of positive integral coefficients other than +1
- ncoeffsnint : number of negative integral coefficients other than -1
- ncoeffspfrac : number of positive fractional coefficients
- ncoeffsnfrac : number of negative fractional coefficients
- poscoeffsum : sum of all positive coefficients
- negcoeffsum : sum of all negative coefficients
- integral : TRUE iff constraints activity value is always integral
- upgdcons : pointer to store the upgraded constraint
Definition at line 120 of file cons_linear.h.
◆ SCIP_DECL_VERTEXPOLYFUN
evaluation callback for (vertex-polyhedral) functions used as input for facet computation of its envelopes
- Parameters
-
[in] args the point to be evaluated [in] nargs the number of arguments of the function (length of array args
)[in] funcdata user-data of function evaluation callback
- Returns
- value of function in point given by
args
or SCIP_INVALID if could not be evaluated
Definition at line 102 of file cons_nonlinear.h.
◆ SCIP_MAXVERTEXPOLYDIM
#define SCIP_MAXVERTEXPOLYDIM 14 |
maximum dimension of vertex-polyhedral function for which we can try to compute a facet of its convex or concave envelope
Definition at line 105 of file cons_nonlinear.h.
Referenced by buildVertexPolyhedralSeparationLP(), computeVertexPolyhedralFacetLP(), estimateVertexPolyhedralProduct(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSFREE(), SCIP_DECL_NLHDLRDETECT(), and SCIPcomputeFacetVertexPolyhedralNonlinear().
◆ SCIP_DECL_NONLINCONSUPGD
#define SCIP_DECL_NONLINCONSUPGD | ( | x | ) |
upgrading method for nonlinear constraints into more specific constraints
The method might upgrade a nonlinear constraint into a set of upgrade constraints. The caller provided an array upgdconss
of size upgdconsssize
to store upgrade constraints. If an upgrade is not possible, set *nupgdconss
to zero. If more than upgdconsssize
many constraints shall replace cons
, the function should return the required number as negated value in *nupgdconss
, e.g., if cons
should be replaced by 3 constraints, the function should set *nupgdconss
to -3 and return with SCIP_OKAY.
- Parameters
-
[in] scip SCIP main data structure [in] cons the nonlinear constraint to upgrade [in] nvarexprs total number of variable expressions in the nonlinear constraint [out] nupgdconss pointer to store number of constraints that replace this constraint [out] upgdconss array to store constraints that replace this constraint [in] upgdconsssize length of the provided upgdconss
array
Definition at line 124 of file cons_nonlinear.h.
Referenced by findAggregation().
Typedef Documentation
◆ SCIP_LINCONSUPGRADE
typedef struct SCIP_LinConsUpgrade SCIP_LINCONSUPGRADE |
linear constraint update method
Definition at line 87 of file cons_linear.h.
◆ SCIP_CONSNONLINEAR_AUXEXPR
typedef struct SCIP_ConsNonlinear_Auxexpr SCIP_CONSNONLINEAR_AUXEXPR |
Definition at line 65 of file cons_nonlinear.h.
◆ SCIP_CONSNONLINEAR_BILINTERM
typedef struct SCIP_ConsNonlinear_BilinTerm SCIP_CONSNONLINEAR_BILINTERM |
bilinear term structure
Definition at line 93 of file cons_nonlinear.h.
◆ SCIP_LINEARCONSTYPE
typedef enum SCIP_LinearConsType SCIP_LINEARCONSTYPE |
Definition at line 90 of file cons_pseudoboolean.h.
◆ SCIP_SETPPCTYPE
typedef enum SCIP_SetppcType SCIP_SETPPCTYPE |
Definition at line 91 of file cons_setppc.h.
Enumeration Type Documentation
◆ SCIP_LinearConsType
enum SCIP_LinearConsType |
solution status after solving LP
Definition at line 77 of file cons_pseudoboolean.h.
◆ SCIP_SetppcType
enum SCIP_SetppcType |
type of setppc constraint: set partitioning, set packing, or set covering
Definition at line 85 of file cons_setppc.h.
Function Documentation
◆ SCIPcreateConsAbspower()
SCIP_RETCODE SCIPcreateConsAbspower | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | x, | ||
SCIP_VAR * | z, | ||
SCIP_Real | exponent, | ||
SCIP_Real | xoffset, | ||
SCIP_Real | zcoef, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an absolute power nonlinear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Deprecated:
- Use SCIPcreateConsNonlinear() instead.
creates and captures an absolute power nonlinear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Deprecated:
- Use SCIPcreateConsNonlinear() instead.
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint x nonlinear variable x in constraint z linear variable z in constraint exponent exponent n of |x+offset|^n term in constraint xoffset offset in |x+offset|^n term in constraint zcoef coefficient of z in constraint lhs left hand side of constraint rhs right hand side of constraint initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 43 of file cons_abspower.c.
References SCIP_CALL, SCIP_OKAY, SCIPcreateConsBasicSignpowerNonlinear(), SCIPsetConsChecked(), SCIPsetConsDynamic(), SCIPsetConsEnforced(), SCIPsetConsInitial(), SCIPsetConsLocal(), SCIPsetConsModifiable(), SCIPsetConsPropagated(), SCIPsetConsRemovable(), SCIPsetConsSeparated(), and SCIPsetConsStickingAtNode().
◆ SCIPcreateConsBasicAbspower()
SCIP_RETCODE SCIPcreateConsBasicAbspower | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | x, | ||
SCIP_VAR * | z, | ||
SCIP_Real | exponent, | ||
SCIP_Real | xoffset, | ||
SCIP_Real | zcoef, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures an absolute power nonlinear constraint in its most basic version, i.e., all constraint flags are set to their basic value
All flags can be set via SCIPconsSetFLAGNAME-methods.
- See also
- SCIPcreateConsAbspower() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Deprecated:
- Use SCIPcreateConsBasicNonlinear() instead.
creates and captures an absolute power nonlinear constraint in its most basic version, i.e., all constraint flags are set to their basic value
All flags can be set via SCIPconsSetFLAGNAME-methods.
- See also
- SCIPcreateConsAbspower() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Deprecated:
- Use SCIPcreateConsBasicNonlinear() instead.
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint x nonlinear variable x in constraint z linear variable z in constraint exponent exponent n of |x+offset|^n term in constraint xoffset offset in |x+offset|^n term in constraint zcoef coefficient of z in constraint lhs left hand side of constraint rhs right hand side of constraint
Definition at line 106 of file cons_abspower.c.
References SCIP_CALL, SCIP_OKAY, and SCIPcreateConsBasicSignpowerNonlinear().
◆ SCIPgetNlRowAbspower()
SCIP_RETCODE SCIPgetNlRowAbspower | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLROW ** | nlrow | ||
) |
gets the absolute power constraint as a nonlinear row representation
- Deprecated:
- Use SCIPgetNlRowNonlinear() instead.
gets the absolute power constraint as a nonlinear row representation
- Deprecated:
- Use SCIPgetNlRowNonlinear)_ instead.
- Parameters
-
scip SCIP data structure cons constraint nlrow a buffer where to store pointer to nonlinear row
Definition at line 128 of file cons_abspower.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetNlRowNonlinear().
◆ SCIPcreateConsAnd()
SCIP_RETCODE SCIPcreateConsAnd | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | resvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an and constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a AND-constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint resvar resultant variable of the operation nvars number of operator variables in the constraint vars array with operator variables of constraint initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 5028 of file cons_and.c.
References ARTIFICIALVARNAMEPREFIX, consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIPchgVarType(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicAnd(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPisTransformed(), SCIPvarGetName(), SCIPvarGetProbvar(), and SCIPvarGetType().
Referenced by CREATE_CONSTRAINT(), createAndAddAndCons(), extractGates(), findAggregation(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicAnd(), SCIPincludeConshdlrAnd(), setObjective(), and upgradeCons().
◆ SCIPcreateConsBasicAnd()
SCIP_RETCODE SCIPcreateConsBasicAnd | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | resvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsAnd(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsAnd() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures an AND-constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsAnd(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsAnd() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint resvar resultant variable of the operation nvars number of operator variables in the constraint vars array with operator variables of constraint
Definition at line 5138 of file cons_and.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsAnd(), SCIPgetNVarsAnd(), and TRUE.
Referenced by getBinaryProductExprDo(), and SCIPcreateConsAnd().
◆ SCIPgetNVarsAnd()
gets number of variables in and constraint
gets number of variables in AND-constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5157 of file cons_and.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsAnd().
Referenced by checkAndConss(), checkOrigPbCons(), chgLhs(), chgRhs(), computeAndConstraintInfos(), computeConsAndDataChanges(), computeSymmetryGroup(), consdataFree(), consdataPrint(), countNonlinearities(), createCoveringProblem(), printAndCons(), printRowAnd(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIPcreateConsBasicAnd(), SCIPcreateConsPseudobooleanWithConss(), SCIPwriteMps(), SCIPwritePip(), transformToOrig(), and writeOpbConstraints().
◆ SCIPgetVarsAnd()
gets array of variables in and constraint
gets array of variables in AND-constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5181 of file cons_and.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetResultantAnd().
Referenced by checkAndConss(), checkOrigPbCons(), chgLhs(), chgRhs(), computeAndConstraintInfos(), computeConsAndDataChanges(), computeSymmetryGroup(), consdataFree(), consdataPrint(), countNonlinearities(), createCoveringProblem(), printAndCons(), printRowAnd(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSGETVARS(), SCIPcreateConsPseudobooleanWithConss(), SCIPgetNVarsAnd(), SCIPwriteMps(), SCIPwritePip(), transformToOrig(), and writeOpbConstraints().
◆ SCIPgetResultantAnd()
gets the resultant variable in and constraint
gets the resultant variable in AND-constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5206 of file cons_and.c.
References CONSHDLR_NAME, NULL, SCIP_Bool, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPisAndConsSorted().
Referenced by addCliques(), addCoefTerm(), checkAndConss(), checkOrigPbCons(), computeAndConstraintInfos(), computeSymmetryGroup(), consdataCreate(), consdataFree(), copyConsPseudoboolean(), correctConshdlrdata(), correctLocksAndCaptures(), countNonlinearities(), createAndAddAndCons(), createCoveringProblem(), getLinVarsAndAndRess(), lockRoundingAndCons(), printAndCons(), printRowAnd(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSLOCK(), SCIP_DECL_SORTPTRCOMP(), SCIPcreateConsPseudoboolean(), SCIPcreateConsPseudobooleanWithConss(), SCIPgetVarsAnd(), SCIPwriteMps(), SCIPwritePip(), transformToOrig(), tryUpgradingSetppc(), unlockRoundingAndCons(), and updateConsanddataUses().
◆ SCIPisAndConsSorted()
return if the variables of the AND-constraint are sorted with respect to their indices
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5229 of file cons_and.c.
References CONSHDLR_NAME, FALSE, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsortAndCons().
Referenced by computeConsAndDataChanges(), and SCIPgetResultantAnd().
◆ SCIPsortAndCons()
SCIP_RETCODE SCIPsortAndCons | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
sort the variables of the AND-constraint with respect to their indices
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5253 of file cons_and.c.
References consdataSort(), CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsCheckFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by computeConsAndDataChanges(), and SCIPisAndConsSorted().
◆ SCIPchgAndConsCheckFlagWhenUpgr()
SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Bool | flag | ||
) |
when 'upgrading' the given AND-constraint, should the check flag for the upgraded constraint be set to TRUE, even if the check flag of this AND-constraint is set to FALSE?
- Parameters
-
scip SCIP data structure cons constraint data flag should an arising constraint from the given AND-constraint be checked, even if the check flag of the AND-constraint is set to FALSE
Definition at line 5282 of file cons_and.c.
References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsRemovableFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by createAndAddAndCons(), and SCIPsortAndCons().
◆ SCIPchgAndConsRemovableFlagWhenUpgr()
SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Bool | flag | ||
) |
when 'upgrading' the given AND-constraint, should the removable flag for the upgraded constraint be set to FALSE, even if the removable flag of this AND-constraint is set to TRUE?
- Parameters
-
scip SCIP data structure cons constraint data flag should an arising constraint from the given AND-constraint be not removable, even if the removable flag of the AND-constraint is set to TRUE
Definition at line 5313 of file cons_and.c.
References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by createAndAddAndCons(), and SCIPchgAndConsCheckFlagWhenUpgr().
◆ SCIPconsBendersEnforceSolution()
SCIP_RETCODE SCIPconsBendersEnforceSolution | ( | SCIP * | scip, |
SCIP_SOL * | sol, | ||
SCIP_CONSHDLR * | conshdlr, | ||
SCIP_RESULT * | result, | ||
SCIP_BENDERSENFOTYPE | type, | ||
SCIP_Bool | checkint | ||
) |
enforces Benders' constraints for given solution
This method is called from cons_benderslp and cons_benders. If the method is called from cons_benderslp, then the solutions are not guaranteed to be integer feasible. This is because the default priority is set greater than the integer constraint handler. If this method is called from cons_benders, then, because the default enforcement priority is set less than that of the integer constraint handler, then it can be assumed that the solutions are integer feasible.
The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint == FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e. checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check solution feasibility.
- Parameters
-
scip the SCIP instance sol the primal solution to enforce, or NULL for the current LP/pseudo sol conshdlr the constraint handler result the result of the enforcement type the type of solution being enforced checkint should integrality be considered when checking the subproblems
Definition at line 261 of file cons_benders.c.
References constructValidSolution(), FALSE, NULL, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSENFOTYPE_RELAX, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPbendersCutLP(), SCIPbendersCutPseudo(), SCIPbendersCutRelaxation(), SCIPgetBenders(), SCIPgetLPSolstat(), SCIPgetNActiveBenders(), SCIPsolveBendersSubproblems(), SCIPwarningMessage(), TRUE, and unboundedAuxiliaryVariables().
Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSENFORELAX(), and unboundedAuxiliaryVariables().
◆ SCIPcreateConsBounddisjunction()
SCIP_RETCODE SCIPcreateConsBounddisjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
SCIP_Real * | bounds, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a bound disjunction constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint 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 initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 3176 of file cons_bounddisjunction.c.
References consdataCreate(), CONSHDLR_NAME, isOverlapping(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPboundtypeOpposite(), SCIPcreateCons(), SCIPcreateConsBasicBounddisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by addLowerboundCons(), adjustOversizedJobBounds(), createConflict(), CUTOFF_CONSTRAINT(), forbidFixation(), presolveSingleLockedVars(), readBounds(), readSemicontinuous(), readVariables(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicBounddisjunction(), and SCIPincludeConshdlrBounddisjunction().
◆ SCIPcreateConsBasicBounddisjunction()
SCIP_RETCODE SCIPcreateConsBasicBounddisjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
SCIP_Real * | bounds | ||
) |
creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a bound disjunction constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint 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 3256 of file cons_bounddisjunction.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBounddisjunction(), SCIPcreateConsBounddisjunctionRedundant(), and TRUE.
Referenced by createBounddisjunctionCons(), SCIPcreateConsBounddisjunction(), and SCIPreoptApplyGlbConss().
◆ SCIPcreateConsBounddisjunctionRedundant()
SCIP_RETCODE SCIPcreateConsBounddisjunctionRedundant | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
SCIP_Real * | bounds, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a bound disjunction constraint with possibly redundant literals
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint 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 initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 3278 of file cons_bounddisjunction.c.
References consdataCreateRedundant(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicBounddisjunctionRedundant(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by addLocalConss(), addSplitcons(), SCIPcreateConsBasicBounddisjunction(), and SCIPcreateConsBasicBounddisjunctionRedundant().
◆ SCIPcreateConsBasicBounddisjunctionRedundant()
SCIP_RETCODE SCIPcreateConsBasicBounddisjunctionRedundant | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_BOUNDTYPE * | boundtypes, | ||
SCIP_Real * | bounds | ||
) |
creates and captures an and constraint with possibly redundant literals in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a bound disjunction constraint with possibly redundant literals in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint 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 3342 of file cons_bounddisjunction.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBounddisjunctionRedundant(), SCIPgetNVarsBounddisjunction(), and TRUE.
Referenced by SCIPcreateConsBounddisjunctionRedundant().
◆ SCIPgetNVarsBounddisjunction()
gets number of variables in bound disjunction constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3361 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsBounddisjunction().
Referenced by checkBounddisjunction(), computeSymmetryGroup(), createCoveringProblem(), SCIP_DECL_CONSCOPY(), and SCIPcreateConsBasicBounddisjunctionRedundant().
◆ SCIPgetVarsBounddisjunction()
gets array of variables in bound disjunction constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3382 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundtypesBounddisjunction().
Referenced by checkBounddisjunction(), computeSymmetryGroup(), createCoveringProblem(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetNVarsBounddisjunction().
◆ SCIPgetBoundtypesBounddisjunction()
SCIP_BOUNDTYPE* SCIPgetBoundtypesBounddisjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets array of bound types in bound disjunction constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3403 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundsBounddisjunction().
Referenced by checkBounddisjunction(), computeSymmetryGroup(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetVarsBounddisjunction().
◆ SCIPgetBoundsBounddisjunction()
gets array of bounds in bound disjunction constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3424 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by checkBounddisjunction(), computeSymmetryGroup(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetBoundtypesBounddisjunction().
◆ SCIPcreateConsCardinality()
SCIP_RETCODE SCIPcreateConsCardinality | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int | cardval, | ||
SCIP_VAR ** | indvars, | ||
SCIP_Real * | weights, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an cardinality constraint
We set the constraint to not be modifable. If the weights are non NULL, the variables are ordered according to these weights (in ascending order).
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a cardinality constraint
We set the constraint to not be modifable. If the weights are non NULL, the variables are ordered according to these weights (in ascending order).
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables in the constraint vars array with variables of constraint entries cardval number of variables allowed to be nonzero indvars indicator variables indicating which variables may be treated as nonzero in cardinality constraint, or NULL if new indicator variables should be introduced automatically weights weights determining the variable order, or NULL if variables should be ordered in the same way they were added to the constraint initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 3319 of file cons_cardinality.c.
References CONSHDLR_NAME, FALSE, handleNewVariableCardinality(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_TRANSFORMED, SCIP_VARTYPE_BINARY, SCIPaddVar(), SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicCardinality(), SCIPcreateVar(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNTotalVars(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPreleaseVar(), SCIPsnprintf(), SCIPsortRealPtrPtrInt(), SCIPvarGetName(), SCIPvarIsBinary(), and SCIPvarIsTransformed().
Referenced by branchBalancedCardinality(), SCIPcreateConsBasicCardinality(), and SCIPincludeConshdlrCardinality().
◆ SCIPcreateConsBasicCardinality()
SCIP_RETCODE SCIPcreateConsBasicCardinality | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int | cardval, | ||
SCIP_VAR ** | indvars, | ||
SCIP_Real * | weights | ||
) |
creates and captures an cardinality constraint in its most basic variant, i. e., with all constraint flags set to their default values, which can be set afterwards using SCIPsetConsFLAGNAME() in scip.h
- See also
- SCIPcreateConsCardinality() for the default constraint flag configuration
- Warning
- Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a cardinality constraint with all constraint flags set to their default values.
- Warning
- Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables in the constraint vars array with variables of constraint entries cardval number of variables allowed to be nonzero indvars indicator variables indicating which variables may be treated as nonzero in cardinality constraint, or NULL if new indicator variables should be introduced automatically weights weights determining the variable order, or NULL if variables should be ordered in the same way they were added to the constraint
Definition at line 3519 of file cons_cardinality.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPchgCardvalCardinality(), SCIPcreateConsCardinality(), and TRUE.
Referenced by SCIPcreateConsCardinality().
◆ SCIPchgCardvalCardinality()
SCIP_RETCODE SCIPchgCardvalCardinality | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | cardval | ||
) |
changes cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint cardval number of variables allowed to be nonzero
Definition at line 3540 of file cons_cardinality.c.
References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPaddVarCardinality(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMsg, and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicCardinality().
◆ SCIPaddVarCardinality()
SCIP_RETCODE SCIPaddVarCardinality | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_VAR * | indvar, | ||
SCIP_Real | weight | ||
) |
adds variable to cardinality constraint, the position is determined by the given weight
- Parameters
-
scip SCIP data structure cons constraint var variable to add to the constraint indvar indicator variable indicating whether variable may be treated as nonzero in cardinality constraint (or NULL if this variable should be created automatically) weight weight determining position of variable
Definition at line 3569 of file cons_cardinality.c.
References addVarCardinality(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarCardinality(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().
Referenced by SCIPchgCardvalCardinality().
◆ SCIPappendVarCardinality()
SCIP_RETCODE SCIPappendVarCardinality | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_VAR * | indvar | ||
) |
appends variable to cardinality constraint
- Parameters
-
scip SCIP data structure cons constraint var variable to add to the constraint indvar indicator variable indicating whether variable may be treated as nonzero in cardinality constraint (or NULL if this variable should be created automatically)
Definition at line 3606 of file cons_cardinality.c.
References appendVarCardinality(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNVarsCardinality(), and SCIPvarGetName().
Referenced by SCIPaddVarCardinality().
◆ SCIPgetNVarsCardinality()
gets number of variables in cardinality constraint
- Parameters
-
scip SCIP data structure cons constraint
Definition at line 3641 of file cons_cardinality.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCardinality().
Referenced by SCIPappendVarCardinality().
◆ SCIPgetVarsCardinality()
gets array of variables in cardinality constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3665 of file cons_cardinality.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCardvalCardinality().
Referenced by SCIPgetNVarsCardinality().
◆ SCIPgetCardvalCardinality()
gets cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3689 of file cons_cardinality.c.
References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsCardinality().
Referenced by SCIPgetVarsCardinality().
◆ SCIPgetWeightsCardinality()
gets array of weights in cardinality constraint (or NULL if not existent)
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 3712 of file cons_cardinality.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetCardvalCardinality().
◆ SCIPcreateConsConjunction()
SCIP_RETCODE SCIPcreateConsConjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nconss, | ||
SCIP_CONS ** | conss, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic | ||
) |
creates and captures a conjunction constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nconss number of initial constraints in conjunction conss initial constraint in conjunction enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
Definition at line 809 of file cons_conjunction.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicConjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicConjunction(), and SCIPincludeConshdlrConjunction().
◆ SCIPcreateConsBasicConjunction()
SCIP_RETCODE SCIPcreateConsBasicConjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nconss, | ||
SCIP_CONS ** | conss | ||
) |
creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsConjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsConjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nconss number of initial constraints in conjunction conss initial constraint in conjunction
Definition at line 858 of file cons_conjunction.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemConjunction(), SCIPcreateConsConjunction(), and TRUE.
Referenced by SCIPcreateConsConjunction().
◆ SCIPaddConsElemConjunction()
SCIP_RETCODE SCIPaddConsElemConjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | addcons | ||
) |
adds constraint to the conjunction of constraints
- Parameters
-
scip SCIP data structure cons conjunction constraint addcons additional constraint in conjunction
Definition at line 875 of file cons_conjunction.c.
References consdataAddCons(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicConjunction().
◆ SCIP_DECL_DIALOGEXEC() [1/4]
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecCountPresolve | ) |
dialog execution method for the count command
Definition at line 1841 of file cons_countsols.c.
References active, CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_DIALOGEXEC(), SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPdialoghdlrAddHistory(), SCIPdialoghdlrGetRoot(), SCIPdialogMessage(), SCIPerrorMessage, SCIPgetBoolParam(), SCIPgetIntParam(), SCIPgetStage(), SCIPpresolve(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPwarningMessage(), SYM_COMPUTETIMING_AFTERPRESOL, SYM_HANDLETYPE_SYMCONS, and TRUE.
Referenced by SCIP_DECL_CONSLOCK(), SCIP_DECL_DIALOGEXEC(), and writeExpandedSolutions().
◆ SCIP_DECL_DIALOGEXEC() [2/4]
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecCount | ) |
dialog execution method for the count command
Definition at line 1934 of file cons_countsols.c.
References active, CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_SORTPTRCOMP(), SCIP_INVALIDCALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIP_VERBLEVEL_FULL, SCIPallocBufferArray, SCIPcount(), SCIPdialoghdlrAddHistory(), SCIPdialoghdlrGetRoot(), SCIPdialogMessage(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetBoolParam(), SCIPgetIntParam(), SCIPgetNContVars(), SCIPgetNCountedFeasSubtrees(), SCIPgetNCountedSols(), SCIPgetNCountedSolsstr(), SCIPgetStage(), SCIPisParamFixed(), SCIPpresolve(), SCIPreallocBufferArray, SCIPsetBoolParam(), SCIPsetIntParam(), SCIPunfixParam(), SCIPverbMessage(), SCIPwarningMessage(), SYM_COMPUTETIMING_AFTERPRESOL, SYM_HANDLETYPE_SYMCONS, and TRUE.
◆ SCIP_DECL_DIALOGEXEC() [3/4]
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecWriteAllsolutions | ) |
execution method of dialog for writing all solutions
Definition at line 2278 of file cons_countsols.c.
References CONSHDLR_NAME, createCountDialog(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPdialoghdlrAddHistory(), SCIPdialoghdlrClearBuffer(), SCIPdialoghdlrGetRoot(), SCIPdialoghdlrGetWord(), SCIPdialogMessage(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNCountedSols(), SCIPgetNCountedSolsstr(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPinfoMessage(), SCIPreallocBufferArray, SCIPsortDownPtrPtr(), SCIPvarGetName(), SCIPvarGetType(), TRUE, and writeExpandedSolutions().
◆ SCIPcount()
SCIP_RETCODE SCIPcount | ( | SCIP * | scip | ) |
execute counting
- Parameters
-
scip SCIP data structure
Definition at line 2700 of file cons_countsols.c.
References active, checkParameters(), CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPgetBoolParam(), SCIPgetNCountedSols(), SCIPsetBoolParam(), SCIPsolve(), and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPincludeConshdlrCountsols().
◆ SCIPgetNCountedSols()
SCIP_Longint SCIPgetNCountedSols | ( | SCIP * | scip, |
SCIP_Bool * | valid | ||
) |
returns number of feasible solutions found as SCIP_Longint; if the number does not fit into a SCIP_Longint the valid flag is set to FALSE
- Parameters
-
scip SCIP data structure valid pointer to store if the return value is valid
Definition at line 2732 of file cons_countsols.c.
References CONSHDLR_NAME, getNCountedSols(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetNCountedSolsstr().
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPcount().
◆ SCIPgetNCountedSolsstr()
void SCIPgetNCountedSolsstr | ( | SCIP * | scip, |
char ** | buffer, | ||
int | buffersize, | ||
int * | requiredsize | ||
) |
returns number of counted solutions as string
puts the number of counted solutions in the given char* buffer
- Parameters
-
scip SCIP data structure buffer buffer to store the number for counted solutions buffersize buffer size requiredsize pointer to store the required size
Definition at line 2752 of file cons_countsols.c.
References CONSHDLR_NAME, NULL, SCIP_Longint, SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetNCountedFeasSubtrees(), and toString().
Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPgetNCountedSols().
◆ SCIPgetNCountedFeasSubtrees()
SCIP_Longint SCIPgetNCountedFeasSubtrees | ( | SCIP * | scip | ) |
returns number of counted feasible subtrees
returns number of counted non trivial feasible subtrees
- Parameters
-
scip SCIP data structure
Definition at line 2790 of file cons_countsols.c.
References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetCountedSparseSols().
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPgetNCountedSolsstr().
◆ SCIPgetCountedSparseSols()
void SCIPgetCountedSparseSols | ( | SCIP * | scip, |
SCIP_VAR *** | vars, | ||
int * | nvars, | ||
SCIP_SPARSESOL *** | sols, | ||
int * | nsols | ||
) |
Method to get the sparse solution.
- Note
- You get the pointer to the sparse solutions stored in the constraint handler (not a copy).
- The sparse solutions are stored w.r.t. the active variables. This are the variables which got not removed during presolving. For none active variables the value has to be computed depending on their aggregation type. See for more details about that Collect all feasible solutions.
Method to get the sparse solution.
- Note
- You get the pointer to the sparse solutions stored in the constraint handler (not a copy).
- The sparse solutions are stored w.r.t. the active variables. There are the variables which have not been removed during presolving. For none active variables the value has to be computed depending on their aggregation type. See for more details about that Collect all feasible solutions.
- Parameters
-
scip SCIP data structure vars pointer to active variable array defining to variable order nvars number of active variables sols pointer to the solutions nsols pointer to number of solutions
Definition at line 2818 of file cons_countsols.c.
References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPsetParamsCountsols().
Referenced by SCIPgetNCountedFeasSubtrees().
◆ SCIPsetParamsCountsols()
SCIP_RETCODE SCIPsetParamsCountsols | ( | SCIP * | scip | ) |
setting SCIP parameters for such that a valid counting process is possible
- Parameters
-
scip SCIP data structure
Definition at line 2845 of file cons_countsols.c.
References SCIP_CALL, SCIP_OKAY, SCIP_PARAMEMPHASIS_COUNTER, SCIPsetEmphasis(), and TRUE.
Referenced by SCIPgetCountedSparseSols().
◆ SCIPcreateConsCumulative()
SCIP_RETCODE SCIPcreateConsCumulative | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a cumulative constraint
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands capacity available cumulative capacity initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 13740 of file cons_cumulative.c.
References consdataCatchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_PROBLEM, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicCumulative(), SCIPdebugMsg, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPgetStage().
Referenced by CREATE_CONSTRAINT(), createConsCumulative(), createCumulativeCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), SCIPcreateSchedulingProblem(), SCIPincludeConshdlrCumulative(), and upgradeCons().
◆ SCIPcreateConsBasicCumulative()
SCIP_RETCODE SCIPcreateConsBasicCumulative | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity | ||
) |
creates and captures an absolute power constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsCumulative() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsCumulative() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands capacity available cumulative capacity
Definition at line 13821 of file cons_cumulative.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsCumulative(), SCIPsetHminCumulative(), and TRUE.
Referenced by SCIPcreateConsCumulative(), and setupAndSolveCumulativeSubscip().
◆ SCIPsetHminCumulative()
SCIP_RETCODE SCIPsetHminCumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | hmin | ||
) |
set the left bound of effective horizon
set the left bound of the time axis to be considered (including hmin)
- Parameters
-
scip SCIP data structure cons constraint data hmin left bound of time axis to be considered
Definition at line 13841 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHminCumulative().
Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), setupAndSolveCumulativeSubscip(), and upgradeCons().
◆ SCIPgetHminCumulative()
returns the left bound of the effective horizon
returns the left bound of the time axis to be considered
- Parameters
-
scip SCIP data structure cons constraint
Definition at line 13865 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsetHmaxCumulative().
Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHminCumulative().
◆ SCIPsetHmaxCumulative()
SCIP_RETCODE SCIPsetHmaxCumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | hmax | ||
) |
set the right bound of the effective horizon
set the right bound of the time axis to be considered (not including hmax)
- Parameters
-
scip SCIP data structure cons constraint data hmax right bound of time axis to be considered
Definition at line 13885 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHmaxCumulative().
Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPgetHminCumulative(), setupAndSolveCumulativeSubscip(), and upgradeCons().
◆ SCIPgetHmaxCumulative()
returns the right bound of effective horizon
returns the right bound of the time axis to be considered
- Parameters
-
scip SCIP data structure cons constraint
Definition at line 13909 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCumulative().
Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHmaxCumulative().
◆ SCIPgetVarsCumulative()
returns the start time variables of the cumulative constraint
returns the activities of the cumulative constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13929 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsCumulative().
Referenced by SCIPgetHmaxCumulative(), and writeFzn().
◆ SCIPgetNVarsCumulative()
returns the number of start time variables of the cumulative constraint
returns the activities of the cumulative constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13950 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCapacityCumulative().
Referenced by SCIPgetVarsCumulative(), and writeFzn().
◆ SCIPgetCapacityCumulative()
returns the capacity of the cumulative constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13971 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDurationsCumulative().
Referenced by SCIPgetNVarsCumulative(), and writeFzn().
◆ SCIPgetDurationsCumulative()
returns the durations of the cumulative constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13992 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDemandsCumulative().
Referenced by SCIPgetCapacityCumulative(), and writeFzn().
◆ SCIPgetDemandsCumulative()
returns the demands of the cumulative constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 14013 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetDurationsCumulative(), and writeFzn().
◆ SCIPcheckCumulativeCondition()
SCIP_RETCODE SCIPcheckCumulativeCondition | ( | SCIP * | scip, |
SCIP_SOL * | sol, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
int | hmin, | ||
int | hmax, | ||
SCIP_Bool * | violated, | ||
SCIP_CONS * | cons, | ||
SCIP_Bool | printreason | ||
) |
check for the given starting time variables with their demands and durations if the cumulative conditions for the given solution is satisfied
- Parameters
-
scip SCIP data structure sol primal solution, or NULL for current LP/pseudo solution nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands capacity available cumulative capacity hmin left bound of time axis to be considered (including hmin) hmax right bound of time axis to be considered (not including hmax) violated pointer to store if the cumulative condition is violated cons constraint which is checked printreason should the reason for the violation be printed?
Definition at line 14036 of file cons_cumulative.c.
References checkCumulativeCondition(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnormalizeCumulativeCondition().
Referenced by checkCons(), enfopsCons(), and SCIPgetDemandsCumulative().
◆ SCIPnormalizeCumulativeCondition()
SCIP_RETCODE SCIPnormalizeCumulativeCondition | ( | SCIP * | scip, |
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int * | capacity, | ||
int * | nchgcoefs, | ||
int * | nchgsides | ||
) |
normalize cumulative condition
- Parameters
-
scip SCIP data structure nvars number of start time variables (activities) vars array of start time variables durations array of durations demands array of demands capacity pointer to store the changed cumulative capacity nchgcoefs pointer to count total number of changed coefficients nchgsides pointer to count number of side changes
Definition at line 14061 of file cons_cumulative.c.
References normalizeCumulativeCondition(), SCIP_OKAY, and SCIPsplitCumulativeCondition().
Referenced by SCIP_DECL_CONSPRESOL(), and SCIPcheckCumulativeCondition().
◆ SCIPsplitCumulativeCondition()
SCIP_RETCODE SCIPsplitCumulativeCondition | ( | SCIP * | scip, |
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
int * | hmin, | ||
int * | hmax, | ||
int * | split | ||
) |
searches for a time point within the cumulative condition were the cumulative condition can be split
- Parameters
-
scip SCIP data structure nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands capacity available cumulative capacity hmin pointer to store the left bound of the effective horizon hmax pointer to store the right bound of the effective horizon split point were the cumulative condition can be split
Definition at line 14078 of file cons_cumulative.c.
References computeEffectiveHorizonCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPpresolveCumulativeCondition().
Referenced by SCIP_DECL_CONSPRESOL(), and SCIPnormalizeCumulativeCondition().
◆ SCIPpresolveCumulativeCondition()
SCIP_RETCODE SCIPpresolveCumulativeCondition | ( | SCIP * | scip, |
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int | hmin, | ||
int | hmax, | ||
SCIP_Bool * | downlocks, | ||
SCIP_Bool * | uplocks, | ||
SCIP_CONS * | cons, | ||
SCIP_Bool * | irrelevants, | ||
int * | nfixedvars, | ||
int * | nchgsides, | ||
SCIP_Bool * | cutoff | ||
) |
presolve cumulative condition w.r.t. effective horizon by detecting irrelevant variables
- Parameters
-
scip SCIP data structure nvars number of start time variables (activities) vars array of start time variables durations array of durations hmin left bound of time axis to be considered hmax right bound of time axis to be considered (not including hmax) downlocks array storing if the variable has a down lock, or NULL uplocks array storing if the variable has an up lock, or NULL cons constraint which gets propagated, or NULL irrelevants array mark those variables which are irrelevant for the cumulative condition nfixedvars pointer to store the number of fixed variables nchgsides pointer to store the number of changed sides cutoff buffer to store whether a cutoff is detected
Definition at line 14097 of file cons_cumulative.c.
References presolveConsEst(), presolveConsLct(), SCIP_CALL, SCIP_OKAY, and SCIPpropCumulativeCondition().
Referenced by presolveCumulativeCondition(), and SCIPsplitCumulativeCondition().
◆ SCIPpropCumulativeCondition()
SCIP_RETCODE SCIPpropCumulativeCondition | ( | SCIP * | scip, |
SCIP_PRESOLTIMING | presoltiming, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
int | hmin, | ||
int | hmax, | ||
SCIP_CONS * | cons, | ||
int * | nchgbds, | ||
SCIP_Bool * | initialized, | ||
SCIP_Bool * | explanation, | ||
SCIP_Bool * | cutoff | ||
) |
propagate the given cumulative condition
- Parameters
-
scip SCIP data structure presoltiming current presolving timing nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands capacity available cumulative capacity hmin left bound of time axis to be considered (including hmin) hmax right bound of time axis to be considered (not including hmax) cons constraint which gets propagated nchgbds pointer to store the number of variable bound changes initialized was conflict analysis initialized explanation bool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL cutoff pointer to store if the cumulative condition is violated
Definition at line 14128 of file cons_cumulative.c.
References CONSHDLR_NAME, FALSE, NULL, propagateCumulativeCondition(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPrespropCumulativeCondition().
Referenced by propagateCons(), and SCIPpresolveCumulativeCondition().
◆ SCIPrespropCumulativeCondition()
SCIP_RETCODE SCIPrespropCumulativeCondition | ( | SCIP * | scip, |
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
int | hmin, | ||
int | hmax, | ||
SCIP_VAR * | infervar, | ||
int | inferinfo, | ||
SCIP_BOUNDTYPE | boundtype, | ||
SCIP_BDCHGIDX * | bdchgidx, | ||
SCIP_Real | relaxedbd, | ||
SCIP_Bool * | explanation, | ||
SCIP_RESULT * | result | ||
) |
resolve propagation w.r.t. the cumulative condition
- Parameters
-
scip SCIP data structure nvars number of start time variables (activities) vars array of start time variables durations array of durations demands array of demands capacity cumulative capacity hmin left bound of time axis to be considered (including hmin) hmax right bound of time axis to be considered (not including hmax) infervar the conflict variable whose bound change has to be resolved inferinfo the user information boundtype the type of the changed bound (lower or upper bound) bdchgidx the index of the bound change, representing the point of time where the change took place relaxedbd the relaxed bound which is sufficient to be explained explanation bool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL result pointer to store the result of the propagation conflict resolving call
Definition at line 14177 of file cons_cumulative.c.
References intToInferInfo(), respropCumulativeCondition(), SCIP_CALL, SCIP_OKAY, SCIPvisualizeConsCumulative(), and TRUE.
Referenced by SCIP_DECL_CONSRESPROP(), and SCIPpropCumulativeCondition().
◆ SCIPvisualizeConsCumulative()
SCIP_RETCODE SCIPvisualizeConsCumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
this method visualizes the cumulative structure in GML format
- Parameters
-
scip SCIP data structure cons cumulative constraint
Definition at line 14202 of file cons_cumulative.c.
References b, NULL, SCIP_CALL_TERMINATE, SCIP_FILECREATEERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, SCIPgmlWriteArc(), SCIPgmlWriteClosing(), SCIPgmlWriteNode(), SCIPgmlWriteOpening(), SCIPhashtableCreate(), SCIPhashtableExists(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPprintSysError(), SCIPsetSolveCumulative(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetUbGlobal(), SCIPvarGetVlbVars(), SCIPvarGetVubVars(), and TRUE.
Referenced by SCIP_DECL_CONSINITPRE(), and SCIPrespropCumulativeCondition().
◆ SCIPsetSolveCumulative()
SCIP_RETCODE SCIPsetSolveCumulative | ( | SCIP * | scip, |
SCIP_DECL_SOLVECUMULATIVE((*solveCumulative)) | |||
) |
sets method to solve an individual cumulative condition
- Parameters
-
scip SCIP data structure
Definition at line 14305 of file cons_cumulative.c.
References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPsolveCumulative(), and solveCumulative().
Referenced by runShell(), and SCIPvisualizeConsCumulative().
◆ SCIPsolveCumulative()
SCIP_RETCODE SCIPsolveCumulative | ( | SCIP * | scip, |
int | njobs, | ||
SCIP_Real * | ests, | ||
SCIP_Real * | lsts, | ||
SCIP_Real * | objvals, | ||
int * | durations, | ||
int * | demands, | ||
int | capacity, | ||
int | hmin, | ||
int | hmax, | ||
SCIP_Real | timelimit, | ||
SCIP_Real | memorylimit, | ||
SCIP_Longint | maxnodes, | ||
SCIP_Bool * | solved, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | unbounded, | ||
SCIP_Bool * | error | ||
) |
solves given cumulative condition as independent sub problem
- Note
- If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.
- Parameters
-
scip SCIP data structure njobs number of jobs (activities) ests array with the earlier start time for each job lsts array with the latest start time for each job objvals array of objective coefficients for each job (linear objective function), or NULL if none durations array of durations demands array of demands capacity cumulative capacity hmin left bound of time axis to be considered (including hmin) hmax right bound of time axis to be considered (not including hmax) timelimit time limit for solving in seconds memorylimit memory limit for solving in mega bytes (MB) maxnodes maximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit) solved pointer to store if the problem is solved (to optimality) infeasible pointer to store if the problem is infeasible unbounded pointer to store if the problem is unbounded error pointer to store if an error occurred
Definition at line 14335 of file cons_cumulative.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateWorstCaseProfile(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.
Referenced by applyOptcumulative(), SCIPsetSolveCumulative(), solveCumulative(), and solveIndependentCons().
◆ SCIPcreateWorstCaseProfile()
SCIP_RETCODE SCIPcreateWorstCaseProfile | ( | SCIP * | scip, |
SCIP_PROFILE * | profile, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands | ||
) |
creates the worst case resource profile, that is, all jobs are inserted with the earliest start and latest completion time
- Parameters
-
scip SCIP data structure profile resource profile nvars number of variables (jobs) vars array of integer variable which corresponds to starting times for a job durations array containing corresponding durations demands array containing corresponding demands
Definition at line 14391 of file cons_cumulative.c.
References computeImpliedEst(), computeImpliedLct(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPcomputeHmin(), SCIPconvertRealToInt(), SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsertInt(), SCIPprofileInsertCore(), SCIPsortDownIntInt(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), propagateCons(), and SCIPsolveCumulative().
◆ SCIPcomputeHmin()
int SCIPcomputeHmin | ( | SCIP * | scip, |
SCIP_PROFILE * | profile, | ||
int | capacity | ||
) |
computes w.r.t. the given worst case resource profile the first time point where the given capacity can be violated
- Parameters
-
scip SCIP data structure profile worst case resource profile capacity capacity to check
Definition at line 14470 of file cons_cumulative.c.
References SCIPcomputeHmax(), SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), propagateCons(), and SCIPcreateWorstCaseProfile().
◆ SCIPcomputeHmax()
int SCIPcomputeHmax | ( | SCIP * | scip, |
SCIP_PROFILE * | profile, | ||
int | capacity | ||
) |
computes w.r.t. the given worst case resource profile the first time point where the given capacity is satisfied for sure
- Parameters
-
scip SCIP data structure profile worst case profile capacity capacity to check
Definition at line 14500 of file cons_cumulative.c.
References SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcomputeHmin().
◆ SCIPcreateConsDisjunction()
SCIP_RETCODE SCIPcreateConsDisjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nconss, | ||
SCIP_CONS ** | conss, | ||
SCIP_CONS * | relaxcons, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic | ||
) |
creates and captures a disjunction constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nconss number of initial constraints in disjunction conss initial constraint in disjunction relaxcons a conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
Definition at line 1089 of file cons_disjunction.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicDisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by SCIPcreateConsBasicDisjunction(), and SCIPincludeConshdlrDisjunction().
◆ SCIPcreateConsBasicDisjunction()
SCIP_RETCODE SCIPcreateConsBasicDisjunction | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nconss, | ||
SCIP_CONS ** | conss, | ||
SCIP_CONS * | relaxcons | ||
) |
creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsDisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsDisjunction() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nconss number of initial constraints in disjunction conss initial constraint in disjunction relaxcons a conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL
Definition at line 1141 of file cons_disjunction.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemDisjunction(), SCIPcreateConsDisjunction(), and TRUE.
Referenced by SCIPcreateConsDisjunction().
◆ SCIPaddConsElemDisjunction()
SCIP_RETCODE SCIPaddConsElemDisjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | addcons | ||
) |
adds constraint to the disjunction of constraints
- Parameters
-
scip SCIP data structure cons disjunction constraint addcons additional constraint in disjunction
Definition at line 1160 of file cons_disjunction.c.
References consdataAddCons(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicDisjunction().
◆ SCIPcreateConsIndicator()
SCIP_RETCODE SCIPcreateConsIndicator | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an indicator constraint
- Note
- binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint (indicator or quadratic) name name of constraint binvar binary indicator variable (or NULL) nvars number of variables in the inequality vars array with variables of inequality (or NULL) vals values of variables in inequality (or NULL) rhs rhs of the inequality initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 7435 of file cons_indicator.c.
References SCIPcreateConsIndicatorGeneric(), and TRUE.
Referenced by createIndicatorConstraint(), readIndicators(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_LINCONSUPGD(), SCIPcreateConsBasicIndicator(), SCIPincludeConshdlrIndicator(), and upgradeIndicatorSuperindicator().
◆ SCIPcreateConsBasicIndicator()
SCIP_RETCODE SCIPcreateConsBasicIndicator | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | rhs | ||
) |
creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsIndicator() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint (indicator or quadratic) name name of constraint binvar binary indicator variable (or NULL) nvars number of variables in the inequality vars array with variables of inequality (or NULL) vals values of variables in inequality (or NULL) rhs rhs of the inequality
Definition at line 7724 of file cons_indicator.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsIndicator(), SCIPcreateConsIndicatorGenericLinCons(), and TRUE.
Referenced by SCIPcreateConsIndicatorGeneric().
◆ SCIPcreateConsIndicatorGeneric()
SCIP_RETCODE SCIPcreateConsIndicatorGeneric | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | activeone, | ||
SCIP_Bool | lessthanineq, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a indicator constraint in a more generic version.
The key difference from SCIPcreateConsIndicator() is the activeone and lessthanineq Booleans. If \(z = o\), with \(o\) the activeone flag, then: if lessthanineq then \(a^T x \leq b\) holds, else the passed vectors are assumed to be of the form \(a^T x \geq b\). The underlying linear constraint is always created as a less-than inequality.
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint (indicator or quadratic) name name of constraint binvar binary indicator variable (or NULL) nvars number of variables in the inequality vars array with variables of inequality (or NULL) vals values of variables in inequality (or NULL) rhs rhs of the inequality activeone is the constraint active when the binary is 1? lessthanineq is the linear constraint a less than RHS (TRUE) or greater than RHS (FALSE)? initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 7476 of file cons_indicator.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPblkmem(), SCIPceil(), SCIPconsAddUpgradeLocks(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicIndicator(), SCIPcreateConsLinear(), SCIPcreateConsQuadraticNonlinear(), SCIPcreateVar(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPgetNOrigVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPinfinity(), SCIPisIntegral(), SCIPisTransformed(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPsnprintf(), SCIPvarGetType(), SCIPvarIsIntegral(), and TRUE.
Referenced by SCIPcreateConsIndicator().
◆ SCIPcreateConsIndicatorLinCons()
SCIP_RETCODE SCIPcreateConsIndicatorLinCons | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
SCIP_CONS * | lincons, | ||
SCIP_VAR * | slackvar, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an indicator constraint with given linear constraint and slack variable
- Note
- binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
- we assume that slackvar actually appears in lincons and we also assume that it takes the role of a slack variable!
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint binvar binary indicator variable (or NULL) lincons linear constraint slackvar slack variable initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 7905 of file cons_indicator.c.
References SCIPcreateConsBasicIndicatorLinCons(), SCIPcreateConsIndicatorGenericLinCons(), and TRUE.
Referenced by createSubSCIP(), readIndicators(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicIndicatorLinCons(), and SCIPcreateConsIndicatorGenericLinCons().
◆ SCIPcreateConsIndicatorGenericLinCons()
SCIP_RETCODE SCIPcreateConsIndicatorGenericLinCons | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
SCIP_CONS * | lincons, | ||
SCIP_VAR * | slackvar, | ||
SCIP_Bool | activeone, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures an indicator constraint with given linear constraint and slack variable in a generic version, i. e., with a flag activeone indicating whether the constraint is active on value 1 or 0 of the binary variable.
- Note
- binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
- we assume that slackvar actually appears in lincons and we also assume that it takes the role of a slack variable!
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- See also
- SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint binvar binary indicator variable (or NULL) lincons linear constraint slackvar slack variable activeone is the constraint active when the binary is 1? initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 7757 of file cons_indicator.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPcaptureVar(), SCIPconsAddUpgradeLocks(), SCIPconsGetHdlr(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCons(), SCIPcreateConsIndicatorLinCons(), SCIPcreateConsQuadraticNonlinear(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNegatedVar(), SCIPgetNVarsLinear(), SCIPgetVarsLinear(), SCIPmarkDoNotMultaggrVar(), SCIPvarGetType(), and TRUE.
Referenced by SCIP_DECL_CONSCOPY(), SCIPcreateConsBasicIndicator(), and SCIPcreateConsIndicatorLinCons().
◆ SCIPcreateConsBasicIndicatorLinCons()
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
SCIP_CONS * | lincons, | ||
SCIP_VAR * | slackvar | ||
) |
creates and captures an indicator constraint with given linear constraint and slack variable in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- Note
- binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
- we assume that slackvar actually appears in lincons and we also assume that it takes the role of a slack variable!
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- See also
- SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint binvar binary indicator variable (or NULL) lincons linear constraint slackvar slack variable
Definition at line 7954 of file cons_indicator.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarIndicator(), SCIPcreateConsIndicatorLinCons(), and TRUE.
Referenced by SCIPcreateConsIndicatorLinCons().
◆ SCIPaddVarIndicator()
SCIP_RETCODE SCIPaddVarIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val | ||
) |
adds variable to the inequality of the indicator constraint
- Parameters
-
scip SCIP data structure cons indicator constraint var variable to add to the inequality val value of variable
Definition at line 7973 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetLinearConsIndicator(), SCIPisIntegral(), SCIPvarGetType(), and SCIPvarIsIntegral().
Referenced by SCIPcreateConsBasicIndicatorLinCons().
◆ SCIPgetLinearConsIndicator()
gets the linear constraint corresponding to the indicator constraint (may be NULL)
- Parameters
-
cons indicator constraint
Definition at line 8008 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetLinearConsIndicator().
Referenced by computeRanks(), createSubSCIP(), SCIP_DECL_LINCONSUPGD(), SCIPaddVarIndicator(), SCIPwriteLp(), SCIPwriteMps(), and writeOpbConstraints().
◆ SCIPsetLinearConsIndicator()
SCIP_RETCODE SCIPsetLinearConsIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | lincons | ||
) |
sets the linear constraint corresponding to the indicator constraint (may be NULL)
- Parameters
-
scip SCIP data structure cons indicator constraint lincons linear constraint
Definition at line 8025 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdelCons(), SCIPerrorMessage, SCIPgetActiveOnIndicator(), SCIPgetNVarsLinear(), SCIPgetStage(), SCIPgetVarsLinear(), SCIPreleaseCons(), SCIPvarGetType(), and TRUE.
Referenced by SCIPgetLinearConsIndicator().
◆ SCIPsetBinaryVarIndicator()
SCIP_RETCODE SCIPsetBinaryVarIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | binvar | ||
) |
sets binary indicator variable for indicator constraint
- Parameters
-
scip SCIP data structure cons indicator constraint binvar binary variable to add to the inequality
Definition at line 8150 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetNegatedVar(), SCIPgetSlackVarIndicator(), SCIPgetTransformedVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetType().
Referenced by SCIPgetBinaryVarIndicatorGeneric().
◆ SCIPgetActiveOnIndicator()
gets activation value of an indicator constraint, TRUE for active on 1, FALSE for active on 0
- Parameters
-
cons indicator constraint
Definition at line 8095 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetBinaryVarIndicator().
Referenced by SCIPsetLinearConsIndicator().
◆ SCIPgetBinaryVarIndicator()
gets binary variable corresponding to indicator constraint. Returns the negative of the original binary variable if activeone was set to false
gets binary variable corresponding to indicator constraint
- Parameters
-
cons indicator constraint
Definition at line 8112 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetBinaryVarIndicatorGeneric().
Referenced by computeRanks(), createCoveringProblem(), createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSGETDIVEBDCHGS(), SCIP_DECL_HEUREXEC(), SCIPgetActiveOnIndicator(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), tryOneOpt(), trySolCandidate(), and writeOpbConstraints().
◆ SCIPgetBinaryVarIndicatorGeneric()
similar to SCIPgetBinaryVarIndicator but returns the original binary variable passed by the user.
- Parameters
-
cons indicator constraint
Definition at line 8128 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPsetBinaryVarIndicator(), and SCIPvarGetNegationVar().
Referenced by SCIPgetBinaryVarIndicator().
◆ SCIPgetSlackVarIndicator()
gets slack variable corresponding to indicator constraint
- Parameters
-
cons indicator constraint
Definition at line 8231 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetSlackVarUb().
Referenced by createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIPsetBinaryVarIndicator(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and writeOpbConstraints().
◆ SCIPsetSlackVarUb()
SCIP_RETCODE SCIPsetSlackVarUb | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | ub | ||
) |
sets upper bound for slack variable corresponding to indicator constraint
Use with care if you know that the maximal violation of the corresponding constraint is at most ub
. This bound might be improved automatically during the solution process.
- Precondition
- This method should only be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure cons indicator constraint ub upper bound for slack variable
Definition at line 8256 of file cons_indicator.c.
References CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgVarUb(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetStage(), and SCIPisViolatedIndicator().
Referenced by SCIPgetSlackVarIndicator().
◆ SCIPisViolatedIndicator()
checks whether indicator constraint is violated w.r.t. sol
- Parameters
-
scip SCIP data structure cons indicator constraint sol solution, or NULL to use current node's solution
Definition at line 8282 of file cons_indicator.c.
References FALSE, NULL, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetSolVal(), SCIPisFeasPositive(), SCIPmakeIndicatorFeasible(), and TRUE.
Referenced by SCIP_DECL_CONSGETDIVEBDCHGS(), and SCIPsetSlackVarUb().
◆ SCIPmakeIndicatorFeasible()
SCIP_RETCODE SCIPmakeIndicatorFeasible | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool * | changed | ||
) |
based on values of other variables, computes slack and binary variable to turn constraint feasible
based on values of other variables, computes slack and binary variable to turn constraint feasible
It will also clean up the solution, i.e., shift slack variable, as follows:
If the inequality is \(a^T x + \gamma\, s \leq \beta\), the value of the slack variable \(s\) to achieve equality is
\[ s^* = \frac{\beta - a^T x^*}{\gamma}, \]
where \(x^*\) is the given solution. In case of \(a^T x + \gamma\, s \geq \alpha\), we arrive at
\[ s^* = \frac{\alpha - a^T x^*}{\gamma}. \]
The typical values of \(\gamma\) in the first case is -1 and +1 in the second case.
Now, let \(\sigma\) be the sign of \(\gamma\) in the first case and \(-\gamma\) in the second case. Thus, if \(\sigma > 0\) and \(s^* < 0\), the inequality cannot be satisfied by a nonnegative value for the slack variable; in this case, we have to leave the values as they are. If \(\sigma < 0\) and \(s^* > 0\), the solution violates the indicator constraint (we can set the slack variable to value \(s^*\)). If \(\sigma < 0\) and \(s^* \leq 0\) or \(\sigma > 0\) and \(s^* \geq 0\), the constraint is satisfied, and we can set the slack variable to 0.
- Parameters
-
scip SCIP data structure cons indicator constraint sol solution changed pointer to store whether the solution has been changed
Definition at line 8337 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPmakeIndicatorsFeasible(), SCIPsetSolVal(), SCIPvarGetLbLocal(), SCIPvarGetNegationVar(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetStatus(), TRUE, and varGetObjDelta().
Referenced by SCIP_DECL_CONSCHECK(), SCIPisViolatedIndicator(), and SCIPmakeIndicatorsFeasible().
◆ SCIPmakeIndicatorsFeasible()
SCIP_RETCODE SCIPmakeIndicatorsFeasible | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool * | changed | ||
) |
based on values of other variables, computes slack and binary variable to turn all constraints feasible
- Parameters
-
scip SCIP data structure conshdlr indicator constraint handler sol solution changed pointer to store whether the solution has been changed
Definition at line 8512 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITPRESOLVE, SCIPaddLinearConsIndicator(), SCIPconsGetData(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPgetStage(), and SCIPmakeIndicatorFeasible().
Referenced by SCIPmakeIndicatorFeasible(), and SCIPperformGenericDivingAlgorithm().
◆ SCIPaddLinearConsIndicator()
SCIP_RETCODE SCIPaddLinearConsIndicator | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr, | ||
SCIP_CONS * | lincons | ||
) |
adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation
- Parameters
-
scip SCIP data structure conshdlr indicator constraint handler lincons linear constraint
Definition at line 8559 of file cons_indicator.c.
References consdataEnsureAddLinConsSize(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddRowIndicator(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsLocal(), and SCIPconsIsModifiable().
Referenced by SCIPmakeIndicatorsFeasible().
◆ SCIPaddRowIndicator()
SCIP_RETCODE SCIPaddRowIndicator | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr, | ||
SCIP_ROW * | row | ||
) |
adds additional globally valid row that is not connected with an indicator constraint, but can be used for separation
adds additional row that is not connected with an indicator constraint, but can be used for separation
- Note
- The row is directly added to the alternative polyhedron and is not stored.
- Parameters
-
scip SCIP data structure conshdlr indicator constraint handler row row to add
Definition at line 8591 of file cons_indicator.c.
References addAltLPRow(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIProwGetName(), and SCIProwIsLocal().
Referenced by SCIPaddLinearConsIndicator().
◆ SCIPcreateConsKnapsack()
SCIP_RETCODE SCIPcreateConsKnapsack | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Longint * | weights, | ||
SCIP_Longint | capacity, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a knapsack constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a knapsack constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()! [SnippetConsCreationKnapsack]
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of items in the knapsack vars array with item variables weights array with item weights capacity capacity of knapsack (right hand side of inequality) initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 13558 of file cons_knapsack.c.
References catchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicKnapsack(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPisTransformed().
Referenced by createAndAddLinearCons(), createCapacityRestriction(), createMipCpFormulation(), createNormalizedKnapsack(), createRow(), presolRoundCardinality(), and SCIPcreateConsBasicKnapsack().
◆ SCIPcreateConsBasicKnapsack()
SCIP_RETCODE SCIPcreateConsBasicKnapsack | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Longint * | weights, | ||
SCIP_Longint | capacity | ||
) |
creates and captures a knapsack constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsKnapsack(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsKnapsack() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
! [SnippetConsCreationKnapsack] creates and captures a knapsack constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsKnapsack(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsKnapsack() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of items in the knapsack vars array with item variables weights array with item weights capacity capacity of knapsack
Definition at line 13633 of file cons_knapsack.c.
References FALSE, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddCoefKnapsack(), SCIPcreateConsKnapsack(), and TRUE.
Referenced by createIntervalRelaxation(), createMipFormulation(), initPricing(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsKnapsack().
◆ SCIPaddCoefKnapsack()
SCIP_RETCODE SCIPaddCoefKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Longint | weight | ||
) |
adds new item to knapsack constraint
- Parameters
-
scip SCIP data structure cons constraint data var item variable weight item weight
Definition at line 13652 of file cons_knapsack.c.
Referenced by addCoefTerm(), createCapacityRestriction(), createIntervalRelaxation(), createMipCpFormulation(), createMipFormulation(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddCoefPseudoboolean(), SCIPconsAddCoef(), and SCIPcreateConsBasicKnapsack().
◆ SCIPgetCapacityKnapsack()
SCIP_Longint SCIPgetCapacityKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the capacity of the knapsack constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13674 of file cons_knapsack.c.
References NULL, SCIP_Longint, SCIPABORT, SCIPchgCapacityKnapsack(), SCIPconsGetData(), and SCIPerrorMessage.
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), createAltLP(), getLinearConsSides(), presolveAddKKTKnapsackConss(), SCIPconsGetRhs(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPchgCapacityKnapsack()
SCIP_RETCODE SCIPchgCapacityKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Longint | capacity | ||
) |
changes capacity of the knapsack constraint
- Note
- This method can only be called during problem creation stage (SCIP_STAGE_PROBLEM)
- Parameters
-
scip SCIP data structure cons constraint data capacity new capacity of knapsack
Definition at line 13700 of file cons_knapsack.c.
Referenced by SCIPgetCapacityKnapsack().
◆ SCIPgetNVarsKnapsack()
gets the number of items in the knapsack constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13731 of file cons_knapsack.c.
References NULL, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetVarsKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), createAltLP(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPgetVarsKnapsack()
gets the array of variables in the knapsack constraint; the user must not modify this array!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13754 of file cons_knapsack.c.
References NULL, SCIP_Longint, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetWeightsKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), createAltLP(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIPgetNVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPgetWeightsKnapsack()
SCIP_Longint* SCIPgetWeightsKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the array of weights in the knapsack constraint; the user must not modify this array!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13777 of file cons_knapsack.c.
References NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetDualsolKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), createAltLP(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIPgetConsVals(), SCIPgetVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
◆ SCIPgetDualsolKnapsack()
gets the dual solution of the knapsack constraint in the current LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13800 of file cons_knapsack.c.
References NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetDualfarkasKnapsack(), and SCIProwGetDualsol().
Referenced by SCIPconsGetDualsol(), and SCIPgetWeightsKnapsack().
◆ SCIPgetDualfarkasKnapsack()
gets the dual Farkas value of the knapsack constraint in the current infeasible LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13826 of file cons_knapsack.c.
References NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetRowKnapsack(), and SCIProwGetDualfarkas().
Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolKnapsack().
◆ SCIPgetRowKnapsack()
returns the linear relaxation of the given knapsack constraint; may return NULL if no LP row was yet created; the user must not modify the row!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 13854 of file cons_knapsack.c.
References NULL, SCIP_Bool, SCIPABORT, SCIPcleanupConssKnapsack(), SCIPconsGetData(), and SCIPerrorMessage.
Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasKnapsack().
◆ SCIPsolveKnapsackExactly()
SCIP_RETCODE SCIPsolveKnapsackExactly | ( | SCIP * | scip, |
int | nitems, | ||
SCIP_Longint * | weights, | ||
SCIP_Real * | profits, | ||
SCIP_Longint | capacity, | ||
int * | items, | ||
int * | solitems, | ||
int * | nonsolitems, | ||
int * | nsolitems, | ||
int * | nnonsolitems, | ||
SCIP_Real * | solval, | ||
SCIP_Bool * | success | ||
) |
solves knapsack problem in maximization form exactly using dynamic programming; if needed, one can provide arrays to store all selected items and all not selected items
- Note
- in case you provide the solitems or nonsolitems array you also have to provide the counter part, as well
- the algorithm will first compute a greedy solution and terminate if the greedy solution is proven to be optimal. The dynamic programming algorithm runs with a time and space complexity of O(nitems * capacity).
solves knapsack problem in maximization form exactly using dynamic programming; if needed, one can provide arrays to store all selected items and all not selected items
- Note
- in case you provide the solitems or nonsolitems array you also have to provide the counter part, as well
- the algorithm will first compute a greedy solution and terminate if the greedy solution is proven to be optimal. The dynamic programming algorithm runs with a time and space complexity of O(nitems * capacity).
- Parameters
-
scip SCIP data structure nitems number of available items weights item weights profits item profits capacity capacity of knapsack items item numbers solitems array to store items in solution, or NULL nonsolitems array to store items not in solution, or NULL nsolitems pointer to store number of items in solution, or NULL nnonsolitems pointer to store number of items not in solution, or NULL solval pointer to store optimal solution value, or NULL success pointer to store if an error occured during solving (normally a memory problem)
Definition at line 1100 of file cons_knapsack.c.
References FALSE, IDX, MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_NOMEMORY, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcGreComDiv(), SCIPdebugMsg, SCIPfloor(), SCIPfreeBufferArray, SCIPisGE(), SCIPisIntegral(), SCIPselectWeightedDownRealLongRealInt(), SCIPsolveKnapsackApproximately(), SCIPsortDownRealIntLong(), and TRUE.
Referenced by buildFlowCover(), and getHighestCapacityUsage().
◆ SCIPsolveKnapsackApproximately()
SCIP_RETCODE SCIPsolveKnapsackApproximately | ( | SCIP * | scip, |
int | nitems, | ||
SCIP_Longint * | weights, | ||
SCIP_Real * | profits, | ||
SCIP_Longint | capacity, | ||
int * | items, | ||
int * | solitems, | ||
int * | nonsolitems, | ||
int * | nsolitems, | ||
int * | nnonsolitems, | ||
SCIP_Real * | solval | ||
) |
solves knapsack problem in maximization form approximately by solving the LP-relaxation of the problem using Dantzig's method and rounding down the solution; if needed, one can provide arrays to store all selected items and all not selected items
- Parameters
-
scip SCIP data structure nitems number of available items weights item weights profits item profits capacity capacity of knapsack items item numbers solitems array to store items in solution, or NULL nonsolitems array to store items not in solution, or NULL nsolitems pointer to store number of items in solution, or NULL nnonsolitems pointer to store number of items not in solution, or NULL solval pointer to store optimal solution value, or NULL
Definition at line 1604 of file cons_knapsack.c.
References GUBconsCreate(), SCIP_GUBSet::gubconss, SCIP_GUBCons::gubvars, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPisFeasGT(), SCIPselectWeightedDownRealLongRealInt(), and SCIPvarGetName().
Referenced by getCover(), and SCIPsolveKnapsackExactly().
◆ SCIPseparateKnapsackCuts()
SCIP_RETCODE SCIPseparateKnapsackCuts | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SEPA * | sepa, | ||
SCIP_VAR ** | vars, | ||
int | nvars, | ||
SCIP_Longint * | weights, | ||
SCIP_Longint | capacity, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool | usegubs, | ||
SCIP_Bool * | cutoff, | ||
int * | ncuts | ||
) |
separates different classes of valid inequalities for the 0-1 knapsack problem
- Parameters
-
scip SCIP data structure cons originating constraint of the knapsack problem, or NULL sepa originating separator of the knapsack problem, or NULL vars variables in knapsack constraint nvars number of variables in knapsack constraint weights weights of variables in knapsack constraint capacity capacity of knapsack sol primal SCIP solution to separate, NULL for current LP solution usegubs should GUB information be used for separation? cutoff pointer to store whether a cutoff has been detected ncuts pointer to add up the number of found cuts
Definition at line 5565 of file cons_knapsack.c.
References FALSE, getCover(), getFeasibleSet(), GUBsetCreate(), GUBsetFree(), GUBsetGetCliquePartition(), makeCoverMinimal(), SCIP_GUBSet::ngubconss, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPfreeBufferArray, SCIPgetSolVals(), SCIPincConsAge(), SCIPseparateRelaxedKnapsack(), SCIPvarGetName(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), TRUE, and USESUPADDLIFT.
Referenced by getFeasibleSet(), SCIPseparateRelaxedKnapsack(), and separateCons().
◆ SCIPseparateRelaxedKnapsack()
SCIP_RETCODE SCIPseparateRelaxedKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SEPA * | sepa, | ||
int | nknapvars, | ||
SCIP_VAR ** | knapvars, | ||
SCIP_Real * | knapvals, | ||
SCIP_Real | valscale, | ||
SCIP_Real | rhs, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool * | cutoff, | ||
int * | ncuts | ||
) |
- Parameters
-
scip SCIP data structure cons originating constraint of the knapsack problem, or NULL sepa originating separator of the knapsack problem, or NULL nknapvars number of variables in the continuous knapsack constraint knapvars variables in the continuous knapsack constraint knapvals coefficients of the variables in the continuous knapsack constraint valscale -1.0 if lhs of row is used as rhs of c. k. constraint, +1.0 otherwise rhs right hand side of the continuous knapsack constraint sol primal CIP solution, NULL for current LP solution cutoff pointer to store whether a cutoff was found ncuts pointer to add up the number of found cuts
Definition at line 5782 of file cons_knapsack.c.
References BMSclearMemoryArray, CONSHDLR_NAME, DEFAULT_USEGUBS, FALSE, KNAPSACKRELAX_MAXDELTA, KNAPSACKRELAX_MAXDNOM, KNAPSACKRELAX_MAXSCALE, MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcIntegralScalar(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPepsilon(), SCIPfeasFloor(), SCIPfindConshdlr(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetNContVars(), SCIPgetNegatedVar(), SCIPgetNVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPreallocBlockMemoryArray, SCIPseparateKnapsackCuts(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), SCIPvarIsBinary(), separateCons(), and TRUE.
Referenced by addCut(), and SCIPseparateKnapsackCuts().
◆ SCIPcleanupConssKnapsack()
SCIP_RETCODE SCIPcleanupConssKnapsack | ( | SCIP * | scip, |
SCIP_Bool | onlychecked, | ||
SCIP_Bool * | infeasible | ||
) |
cleans up (multi-)aggregations and fixings from knapsack constraints
- Parameters
-
scip SCIP data structure onlychecked should only checked constraints be cleaned up? infeasible pointer to return whether the problem was detected to be infeasible
Definition at line 13877 of file cons_knapsack.c.
Referenced by SCIPgetRowKnapsack(), and SCIPmatrixCreate().
◆ SCIPincludeLinconsUpgrade()
SCIP_RETCODE SCIPincludeLinconsUpgrade | ( | SCIP * | scip, |
SCIP_DECL_LINCONSUPGD((*linconsupgd)) | , | ||
int | priority, | ||
const char * | conshdlrname | ||
) |
includes a linear constraint update method into the linear constraint handler
- Parameters
-
scip SCIP data structure priority priority of upgrading method conshdlrname name of the constraint handler
Definition at line 17799 of file cons_linear.c.
References SCIP_LinConsUpgrade::active, conshdlrdataHasUpgrade(), conshdlrdataIncludeUpgrade(), FALSE, linconsupgradeCreate(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPaddBoolParam(), SCIPconshdlrGetData(), SCIPcreateConsLinear(), SCIPerrorMessage, SCIPsnprintf(), and TRUE.
Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLogicor(), SCIPincludeConshdlrVarbound(), and SCIPincludeConshdlrXor().
◆ SCIPcreateConsLinear()
SCIP_RETCODE SCIPcreateConsLinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a linear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of nonzeros in the constraint vars array with variables of constraint entries vals array with coefficients of constraint entries lhs left hand side of constraint rhs right hand side of constraint initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 17851 of file cons_linear.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIPABORT, SCIPcreateCons(), SCIPcreateConsBasicLinear(), SCIPcreateConsLinear(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarIsRelaxationOnly(), and TRUE.
Referenced by addBranchingComplementaritiesSOS1(), addExtendedAsymmetricFormulation(), addExtendedFlowFormulation(), addLocalBranchingConstraint(), addLocalbranchingConstraintAndObjcutoff(), addLocalConss(), addSSTConssOrbitAndUpdateSST(), addStrongSBCsSubgroup(), addTrustRegionConstraints(), addWeakSBCsSubgroup(), aggregation(), applyFixings(), cancelRow(), consdataLinearize(), copyCuts(), CREATE_CONSTRAINT(), createAndAddLinearCons(), createAndAddProofcons(), createConstraint(), createConstraints(), createCoveringProblem(), createLinearCons(), createMipCpFormulation(), createNAryBranch(), createProbOnlyEdge(), createProbSimplified(), createProbSimplifiedTest(), createRows(), createSubSCIP(), createSubscip(), dualPresolve(), execmain(), fixDeleteOrUpgradeCons(), fixVariableZeroNode(), forbidCover(), getFixedVariable(), preprocessConstraintPairs(), propIndicator(), scipexamples::QueensSolver::QueensSolver(), readCnf(), readConstraints(), readOPBFile(), readRows(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_READERREAD(), SCIPaddTrustregionNeighborhoodConstraint(), SCIPcopyConsLinear(), SCIPcreateConsIndicatorGeneric(), SCIPcreateConsLinear(), SCIPgetVarCopy(), SCIPincludeLinconsUpgrade(), selectVarMultAggrBranching(), setupAndSolveSubscip(), setupSubproblem(), setupSubScip(), tightenSingleVar(), tryUpgradingLogicor(), tryUpgradingSetppc(), and upgradeLinearSuperindicator().
◆ SCIPcreateConsBasicLinear()
SCIP_RETCODE SCIPcreateConsBasicLinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a linear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsLinear() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of nonzeros in the constraint vars array with variables of constraint entries vals array with coefficients of constraint entries lhs left hand side of constraint rhs right hand side of constraint
Definition at line 18040 of file cons_linear.c.
Referenced by addLocalBranchingConstraint(), applyRepair(), createAndAddTransferredCut(), createAndApplyStoredBendersCut(), createBlockproblem(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMasterproblem(), createMIP(), createMipFormulation(), createOriginalproblem(), createProbSimplified(), createProbSimplifiedTest(), createSubproblem(), createSubproblems(), generateAndApplyBendersCuts(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), getBinaryProductExprDo(), infinityCountUpdate(), main(), AMPLProblemHandler::OnHeader(), readLIBSVM(), reformulateFactorizedBinaryQuadratic(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcreateConsLinear(), SCIPgenerateAndApplyBendersOptCut(), SCIPincludePresolMILP(), SCIPverifyCircularPatternNLP(), setupAndSolveFiniteSolSubscip(), setupProblem(), and solvePricingMINLP().
◆ SCIPcopyConsLinear()
SCIP_RETCODE SCIPcopyConsLinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
SCIP * | sourcescip, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | sourcevars, | ||
SCIP_Real * | sourcecoefs, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
SCIP_HASHMAP * | varmap, | ||
SCIP_HASHMAP * | consmap, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode, | ||
SCIP_Bool | global, | ||
SCIP_Bool * | valid | ||
) |
creates by copying and captures a linear constraint
- Parameters
-
scip target SCIP data structure cons pointer to store the created target constraint sourcescip source SCIP data structure name name of constraint nvars number of variables in source variable array sourcevars source variables of the linear constraints sourcecoefs coefficient array of the linear constraint, or NULL if all coefficients are one lhs left hand side of the linear constraint rhs right hand side of the linear constraint varmap a SCIP_HASHMAP mapping variables of the source SCIP to corresponding variables of the target SCIP consmap a hashmap to store the mapping of source constraints to the corresponding target constraints initial should the LP relaxation of constraint be in the initial LP? separate should the constraint be separated during LP processing? enforce should the constraint be enforced during node processing? check should the constraint be checked for feasibility? propagate should the constraint be propagated during node processing? local is constraint only valid locally? modifiable is constraint modifiable (subject to column generation)? dynamic is constraint subject to aging? removable should the relaxation be removed from the LP due to aging or cleanup? stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? global create a global or a local copy? valid pointer to store if the copying was valid
Definition at line 18060 of file cons_linear.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPcreateConsLinear(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetVarCopy(), SCIPisGT(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), SCIPvarIsRelaxationOnly(), and TRUE.
Referenced by SCIP_DECL_CONSCOPY().
◆ SCIPaddCoefLinear()
SCIP_RETCODE SCIPaddCoefLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val | ||
) |
adds coefficient to linear constraint (if it is not zero)
- Parameters
-
scip SCIP data structure cons constraint data var variable of constraint entry val coefficient of constraint entry
Definition at line 18192 of file cons_linear.c.
References addCoef(), chgLhs(), chgRhs(), CONSHDLR_NAME, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPchgCoefLinear(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPinfinity(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetName(), and TRUE.
Referenced by ObjPricerVRP::add_tour_variable(), addAuxiliaryVariableToCut(), addCoefTerm(), AMPLProblemHandler::LinearPartHandler::AddTerm(), addVariable(), applyFixings(), applyRepair(), computeNogoodCut(), computeStandardIntegerOptCut(), consdataLinearize(), createAndAddLinearCons(), createAndAddProofcons(), createAndAddTransferredCut(), createConstraint(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMasterproblem(), createMIP(), createMipCpFormulation(), createMipFormulation(), createOriginalproblem(), createProbOnlyEdge(), createProbSimplified(), createProbSimplifiedTest(), createSubproblem(), createSubproblems(), createSubSCIP(), execmain(), getBoundConsFromVertices(), main(), presolveAddKKTLinearCons(), presolveAddKKTQuadBilinearTerms(), presolveAddKKTQuadLinearTerms(), presolveAddKKTQuadQuadraticTerms(), scipexamples::QueensSolver::QueensSolver(), readCols(), readIndicators(), reformulateFactorizedBinaryQuadratic(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_READERREAD(), SCIPaddCoefPseudoboolean(), SCIPaddVarIndicator(), SCIPapplyProximity(), SCIPbendersMergeSubproblemIntoMaster(), SCIPchgCoefLinear(), SCIPconsAddCoef(), SCIPcopyConsLinear(), SCIPcreateConsIndicatorGeneric(), SCIPgenerateAndApplyBendersOptCut(), SCIPgetVarCopy(), SCIPverifyCircularPatternNLP(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscip(), setupProblem(), setupSubproblem(), setupSubScip(), solvePricingMINLP(), tightenSingleVar(), tryUpgradingLogicor(), and tryUpgradingSetppc().
◆ SCIPchgCoefLinear()
SCIP_RETCODE SCIPchgCoefLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val | ||
) |
changes coefficient of variable in linear constraint; deletes the variable if coefficient is zero; adds variable if not yet contained in the constraint
- Note
- This method may only be called during problem creation stage for an original constraint and variable.
- This method requires linear time to search for occurences of the variable in the constraint data.
- Parameters
-
scip SCIP data structure cons constraint data var variable of constraint entry val new coefficient of constraint entry
Definition at line 18353 of file cons_linear.c.
References chgCoefPos(), delCoefPos(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPchgCoefLinear(), SCIPconsGetData(), SCIPdelCoefLinear(), SCIPerrorMessage, SCIPgetLhsLinear(), SCIPisZero(), and TRUE.
Referenced by addScenarioVarsAndConsToProb(), SCIPaddCoefLinear(), and SCIPchgCoefLinear().
◆ SCIPdelCoefLinear()
SCIP_RETCODE SCIPdelCoefLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
deletes variable from linear constraint
- Note
- This method may only be called during problem creation stage for an original constraint and variable.
- This method requires linear time to search for occurences of the variable in the constraint data.
- Parameters
-
scip SCIP data structure cons constraint data var variable of constraint entry
Definition at line 18421 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPchgCoefLinear().
◆ SCIPgetLhsLinear()
gets left hand side of linear constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18437 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addAltLPConstraint(), addLinearConstraints(), addScenarioVarsAndConsToProb(), checkConsnames(), checkLinearConssVarboundSOS1(), computeNogoodCut(), computeStandardIntegerOptCut(), computeSymmetryGroup(), createAltLP(), createAndAddProofcons(), determineTotalNumberLinearConss(), generateAndApplyBendersCuts(), generateAndApplyBendersIntegerCuts(), getLinearConsSides(), presolveAddKKTLinearConss(), presolveAddKKTQuadLinearTerms(), printRangeSection(), propIndicator(), readIndicators(), readQCMatrix(), readRanges(), readRhs(), reuseSolution(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRESOLEXEC(), SCIPchgCoefLinear(), SCIPconflictstoreCleanNewIncumbent(), SCIPconsGetLhs(), SCIPgenerateAndApplyBendersOptCut(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
◆ SCIPgetRhsLinear()
gets right hand side of linear constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18461 of file cons_linear.c.
References chgLhs(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addAltLPConstraint(), addLinearConstraints(), addScenarioVarsAndConsToProb(), checkConsnames(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAltLP(), createAndAddProofcons(), determineTotalNumberLinearConss(), generateAndApplyBendersCuts(), getLinearConsSides(), presolveAddKKTLinearConss(), presolveAddKKTQuadLinearTerms(), printRangeSection(), propIndicator(), readIndicators(), readQCMatrix(), readRanges(), readRhs(), reuseSolution(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRESOLEXEC(), SCIPapplyProximity(), SCIPconflictstoreCleanNewIncumbent(), SCIPconsGetRhs(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPchgLhsLinear()
SCIP_RETCODE SCIPchgLhsLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | lhs | ||
) |
changes left hand side of linear constraint
- Parameters
-
scip SCIP data structure cons constraint data lhs new left hand side
Definition at line 18485 of file cons_linear.c.
References chgRhs(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsLinear().
Referenced by addScenarioVarsAndConsToProb(), applyFixings(), chgLhsLinearCons(), computeNogoodCut(), computeStandardIntegerOptCut(), fixDiscreteVars(), generateAndApplyBendersIntegerCuts(), initCurrent(), AMPLProblemHandler::OnConBounds(), presolveAddKKTQuadLinearTerms(), readIndicators(), readRanges(), readRhs(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIPconflictstoreCleanNewIncumbent(), tryUpgradingLogicor(), and updatePartition().
◆ SCIPchgRhsLinear()
SCIP_RETCODE SCIPchgRhsLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | rhs | ||
) |
changes right hand side of linear constraint
- Parameters
-
scip SCIP data structure cons constraint data rhs new right hand side
Definition at line 18506 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addScenarioVarsAndConsToProb(), applyFixings(), chgRhsLinearCons(), fixDiscreteVars(), initCurrent(), AMPLProblemHandler::OnConBounds(), presolveAddKKTQuadLinearTerms(), readRanges(), readRhs(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPconflictstoreCleanNewIncumbent(), tryUpgradingSetppc(), and updatePartition().
◆ SCIPgetNVarsLinear()
gets the number of variables in the linear constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18524 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAltLP(), extractLinearValues(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readQCMatrix(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIPchgLhsLinear(), SCIPcreateConsIndicatorGenericLinCons(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPgetVarsLinear()
gets the array of variables in the linear constraint; the user must not modify this array!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18548 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAltLP(), extractLinearValues(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readQCMatrix(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIPcreateConsIndicatorGenericLinCons(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
◆ SCIPgetValsLinear()
gets the array of coefficient values in the linear constraint; the user must not modify this array!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18572 of file cons_linear.c.
References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAltLP(), extractLinearValues(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readQCMatrix(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIPgetConsVals(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
◆ SCIPgetActivityLinear()
gets the activity of the linear constraint in the given solution
- Note
- if the solution contains values at infinity, this method will return SCIP_INVALID in case the activity comprises positive and negative infinity contributions
- Parameters
-
scip SCIP data structure cons constraint data sol solution, or NULL to use current node's solution
Definition at line 18600 of file cons_linear.c.
Referenced by computeNogoodCut(), computeStandardIntegerOptCut(), generateAndApplyBendersCuts(), reuseSolution(), and SCIPgenerateAndApplyBendersOptCut().
◆ SCIPgetFeasibilityLinear()
gets the feasibility of the linear constraint in the given solution
- Parameters
-
scip SCIP data structure cons constraint data sol solution, or NULL to use current node's solution
Definition at line 18628 of file cons_linear.c.
◆ SCIPgetDualsolLinear()
gets the dual solution of the linear constraint in the current LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18656 of file cons_linear.c.
Referenced by ObjPricerVRP::pricing(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_PRICERREDCOST(), SCIPconsGetDualsol(), SCIPgetDualSolVal(), and SCIPwriteSolutionNl().
◆ SCIPgetDualfarkasLinear()
gets the dual Farkas value of the linear constraint in the current infeasible LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18684 of file cons_linear.c.
Referenced by ObjPricerVRP::pricing(), and SCIPconsGetDualfarkas().
◆ SCIPgetRowLinear()
returns the linear relaxation of the given linear constraint; may return NULL if no LP row was yet created; the user must not modify the row!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 18714 of file cons_linear.c.
References SCIP_Bool, and SCIP_Real.
Referenced by SCIPconsGetRow().
◆ SCIPupgradeConsLinear()
SCIP_RETCODE SCIPupgradeConsLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS ** | upgdcons | ||
) |
tries to automatically convert a linear constraint into a more specific and more specialized constraint
- Parameters
-
scip SCIP data structure cons source constraint to try to convert upgdcons pointer to store upgraded constraint, or NULL if not successful
Definition at line 18738 of file cons_linear.c.
Referenced by createAndAddProofcons().
◆ SCIPclassifyConstraintTypesLinear()
SCIP_RETCODE SCIPclassifyConstraintTypesLinear | ( | SCIP * | scip, |
SCIP_LINCONSSTATS * | linconsstats | ||
) |
performs linear constraint type classification as used for MIPLIB
iterates through all linear constraints and stores relevant statistics in the linear constraint statistics linconsstats
.
- Note
- only constraints are iterated that belong to the linear constraint handler. If the problem has been presolved already, constraints that were upgraded to more special types such as, e.g., varbound constraints, will not be shown correctly anymore. Similarly, if specialized constraints were created through the API, these are currently not present.
- Parameters
-
scip SCIP data structure linconsstats linear constraint type classification
Definition at line 15361 of file cons_linear.c.
References b, FALSE, isFiniteNonnegativeIntegral(), isRangedRow(), mergeMultiples(), NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSEXITPRE(), SCIP_LINCONSTYPE_AGGREGATION, SCIP_LINCONSTYPE_BINPACKING, SCIP_LINCONSTYPE_CARDINALITY, SCIP_LINCONSTYPE_EMPTY, SCIP_LINCONSTYPE_EQKNAPSACK, SCIP_LINCONSTYPE_FREE, SCIP_LINCONSTYPE_GENERAL, SCIP_LINCONSTYPE_INTKNAPSACK, SCIP_LINCONSTYPE_INVKNAPSACK, SCIP_LINCONSTYPE_KNAPSACK, SCIP_LINCONSTYPE_MIXEDBINARY, SCIP_LINCONSTYPE_PRECEDENCE, SCIP_LINCONSTYPE_SETCOVERING, SCIP_LINCONSTYPE_SETPACKING, SCIP_LINCONSTYPE_SETPARTITION, SCIP_LINCONSTYPE_SINGLETON, SCIP_LINCONSTYPE_VARBOUND, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNConss(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPinfinity(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisNegative(), SCIPisZero(), SCIPlinConsStatsIncTypeCount(), SCIPlinConsStatsReset(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPcleanupConssLinear()
SCIP_RETCODE SCIPcleanupConssLinear | ( | SCIP * | scip, |
SCIP_Bool | onlychecked, | ||
SCIP_Bool * | infeasible | ||
) |
cleans up (multi-)aggregations and fixings from linear constraints
- Parameters
-
scip SCIP data structure onlychecked should only checked constraints be cleaned up? infeasible pointer to return whether the problem was detected to be infeasible
Definition at line 18978 of file cons_linear.c.
References applyFixings(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPmatrixCreate().
◆ SCIPcreateConsLinking()
SCIP_RETCODE SCIPcreateConsLinking | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | linkvar, | ||
SCIP_VAR ** | binvars, | ||
SCIP_Real * | vals, | ||
int | nbinvars, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a linking constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint linkvar linking variable (continuous or integer) which should be linked binvars binary variables vals coefficients of the binary variables nbinvars number of binary starting variables initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 3486 of file cons_linking.c.
References consdataCreate(), consdataCreateBinvars(), CONSHDLR_NAME, getHashmapKey(), HASHSIZE_BINVARSCONS, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPblkmem(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPdebugMsg, SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetName(), and SCIPvarGetUbGlobal().
Referenced by consdataCollectLinkingCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicLinking().
◆ SCIPcreateConsBasicLinking()
SCIP_RETCODE SCIPcreateConsBasicLinking | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | linkvar, | ||
SCIP_VAR ** | binvars, | ||
SCIP_Real * | vals, | ||
int | nbinvars | ||
) |
creates and captures a linking constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinking(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsLinking() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
creates and captures a linking constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinking(); all flags can be set via SCIPsetCons<Flagname>-methods in scip.h
- See also
- SCIPcreateConsLinking() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint linkvar linking variable (continuous or integer) which should be linked binvars binary variables, or NULL vals coefficients of the binary variables nbinvars number of binary variables
Definition at line 3583 of file cons_linking.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsLinking(), and TRUE.
◆ SCIPexistsConsLinking()
checks if for the given linking variable (continuous or integer) a linking constraint exists
- Parameters
-
scip SCIP data structure linkvar linking variable (continuous or integer) which should be linked
Definition at line 3602 of file cons_linking.c.
References CONSHDLR_NAME, getHashmapKey(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapExists().
Referenced by collectBinaryVars(), and consdataCollectLinkingCons().
◆ SCIPgetConsLinking()
returns the linking constraint belonging the given linking variable (continuous or integer) or NULL if it does not exist yet
- Parameters
-
scip SCIP data structure linkvar linking variable (continuous or integer) which should be linked
Definition at line 3620 of file cons_linking.c.
References CONSHDLR_NAME, getHashmapKey(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapGetImage().
Referenced by collectBinaryVars(), consdataCollectLinkingCons(), and consdataCreate().
◆ SCIPgetLinkvarLinking()
returns the linking variable (continuous or integer) of the linking constraint
- Parameters
-
scip SCIP data structure cons linking constraint
Definition at line 3641 of file cons_linking.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by computeSymmetryGroup().
◆ SCIPgetBinvarsLinking()
SCIP_RETCODE SCIPgetBinvarsLinking | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR *** | binvars, | ||
int * | nbinvars | ||
) |
returns the binary variables of the linking constraint
- Parameters
-
scip SCIP data structure cons linking constraint binvars pointer to store the binary variables array pointer nbinvars pointer to store the number of returned binary variables
Definition at line 3664 of file cons_linking.c.
References consdataCreateBinvars(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by collectBinaryVars(), computeSymmetryGroup(), createCoverCutsTimepoint(), and SCIPmatrixCreate().
◆ SCIPgetNBinvarsLinking()
returns the number of binary variables of the linking constraint
- Parameters
-
scip SCIP data structure cons linking constraint
Definition at line 3710 of file cons_linking.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
◆ SCIPgetValsLinking()
returns the coefficients of the binary variables
- Parameters
-
scip SCIP data structure cons linking constraint
Definition at line 3733 of file cons_linking.c.
References consdataSort(), CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by collectBinaryVars(), computeSymmetryGroup(), createCoverCutsTimepoint(), and SCIPmatrixCreate().
◆ SCIPgetBinvarsDataLinking()
SCIP_RETCODE SCIPgetBinvarsDataLinking | ( | SCIP_CONS * | cons, |
SCIP_VAR *** | binvars, | ||
SCIP_Real ** | vals, | ||
int * | nbinvars | ||
) |
return all binary variable information of the linking constraint
- Parameters
-
cons linking constraint binvars pointer to store binary variables, or NULL vals pointer to store the binary coefficients, or NULL nbinvars pointer to store the number of binary variables, or NULL
Definition at line 3757 of file cons_linking.c.
References consdataSort(), CONSHDLR_NAME, NULL, SCIP_ERROR, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
◆ SCIPcreateConsLogicor()
SCIP_RETCODE SCIPcreateConsLogicor | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable, | ||
SCIP_Bool | stickingatnode | ||
) |
creates and captures a logic or constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables in the constraint vars array with variables of constraint entries initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. stickingatnode should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.
Definition at line 5307 of file cons_logicor.c.
References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARFIXED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIPcatchVarEvent(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicLogicor(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), and SCIPisTransformed().
Referenced by addSplitcons(), applyCliqueFixings(), BENDERS_CUTORACLE(), consdataLinearize(), createAndAddLinearCons(), createConflict(), createConflictCons(), createNormalizedLogicor(), extendToCover(), readCnf(), SCIP_DECL_CONFLICTEXEC(), SCIPcreateConsBasicLogicor(), SCIPincludeConshdlrLogicor(), SCIPreoptApplyGlbConss(), and upgradeCons().
◆ SCIPcreateConsBasicLogicor()
SCIP_RETCODE SCIPcreateConsBasicLogicor | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures a logicor constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLogicor(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See also
- SCIPcreateConsLogicor() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables in the constraint vars array with variables of constraint entries
Definition at line 5384 of file cons_logicor.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLogicor(), SCIPcreateConsLogicor(), and TRUE.
Referenced by addFixedVarsConss(), createProbQP(), createProbSimplified(), createProbSimplifiedTest(), and SCIPcreateConsLogicor().
◆ SCIPaddCoefLogicor()
SCIP_RETCODE SCIPaddCoefLogicor | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
adds coefficient in logic or constraint
- Parameters
-
scip SCIP data structure cons logicor constraint var variable to add to the constraint
Definition at line 5401 of file cons_logicor.c.
References addCoef(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsLogicor().
Referenced by addCoefTerm(), createConflictCons(), createProbQP(), createProbSimplified(), createProbSimplifiedTest(), SCIPaddCoefPseudoboolean(), SCIPconsAddCoef(), and SCIPcreateConsBasicLogicor().
◆ SCIPgetNVarsLogicor()
gets number of variables in logic or constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5424 of file cons_logicor.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsLogicor().
Referenced by addLogicOrConstraints(), checkLogicor(), computeSymmetryGroup(), correctPresoldata(), createAltLP(), createPresoldata(), extractGates(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTLogicorConss(), SCIPaddCoefLogicor(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
◆ SCIPgetVarsLogicor()
gets array of variables in logic or constraint
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5447 of file cons_logicor.c.
References CONSHDLR_NAME, NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDualsolLogicor().
Referenced by addLogicOrConstraints(), checkLogicor(), computeSymmetryGroup(), createAltLP(), extractGates(), getLinearConsVarsData(), presolveAddKKTLogicorConss(), saveConsLinear(), SCIPgetNVarsLogicor(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
◆ SCIPgetDualsolLogicor()
gets the dual solution of the logic or constraint in the current LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5470 of file cons_logicor.c.
References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasLogicor(), and SCIProwGetDualsol().
Referenced by SCIPconsGetDualsol(), and SCIPgetVarsLogicor().
◆ SCIPgetDualfarkasLogicor()
gets the dual Farkas value of the logic or constraint in the current infeasible LP
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5496 of file cons_logicor.c.
References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowLogicor(), and SCIProwGetDualfarkas().
Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolLogicor().
◆ SCIPgetRowLogicor()
returns the linear relaxation of the given logic or constraint; may return NULL if no LP row was yet created; the user must not modify the row!
- Parameters
-
scip SCIP data structure cons constraint data
Definition at line 5524 of file cons_logicor.c.
References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcleanupConssLogicor(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasLogicor().
◆ SCIPcleanupConssLogicor()
SCIP_RETCODE SCIPcleanupConssLogicor | ( | SCIP * | scip, |
SCIP_Bool | onlychecked, | ||
int * | naddconss, | ||
int * | ndelconss, | ||
int * | nchgcoefs | ||
) |
cleans up (multi-)aggregations and fixings from logicor constraints
- Parameters
-
scip SCIP data structure onlychecked should only checked constraints be cleaned up? naddconss pointer to count number of added (linear) constraints ndelconss pointer to count number of deleted (logicor) constraints nchgcoefs pointer to count number of changed coefficients
Definition at line 5547 of file cons_logicor.c.
References applyFixings(), CONSHDLR_NAME, FALSE, mergeMultiples(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetNCheckConss(), SCIPconsIsDeleted(), SCIPdelCons(), SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNContVars(), and SCIPgetNVars().
Referenced by SCIPgetRowLogicor(), and SCIPmatrixCreate().
◆ SCIPincludeConsUpgradeNonlinear()
SCIP_RETCODE SCIPincludeConsUpgradeNonlinear | ( | SCIP * | scip, |
SCIP_DECL_NONLINCONSUPGD((*nlconsupgd)) | , | ||
int | priority, | ||
SCIP_Bool | active, | ||
const char * | conshdlrname | ||
) |
includes a nonlinear constraint upgrade method into the nonlinear constraint handler
- Parameters
-
scip SCIP data structure priority priority of upgrading method active should the upgrading method by active by default? conshdlrname name of the constraint handler
Definition at line 11074 of file cons_nonlinear.c.
References active, CONSUPGRADE::active, CONSHDLR_NAME, FALSE, NULL, paramname, CONSUPGRADE::priority, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPconshdlrGetData(), SCIPcreateConsNonlinear(), SCIPensureBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPsnprintf(), and SCIPwarningMessage().
Referenced by SCIPincludeConshdlrNonlinear().
◆ SCIPcreateConsNonlinear()
SCIP_RETCODE SCIPcreateConsNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_EXPR * | expr, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable | ||
) |
creates and captures a nonlinear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint expr expression of constraint (must not be NULL) lhs left hand side of constraint rhs right hand side of constraint initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.
Definition at line 11145 of file cons_nonlinear.c.
References CONSHDLR_NAME, createCons(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateConsBasicNonlinear(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.
Referenced by createConstraint(), readConstraints(), readObjective(), SCIPcreateConsBasicNonlinear(), SCIPcreateConsSOC(), and SCIPincludeConsUpgradeNonlinear().
◆ SCIPcreateConsBasicNonlinear()
SCIP_RETCODE SCIPcreateConsBasicNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_EXPR * | expr, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a nonlinear constraint with all its constraint flags set to their default values
All flags can be set via SCIPconsSetFLAGNAME-methods.
- See also
- SCIPcreateConsNonlinear() for information about the basic constraint flag configuration.
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint expr expression of constraint (must not be NULL) lhs left hand side of constraint rhs right hand side of constraint
Definition at line 11200 of file cons_nonlinear.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsNonlinear(), SCIPcreateConsQuadraticNonlinear(), and TRUE.
Referenced by AMPLProblemHandler::EndInput(), AMPLProblemHandler::OnHeader(), SCIPcreateConsBasicSignpowerNonlinear(), SCIPcreateConsBasicSOC(), SCIPcreateConsBasicSOCNonlinear(), SCIPcreateConsNonlinear(), and setupProblem().
◆ SCIPcreateConsQuadraticNonlinear()
SCIP_RETCODE SCIPcreateConsQuadraticNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nquadterms, | ||
SCIP_VAR ** | quadvars1, | ||
SCIP_VAR ** | quadvars2, | ||
SCIP_Real * | quadcoefs, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | separate, | ||
SCIP_Bool | enforce, | ||
SCIP_Bool | check, | ||
SCIP_Bool | propagate, | ||
SCIP_Bool | local, | ||
SCIP_Bool | modifiable, | ||
SCIP_Bool | dynamic, | ||
SCIP_Bool | removable | ||
) |
creates and captures a quadratic nonlinear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nlinvars number of linear terms linvars array with variables in linear part lincoefs array with coefficients of variables in linear part nquadterms number of quadratic terms quadvars1 array with first variables in quadratic terms quadvars2 array with second variables in quadratic terms quadcoefs array with coefficients of quadratic terms lhs left hand side of quadratic equation rhs right hand side of quadratic equation initial should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. separate should the constraint be separated during LP processing? Usually set to TRUE. enforce should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. check should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. propagate should the constraint be propagated during node processing? Usually set to TRUE. local is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. modifiable is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. dynamic is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. removable should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.
Definition at line 11219 of file cons_nonlinear.c.
References CONSHDLR_NAME, createCons(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateConsBasicQuadraticNonlinear(), SCIPcreateExprQuadratic(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPreleaseExpr().
Referenced by createOriginalproblem(), createProbQP(), createQuadraticCons(), createSubproblems(), readConstraints(), readObjective(), readQCMatrix(), readQMatrix(), SCIPcreateConsBasicNonlinear(), SCIPcreateConsBasicQuadraticNonlinear(), SCIPcreateConsIndicatorGeneric(), SCIPcreateConsIndicatorGenericLinCons(), SCIPcreateConsQuadratic(), SCIPverifyCircularPatternNLP(), setupProblem(), and solvePricingMINLP().
◆ SCIPcreateConsBasicQuadraticNonlinear()
SCIP_RETCODE SCIPcreateConsBasicQuadraticNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nquadterms, | ||
SCIP_VAR ** | quadvars1, | ||
SCIP_VAR ** | quadvars2, | ||
SCIP_Real * | quadcoefs, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a quadratic nonlinear constraint with all its constraint flags set to their default values
All flags can be set via SCIPconsSetFLAGNAME-methods.
- See also
- SCIPcreateConsQuadraticNonlinear() for information about the basic constraint flag configuration.
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nlinvars number of linear terms linvars array with variables in linear part lincoefs array with coefficients of variables in linear part nquadterms number of quadratic terms quadvars1 array with first variables in quadratic terms quadvars2 array with second variables in quadratic terms quadcoefs array with coefficients of quadratic terms lhs left hand side of quadratic equation rhs right hand side of quadratic equation
Definition at line 11290 of file cons_nonlinear.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBasicSOCNonlinear(), SCIPcreateConsQuadraticNonlinear(), and TRUE.
Referenced by SCIPcreateConsBasicQuadratic(), and SCIPcreateConsQuadraticNonlinear().
◆ SCIPcreateConsBasicSOCNonlinear()
SCIP_RETCODE SCIPcreateConsBasicSOCNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | coefs, | ||
SCIP_Real * | offsets, | ||
SCIP_Real | constant, | ||
SCIP_VAR * | rhsvar, | ||
SCIP_Real | rhscoeff, | ||
SCIP_Real | rhsoffset | ||
) |
creates and captures a nonlinear constraint that is a second-order cone constraint with all its constraint flags set to their default values
\(\sqrt{\gamma + \sum_{i=1}^{n} (\alpha_i\, (x_i + \beta_i))^2} \leq \alpha_{n+1}\, (x_{n+1}+\beta_{n+1})\)
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint nvars number of variables on left hand side of constraint (n) vars array with variables on left hand side (x_i) coefs array with coefficients of left hand side variables (alpha_i), or NULL if all 1.0 offsets array with offsets of variables (beta_i), or NULL if all 0.0 constant constant on left hand side (gamma) rhsvar variable on right hand side of constraint (x_{n+1}) rhscoeff coefficient of variable on right hand side (alpha_{n+1}) rhsoffset offset of variable on right hand side (beta_{n+1})
Definition at line 11317 of file cons_nonlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPappendExprSumExpr(), SCIPcreateConsBasicNonlinear(), SCIPcreateConsBasicSignpowerNonlinear(), SCIPcreateExprPow(), SCIPcreateExprSum(), SCIPcreateExprVar(), SCIPinfinity(), and SCIPreleaseExpr().
Referenced by SCIPcreateConsBasicQuadraticNonlinear().
◆ SCIPcreateConsBasicSignpowerNonlinear()
SCIP_RETCODE SCIPcreateConsBasicSignpowerNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | x, | ||
SCIP_VAR * | z, | ||
SCIP_Real | exponent, | ||
SCIP_Real | xoffset, | ||
SCIP_Real | zcoef, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a signpower nonlinear constraint with all its constraint flags set to their default values
\(\textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs}\)
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip SCIP data structure cons pointer to hold the created constraint name name of constraint x nonlinear variable x in constraint z linear variable z in constraint exponent exponent n of |x+offset|^n term in constraint xoffset offset in |x+offset|^n term in constraint zcoef coefficient of z in constraint lhs left hand side of constraint rhs right hand side of constraint
Definition at line 11388 of file cons_nonlinear.c.
References NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPcreateConsBasicNonlinear(), SCIPcreateExprSignpower(), SCIPcreateExprSum(), SCIPcreateExprVar(), SCIPgetCurBoundsTagNonlinear(), and