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_QuadVarTerm |
struct | SCIP_BilinTerm |
struct | SCIP_RowPrep |
Modules | |
Inclusion methods | |
methods to include specific constraint handlers into SCIP | |
Files | |
file | cons_abspower.h |
Constraint handler for absolute power constraints \(\textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs}\). | |
file | cons_and.h |
Constraint handler for AND constraints, \(r = x_1 \wedge x_2 \wedge \dots \wedge x_n\). | |
file | cons_bivariate.h |
constraint handler for bivariate nonlinear constraints \(\textrm{lhs} \leq f(x,y) + c z \leq \textrm{rhs}\) | |
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 an 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 \(\textrm{lhs} \leq \sum_{i=1}^n a_ix_i + \sum_{j=1}^m c_jf_j(x) \leq \textrm{rhs}\) | |
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 |
constraint handler for quadratic constraints \(\textrm{lhs} \leq \sum_{i,j=1}^n a_{i,j} x_ix_j + \sum_{i=1}^n 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 |
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\). | |
Absolute Power Constraints | |
This constraint handler handles constraints of the form \[ \textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs} \] for \(n > 1.0\) a rational number, \(a\) and \(c\) arbitrary, and \(x\) and \(z\) variables. Note that \(x\) can have \(-a\) in the interior of its domain. Constraints are enforced by separation, domain propagation, and spatial branching. Cuts that separate on the convex hull of the graph of \(\textrm{sign}(x+a) |x+a|^n\) are generated as long as they separate the relaxation solution. Otherwise, spatial branching on \(x\) is applied. Further, domain propagation is implemented to propagate bound changes on \(x\) onto \(z\), and vice versa, and repropagation is implemented to allow for conflict analysis. During presolve, a pairwise comparison of absolute power constraints may allow to fix or aggregate some variables. See also
| |
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) |
SCIP_VAR * | SCIPgetNonlinearVarAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetLinearVarAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetExponentAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetOffsetAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetCoefLinearAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetViolationAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
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) |
Bivariate Constraints | |
This constraint handler handles constraints of the form \[ \textrm{lhs} \leq f(x,y) + c z \leq \textrm{rhs} \] for a bivariate nonlinear function \(f(x,y)\) (given as expression tree) that has a fixed convexity behaviour, that is, \(f(x,y)\) has to be either jointly convex in \((x,y)\), or convex in \(x\) and concave in \(y\), or convex in \(x\) and convex in \(y\), but indefinite w.r.t. \((x,y)\). See also
| |
enum | SCIP_BIVAR_CONVEXITY { SCIP_BIVAR_ALLCONVEX = 0, SCIP_BIVAR_1CONVEX_INDEFINITE = 1, SCIP_BIVAR_CONVEX_CONCAVE = 2, SCIP_BIVAR_UNKNOWN = 3 } |
SCIP_RETCODE | SCIPcreateConsBivariate (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, 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 | SCIPcreateConsBasicBivariate (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPRTREE *f, SCIP_BIVAR_CONVEXITY convextype, SCIP_VAR *z, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_VAR * | SCIPgetLinearVarBivariate (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLinearCoefBivariate (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPRTREE * | SCIPgetExprtreeBivariate (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsBivariate (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsBivariate (SCIP *scip, SCIP_CONS *cons) |
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) |
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 | 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 | 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_VAR * | SCIPgetBinaryVarIndicator (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) |
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) |
#define | SCIP_DECL_LINCONSUPGD(x) |
Linking Constraints | |
The constraints handler stores linking constraints between an integer variable and an array of binary variables. Such a linking constraint has the form: \[ y = \sum_{i=1}^n {c_i * x_i} \] with integer variable \( 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 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 integer variable which will be dynamically created. | |
SCIP_RETCODE | SCIPcreateConsLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *intvar, SCIP_VAR **binvars, int *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 *intvar, SCIP_VAR **binvars, int *vals, int nbinvars) |
SCIP_Bool | SCIPexistsConsLinking (SCIP *scip, SCIP_VAR *intvar) |
SCIP_CONS * | SCIPgetConsLinking (SCIP *scip, SCIP_VAR *intvar) |
SCIP_VAR * | SCIPgetIntvarLinking (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) |
int * | SCIPgetValsLinking (SCIP *scip, SCIP_CONS *cons) |
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) |
Nonlinear Constraints | |
This constraint handler handles constraints of the form \[ \textrm{lhs} \leq \sum_{i=1}^n a_ix_i + \sum_{j=1}^m c_jf_j(x) \leq \textrm{rhs}, \] where \(a_i\) and \(c_j\) are coefficients and \(f_j(x)\) are nonlinear functions (given as expression tree). Constraints are enforced by separation, domain propagation, and spatial branching. For convex or concave \(f_j(x)\), cuts that separate on the convex hull of the function graph are implemented. For \(f_j(x)\) that are not known to be convex or concave, a simple variant of linear estimation based on interval gradients is implemented. Branching is performed for variables in nonconvex terms, if the relaxation solution cannot be separated. This header offers the upgrade functionality to upgrade a general nonlinear constraint into a more specific constraint via SCIP_DECL_NONLINCONSUPGD(). Furthermore, the definition of callbacks used to reformulate an expression graph is offered by SCIP_DECL_EXPRGRAPHNODEREFORM(). Further, the function representation is stored in an expression graph, which allows to propagate variable domains and constraint sides and offers a simple convexity check. During presolve, the expression graph is reformulated, whereby new variables and constraints are created such that for the remaining nonlinear constraints the functions \(f_j(x)\) are known to be convex or concave. See also
| |
SCIP_RETCODE | SCIPincludeNonlinconsUpgrade (SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)), SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)), int priority, SCIP_Bool active, const char *conshdlrname) |
SCIP_RETCODE | SCIPcreateConsNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, 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 | SCIPcreateConsBasicNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *nonlincoefs, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPcreateConsNonlinear2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPRGRAPHNODE *exprgraphnode, 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 | SCIPcreateConsBasicNonlinear2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPRGRAPHNODE *exprgraphnode, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPaddLinearVarNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPsetExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs) |
SCIP_RETCODE | SCIPaddExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs) |
SCIP_RETCODE | SCIPgetNlRowNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
int | SCIPgetNLinearVarsNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetLinearVarsNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetLinearCoefsNonlinear (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPRTREE ** | SCIPgetExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetExprtreeCoefsNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPRGRAPHNODE * | SCIPgetExprgraphNodeNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcheckCurvatureNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPgetCurvatureNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV *curvature) |
SCIP_RETCODE | SCIPgetExprtreeCurvaturesNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV **curvatures) |
SCIP_RETCODE | SCIPgetViolationNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation) |
int | SCIPgetLinvarMayDecreaseNonlinear (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetLinvarMayIncreaseNonlinear (SCIP *scip, SCIP_CONS *cons) |
SCIP_EXPRGRAPH * | SCIPgetExprgraphNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr) |
SCIP_RETCODE | SCIPcomputeHyperplaneThreePoints (SCIP *scip, SCIP_Real a1, SCIP_Real a2, SCIP_Real a3, SCIP_Real b1, SCIP_Real b2, SCIP_Real b3, SCIP_Real c1, SCIP_Real c2, SCIP_Real c3, SCIP_Real *alpha, SCIP_Real *beta, SCIP_Real *gamma_, SCIP_Real *delta) |
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 | SCIPseparateCoversOrbisack (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool *infeasible, int *ngen) |
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 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) |
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. | |
enum | SCIP_OrbitopeType { SCIP_ORBITOPETYPE_FULL = 0, SCIP_ORBITOPETYPE_PARTITIONING = 1, SCIP_ORBITOPETYPE_PACKING = 2 } |
typedef enum SCIP_OrbitopeType | SCIP_ORBITOPETYPE |
SCIP_RETCODE | SCIPcreateConsOrbitope (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool resolveprop, 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 resolveprop) |
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 and all \(c\) are integer. | |
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) |
Quadratic Constraints | |
This constraint handler handles constraints of the form \[ \textrm{lhs} \leq \sum_{i,j=1}^n a_{i,j} x_ix_j + \sum_{i=1}^n b_i x_i \leq \textrm{rhs} \] Constraints are enforced by separation, domain propagation, and spatial branching. For semidefinite matrices \(A=(a_{i,j})_{i,j}\), cuts based on linearization of \(\langle x, Ax\rangle\) are implemented. For underestimating a non-convex term, McCormick underestimators and secants for univariate concave quadratic terms are implemented. If \(\langle x, Ax\rangle\) is factorable (i.e., can be written as product of two linear functions), specialized separation techniques (e.g., lifted tangent inequalities) that take the constraint sides into account are applied. Branching is performed for variables in nonconvex terms, if the relaxation solution cannot be separated. Further, domain propagation is applied. During presolve, variable products which contain binary variables may be reformulated into linear constraints, thereby introducing new variables. See also
| |
typedef struct SCIP_QuadVarEventData | SCIP_QUADVAREVENTDATA |
typedef struct SCIP_QuadVarTerm | SCIP_QUADVARTERM |
typedef struct SCIP_BilinTerm | SCIP_BILINTERM |
typedef struct SCIP_RowPrep | SCIP_ROWPREP |
SCIP_RETCODE | SCIPincludeQuadconsUpgrade (SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname) |
SCIP_RETCODE | SCIPcreateConsQuadratic (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 *quadcoeffs, 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_RETCODE | SCIPcreateConsBasicQuadratic (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_RETCODE | SCIPcreateConsQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, 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_RETCODE | SCIPcreateConsBasicQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs) |
void | SCIPaddConstantQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real constant) |
SCIP_RETCODE | SCIPaddLinearVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddQuadVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real lincoef, SCIP_Real sqrcoef) |
SCIP_RETCODE | SCIPaddQuadVarLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddBilinTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
SCIP_RETCODE | SCIPgetNlRowQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
int | SCIPgetNLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetCoefsLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_QUADVARTERM * | SCIPgetQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsortQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPfindQuadVarTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos) |
int | SCIPgetNBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_BILINTERM * | SCIPgetBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetLinvarMayDecreaseQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetLinvarMayIncreaseQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcheckCurvatureQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPisConvexQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPisConcaveQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPgetViolationQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation) |
SCIP_Bool | SCIPisLinearLocalQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPaddToNlpiProblemQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names) |
SCIP_RETCODE | SCIPchgLhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
SCIP_RETCODE | SCIPchgRhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
SCIP_RETCODE | SCIPgetFeasibilityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *feasibility) |
SCIP_RETCODE | SCIPgetActivityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity) |
SCIP_RETCODE | SCIPchgLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPchgSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPchgBilinCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
int | SCIPgetNAllBilinearTermsQuadratic (SCIP *scip) |
SCIP_RETCODE | SCIPgetAllBilinearTermsQuadratic (SCIP *scip, SCIP_VAR **RESTRICT x, SCIP_VAR **RESTRICT y, int *RESTRICT nbilinterms, int *RESTRICT nunderests, int *RESTRICT noverests, SCIP_Real *maxnonconvexity) |
SCIP_RETCODE | SCIPaddBilinearIneqQuadratic (SCIP *scip, SCIP_VAR *x, SCIP_VAR *y, int idx, SCIP_Real xcoef, SCIP_Real ycoef, SCIP_Real constant, SCIP_Bool *success) |
#define | SCIP_DECL_QUADCONSUPGD(x) |
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) |
Second Order Cone Constraints | |
This constraint handler implements second order cone constraints of the form \[ \sqrt{\gamma + \sum_{i=1}^{n} (\alpha_i\, (x_i + \beta_i))^2} \leq \alpha_{n+1}\, (x_{n+1}+\beta_{n+1}) \] Here, \(\gamma \geq 0\) and either \(x_{n+1} \geq -\beta_{n+1}, \alpha_{n+1} \geq 0\) or \(x_{n+1} \leq -\beta_{n+1}, \alpha_{n+1} \leq 0\). Constraints are enforced by separation, where cuts are generated by linearizing the (convex) nonlinear function on the left-hand-side of the constraint. Further, a linear outer-approximation (which includes new variables) based on Ben-Tal & Nemirovski or Glineur can be added. See also
| |
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) |
int | SCIPgetNLhsVarsSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetLhsVarsSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetLhsCoefsSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetLhsOffsetsSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsConstantSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetRhsVarSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsCoefSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsOffsetSOC (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPaddToNlpiProblemSOC (SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names) |
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 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 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) |
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) |
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) |
#define SCIP_DECL_SOLVECUMULATIVE | ( | x | ) |
solves given cumulative condition as independent sub problem
input:
input/output:
output:
Definition at line 338 of file cons_cumulative.h.
#define SCIP_DECL_LINCONSUPGD | ( | x | ) |
upgrading method for linear constraints into more specific constraints
input:
Definition at line 104 of file cons_linear.h.
Referenced by consdataEnsureVarsSize().
#define SCIP_DECL_QUADCONSUPGD | ( | x | ) |
upgrading method for quadratic constraints into more specific constraints
the method might upgrade a quadratic constraint into a set of quadratic constraints the caller provided an array upgdconss to store upgrade constraints the length of upgdconss is given by upgdconsssize 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 i.e., if cons should be replaced by 3 constraints, the function should set *nupgdconss to -3 and return with SCIP_OKAY
input:
Definition at line 166 of file cons_quadratic.h.
typedef struct SCIP_LinConsUpgrade SCIP_LINCONSUPGRADE |
linear constraint update method
Definition at line 71 of file cons_linear.h.
typedef enum SCIP_OrbitopeType SCIP_ORBITOPETYPE |
Definition at line 78 of file cons_orbitope.h.
typedef enum SCIP_LinearConsType SCIP_LINEARCONSTYPE |
Definition at line 77 of file cons_pseudoboolean.h.
typedef struct SCIP_QuadVarEventData SCIP_QUADVAREVENTDATA |
event data for variable bound changes in quadratic constraints
Definition at line 91 of file cons_quadratic.h.
typedef struct SCIP_QuadVarTerm SCIP_QUADVARTERM |
Definition at line 107 of file cons_quadratic.h.
typedef struct SCIP_BilinTerm SCIP_BILINTERM |
Definition at line 118 of file cons_quadratic.h.
typedef struct SCIP_RowPrep SCIP_ROWPREP |
Definition at line 136 of file cons_quadratic.h.
typedef enum SCIP_SetppcType SCIP_SETPPCTYPE |
Definition at line 77 of file cons_setppc.h.
enum SCIP_BIVAR_CONVEXITY |
Enumerator | |
---|---|
SCIP_BIVAR_ALLCONVEX | |
SCIP_BIVAR_1CONVEX_INDEFINITE | |
SCIP_BIVAR_CONVEX_CONCAVE | |
SCIP_BIVAR_UNKNOWN |
Definition at line 69 of file cons_bivariate.h.
enum SCIP_OrbitopeType |
type of orbitope constraint: full, packing, or partitioning orbitope
Definition at line 72 of file cons_orbitope.h.
enum SCIP_LinearConsType |
solution status after solving LP
Definition at line 64 of file cons_pseudoboolean.h.
enum SCIP_SetppcType |
type of setppc constraint: set partitioning, set packing, or set covering
Definition at line 71 of file cons_setppc.h.
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 a absolute power constraint
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 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 7133 of file cons_abspower.c.
References BMSclearMemory, CONSHDLR_NAME, pow(), REALABS, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcreateCons(), SCIPcreateConsBasicAbspower(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPvarIsActive(), and square().
Referenced by presolveFindDuplicates(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicAbspower(), and SCIPincludeConshdlrAbspower().
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 constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsAbspower(); all flags can be set via SCIPconsSetFLAGNAME-methods in scip.h
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 SCIPcreateConsAbspower(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
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 7234 of file cons_abspower.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsAbspower(), SCIPgetNlRowAbspower(), and TRUE.
Referenced by SCIPcreateConsAbspower(), and setupProblem().
SCIP_RETCODE SCIPgetNlRowAbspower | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLROW ** | nlrow | ||
) |
gets the absolute power constraint as a nonlinear row representation
scip | SCIP data structure |
cons | constraint |
nlrow | a buffer where to store pointer to nonlinear row |
Definition at line 7256 of file cons_abspower.c.
References CONSHDLR_NAME, createNlRow(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetNonlinearVarAbspower().
Referenced by SCIPcreateConsBasicAbspower().
gets nonlinear variable x in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7282 of file cons_abspower.c.
References CONSHDLR_NAME, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetLinearVarAbspower().
Referenced by SCIPgetNlRowAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets linear variable z in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7299 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetExponentAbspower().
Referenced by SCIPgetNonlinearVarAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets exponent in power term in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7316 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetOffsetAbspower().
Referenced by SCIPgetLinearVarAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets offset in power term in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7333 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetCoefLinearAbspower().
Referenced by SCIPgetExponentAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets coefficient of linear variable in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7350 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetLhsAbspower().
Referenced by SCIPgetOffsetAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets left hand side in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7367 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetRhsAbspower().
Referenced by SCIPgetCoefLinearAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets right hand side in absolute power constraint
scip | SCIP data structure |
cons | absolute power constraint |
Definition at line 7384 of file cons_abspower.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetViolationAbspower().
Referenced by SCIPgetLhsAbspower(), SCIPwriteGms(), and SCIPwritePip().
gets the absolute violation of a absolute power constraint by a solution
scip | SCIP data structure |
cons | absolute power constraint |
sol | LP solution |
Definition at line 7401 of file cons_abspower.c.
References CONSHDLR_NAME, pow(), REALABS, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetSolVal(), and SIGN.
Referenced by SCIPgetRhsAbspower().
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
creates and captures a AND-constraint
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 4968 of file cons_and.c.
References ARTIFICIALVARNAMEPREFIX, consdataCreate(), CONSHDLR_NAME, FALSE, 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(), presolveTryAddAND(), presolveTryAddLinearReform(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIPcreateConsBasicAnd(), SCIPincludeConshdlrAnd(), setObjective(), and upgradeCons().
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
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
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 5078 of file cons_and.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsAnd(), SCIPgetNVarsAnd(), and TRUE.
Referenced by SCIPcreateConsAnd().
gets number of variables in and constraint
gets number of variables in AND-constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5097 of file cons_and.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsAnd().
Referenced by checkAndConss(), checkOrigPbCons(), chgLhs(), chgRhs(), computeAndConstraintInfos(), computeConsAndDataChanges(), computeSymmetryGroup(), consdataFree(), consdataPrint(), countNonlinearities(), createCoveringProblem(), printAndCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_READERWRITE(), SCIPcreateConsBasicAnd(), SCIPcreateConsPseudobooleanWithConss(), SCIPwritePip(), transformToOrig(), and writeOpbConstraints().
gets array of variables in and constraint
gets array of variables in AND-constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5121 of file cons_and.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetResultantAnd().
Referenced by checkAndConss(), checkOrigPbCons(), chgLhs(), chgRhs(), computeAndConstraintInfos(), computeConsAndDataChanges(), computeSymmetryGroup(), consdataFree(), consdataPrint(), countNonlinearities(), createCoveringProblem(), printAndCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_READERWRITE(), SCIPcreateConsPseudobooleanWithConss(), SCIPgetNVarsAnd(), SCIPwritePip(), transformToOrig(), and writeOpbConstraints().
gets the resultant variable in and constraint
gets the resultant variable in AND-constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5146 of file cons_and.c.
References CONSHDLR_NAME, 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(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSLOCK(), SCIP_DECL_READERWRITE(), SCIP_DECL_SORTPTRCOMP(), SCIPcreateConsPseudoboolean(), SCIPcreateConsPseudobooleanWithConss(), SCIPgetVarsAnd(), SCIPwritePip(), transformToOrig(), tryUpgradingSetppc(), unlockRoundingAndCons(), and updateConsanddataUses().
return if the variables of the AND-constraint are sorted with respect to their indices
scip | SCIP data structure |
cons | constraint data |
Definition at line 5169 of file cons_and.c.
References CONSHDLR_NAME, FALSE, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsortAndCons().
Referenced by computeConsAndDataChanges(), and SCIPgetResultantAnd().
SCIP_RETCODE SCIPsortAndCons | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
sort the variables of the AND-constraint with respect to their indices
scip | SCIP data structure |
cons | constraint data |
Definition at line 5193 of file cons_and.c.
References consdataSort(), CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsCheckFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by computeConsAndDataChanges(), and SCIPisAndConsSorted().
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?
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 5222 of file cons_and.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsRemovableFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by createAndAddAndCons(), and SCIPsortAndCons().
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?
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 5253 of file cons_and.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by createAndAddAndCons(), and SCIPchgAndConsCheckFlagWhenUpgr().
SCIP_RETCODE SCIPcreateConsBivariate | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_EXPRTREE * | f, | ||
SCIP_BIVAR_CONVEXITY | convextype, | ||
SCIP_VAR * | z, | ||
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 a bivariate constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
f | expression tree specifying bivariate function f(x,y) |
convextype | kind of convexity of f(x,y) |
z | linear variable in constraint |
zcoef | coefficient of linear variable |
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 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 7924 of file cons_bivariate.c.
References BMSclearMemory, CONSHDLR_NAME, FALSE, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPblkmem(), SCIPcreateCons(), SCIPcreateConsBasicBivariate(), SCIPerrorMessage, SCIPexprtreeCopy(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfindConshdlr(), and SCIPisInfinity().
Referenced by createConsFromMonomial(), createConsFromQuadTerm(), SCIP_DECL_CONSCOPY(), SCIPcreateConsBasicBivariate(), and SCIPincludeConshdlrBivariate().
SCIP_RETCODE SCIPcreateConsBasicBivariate | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_EXPRTREE * | f, | ||
SCIP_BIVAR_CONVEXITY | convextype, | ||
SCIP_VAR * | z, | ||
SCIP_Real | zcoef, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
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 SCIPcreateConsBivariate(); all flags can be set via SCIPconsSetFLAGNAME-methods in cons.h
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 SCIPcreateConsBivariate(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
f | expression tree specifying bivariate function f(x,y) |
convextype | kind of convexity of f(x,y) |
z | linear variable in constraint |
zcoef | coefficient of linear variable |
lhs | left hand side of constraint |
rhs | right hand side of constraint |
Definition at line 8008 of file cons_bivariate.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBivariate(), SCIPgetLinearVarBivariate(), and TRUE.
Referenced by SCIPcreateConsBivariate().
gets the linear variable of a bivariate constraint, or NULL if no such variable
scip | SCIP data structure |
cons | constraint |
Definition at line 8029 of file cons_bivariate.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLinearCoefBivariate().
Referenced by SCIPcreateConsBasicBivariate(), SCIPwriteGms(), and SCIPwritePip().
gets the coefficients of the linear variable of a bivariate constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 8041 of file cons_bivariate.c.
References SCIPconsGetData(), and SCIPgetExprtreeBivariate().
Referenced by SCIPgetLinearVarBivariate(), SCIPwriteGms(), and SCIPwritePip().
SCIP_EXPRTREE* SCIPgetExprtreeBivariate | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the expression tree of a bivariate constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 8053 of file cons_bivariate.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsBivariate().
Referenced by SCIPgetLinearCoefBivariate(), SCIPwriteGms(), and SCIPwritePip().
gets the left hand side of a bivariate constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 8065 of file cons_bivariate.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetRhsBivariate().
Referenced by SCIPgetExprtreeBivariate(), SCIPwriteGms(), and SCIPwritePip().
gets the right hand side of a bivariate constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 8077 of file cons_bivariate.c.
References SCIPconsGetData().
Referenced by SCIPgetLhsBivariate(), SCIPwriteGms(), and SCIPwritePip().
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
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 3324 of file cons_bounddisjunction.c.
References consdataCreate(), CONSHDLR_NAME, isOverlapping(), SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPboundtypeOpposite(), SCIPcreateCons(), SCIPcreateConsBasicBounddisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by addLocalConss(), addSplitcons(), adjustOversizedJobBounds(), createConflict(), CUTOFF_CONSTRAINT(), forbidFixation(), readBounds(), readSemicontinuous(), readVariables(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicBounddisjunction(), and SCIPincludeConshdlrBounddisjunction().
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
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
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 3404 of file cons_bounddisjunction.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBounddisjunction(), SCIPgetNVarsBounddisjunction(), and TRUE.
Referenced by SCIPcreateConsBounddisjunction(), and SCIPreoptApplyGlbConss().
gets number of variables in bound disjunction constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 3423 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsBounddisjunction().
Referenced by checkBounddisjunction(), createCoveringProblem(), SCIP_DECL_CONSCOPY(), and SCIPcreateConsBasicBounddisjunction().
gets array of variables in bound disjunction constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 3444 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundtypesBounddisjunction().
Referenced by checkBounddisjunction(), createCoveringProblem(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetNVarsBounddisjunction().
SCIP_BOUNDTYPE* SCIPgetBoundtypesBounddisjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets array of bound types in bound disjunction constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 3465 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundsBounddisjunction().
Referenced by checkBounddisjunction(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetVarsBounddisjunction().
gets array of bounds in bound disjunction constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 3486 of file cons_bounddisjunction.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by checkBounddisjunction(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetBoundtypesBounddisjunction().
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).
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).
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 3269 of file cons_cardinality.c.
References CONSHDLR_NAME, FALSE, handleNewVariableCardinality(), 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().
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
creates and captures a cardinality constraint with all constraint flags set to their default values.
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 3469 of file cons_cardinality.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPchgCardvalCardinality(), SCIPcreateConsCardinality(), and TRUE.
Referenced by SCIPcreateConsCardinality().
SCIP_RETCODE SCIPchgCardvalCardinality | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | cardval | ||
) |
changes cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)
scip | SCIP data structure |
cons | pointer to hold the created constraint |
cardval | number of variables allowed to be nonzero |
Definition at line 3490 of file cons_cardinality.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIPaddVarCardinality(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMsg, and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicCardinality().
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
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 3519 of file cons_cardinality.c.
References addVarCardinality(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarCardinality(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().
Referenced by SCIPchgCardvalCardinality().
SCIP_RETCODE SCIPappendVarCardinality | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_VAR * | indvar | ||
) |
appends variable to cardinality constraint
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 3556 of file cons_cardinality.c.
References appendVarCardinality(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNVarsCardinality(), and SCIPvarGetName().
Referenced by SCIPaddVarCardinality().
gets number of variables in cardinality constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 3591 of file cons_cardinality.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCardinality().
Referenced by SCIPappendVarCardinality().
gets array of variables in cardinality constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 3615 of file cons_cardinality.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCardvalCardinality().
Referenced by SCIPgetNVarsCardinality().
gets cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)
scip | SCIP data structure |
cons | constraint data |
Definition at line 3639 of file cons_cardinality.c.
References CONSHDLR_NAME, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsCardinality().
Referenced by SCIPgetVarsCardinality().
gets array of weights in cardinality constraint (or NULL if not existent)
scip | SCIP data structure |
cons | constraint data |
Definition at line 3662 of file cons_cardinality.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetCardvalCardinality().
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
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 788 of file cons_conjunction.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicConjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicConjunction(), and SCIPincludeConshdlrConjunction().
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
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 837 of file cons_conjunction.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemConjunction(), SCIPcreateConsConjunction(), and TRUE.
Referenced by SCIPcreateConsConjunction().
SCIP_RETCODE SCIPaddConsElemConjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | addcons | ||
) |
adds constraint to the conjunction of constraints
scip | SCIP data structure |
cons | conjunction constraint |
addcons | additional constraint in conjunction |
Definition at line 854 of file cons_conjunction.c.
References consdataAddCons(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicConjunction().
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecCountPresolve | ) |
dialog execution method for the count command
Definition at line 1804 of file cons_countsols.c.
References active, CONSHDLR_NAME, FALSE, 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(), SCIPgetStage(), SCIPpresolve(), SCIPsetBoolParam(), and TRUE.
Referenced by SCIP_DECL_CONSLOCK(), SCIP_DECL_DIALOGEXEC(), and writeExpandedSolutions().
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecCount | ) |
dialog execution method for the count command
Definition at line 1865 of file cons_countsols.c.
References active, CONSHDLR_NAME, FALSE, 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(), and TRUE.
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecWriteAllsolutions | ) |
execution method of dialog for writing all solutions
Definition at line 2177 of file cons_countsols.c.
References CONSHDLR_NAME, createCountDialog(), FALSE, 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().
SCIP_RETCODE SCIPcount | ( | SCIP * | scip | ) |
execute counting
scip | SCIP data structure |
Definition at line 2608 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().
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
scip | SCIP data structure |
valid | pointer to store if the return value is valid |
Definition at line 2640 of file cons_countsols.c.
References CONSHDLR_NAME, getNCountedSols(), SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetNCountedSolsstr().
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPcount().
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
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 2660 of file cons_countsols.c.
References CONSHDLR_NAME, pow(), SCIP_Longint, SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetNCountedFeasSubtrees(), and toString().
Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPgetNCountedSols().
SCIP_Longint SCIPgetNCountedFeasSubtrees | ( | SCIP * | scip | ) |
returns number of counted feasible subtrees
returns number of counted non trivial feasible subtrees
scip | SCIP data structure |
Definition at line 2698 of file cons_countsols.c.
References CONSHDLR_NAME, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetCountedSparseSols().
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPgetNCountedSolsstr().
void SCIPgetCountedSparseSols | ( | SCIP * | scip, |
SCIP_VAR *** | vars, | ||
int * | nvars, | ||
SCIP_SPARSESOL *** | sols, | ||
int * | nsols | ||
) |
Method to get the sparse solution.
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 2726 of file cons_countsols.c.
References CONSHDLR_NAME, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPsetParamsCountsols().
Referenced by SCIPgetNCountedFeasSubtrees().
SCIP_RETCODE SCIPsetParamsCountsols | ( | SCIP * | scip | ) |
setting SCIP parameters for such that a valid counting process is possible
scip | SCIP data structure |
Definition at line 2753 of file cons_countsols.c.
References SCIP_CALL, SCIP_OKAY, SCIP_PARAMEMPHASIS_COUNTER, SCIPsetEmphasis(), and TRUE.
Referenced by SCIPgetCountedSparseSols().
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
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 13719 of file cons_cumulative.c.
References consdataCatchEvents(), consdataCreate(), CONSHDLR_NAME, 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(), and SCIPincludeConshdlrCumulative().
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
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
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 13801 of file cons_cumulative.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsCumulative(), SCIPsetHminCumulative(), and TRUE.
Referenced by SCIPcreateConsCumulative(), and setupAndSolveCumulativeSubscip().
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)
scip | SCIP data structure |
cons | constraint data |
hmin | left bound of time axis to be considered |
Definition at line 13821 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHminCumulative().
Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), and setupAndSolveCumulativeSubscip().
returns the left bound of the effective horizon
returns the left bound of the time axis to be considered
scip | SCIP data structure |
cons | constraint |
Definition at line 13845 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsetHmaxCumulative().
Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHminCumulative().
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)
scip | SCIP data structure |
cons | constraint data |
hmax | right bound of time axis to be considered |
Definition at line 13865 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIP_INVALIDCALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHmaxCumulative().
Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPgetHminCumulative(), and setupAndSolveCumulativeSubscip().
returns the right bound of effective horizon
returns the right bound of the time axis to be considered
scip | SCIP data structure |
cons | constraint |
Definition at line 13889 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCumulative().
Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHmaxCumulative().
returns the start time variables of the cumulative constraint
returns the activities of the cumulative constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13909 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsCumulative().
Referenced by SCIPgetHmaxCumulative(), and writeFzn().
returns the number of start time variables of the cumulative constraint
returns the activities of the cumulative constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13930 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCapacityCumulative().
Referenced by SCIPgetVarsCumulative(), and writeFzn().
returns the capacity of the cumulative constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13951 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDurationsCumulative().
Referenced by SCIPgetNVarsCumulative(), and writeFzn().
returns the durations of the cumulative constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13972 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDemandsCumulative().
Referenced by SCIPgetCapacityCumulative(), and writeFzn().
returns the demands of the cumulative constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13993 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIPABORT, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetDurationsCumulative(), and writeFzn().
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
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 14016 of file cons_cumulative.c.
References checkCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPnormalizeCumulativeCondition().
Referenced by SCIPgetDemandsCumulative().
SCIP_RETCODE SCIPnormalizeCumulativeCondition | ( | SCIP * | scip, |
int | nvars, | ||
SCIP_VAR ** | vars, | ||
int * | durations, | ||
int * | demands, | ||
int * | capacity, | ||
int * | nchgcoefs, | ||
int * | nchgsides | ||
) |
normalize cumulative condition
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 14041 of file cons_cumulative.c.
References normalizeCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPsplitCumulativeCondition().
Referenced by SCIPcheckCumulativeCondition().
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
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 14059 of file cons_cumulative.c.
References computeEffectiveHorizonCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPpresolveCumulativeCondition().
Referenced by SCIPnormalizeCumulativeCondition().
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
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 14078 of file cons_cumulative.c.
References presolveConsEst(), presolveConsLct(), SCIP_CALL, SCIP_OKAY, and SCIPpropCumulativeCondition().
Referenced by SCIPsplitCumulativeCondition().
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
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 14109 of file cons_cumulative.c.
References CONSHDLR_NAME, FALSE, propagateCumulativeCondition(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPrespropCumulativeCondition().
Referenced by SCIPpresolveCumulativeCondition().
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
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 14158 of file cons_cumulative.c.
References intToInferInfo(), respropCumulativeCondition(), SCIP_CALL, SCIP_OKAY, SCIPvisualizeConsCumulative(), and TRUE.
Referenced by SCIPpropCumulativeCondition().
SCIP_RETCODE SCIPvisualizeConsCumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
this method visualizes the cumulative structure in GML format
scip | SCIP data structure |
cons | cumulative constraint |
Definition at line 14183 of file cons_cumulative.c.
References 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().
SCIP_RETCODE SCIPsetSolveCumulative | ( | SCIP * | scip, |
SCIP_DECL_SOLVECUMULATIVE((*solveCumulative)) | |||
) |
sets method to solve an individual cumulative condition
scip | SCIP data structure |
Definition at line 14286 of file cons_cumulative.c.
References CONSHDLR_NAME, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPsolveCumulative().
Referenced by SCIPvisualizeConsCumulative().
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
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 14316 of file cons_cumulative.c.
References CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateWorstCaseProfile(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.
Referenced by SCIPsetSolveCumulative(), and solveIndependentCons().
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
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 14372 of file cons_cumulative.c.
References computeImpliedEst(), computeImpliedLct(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPcomputeHmin(), SCIPconvertRealToInt(), SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), SCIPprofileInsertCore(), SCIPsortDownIntInt(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPsolveCumulative().
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
scip | SCIP data structure |
profile | worst case resource profile |
capacity | capacity to check |
Definition at line 14451 of file cons_cumulative.c.
References SCIPcomputeHmax(), SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcreateWorstCaseProfile().
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
scip | SCIP data structure |
profile | worst case profile |
capacity | capacity to check |
Definition at line 14481 of file cons_cumulative.c.
References SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().
Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcomputeHmin().
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
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 1055 of file cons_disjunction.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicDisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by SCIPcreateConsBasicDisjunction(), and SCIPincludeConshdlrDisjunction().
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
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 1107 of file cons_disjunction.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemDisjunction(), SCIPcreateConsDisjunction(), and TRUE.
Referenced by SCIPcreateConsDisjunction().
SCIP_RETCODE SCIPaddConsElemDisjunction | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | addcons | ||
) |
adds constraint to the disjunction of constraints
scip | SCIP data structure |
cons | disjunction constraint |
addcons | additional constraint in disjunction |
Definition at line 1126 of file cons_disjunction.c.
References consdataAddCons(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPcreateConsBasicDisjunction().
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
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 7271 of file cons_indicator.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPblkmem(), SCIPceil(), SCIPconsAddUpgradeLocks(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicIndicator(), SCIPcreateConsLinear(), SCIPcreateConsQuadratic(), SCIPcreateVar(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNOrigVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPinfinity(), SCIPisIntegral(), SCIPisTransformed(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetType(), SCIPvarIsIntegral(), and TRUE.
Referenced by createIndicatorConstraint(), readIndicators(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_LINCONSUPGD(), SCIPcreateConsBasicIndicator(), SCIPincludeConshdlrIndicator(), and upgradeIndicatorSuperindicator().
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
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 7484 of file cons_indicator.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsIndicator(), SCIPcreateConsIndicatorLinCons(), and TRUE.
Referenced by SCIPcreateConsIndicator().
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
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 7513 of file cons_indicator.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPconsAddUpgradeLocks(), SCIPconsGetHdlr(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCons(), SCIPcreateConsBasicIndicatorLinCons(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNVarsLinear(), SCIPgetVarsLinear(), SCIPmarkDoNotMultaggrVar(), SCIPvarGetType(), and TRUE.
Referenced by createSubSCIP(), readIndicators(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicIndicator(), and 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
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 7651 of file cons_indicator.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddVarIndicator(), SCIPcreateConsIndicatorLinCons(), and TRUE.
Referenced by SCIPcreateConsIndicatorLinCons().
SCIP_RETCODE SCIPaddVarIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val | ||
) |
adds variable to the inequality of the indicator constraint
scip | SCIP data structure |
cons | indicator constraint |
var | variable to add to the inequality |
val | value of variable |
Definition at line 7670 of file cons_indicator.c.
References CONSHDLR_NAME, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetLinearConsIndicator(), SCIPisIntegral(), SCIPvarGetType(), and SCIPvarIsIntegral().
Referenced by SCIPcreateConsBasicIndicatorLinCons().
gets the linear constraint corresponding to the indicator constraint (may be NULL)
cons | indicator constraint |
Definition at line 7701 of file cons_indicator.c.
References CONSHDLR_NAME, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetLinearConsIndicator().
Referenced by computeRanks(), createSubSCIP(), SCIP_DECL_LINCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPaddVarIndicator(), SCIPwriteLp(), and writeOpbConstraints().
SCIP_RETCODE SCIPsetLinearConsIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_CONS * | lincons | ||
) |
sets the linear constraint corresponding to the indicator constraint (may be NULL)
scip | SCIP data structure |
cons | indicator constraint |
lincons | linear constraint |
Definition at line 7718 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdelCons(), SCIPerrorMessage, SCIPgetBinaryVarIndicator(), SCIPgetNVarsLinear(), SCIPgetStage(), SCIPgetVarsLinear(), SCIPreleaseCons(), SCIPvarGetType(), and TRUE.
Referenced by SCIPgetLinearConsIndicator().
SCIP_RETCODE SCIPsetBinaryVarIndicator | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | binvar | ||
) |
sets binary indicator variable for indicator constraint
scip | SCIP data structure |
cons | indicator constraint |
binvar | binary variable to add to the inequality |
Definition at line 7806 of file cons_indicator.c.
References CONSHDLR_NAME, 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, SCIPgetSlackVarIndicator(), SCIPgetTransformedVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetType().
Referenced by SCIPgetBinaryVarIndicator().
gets binary variable corresponding to indicator constraint
cons | indicator constraint |
Definition at line 7789 of file cons_indicator.c.
References CONSHDLR_NAME, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetBinaryVarIndicator().
Referenced by computeRanks(), createCoveringProblem(), createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSGETDIVEBDCHGS(), SCIP_DECL_HEUREXEC(), SCIP_DECL_READERWRITE(), SCIPsetLinearConsIndicator(), SCIPwriteGms(), SCIPwriteLp(), tryOneOpt(), trySolCandidate(), and writeOpbConstraints().
gets slack variable corresponding to indicator constraint
cons | indicator constraint |
Definition at line 7880 of file cons_indicator.c.
References CONSHDLR_NAME, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetSlackVarUb().
Referenced by createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_READERWRITE(), SCIPsetBinaryVarIndicator(), SCIPwriteGms(), SCIPwriteLp(), and writeOpbConstraints().
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.
scip | SCIP data structure |
cons | indicator constraint |
ub | upper bound for slack variable |
Definition at line 7905 of file cons_indicator.c.
References CONSHDLR_NAME, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgVarUb(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetStage(), and SCIPisViolatedIndicator().
Referenced by SCIPgetSlackVarIndicator().
checks whether indicator constraint is violated w.r.t. sol
scip | SCIP data structure |
cons | indicator constraint |
sol | solution, or NULL to use current node's solution |
Definition at line 7931 of file cons_indicator.c.
References FALSE, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetSolVal(), SCIPisFeasPositive(), SCIPmakeIndicatorFeasible(), and TRUE.
Referenced by SCIP_DECL_CONSGETDIVEBDCHGS(), and SCIPsetSlackVarUb().
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.
scip | SCIP data structure |
cons | indicator constraint |
sol | solution |
changed | pointer to store whether the solution has been changed |
Definition at line 7986 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPmakeIndicatorsFeasible(), SCIPsetSolVal(), SCIPvarGetLbLocal(), SCIPvarGetNegationVar(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetStatus(), TRUE, and varGetObjDelta().
Referenced by SCIP_DECL_CONSCHECK(), SCIPisViolatedIndicator(), and 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
scip | SCIP data structure |
conshdlr | indicator constraint handler |
sol | solution |
changed | pointer to store whether the solution has been changed |
Definition at line 8160 of file cons_indicator.c.
References CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITPRESOLVE, SCIPaddLinearConsIndicator(), SCIPconsGetData(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPgetStage(), and SCIPmakeIndicatorFeasible().
Referenced by SCIPmakeIndicatorFeasible(), and SCIPperformGenericDivingAlgorithm().
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
scip | SCIP data structure |
conshdlr | indicator constraint handler |
lincons | linear constraint |
Definition at line 8207 of file cons_indicator.c.
References consdataEnsureAddLinConsSize(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIPaddRowIndicator(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconsIsLocal().
Referenced by SCIPmakeIndicatorsFeasible().
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
scip | SCIP data structure |
conshdlr | indicator constraint handler |
row | row to add |
Definition at line 8239 of file cons_indicator.c.
References addAltLPRow(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIProwGetName(), and SCIProwIsLocal().
Referenced by SCIP_DECL_CONSINITLP(), SCIPaddLinearConsIndicator(), and separatePoint().
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
creates and captures a knapsack constraint
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 13459 of file cons_knapsack.c.
References catchEvents(), consdataCreate(), CONSHDLR_NAME, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicKnapsack(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPisTransformed().
Referenced by createAndAddLinearCons(), createCapacityRestriction(), createNormalizedKnapsack(), presolRoundCardinality(), and 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
! [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
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 13534 of file cons_knapsack.c.
References FALSE, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddCoefKnapsack(), SCIPcreateConsKnapsack(), and TRUE.
Referenced by initPricing(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsKnapsack().
SCIP_RETCODE SCIPaddCoefKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Longint | weight | ||
) |
adds new item to knapsack constraint
scip | SCIP data structure |
cons | constraint data |
var | item variable |
weight | item weight |
Definition at line 13553 of file cons_knapsack.c.
References addCoef(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_Longint, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCapacityKnapsack().
Referenced by addCoefTerm(), createCapacityRestriction(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddCoefPseudoboolean(), and SCIPcreateConsBasicKnapsack().
SCIP_Longint SCIPgetCapacityKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the capacity of the knapsack constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13574 of file cons_knapsack.c.
References SCIP_Longint, SCIPABORT, SCIPchgCapacityKnapsack(), SCIPconsGetData(), and SCIPerrorMessage.
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), getLinearConsSides(), presolveAddKKTKnapsackConss(), SCIP_DECL_READERWRITE(), SCIPaddCoefKnapsack(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
SCIP_RETCODE SCIPchgCapacityKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Longint | capacity | ||
) |
changes capacity of the knapsack constraint
scip | SCIP data structure |
cons | constraint data |
capacity | new capacity of knapsack |
Definition at line 13598 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetNVarsKnapsack(), and SCIPgetStage().
Referenced by SCIPgetCapacityKnapsack().
gets the number of items in the knapsack constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 13627 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIP_DECL_READERWRITE(), SCIPchgCapacityKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of variables in the knapsack constraint; the user must not modify this array!
scip | SCIP data structure |
cons | constraint data |
Definition at line 13648 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIP_Longint, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIP_DECL_READERWRITE(), SCIPgetNVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
SCIP_Longint* SCIPgetWeightsKnapsack | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the array of weights in the knapsack constraint; the user must not modify this array!
scip | SCIP data structure |
cons | constraint data |
Definition at line 13669 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDualsolKnapsack().
Referenced by addKnapsackConstraints(), checkKnapsack(), computeSymmetryGroup(), getLinearConsVarsData(), presolveAddKKTKnapsackConss(), SCIP_DECL_READERWRITE(), SCIPgetVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets the dual solution of the knapsack constraint in the current LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 13690 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasKnapsack(), and SCIProwGetDualsol().
Referenced by SCIPgetWeightsKnapsack().
gets the dual Farkas value of the knapsack constraint in the current infeasible LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 13714 of file cons_knapsack.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowKnapsack(), and SCIProwGetDualfarkas().
Referenced by SCIPgetDualsolKnapsack().
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!
scip | SCIP data structure |
cons | constraint data |
Definition at line 13740 of file cons_knapsack.c.
References SCIPABORT, SCIPconsGetData(), and SCIPerrorMessage.
Referenced by SCIPgetDualfarkasKnapsack().
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
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
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 1008 of file cons_knapsack.c.
References FALSE, IDX, MAX, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_NOMEMORY, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcGreComDiv(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPsolveKnapsackApproximately(), SCIPsortDownRealIntLong(), SCIPsortDownRealLongRealInt(), and TRUE.
Referenced by buildFlowCover(), checkCons(), and getHighestCapacityUsage().
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
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 1547 of file cons_knapsack.c.
References GUBconsCreate(), SCIP_GUBSet::gubconss, SCIP_GUBCons::gubvars, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPisFeasGT(), SCIPselectWeightedDownRealLongRealInt(), and SCIPvarGetName().
Referenced by getCover(), and SCIPsolveKnapsackExactly().
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
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 5536 of file cons_knapsack.c.
References FALSE, getCover(), getFeasibleSet(), GUBsetCreate(), GUBsetFree(), GUBsetGetCliquePartition(), makeCoverMinimal(), SCIP_GUBSet::ngubconss, 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().
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 | 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 5753 of file cons_knapsack.c.
References BMSclearMemoryArray, CONSHDLR_NAME, DEFAULT_USEGUBS, FALSE, KNAPSACKRELAX_MAXDELTA, KNAPSACKRELAX_MAXDNOM, KNAPSACKRELAX_MAXSCALE, MAXABSVBCOEF, 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().
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
scip | SCIP data structure |
priority | priority of upgrading method |
conshdlrname | name of the constraint handler |
Definition at line 17366 of file cons_linear.c.
Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLogicor(), SCIPincludeConshdlrVarbound(), and SCIPincludeConshdlrXor().
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
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 17418 of file cons_linear.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, 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, and TRUE.
Referenced by addBranchingComplementaritiesSOS1(), addExtendedAsymmetricFormulation(), addExtendedFlowFormulation(), addLocalBranchingConstraint(), addLocalConss(), applyFixings(), cancelRow(), consdataLinearize(), copyCuts(), CREATE_CONSTRAINT(), createAndAddLinearCons(), createAndAddProofcons(), createConstraints(), createCoveringProblem(), createLinearCons(), createNAryBranch(), createRows(), createSubSCIP(), createSubscip(), dualPresolve(), fixDeleteOrUpgradeCons(), fixVariableZeroNode(), forbidCover(), getFixedVariable(), preprocessConstraintPairs(), presolveCreateBenTalNemirovskiApproxDim3(), presolveCreateGlineurApproxDim3(), presolveFindDuplicates(), presolveFindDuplicatesUpgradeCons(), presolveRemoveFixedVariables(), presolveTryAddLinearReform(), propIndicator(), readCnf(), readConstraints(), readOPBFile(), readRows(), replaceByLinearConstraints(), replaceViolatedByLinearConstraints(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERREAD(), SCIPcopyConsLinear(), SCIPcreateConsIndicator(), SCIPcreateConsLinear(), SCIPgetVarCopy(), selectVarMultAggrBranching(), setupAndSolveSubscip(), setupSubproblem(), setupSubScip(), tightenBounds(), tightenSingleVar(), tryUpgradingLogicor(), tryUpgradingSetppc(), and upgradeLinearSuperindicator().
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
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 17597 of file cons_linear.c.
Referenced by addLocalBranchingConstraint(), applyRepair(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMIP(), createSubproblem(), disaggregate(), SCIPapplyProximity(), SCIPcreateConsLinear(), setupAndSolveFiniteSolSubscip(), and setupProblem().
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
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 17617 of file cons_linear.c.
References CONSHDLR_NAME, FALSE, 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(), and TRUE.
Referenced by SCIP_DECL_CONSCOPY().
SCIP_RETCODE SCIPaddCoefLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | val | ||
) |
adds coefficient to linear constraint (if it is not zero)
scip | SCIP data structure |
cons | constraint data |
var | variable of constraint entry |
val | coefficient of constraint entry |
Definition at line 17747 of file cons_linear.c.
References addCoef(), chgLhs(), chgRhs(), CONSHDLR_NAME, 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 addCoefTerm(), applyFixings(), applyRepair(), consdataLinearize(), createAndAddLinearCons(), createAndAddProofcons(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMIP(), createSubproblem(), createSubSCIP(), getBoundConsFromVertices(), presolveAddKKTLinearCons(), presolveAddKKTQuadBilinearTerms(), presolveAddKKTQuadLinearTerms(), presolveAddKKTQuadQuadraticTerms(), readCols(), readIndicators(), readLinearCoefs(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERREAD(), SCIPaddCoefPseudoboolean(), SCIPaddVarIndicator(), SCIPapplyProximity(), SCIPchgCoefLinear(), SCIPcopyConsLinear(), SCIPcreateConsIndicator(), SCIPgetVarCopy(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscip(), setupProblem(), setupSubproblem(), setupSubScip(), tightenSingleVar(), tryUpgradingLogicor(), and tryUpgradingSetppc().
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
scip | SCIP data structure |
cons | constraint data |
var | variable of constraint entry |
val | new coefficient of constraint entry |
Definition at line 17908 of file cons_linear.c.
References chgCoefPos(), delCoefPos(), FALSE, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIPaddCoefLinear(), SCIPchgCoefLinear(), SCIPconsGetData(), SCIPconsIsOriginal(), SCIPdelCoefLinear(), SCIPerrorMessage, SCIPgetLhsLinear(), SCIPgetStage(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIPaddCoefLinear(), and SCIPchgCoefLinear().
SCIP_RETCODE SCIPdelCoefLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
deletes variable from linear constraint
scip | SCIP data structure |
cons | constraint data |
var | variable of constraint entry |
Definition at line 17976 of file cons_linear.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPchgCoefLinear().
gets left hand side of linear constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 17992 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkConsnames(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAndAddProofcons(), getLinearConsSides(), presolveAddKKTLinearConss(), presolveAddKKTQuadLinearTerms(), printRangeSection(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), readRanges(), readRhs(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPchgCoefLinear(), SCIPconflictstoreCleanNewIncumbent(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
gets right hand side of linear constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 18015 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), createAndAddProofcons(), getLinearConsSides(), presolveAddKKTLinearConss(), presolveAddKKTQuadLinearTerms(), printRangeSection(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), readRanges(), readRhs(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPapplyProximity(), SCIPconflictstoreCleanNewIncumbent(), SCIPgetDualSolVal(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
SCIP_RETCODE SCIPchgLhsLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | lhs | ||
) |
changes left hand side of linear constraint
scip | SCIP data structure |
cons | constraint data |
lhs | new left hand side |
Definition at line 18038 of file cons_linear.c.
References chgRhs(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by applyFixings(), chgLhsLinearCons(), fixDiscreteVars(), presolveAddKKTQuadLinearTerms(), readIndicators(), readRanges(), readRhs(), SCIP_DECL_PRESOLEXEC(), SCIPconflictstoreCleanNewIncumbent(), and tryUpgradingLogicor().
SCIP_RETCODE SCIPchgRhsLinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | rhs | ||
) |
changes right hand side of linear constraint
scip | SCIP data structure |
cons | constraint data |
rhs | new right hand side |
Definition at line 18059 of file cons_linear.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by applyFixings(), chgRhsLinearCons(), fixDiscreteVars(), presolveAddKKTQuadLinearTerms(), readRanges(), readRhs(), SCIP_DECL_PRESOLEXEC(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPconflictstoreCleanNewIncumbent(), and tryUpgradingSetppc().
gets the number of variables in the linear constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 18077 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), extractLinearValues(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPcreateConsIndicatorLinCons(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of variables in the linear constraint; the user must not modify this array!
scip | SCIP data structure |
cons | constraint data |
Definition at line 18100 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), extractLinearValues(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPcreateConsIndicatorLinCons(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of coefficient values in the linear constraint; the user must not modify this array!
scip | SCIP data structure |
cons | constraint data |
Definition at line 18123 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkLinearConssVarboundSOS1(), computeSymmetryGroup(), extractLinearValues(), getLinearConsVarsData(), presolveAddKKTLinearConss(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), saveConsLinear(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPmakeIndicatorFeasible(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), separatePerspective(), tightenVarsBoundsSOS1(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
gets the activity of the linear constraint in the given solution
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
Definition at line 18150 of file cons_linear.c.
gets the feasibility of the linear constraint in the given solution
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
Definition at line 18177 of file cons_linear.c.
gets the dual solution of the linear constraint in the current LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 18204 of file cons_linear.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPgetDualSolVal().
gets the dual Farkas value of the linear constraint in the current infeasible LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 18231 of file cons_linear.c.
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!
scip | SCIP data structure |
cons | constraint data |
Definition at line 18260 of file cons_linear.c.
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
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 18283 of file cons_linear.c.
Referenced by createAndAddProofcons().
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
.
scip | SCIP data structure |
linconsstats | linear constraint type classification |
Definition at line 14994 of file cons_linear.c.
Referenced by SCIP_DECL_DIALOGEXEC().
SCIP_RETCODE SCIPcreateConsLinking | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | intvar, | ||
SCIP_VAR ** | binvars, | ||
int * | 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
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
intvar | integer variable which should be linked |
binvars | binary variables, or NULL |
vals | coefficients of the binary variables |
nbinvars | number of binary 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 3261 of file cons_linking.c.
References consdataCreate(), CONSHDLR_NAME, getHashmapKey(), HASHSIZE_BINVARSCONS, 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().
SCIP_RETCODE SCIPcreateConsBasicLinking | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | intvar, | ||
SCIP_VAR ** | binvars, | ||
int * | 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
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
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
intvar | integer variable which should be linked |
binvars | binary variables, or NULL |
vals | coefficients of the binary variables |
nbinvars | number of binary variables |
Definition at line 3347 of file cons_linking.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsLinking(), and TRUE.
checks if for the given integer variable a linking constraint exists
scip | SCIP data structure |
intvar | integer variable which should be linked |
Definition at line 3366 of file cons_linking.c.
References CONSHDLR_NAME, getHashmapKey(), SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapExists().
Referenced by collectBinaryVars(), and consdataCollectLinkingCons().
returns the linking constraint belonging the given integer variable or NULL if it does not exist yet
returns the linking constraint belonging to the given integer variable or NULL if it does not exist yet
scip | SCIP data structure |
intvar | integer variable which should be linked |
Definition at line 3384 of file cons_linking.c.
References CONSHDLR_NAME, getHashmapKey(), SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapGetImage().
Referenced by collectBinaryVars(), consdataCollectLinkingCons(), and consdataCreate().
returns the integer variable of the linking constraint
scip | SCIP data structure |
cons | linking constraint |
Definition at line 3405 of file cons_linking.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
SCIP_RETCODE SCIPgetBinvarsLinking | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR *** | binvars, | ||
int * | nbinvars | ||
) |
returns the binary variables of the linking constraint
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 3427 of file cons_linking.c.
References consdataCreateBinvars(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by collectBinaryVars(), and createCoverCutsTimepoint().
returns the number of binary variables of the linking constraint
scip | SCIP data structure |
cons | linking constraint |
Definition at line 3471 of file cons_linking.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
returns the coefficients of the binary variables
scip | SCIP data structure |
cons | linking constraint |
Definition at line 3492 of file cons_linking.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by collectBinaryVars(), and createCoverCutsTimepoint().
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
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 5144 of file cons_logicor.c.
References consdataCreate(), CONSHDLR_NAME, 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(), consdataLinearize(), createAndAddLinearCons(), createConflict(), createNormalizedLogicor(), extendToCover(), readCnf(), SCIP_DECL_CONFLICTEXEC(), SCIPcreateConsBasicLogicor(), SCIPincludeConshdlrLogicor(), SCIPreoptApplyGlbConss(), and upgradeCons().
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
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 5221 of file cons_logicor.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLogicor(), SCIPcreateConsLogicor(), and TRUE.
Referenced by addFixedVarsConss(), and SCIPcreateConsLogicor().
SCIP_RETCODE SCIPaddCoefLogicor | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
adds coefficient in logic or constraint
scip | SCIP data structure |
cons | logicor constraint |
var | variable to add to the constraint |
Definition at line 5238 of file cons_logicor.c.
References addCoef(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsLogicor().
Referenced by addCoefTerm(), SCIPaddCoefPseudoboolean(), and SCIPcreateConsBasicLogicor().
gets number of variables in logic or constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5261 of file cons_logicor.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsLogicor().
Referenced by addLogicOrConstraints(), checkLogicor(), computeSymmetryGroup(), correctPresoldata(), createPresoldata(), extractGates(), getLinearConsNVars(), getLinearConsVarsData(), presolveAddKKTLogicorConss(), SCIP_DECL_READERWRITE(), SCIPaddCoefLogicor(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets array of variables in logic or constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5282 of file cons_logicor.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDualsolLogicor().
Referenced by addLogicOrConstraints(), checkLogicor(), computeSymmetryGroup(), extractGates(), getLinearConsVarsData(), presolveAddKKTLogicorConss(), saveConsLinear(), SCIP_DECL_READERWRITE(), SCIPgetNVarsLogicor(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets the dual solution of the logic or constraint in the current LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 5303 of file cons_logicor.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasLogicor(), and SCIProwGetDualsol().
Referenced by SCIPgetVarsLogicor().
gets the dual Farkas value of the logic or constraint in the current infeasible LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 5327 of file cons_logicor.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowLogicor(), and SCIProwGetDualfarkas().
Referenced by SCIPgetDualsolLogicor().
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!
scip | SCIP data structure |
cons | constraint data |
Definition at line 5353 of file cons_logicor.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetDualfarkasLogicor().
SCIP_RETCODE SCIPincludeNonlinconsUpgrade | ( | SCIP * | scip, |
SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)) | , | ||
SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)) | , | ||
int | priority, | ||
SCIP_Bool | active, | ||
const char * | conshdlrname | ||
) |
includes a nonlinear constraint upgrade method into the nonlinear constraint handler
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 9219 of file cons_nonlinear.c.
References active, SCIP_NlConsUpgrade::active, CONSHDLR_NAME, LinVarEventData::conshdlrdata, FALSE, SCIP_NlConsUpgrade::priority, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPcalcMemGrowSize(), SCIPconshdlrGetData(), SCIPcreateConsNonlinear(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPreallocBlockMemoryArray, SCIPsnprintf(), and SCIPwarningMessage().
Referenced by SCIPincludeConshdlrAbspower(), SCIPincludeConshdlrAnd(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrNonlinear(), and SCIPincludeConshdlrQuadratic().
SCIP_RETCODE SCIPcreateConsNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nexprtrees, | ||
SCIP_EXPRTREE ** | exprtrees, | ||
SCIP_Real * | nonlincoefs, | ||
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 nonlinear constraint this variant takes expression trees as input
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear variables in the constraint |
linvars | array with linear variables of constraint entries |
lincoefs | array with coefficients of constraint linear entries |
nexprtrees | number of expression trees for nonlinear part of constraint |
exprtrees | expression trees for nonlinear part of constraint |
nonlincoefs | coefficients for expression trees for nonlinear part, or NULL if all 1.0 |
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 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 9304 of file cons_nonlinear.c.
References addLinearCoef(), consdataCreateEmpty(), consdataEnsureLinearVarsSize(), consdataSetExprtrees(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicNonlinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindConshdlr(), SCIPisZero(), and TRUE.
Referenced by readConstraints(), readNonlinearExprs(), readObjective(), removeFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicNonlinear(), and SCIPincludeNonlinconsUpgrade().
SCIP_RETCODE SCIPcreateConsBasicNonlinear | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nexprtrees, | ||
SCIP_EXPRTREE ** | exprtrees, | ||
SCIP_Real * | nonlincoefs, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a nonlinear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsNonlinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
this variant takes expression trees as input
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear variables in the constraint |
linvars | array with linear variables of constraint entries |
lincoefs | array with coefficients of constraint linear entries |
nexprtrees | number of expression trees for nonlinear part of constraint |
exprtrees | expression trees for nonlinear part of constraint |
nonlincoefs | coefficients for expression trees for nonlinear part, or NULL if all 1.0 |
lhs | left hand side of constraint |
rhs | right hand side of constraint |
Definition at line 9397 of file cons_nonlinear.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsNonlinear(), SCIPcreateConsNonlinear2(), and TRUE.
Referenced by SCIPcreateConsNonlinear(), and setupProblem().
SCIP_RETCODE SCIPcreateConsNonlinear2 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
SCIP_EXPRGRAPHNODE * | exprgraphnode, | ||
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 nonlinear constraint this variant takes a node of the expression graph as input and can only be used during presolving it is assumed that the nonlinear constraint will be added to the transformed problem short after creation the given exprgraphnode is captured in this method
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear variables in the constraint |
linvars | array with linear variables of constraint entries |
lincoefs | array with coefficients of constraint linear entries |
exprgraphnode | expression graph node associated to nonlinear expression |
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 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 9427 of file cons_nonlinear.c.
References addLinearCoef(), consdataCreateEmpty(), consdataEnsureLinearVarsSize(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_EXPRCURV_UNKNOWN, SCIP_INVALID, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_PRESOLVING, SCIPcreateCons(), SCIPcreateConsBasicNonlinear2(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPexprgraphCaptureNode(), SCIPfindConshdlr(), SCIPgetStage(), and SCIPisZero().
Referenced by reformMonomial(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), SCIPcreateConsBasicNonlinear(), and SCIPcreateConsBasicNonlinear2().
SCIP_RETCODE SCIPcreateConsBasicNonlinear2 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
SCIP_EXPRGRAPHNODE * | exprgraphnode, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a nonlinear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsNonlinear2(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
this variant takes a node of the expression graph as input and can only be used during presolving it is assumed that the nonlinear constraint will be added to the transformed problem short after creation the given exprgraphnode is captured in this method
creates and captures a nonlinear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsNonlinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
this variant takes a node of the expression graph as input and can only be used during presolving it is assumed that the nonlinear constraint will be added to the transformed problem short after creation the given exprgraphnode is captured in this method
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear variables in the constraint |
linvars | array with linear variables of constraint entries |
lincoefs | array with coefficients of constraint linear entries |
exprgraphnode | expression graph node associated to nonlinear expression |
lhs | left hand side of constraint |
rhs | right hand side of constraint |
Definition at line 9525 of file cons_nonlinear.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddLinearVarNonlinear(), SCIPcreateConsNonlinear2(), and TRUE.
Referenced by SCIPcreateConsNonlinear2().
SCIP_RETCODE SCIPaddLinearVarNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
adds a linear variable with coefficient to a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | coefficient of variable |
Definition at line 9546 of file cons_nonlinear.c.
References addLinearCoef(), REALABS, SCIP_CALL, SCIP_OKAY, SCIPisInfinity(), and SCIPsetExprtreesNonlinear().
Referenced by SCIPcreateConsBasicNonlinear2().
SCIP_RETCODE SCIPsetExprtreesNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | nexprtrees, | ||
SCIP_EXPRTREE ** | exprtrees, | ||
SCIP_Real * | coefs | ||
) |
sets the expression trees in a nonlinear constraint constraint must not be active yet
scip | SCIP data structure |
cons | constraint |
nexprtrees | number of expression trees |
exprtrees | new expression trees, or NULL if nexprtrees is 0 |
coefs | coefficients of expression trees, or NULL if all 1.0 |
Definition at line 9566 of file cons_nonlinear.c.
References consdataSetExprtrees(), SCIP_CALL, SCIP_OKAY, SCIPaddExprtreesNonlinear(), SCIPconsGetData(), SCIPconsIsActive(), and TRUE.
Referenced by SCIPaddLinearVarNonlinear().
SCIP_RETCODE SCIPaddExprtreesNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | nexprtrees, | ||
SCIP_EXPRTREE ** | exprtrees, | ||
SCIP_Real * | coefs | ||
) |
adds expression trees to a nonlinear constraint constraint must not be active yet
scip | SCIP data structure |
cons | constraint |
nexprtrees | number of expression trees |
exprtrees | new expression trees, or NULL if nexprtrees is 0 |
coefs | coefficients of expression trees, or NULL if all 1.0 |
Definition at line 9588 of file cons_nonlinear.c.
References consdataAddExprtrees(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsActive(), SCIPgetNlRowNonlinear(), and TRUE.
Referenced by readNonlinearExprs(), and SCIPsetExprtreesNonlinear().
SCIP_RETCODE SCIPgetNlRowNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLROW ** | nlrow | ||
) |
gets the nonlinear constraint as a nonlinear row representation
scip | SCIP data structure |
cons | constraint |
nlrow | pointer to store nonlinear row |
Definition at line 9608 of file cons_nonlinear.c.
References createNlRow(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNLinearVarsNonlinear().
Referenced by SCIPaddExprtreesNonlinear().
gets the number of variables in the linear term of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9633 of file cons_nonlinear.c.
References SCIPconsGetData(), and SCIPgetLinearVarsNonlinear().
Referenced by readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNlRowNonlinear(), SCIPwriteGms(), and SCIPwritePip().
gets the variables in the linear part of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9645 of file cons_nonlinear.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLinearCoefsNonlinear().
Referenced by readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetNLinearVarsNonlinear(), SCIPwriteGms(), and SCIPwritePip().
gets the coefficients in the linear part of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9657 of file cons_nonlinear.c.
References SCIPconsGetData(), and SCIPgetNExprtreesNonlinear().
Referenced by readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetLinearVarsNonlinear(), SCIPwriteGms(), and SCIPwritePip().
gets the number of expression trees of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9669 of file cons_nonlinear.c.
References SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprtreesNonlinear(), and SCIPgetStage().
Referenced by SCIPgetLinearCoefsNonlinear(), SCIPwriteGms(), and SCIPwritePip().
SCIP_EXPRTREE** SCIPgetExprtreesNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the expression trees of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9682 of file cons_nonlinear.c.
References SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprtreeCoefsNonlinear(), and SCIPgetStage().
Referenced by SCIPgetNExprtreesNonlinear(), SCIPwriteGms(), and SCIPwritePip().
gets the coefficients of the expression trees of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9695 of file cons_nonlinear.c.
References SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprgraphNodeNonlinear(), and SCIPgetStage().
Referenced by SCIPgetExprtreesNonlinear(), SCIPwriteGms(), and SCIPwritePip().
SCIP_EXPRGRAPHNODE* SCIPgetExprgraphNodeNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets the expression graph node of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9708 of file cons_nonlinear.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsNonlinear().
Referenced by SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPgetExprtreeCoefsNonlinear(), and SCIPwriteGms().
gets the left hand side of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9720 of file cons_nonlinear.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetRhsNonlinear().
Referenced by readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetExprgraphNodeNonlinear(), SCIPwriteGms(), and SCIPwritePip().
gets the right hand side of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 9732 of file cons_nonlinear.c.
References SCIPcheckCurvatureNonlinear(), and SCIPconsGetData().
Referenced by readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetLhsNonlinear(), SCIPwriteGms(), and SCIPwritePip().
SCIP_RETCODE SCIPcheckCurvatureNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
check the function of a nonlinear constraint for convexity/concavity, if not done yet
scip | SCIP data structure |
cons | constraint |
Definition at line 9744 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetData(), and SCIPgetCurvatureNonlinear().
Referenced by SCIPgetRhsNonlinear().
SCIP_RETCODE SCIPgetCurvatureNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Bool | checkcurv, | ||
SCIP_EXPRCURV * | curvature | ||
) |
gets the curvature of the nonlinear function of a nonlinear constraint
The curvature is computed by summing up the curvature for each nonlinear summand. To get the curvature for single summands, use SCIPgetExprtreeCurvaturesNonlinear().
gets the curvature of the nonlinear function of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
checkcurv | whether to check constraint curvature, if not checked before |
curvature | pointer to store curvature of constraint |
Definition at line 9766 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), and SCIPgetExprtreeCurvaturesNonlinear().
Referenced by SCIPcheckCurvatureNonlinear().
SCIP_RETCODE SCIPgetExprtreeCurvaturesNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Bool | checkcurv, | ||
SCIP_EXPRCURV ** | curvatures | ||
) |
gets the curvature of the expression trees (multiplied by their coefficient) of a nonlinear constraint
scip | SCIP data structure |
cons | constraint |
checkcurv | whether to check constraint curvature, if not checked before |
curvatures | buffer to store curvatures of exprtrees |
Definition at line 9800 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPgetStage(), and SCIPgetViolationNonlinear().
Referenced by SCIPgetCurvatureNonlinear().
SCIP_RETCODE SCIPgetViolationNonlinear | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Real * | violation | ||
) |
computes the violation of a nonlinear constraint by a solution
scip | SCIP data structure |
cons | constraint |
sol | solution which violation to calculate, or NULL for LP solution |
violation | pointer to store violation of constraint |
Definition at line 9837 of file cons_nonlinear.c.
References computeViolation(), MAX, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_INVALID, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsIsActive(), SCIPerrorMessage, SCIPgetLinvarMayDecreaseNonlinear(), SCIPgetStage(), and SCIPwarningMessage().
Referenced by SCIPgetExprtreeCurvaturesNonlinear().
get index of a linear variable of a nonlinear constraint that may be decreased without making any other constraint infeasible, or -1 if none
scip | SCIP data structure |
cons | constraint |
Definition at line 9880 of file cons_nonlinear.c.
References consdataFindUnlockedLinearVar(), SCIPconsGetData(), and SCIPgetLinvarMayIncreaseNonlinear().
Referenced by SCIPgetViolationNonlinear().
get index of a linear variable of a nonlinear constraint that may be increased without making any other constraint infeasible, or -1 if none
scip | SCIP data structure |
cons | constraint |
Definition at line 9900 of file cons_nonlinear.c.
References consdataFindUnlockedLinearVar(), SCIPconsGetData(), and SCIPgetExprgraphNonlinear().
Referenced by SCIPgetLinvarMayDecreaseNonlinear().
SCIP_EXPRGRAPH* SCIPgetExprgraphNonlinear | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr | ||
) |
gets expression graph of nonlinear constraint handler
scip | SCIP data structure |
conshdlr | nonlinear constraint handler |
Definition at line 9920 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, SCIPcomputeHyperplaneThreePoints(), and SCIPconshdlrGetData().
Referenced by SCIP_DECL_NONLINCONSUPGD(), SCIPgetLinvarMayIncreaseNonlinear(), and SCIPwriteGms().
SCIP_RETCODE SCIPcomputeHyperplaneThreePoints | ( | SCIP * | scip, |
SCIP_Real | a1, | ||
SCIP_Real | a2, | ||
SCIP_Real | a3, | ||
SCIP_Real | b1, | ||
SCIP_Real | b2, | ||
SCIP_Real | b3, | ||
SCIP_Real | c1, | ||
SCIP_Real | c2, | ||
SCIP_Real | c3, | ||
SCIP_Real * | alpha, | ||
SCIP_Real * | beta, | ||
SCIP_Real * | gamma_, | ||
SCIP_Real * | delta | ||
) |
given three points, constructs coefficient of equation for hyperplane generated by these three points Three points a, b, and c are given. Computes coefficients alpha, beta, gamma, and delta, such that a, b, and c, satisfy alpha * x1 + beta * x2 + gamma * x3 = delta and gamma >= 0.0.
scip | SCIP data structure |
a1 | first coordinate of a |
a2 | second coordinate of a |
a3 | third coordinate of a |
b1 | first coordinate of b |
b2 | second coordinate of b |
b3 | third coordinate of b |
c1 | first coordinate of c |
c2 | second coordinate of c |
c3 | third coordinate of c |
alpha | coefficient of first coordinate |
beta | coefficient of second coordinate |
gamma_ | coefficient of third coordinate |
delta | constant right-hand side |
Definition at line 9942 of file cons_nonlinear.c.
References SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPisRelEQ(), and SCIPsolveLinearProb().
Referenced by addConcaveEstimatorBivariate(), generateEstimatingHyperplane(), and SCIPgetExprgraphNonlinear().
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 | ||
) |
creates and captures an or constraint
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 2068 of file cons_or.c.
References consdataCreate(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicOr(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by CREATE_CONSTRAINT(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicOr(), and SCIPincludeConshdlrOr().
SCIP_RETCODE SCIPcreateConsBasicOr | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | resvar, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures an or constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsNonlinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
creates and captures an or constraint in its most basic variant, i. e., with all constraint flags set to their default values
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 2130 of file cons_or.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOr(), SCIPgetNVarsOr(), and TRUE.
Referenced by SCIPcreateConsOr().
gets number of variables in or constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 2146 of file cons_or.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsOr().
Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPcreateConsBasicOr().
gets array of variables in or constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 2167 of file cons_or.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetResultantOr().
Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetNVarsOr().
gets the resultant variable in or constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 2188 of file cons_or.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetVarsOr().
SCIP_RETCODE SCIPseparateCoversOrbisack | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_VAR ** | vars1, | ||
SCIP_VAR ** | vars2, | ||
int | nrows, | ||
SCIP_Bool * | infeasible, | ||
int * | ngen | ||
) |
separate orbisack solutions
separate orbisack cover inequalities for a given solution
scip | pointer to scip |
cons | pointer to constraint for which cover inequality should be added |
sol | solution to be separated |
vars1 | variables of first columns |
vars2 | variables of second columns |
nrows | number of rows |
infeasible | memory address to store whether we detected infeasibility |
ngen | memory address to store number of generated cuts |
Definition at line 1747 of file cons_orbisack.c.
References FALSE, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIP_Real, SCIPaddRow(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPconsGetHdlr(), SCIPcreateEmptyRowCons(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPgetSolVals(), SCIPinfinity(), SCIPisEfficacious(), SCIPprintRow(), SCIPreleaseRow(), and TRUE.
Referenced by SCIPcheckSolutionOrbisack(), and separateConstraints().
SCIP_RETCODE SCIPcheckSolutionOrbisack | ( | SCIP * | scip, |
SCIP_SOL * | sol, | ||
SCIP_VAR ** | vars1, | ||
SCIP_VAR ** | vars2, | ||
int | nrows, | ||
SCIP_Bool | printreason, | ||
SCIP_Bool * | feasible | ||
) |
checks whether a given binary solution is feasible for the orbisack
checks given solution for feasibility
scip | SCIP data structure |
sol | solution to check for feasibility |
vars1 | variables of first column |
vars2 | variables of second column |
nrows | number of rows |
printreason | whether reason for infeasibility should be printed |
feasible | memory address to store whether sol is feasible |
Definition at line 1692 of file cons_orbisack.c.
References FALSE, SCIP_OKAY, SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasIntegral(), SCIPseparateCoversOrbisack(), and TRUE.
Referenced by checkFullOrbitopeSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSPRINT().
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 | 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 orbisack constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
vars1 | first column of matrix of variables on which the symmetry acts |
vars2 | second column of matrix of variables on which the symmetry acts |
nrows | number of rows in variable matrix |
ispporbisack | whether the orbisack is a packing/partitioning orbisack |
isparttype | whether the orbisack is a partitioning orbisack |
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 1969 of file cons_orbisack.c.
References consdataCreate(), CONSHDLR_NAME, packingUpgrade(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_ORBITOPETYPE_PACKING, SCIP_ORBITOPETYPE_PARTITIONING, SCIP_PLUGINNOTFOUND, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicOrbisack(), SCIPcreateConsOrbitope(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, and TRUE.
Referenced by orbisackUpgrade(), SCIPcreateConsBasicOrbisack(), and SCIPincludeConshdlrOrbisack().
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 | ||
) |
creates and captures an orbisack constraint in its most basic variant
All constraint flags set to their default values, which can be set afterwards using SCIPsetConsFLAGNAME() in scip.h.
creates and captures an orbisack constraint in its most basic variant
All constraint flags set to their default values, which can be set afterwards using SCIPsetConsFLAGNAME() in scip.h.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
vars1 | first column of matrix of variables on which the symmetry acts |
vars2 | second column of matrix of variables on which the symmetry acts |
nrows | number of rows in constraint matrix |
ispporbisack | whether the orbisack is a packing/partitioning orbisack |
isparttype | whether the orbisack is a partitioning orbisack |
Definition at line 2074 of file cons_orbisack.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOrbisack(), and TRUE.
Referenced by SCIPcreateConsOrbisack().
SCIP_RETCODE SCIPcreateConsOrbitope | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR *** | vars, | ||
SCIP_ORBITOPETYPE | orbitopetype, | ||
int | nspcons, | ||
int | nblocks, | ||
SCIP_Bool | resolveprop, | ||
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 orbitope constraint
creates and captures a orbitope constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
vars | matrix of variables on which the symmetry acts |
orbitopetype | type of orbitope constraint |
nspcons | number of set partitioning/packing constraints <=> p |
nblocks | number of symmetric variable blocks <=> q |
resolveprop | should propagation be resolved? |
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 3147 of file cons_orbitope.c.
References consdataCreate(), CONSHDLR_NAME, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_ORBITOPETYPE_FULL, SCIP_ORBITOPETYPE_PACKING, SCIP_ORBITOPETYPE_PARTITIONING, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicOrbitope(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetSubscipDepth(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIPvarIsNegated(), and strenghtenOrbitopeConstraint().
Referenced by detectOrbitopes(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicOrbitope(), SCIPcreateConsOrbisack(), and SCIPincludeConshdlrOrbitope().
SCIP_RETCODE SCIPcreateConsBasicOrbitope | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR *** | vars, | ||
SCIP_ORBITOPETYPE | orbitopetype, | ||
int | nspcons, | ||
int | nblocks, | ||
SCIP_Bool | resolveprop | ||
) |
creates and captures an orbitope 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
creates and captures an orbitope constraint in its most basic variant, i. e., with all constraint flags set to their default values
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
vars | matrix of variables on which the symmetry acts |
orbitopetype | type of orbitope constraint |
nspcons | number of set partitioning/packing constraints <=> p |
nblocks | number of symmetric variable blocks <=> q |
resolveprop | should propagation be resolved? |
Definition at line 3265 of file cons_orbitope.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOrbitope(), and TRUE.
Referenced by SCIPcreateConsOrbitope().
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 | ||
) |
creates and captures a pseudoboolean constraint, with given linear and and-constraints
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
lincons | associated linear constraint |
linconstype | linear constraint type of associated linear constraint |
andconss | associated and-constraints |
andcoefs | associated coefficients of and-constraints |
nandconss | number of associated and-constraints |
indvar | indicator variable if it's a soft constraint, or NULL |
weight | weight of the soft constraint, if it is one |
issoftcons | is this a soft constraint |
intvar | an artificial variable which was added only for the objective function, if this variable is not NULL this constraint (without this integer variable) describes the objective function |
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 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 8876 of file cons_pseudoboolean.c.
References BMScopyMemoryArray, ConsAndData::cons, consdataCreate(), CONSHDLR_NAME, FALSE, inithashmapandtable(), ConsAndData::isoriginal, ConsAndData::istransformed, ConsAndData::newvars, ConsAndData::nnewvars, ConsAndData::noriguses, ConsAndData::nuses, ConsAndData::nvars, ConsAndData::origcons, SCIP_Bool, SCIP_CALL, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcalcMemGrowSize(), SCIPcaptureCons(), SCIPcaptureVar(), SCIPconsAddUpgradeLocks(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPcreateCons(), SCIPcreateConsPseudoboolean(), SCIPduplicateBlockMemoryArray, SCIPensureBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPgetNVarsAnd(), SCIPgetResultantAnd(), SCIPgetVarsAnd(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPhashtableInsert(), SCIPhashtableRetrieve(), SCIPinfinity(), SCIPisInfinity(), SCIPsortPtr(), SCIPwarningMessage(), ConsAndData::snewvars, ConsAndData::svars, TRUE, and ConsAndData::vars.
Referenced by copyConsPseudoboolean(), and SCIPincludeConshdlrPseudoboolean().
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 | ||
) |
creates and captures a pseudoboolean constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
linvars | variables of the linear part, or NULL |
nlinvars | number of variables of the linear part |
linvals | coefficients of linear part, or NULL |
terms | nonlinear terms of variables, or NULL |
nterms | number of terms of variables of nonlinear term |
ntermvars | number of variables in nonlinear terms, or NULL |
termvals | coefficients of nonlinear parts, or NULL |
indvar | indicator variable if it's a soft constraint, or NULL |
weight | weight of the soft constraint, if it is one |
issoftcons | is this a soft constraint |
intvar | an artificial variable which was added only for the objective function, if this variable is not NULL this constraint (without this integer variable) describes the objective function |
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 9146 of file cons_pseudoboolean.c.
References consdataCreate(), CONSHDLR_NAME, createAndAddAnds(), createAndAddLinearCons(), FALSE, inithashmapandtable(), SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicPseudoboolean(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetResultantAnd(), SCIPinfinity(), and SCIPisInfinity().
Referenced by readConstraints(), SCIPcreateConsBasicPseudoboolean(), SCIPcreateConsPseudobooleanWithConss(), and setObjective().
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 | ||
) |
creates and captures a pseudoboolean 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
creates and captures a pseudoboolean constraint in its most basic variant, i. e., with all constraint flags set to their default values
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
linvars | variables of the linear part, or NULL |
nlinvars | number of variables of the linear part |
linvals | coefficients of linear part, or NULL |
terms | nonlinear terms of variables, or NULL |
nterms | number of terms of variables of nonlinear term |
ntermvars | number of variables in nonlinear terms, or NULL |
termvals | coefficients of nonlinear parts, or NULL |
indvar | indicator variable if it's a soft constraint, or NULL |
weight | weight of the soft constraint, if it is one |
issoftcons | is this a soft constraint |
intvar | a artificial variable which was added only for the objective function, if this variable is not NULL this constraint (without this integer variable) describes the objective function |
lhs | left hand side of constraint |
rhs | right hand side of constraint |
Definition at line 9293 of file cons_pseudoboolean.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddCoefPseudoboolean(), SCIPcreateConsPseudoboolean(), and TRUE.
Referenced by SCIPcreateConsPseudoboolean().
SCIP_RETCODE SCIPaddCoefPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_VAR *const | var, | ||
SCIP_Real const | val | ||
) |
adds linear term pseudo boolean constraint (if it is not zero)
adds a variable to the pseudo boolean constraint (if it is not zero)
scip | SCIP data structure |
cons | constraint data |
var | variable of constraint entry |
val | coefficient of constraint entry |
Definition at line 9328 of file cons_pseudoboolean.c.
References CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIP_LINEARCONSTYPE_KNAPSACK, SCIP_LINEARCONSTYPE_LINEAR, SCIP_LINEARCONSTYPE_LOGICOR, SCIP_LINEARCONSTYPE_SETPPC, SCIP_Longint, SCIP_OKAY, SCIPABORT, SCIPaddCoefKnapsack(), SCIPaddCoefLinear(), SCIPaddCoefLogicor(), SCIPaddCoefSetppc(), SCIPaddTermPseudoboolean(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPisEQ(), SCIPisIntegral(), SCIPisPositive(), and SCIPisZero().
Referenced by SCIPcreateConsBasicPseudoboolean().
SCIP_RETCODE SCIPaddTermPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_VAR **const | vars, | ||
int const | nvars, | ||
SCIP_Real const | val | ||
) |
adds nonlinear term to pseudo boolean constraint (if it is not zero)
adds nonlinear term to pseudo boolean constraint (if it is not zero)
scip | SCIP data structure |
cons | pseudoboolean constraint |
vars | variables of the nonlinear term |
nvars | number of variables of the nonlinear term |
val | coefficient of constraint entry |
Definition at line 9405 of file cons_pseudoboolean.c.
References addCoefTerm(), CONSHDLR_NAME, ConsAndData::nvars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetIndVarPseudoboolean().
Referenced by SCIPaddCoefPseudoboolean().
gets indicator variable of pseudoboolean constraint, or NULL if there is no
scip | SCIP data structure |
cons | constraint data |
Definition at line 9430 of file cons_pseudoboolean.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinearConsPseudoboolean().
Referenced by SCIPaddTermPseudoboolean(), and writeOpbConstraints().
gets linear constraint of pseudoboolean constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9454 of file cons_pseudoboolean.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinearConsTypePseudoboolean().
Referenced by SCIPgetIndVarPseudoboolean(), and writeOpbConstraints().
SCIP_LINEARCONSTYPE SCIPgetLinearConsTypePseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons | ||
) |
gets type of linear constraint of pseudoboolean constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9478 of file cons_pseudoboolean.c.
References CONSHDLR_NAME, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNLinVarsWithoutAndPseudoboolean().
Referenced by SCIPgetLinearConsPseudoboolean().
gets number of linear variables without artificial terms variables of pseudoboolean constraint
scip | SCIP data structure |
cons | pseudoboolean constraint |
Definition at line 9502 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinDatasWithoutAndPseudoboolean().
Referenced by SCIPgetLinearConsTypePseudoboolean(), and writeOpbConstraints().
SCIP_RETCODE SCIPgetLinDatasWithoutAndPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_VAR **const | linvars, | ||
SCIP_Real *const | lincoefs, | ||
int *const | nlinvars | ||
) |
gets linear constraint of pseudoboolean constraint
scip | SCIP data structure |
cons | pseudoboolean constraint |
linvars | array to store and-constraints |
lincoefs | array to store and-coefficients |
nlinvars | pointer to store the required array size for and-constraints, have to be initialized with size of given array |
Definition at line 9528 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, getLinearConsNVars(), getLinearConsVarsData(), getLinVarsAndAndRess(), ConsAndData::nvars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetAndDatasPseudoboolean(), and ConsAndData::vars.
Referenced by SCIPgetNLinVarsWithoutAndPseudoboolean(), and writeOpbConstraints().
SCIP_RETCODE SCIPgetAndDatasPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_CONS **const | andconss, | ||
SCIP_Real *const | andcoefs, | ||
int *const | nandconss | ||
) |
gets and-constraints of pseudoboolean constraint
scip | SCIP data structure |
cons | pseudoboolean constraint |
andconss | array to store and-constraints |
andcoefs | array to store and-coefficients |
nandconss | pointer to store the required array size for and-constraints, have to be initialized with size of given array |
Definition at line 9588 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, SCIP_Bool, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetNAndsPseudoboolean(), and TRUE.
Referenced by SCIPgetLinDatasWithoutAndPseudoboolean(), and writeOpbConstraints().
gets number of and constraints of pseudoboolean constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9648 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, SCIPABORT, SCIPchgLhsPseudoboolean(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetAndDatasPseudoboolean(), and writeOpbConstraints().
SCIP_RETCODE SCIPchgLhsPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_Real const | lhs | ||
) |
changes left hand side of pseudoboolean constraint
changes left hand side of pseudoboolean constraint
scip | SCIP data structure |
cons | constraint data |
lhs | new left hand side |
Definition at line 9680 of file cons_pseudoboolean.c.
References checkConsConsistency, chgLhs(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIP_LINEARCONSTYPE_KNAPSACK, SCIP_LINEARCONSTYPE_LINEAR, SCIP_LINEARCONSTYPE_LOGICOR, SCIP_LINEARCONSTYPE_SETPPC, SCIP_OKAY, SCIPchgRhsPseudoboolean(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetNAndsPseudoboolean().
SCIP_RETCODE SCIPchgRhsPseudoboolean | ( | SCIP *const | scip, |
SCIP_CONS *const | cons, | ||
SCIP_Real const | rhs | ||
) |
changes right hand side of pseudoboolean constraint
changes right hand side of pseudoboolean constraint
scip | SCIP data structure |
cons | constraint data |
rhs | new right hand side |
Definition at line 9731 of file cons_pseudoboolean.c.
References checkConsConsistency, chgRhs(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIP_LINEARCONSTYPE_KNAPSACK, SCIP_LINEARCONSTYPE_LINEAR, SCIP_LINEARCONSTYPE_LOGICOR, SCIP_LINEARCONSTYPE_SETPPC, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLhsPseudoboolean().
Referenced by SCIPchgLhsPseudoboolean().
get left hand side of pseudoboolean constraint
scip | SCIP data structure |
cons | pseudoboolean constraint |
Definition at line 9773 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsPseudoboolean().
Referenced by SCIPchgRhsPseudoboolean(), and writeOpbConstraints().
get right hand side of pseudoboolean constraint
scip | SCIP data structure |
cons | pseudoboolean constraint |
Definition at line 9796 of file cons_pseudoboolean.c.
References checkConsConsistency, CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetLhsPseudoboolean(), and writeOpbConstraints().
SCIP_RETCODE SCIPincludeQuadconsUpgrade | ( | SCIP * | scip, |
SCIP_DECL_QUADCONSUPGD((*quadconsupgd)) | , | ||
int | priority, | ||
SCIP_Bool | active, | ||
const char * | conshdlrname | ||
) |
includes a quadratic constraint upgrade method into the quadratic constraint handler
includes a quadratic constraint update method into the quadratic constraint handler
scip | SCIP data structure |
priority | priority of upgrading method |
active | should the upgrading method be active by default? |
conshdlrname | name of the constraint handler |
Definition at line 14062 of file cons_quadratic.c.
References active, SCIP_QuadConsUpgrade::active, CONSHDLR_NAME, conshdlrdataHasUpgrade(), FALSE, SCIP_QuadConsUpgrade::priority, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPcalcMemGrowSize(), SCIPconshdlrGetData(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPreallocBlockMemoryArray, and SCIPsnprintf().
Referenced by SCIPincludeConshdlrAbspower(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrBounddisjunction(), SCIPincludeConshdlrQuadratic(), and SCIPincludeConshdlrSOC().
SCIP_RETCODE SCIPcreateConsQuadratic | ( | 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 constraint.
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m a_j y_j z_j \leq u, \]
where \(x_i = y_j = z_k\) is possible.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadterms | number of quadratic terms (m) |
quadvars1 | array with first variables in quadratic terms (y_j) |
quadvars2 | array with second variables in quadratic terms (z_j) |
quadcoefs | array with coefficients of quadratic terms (a_j) |
lhs | left hand side of quadratic equation (ell) |
rhs | right hand side of quadratic equation (u) |
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 14138 of file cons_quadratic.c.
References addBilinearTerm(), addLinearCoef(), addQuadVarTerm(), consdataCreateEmpty(), consdataEnsureBilinSize(), consdataEnsureLinearVarsSize(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPblkmem(), SCIPcreateCons(), SCIPcreateConsBasicQuadratic(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindConshdlr(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), and SCIPisZero().
Referenced by createQuadraticCons(), readConstraints(), readObjective(), readQCMatrix(), readQMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicQuadratic(), SCIPcreateConsIndicator(), SCIPcreateConsIndicatorLinCons(), and SCIPincludeQuadconsUpgrade().
SCIP_RETCODE SCIPcreateConsBasicQuadratic | ( | 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 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
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m a_j y_jz_j \leq u, \]
where \(x_i = y_j = z_k\) is possible.
creates and captures a quadratic constraint with all its flags set to their default values.
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m a_j y_j z_j \leq u, \]
where \(x_i = y_j = z_k\) is possible.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadterms | number of quadratic terms (m) |
quadvars1 | array with first variables in quadratic terms (y_j) |
quadvars2 | array with second variables in quadratic terms (z_j) |
quadcoefs | array with coefficients of quadratic terms (a_j) |
lhs | left hand side of quadratic equation (ell) |
rhs | right hand side of quadratic equation (u) |
Definition at line 14320 of file cons_quadratic.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsQuadratic(), SCIPcreateConsQuadratic2(), and TRUE.
Referenced by SCIPcreateConsQuadratic(), and setupProblem().
SCIP_RETCODE SCIPcreateConsQuadratic2 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nquadvarterms, | ||
SCIP_QUADVARTERM * | quadvarterms, | ||
int | nbilinterms, | ||
SCIP_BILINTERM * | bilinterms, | ||
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 constraint.
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m (a_j y_j^2 + b_j y_j) + \sum_{k=1}^p c_k v_k w_k \leq u. \]
Creates and captures a quadratic constraint.
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m (a_j y_j^2 + b_j y_j) + \sum_{k=1}^p c_k v_k w_k \leq u. \]
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadvarterms | number of quadratic terms (m) |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms (p) |
bilinterms | bilinear terms |
lhs | constraint left hand side (ell) |
rhs | constraint right hand side (u) |
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 dynamic? |
removable | should the constraint be removed from the LP due to aging or cleanup? |
Definition at line 14351 of file cons_quadratic.c.
References consdataCreate(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicQuadratic2(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.
Referenced by presolveDisaggregate(), presolveRemoveFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicQuadratic(), and SCIPcreateConsBasicQuadratic2().
SCIP_RETCODE SCIPcreateConsBasicQuadratic2 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nlinvars, | ||
SCIP_VAR ** | linvars, | ||
SCIP_Real * | lincoefs, | ||
int | nquadvarterms, | ||
SCIP_QUADVARTERM * | quadvarterms, | ||
int | nbilinterms, | ||
SCIP_BILINTERM * | bilinterms, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
creates and captures a quadratic 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
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m (a_j y_j^2 + b_j y_j) + \sum_{k=1}^p c_kv_kw_k \leq u. \]
creates and captures a quadratic constraint in its most basic version, i.e., all constraint flags are set to their default values.
The constraint should be given in the form
\[ \ell \leq \sum_{i=1}^n b_i x_i + \sum_{j=1}^m (a_j y_j^2 + b_j y_j) + \sum_{k=1}^p c_k v_k w_k \leq u. \]
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadvarterms | number of quadratic terms (m) |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms (p) |
bilinterms | bilinear terms |
lhs | constraint left hand side (ell) |
rhs | constraint right hand side (u) |
Definition at line 14413 of file cons_quadratic.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddConstantQuadratic(), SCIPcreateConsQuadratic2(), and TRUE.
Referenced by SCIPcreateConsQuadratic2().
Adds a constant to the constraint function, that is, subtracts a constant from both sides
scip | SCIP data structure |
cons | constraint |
constant | constant to subtract from both sides |
Definition at line 14437 of file cons_quadratic.c.
References REALABS, SCIP_STAGE_SOLVING, SCIPABORT, SCIPaddLinearVarQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), and SCIPcreateConsBasicQuadratic2().
SCIP_RETCODE SCIPaddLinearVarQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
Adds a linear variable with coefficient to a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | coefficient of variable |
Definition at line 14473 of file cons_quadratic.c.
References addLinearCoef(), REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddQuadVarQuadratic(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), and SCIPisInfinity().
Referenced by presolveDisaggregate(), readObjective(), SCIP_DECL_CONSPARSE(), SCIP_DECL_QUADCONSUPGD(), and SCIPaddConstantQuadratic().
SCIP_RETCODE SCIPaddQuadVarQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | lincoef, | ||
SCIP_Real | sqrcoef | ||
) |
Adds a quadratic variable with linear and square coefficient to a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
var | variable |
lincoef | linear coefficient of variable |
sqrcoef | square coefficient of variable |
Definition at line 14498 of file cons_quadratic.c.
References addQuadVarTerm(), REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddQuadVarLinearCoefQuadratic(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), and SCIPisInfinity().
Referenced by presolveDisaggregate(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), and SCIPaddLinearVarQuadratic().
SCIP_RETCODE SCIPaddQuadVarLinearCoefQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
Adds a linear coefficient for a quadratic variable.
Variable will be added with square coefficient 0.0 if not existing yet.
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | value to add to linear coefficient of variable |
Definition at line 14528 of file cons_quadratic.c.
References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), and SCIPisZero().
Referenced by presolveDisaggregate(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPaddQuadVarQuadratic(), and setupProblem().
SCIP_RETCODE SCIPaddSquareCoefQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
Adds a square coefficient for a quadratic variable.
Variable will be added with linear coefficient 0.0 if not existing yet.
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | value to add to square coefficient of variable |
Definition at line 14581 of file cons_quadratic.c.
References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddBilinTermQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), and SCIPisZero().
Referenced by SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPaddBilinTermQuadratic(), SCIPaddQuadVarLinearCoefQuadratic(), and setupProblem().
SCIP_RETCODE SCIPaddBilinTermQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var1, | ||
SCIP_VAR * | var2, | ||
SCIP_Real | coef | ||
) |
Adds a bilinear term to a quadratic constraint.
Variables will be added with linear and square coefficient 0.0 if not existing yet. If variables are equal, only the square coefficient of the variable is updated.
scip | SCIP data structure |
cons | constraint |
var1 | first variable |
var2 | second variable |
coef | coefficient of bilinear term |
Definition at line 14638 of file cons_quadratic.c.
References addBilinearTerm(), addQuadVarTerm(), consdataFindQuadVarTerm(), consdataSortQuadVarTerms(), REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetNlRowQuadratic(), SCIPgetStage(), and SCIPisInfinity().
Referenced by presolveDisaggregate(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPaddSquareCoefQuadratic(), SCIPchgBilinCoefQuadratic(), and setupProblem().
SCIP_RETCODE SCIPgetNlRowQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLROW ** | nlrow | ||
) |
Gets the quadratic constraint as a nonlinear row representation.
scip | SCIP data structure |
cons | constraint |
nlrow | pointer to store nonlinear row |
Definition at line 14704 of file cons_quadratic.c.
References createNlRow(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNLinearVarsQuadratic().
Referenced by createCoveringProblem(), and SCIPaddBilinTermQuadratic().
Gets the number of variables in the linear part of a quadratic constraint.
Gets the number of variables in the linear term of a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
Definition at line 14729 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPgetLinearVarsQuadratic().
Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetNlRowQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the variables in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.
scip | SCIP data structure |
cons | constraint |
Definition at line 14743 of file cons_quadratic.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetCoefsLinearVarsQuadratic().
Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetNLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the coefficients in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.
scip | SCIP data structure |
cons | constraint |
Definition at line 14757 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPgetNQuadVarTermsQuadratic().
Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the number of quadratic variable terms of a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
Definition at line 14770 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPgetQuadVarTermsQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetCoefsLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
SCIP_QUADVARTERM* SCIPgetQuadVarTermsQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
Gets the quadratic variable terms of a quadratic constraint. Length is given by SCIPgetNQuadVarTermsQuadratic.
scip | SCIP data structure |
cons | constraint |
Definition at line 14784 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPsortQuadVarTermsQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetNQuadVarTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
SCIP_RETCODE SCIPsortQuadVarTermsQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
Ensures that quadratic variable terms are sorted.
scip | SCIP data structure |
cons | constraint |
Definition at line 14796 of file cons_quadratic.c.
References consdataSortQuadVarTerms(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPfindQuadVarTermQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), and SCIPgetQuadVarTermsQuadratic().
SCIP_RETCODE SCIPfindQuadVarTermQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
int * | pos | ||
) |
Finds the position of a quadratic variable term for a given variable.
scip | SCIP data structure |
cons | constraint |
var | variable to search for |
pos | buffer to store position of quadvarterm for var, or -1 if not found |
Definition at line 14813 of file cons_quadratic.c.
References consdataFindQuadVarTerm(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNBilinTermsQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_QUADCONSUPGD(), and SCIPsortQuadVarTermsQuadratic().
Gets the number of bilinear terms of a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
Definition at line 14831 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPgetBilinTermsQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPfindQuadVarTermQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
SCIP_BILINTERM* SCIPgetBilinTermsQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
Gets the bilinear terms of a quadratic constraint. Length is given by SCIPgetNBilinTermQuadratic.
scip | SCIP data structure |
cons | constraint |
Definition at line 14845 of file cons_quadratic.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsQuadratic().
Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetNBilinTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the left hand side of a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
Definition at line 14857 of file cons_quadratic.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetRhsQuadratic().
Referenced by checkConsnames(), checkConsQuadraticProblem(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetBilinTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the right hand side of a quadratic constraint.
scip | SCIP data structure |
cons | constraint |
Definition at line 14869 of file cons_quadratic.c.
References SCIPconsGetData(), and SCIPgetLinvarMayDecreaseQuadratic().
Referenced by checkConsnames(), checkConsQuadraticProblem(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPgetLhsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
get index of a variable in linvars that may be decreased without making any other constraint infeasible, or -1 if none
scip | SCIP data structure |
cons | constraint |
Definition at line 14881 of file cons_quadratic.c.
References consdataFindUnlockedLinearVar(), SCIPconsGetData(), and SCIPgetLinvarMayIncreaseQuadratic().
Referenced by checkConsQuadraticProblem(), and SCIPgetRhsQuadratic().
get index of a variable in linvars that may be increased without making any other constraint infeasible, or -1 if none
scip | SCIP data structure |
cons | constraint |
Definition at line 14900 of file cons_quadratic.c.
References consdataFindUnlockedLinearVar(), SCIPcheckCurvatureQuadratic(), and SCIPconsGetData().
Referenced by checkConsQuadraticProblem(), and SCIPgetLinvarMayDecreaseQuadratic().
SCIP_RETCODE SCIPcheckCurvatureQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
Check the quadratic function of a quadratic constraint for its semi-definiteness, if not done yet.
scip | SCIP data structure |
cons | constraint |
Definition at line 14919 of file cons_quadratic.c.
References checkCurvature(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPisConvexQuadratic(), and TRUE.
Referenced by SCIP_DECL_QUADCONSUPGD(), and SCIPgetLinvarMayIncreaseQuadratic().
Indicates whether the quadratic function of a quadratic constraint is (known to be) convex.
scip | SCIP data structure |
cons | constraint |
Definition at line 14932 of file cons_quadratic.c.
References checkCurvatureEasy(), FALSE, SCIP_Bool, SCIPconsGetData(), and SCIPisConcaveQuadratic().
Referenced by createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), and SCIPcheckCurvatureQuadratic().
Indicates whether the quadratic function of a quadratic constraint is (known to be) concave.
scip | SCIP data structure |
cons | constraint |
Definition at line 14949 of file cons_quadratic.c.
References checkCurvatureEasy(), FALSE, SCIP_Bool, SCIPconsGetData(), and SCIPgetViolationQuadratic().
Referenced by createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), and SCIPisConvexQuadratic().
SCIP_RETCODE SCIPgetViolationQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Real * | violation | ||
) |
Gets the violation of a constraint by a solution.
Computes the violation of a constraint by a solution
scip | SCIP data structure |
cons | constraint |
sol | solution which violation to calculate, or NULL for LP solution |
violation | pointer to store violation of constraint |
Definition at line 14966 of file cons_quadratic.c.
References computeViolation(), MAX, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPisLinearLocalQuadratic().
Referenced by SCIPisConcaveQuadratic().
Indicates whether the quadratic constraint is local w.r.t. the current local bounds.
That is, checks whether each variable with a square term is fixed and for each bilinear term at least one variable is fixed.
scip | SCIP data structure |
cons | constraint |
Definition at line 14995 of file cons_quadratic.c.
References FALSE, SCIPaddToNlpiProblemQuadratic(), SCIPconsGetData(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIPgetViolationQuadratic().
SCIP_RETCODE SCIPaddToNlpiProblemQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | scipvar2nlpivar, | ||
SCIP_Bool | names | ||
) |
Adds the constraint to an NLPI problem.
scip | SCIP data structure |
cons | constraint |
nlpi | interface to NLP solver |
nlpiprob | NLPI problem where to add constraint |
scipvar2nlpivar | mapping from SCIP variables to variable indices in NLPI |
names | whether to pass constraint names to NLPI |
Definition at line 15041 of file cons_quadratic.c.
References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, MAX, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPchgLhsQuadratic(), SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArrayNull, SCIPhashmapExists(), SCIPhashmapGetImage(), and SCIPnlpiAddConstraints().
Referenced by SCIPisLinearLocalQuadratic().
SCIP_RETCODE SCIPchgLhsQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | lhs | ||
) |
sets the left hand side of a quadratic constraint
scip | SCIP data structure |
cons | constraint data |
lhs | new left hand side |
Definition at line 15176 of file cons_quadratic.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgRhsQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().
Referenced by SCIPaddToNlpiProblemQuadratic().
SCIP_RETCODE SCIPchgRhsQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real | rhs | ||
) |
sets the right hand side of a quadratic constraint
scip | SCIP data structure |
cons | constraint data |
rhs | new right hand side |
Definition at line 15221 of file cons_quadratic.c.
References CONSHDLR_NAME, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetFeasibilityQuadratic(), SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().
Referenced by SCIPchgLhsQuadratic().
SCIP_RETCODE SCIPgetFeasibilityQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Real * | feasibility | ||
) |
gets the feasibility of the quadratic constraint in the given solution
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
feasibility | pointer to store the feasibility |
Definition at line 15263 of file cons_quadratic.c.
References computeViolation(), CONSHDLR_NAME, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetActivityQuadratic(), SCIPinfinity(), and SCIPisInfinity().
Referenced by SCIPchgRhsQuadratic().
SCIP_RETCODE SCIPgetActivityQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Real * | activity | ||
) |
gets the activity of the quadratic constraint in the given solution
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
activity | pointer to store the activity |
Definition at line 15305 of file cons_quadratic.c.
References computeViolation(), CONSHDLR_NAME, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPchgLinearCoefQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetFeasibilityQuadratic().
SCIP_RETCODE SCIPchgLinearCoefQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
changes the linear coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
scip | SCIP data structure |
cons | constraint data |
var | quadratic variable |
coef | new coefficient |
Definition at line 15340 of file cons_quadratic.c.
References addLinearCoef(), chgLinearCoefPos(), CONSHDLR_NAME, delLinearCoefPos(), FALSE, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIPgetActivityQuadratic().
SCIP_RETCODE SCIPchgSquareCoefQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | coef | ||
) |
changes the square coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
scip | SCIP data structure |
cons | constraint data |
var | quadratic variable |
coef | new coefficient |
Definition at line 15433 of file cons_quadratic.c.
References addQuadVarTerm(), CONSHDLR_NAME, FALSE, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgBilinCoefQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIPchgBilinCoefQuadratic(), and SCIPchgLinearCoefQuadratic().
SCIP_RETCODE SCIPchgBilinCoefQuadratic | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var1, | ||
SCIP_VAR * | var2, | ||
SCIP_Real | coef | ||
) |
changes the bilinear coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
scip | SCIP data structure |
cons | constraint |
var1 | first variable |
var2 | second variable |
coef | coefficient of bilinear term |
Definition at line 15502 of file cons_quadratic.c.
References CONSHDLR_NAME, FALSE, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPaddBilinTermQuadratic(), SCIPchgSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetNAllBilinearTermsQuadratic(), SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIPchgSquareCoefQuadratic().
int SCIPgetNAllBilinearTermsQuadratic | ( | SCIP * | scip | ) |
returns the total number of bilinear terms that are contained in all quadratic constraints
scip | SCIP data structure |
Definition at line 15581 of file cons_quadratic.c.
References CONSHDLR_NAME, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetAllBilinearTermsQuadratic().
Referenced by SCIPchgBilinCoefQuadratic().
SCIP_RETCODE SCIPgetAllBilinearTermsQuadratic | ( | SCIP * | scip, |
SCIP_VAR **RESTRICT | x, | ||
SCIP_VAR **RESTRICT | y, | ||
int *RESTRICT | nbilinterms, | ||
int *RESTRICT | nunderests, | ||
int *RESTRICT | noverests, | ||
SCIP_Real * | maxnonconvexity | ||
) |
returns all bilinear terms that are contained in all quadratic constraints
scip | SCIP data structure |
x | array to store first variable of each bilinear term |
y | array to second variable of each bilinear term |
nbilinterms | buffer to store the total number of bilinear terms |
nunderests | array to store the total number of constraints that require to underestimate a bilinear term |
noverests | array to store the total number of constraints that require to overestimate a bilinear term |
maxnonconvexity | largest absolute value of nonconvex eigenvalues of all quadratic constraints containing a bilinear term |
Definition at line 15602 of file cons_quadratic.c.
References CONSHDLR_NAME, getIneqViol(), SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfindConshdlr().
Referenced by SCIPgetNAllBilinearTermsQuadratic().
SCIP_RETCODE SCIPaddBilinearIneqQuadratic | ( | SCIP * | scip, |
SCIP_VAR * | x, | ||
SCIP_VAR * | y, | ||
int | idx, | ||
SCIP_Real | xcoef, | ||
SCIP_Real | ycoef, | ||
SCIP_Real | constant, | ||
SCIP_Bool * | success | ||
) |
adds a globally valid inequality of the form xcoef x <= ycoef y + constant for a bilinear term (x,y)
scip | SCIP data structure |
x | first variable |
y | second variable |
idx | index of the bilinear term |
xcoef | x coefficient |
ycoef | y coefficient |
constant | constant part |
success | buffer to store whether inequality has been accepted |
Definition at line 15691 of file cons_quadratic.c.
References CONSHDLR_NAME, FALSE, getIneqViol(), BilinearEstimator::ineqoverest, BilinearEstimator::inequnderest, MAX, BilinearEstimator::nineqoverest, BilinearEstimator::ninequnderest, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconshdlrGetData(), SCIPcreateRowprep(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPisFeasEQ(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisGT(), SCIPvarGetName(), TRUE, BilinearEstimator::x, and BilinearEstimator::y.
Referenced by getIneqViol().
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 | ||
) |
creates and captures a set partitioning constraint
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 9034 of file cons_setppc.c.
References createConsSetppc(), SCIP_SETPPCTYPE_PARTITIONING, and SCIPcreateConsBasicSetpart().
Referenced by cliquePresolve(), consdataLinearize(), createAndAddLinearCons(), extractGates(), and processIntegerBoundChg().
SCIP_RETCODE SCIPcreateConsBasicSetpart | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures a set partitioning 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
creates and captures a set partitioning constraint with all constraint flags set to their default values
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 9074 of file cons_setppc.c.
Referenced by SCIP_DECL_SOLVECUMULATIVE(), SCIPcreateConsSetpart(), and setupProblem().
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 | ||
) |
creates and captures a set packing constraint
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 9092 of file cons_setppc.c.
References createConsSetppc(), SCIP_SETPPCTYPE_PACKING, and SCIPcreateConsBasicSetpack().
Referenced by addCliques(), addExtraCliques(), cliquePresolve(), consdataLinearize(), createAndAddLinearCons(), createCoveringProblem(), deleteRedundantVars(), detectRedundantVars(), dualWeightsTightening(), fixDeleteOrUpgradeCons(), presolRoundConsSOS1(), removeConstraintsDueToNegCliques(), tightenWeights(), upgradeCons(), and upgradeConss().
SCIP_RETCODE SCIPcreateConsBasicSetpack | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures a set packing 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
creates and captures a set packing constraint with all constraint flags set to their default values
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 9132 of file cons_setppc.c.
Referenced by SCIPcreateConsSetpack().
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 | ||
) |
creates and captures a set covering constraint
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 9151 of file cons_setppc.c.
References createConsSetppc(), SCIP_SETPPCTYPE_COVERING, and SCIPcreateConsBasicSetcover().
Referenced by createAndAddLinearCons(), CUTOFF_CONSTRAINT(), forbidCover(), forbidFixation(), processNlRow(), and readCnf().
SCIP_RETCODE SCIPcreateConsBasicSetcover | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures a set packing 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
creates and captures a set covering constraint with all constraint flags set to their default values
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 9191 of file cons_setppc.c.
Referenced by SCIPcreateConsSetcover(), and SCIPprobdataCreate().
SCIP_RETCODE SCIPaddCoefSetppc | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
adds coefficient in set partitioning / packing / covering constraint
scip | SCIP data structure |
cons | constraint data |
var | variable to add to the constraint |
Definition at line 9207 of file cons_setppc.c.
References addCoef(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsSetppc().
Referenced by addCoefTerm(), cliquePresolve(), createInitialColumns(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPaddCoefPseudoboolean().
gets number of variables in set partitioning / packing / covering constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9230 of file cons_setppc.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsSetppc().
Referenced by addSetppcConstraints(), cleanupHashDatas(), computeSymmetryGroup(), correctPresoldata(), createPresoldata(), getLinearConsNVars(), getLinearConsVarsData(), packingUpgrade(), presolveAddKKTSetppcConss(), SCIP_DECL_READERWRITE(), SCIPaddCoefSetppc(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), strenghtenOrbitopeConstraint(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets array of variables in set partitioning / packing / covering constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9251 of file cons_setppc.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetTypeSetppc().
Referenced by addSetppcConstraints(), computeSymmetryGroup(), correctPresoldata(), createPresoldata(), getLinearConsVarsData(), packingUpgrade(), presolveAddKKTSetppcConss(), saveConsLinear(), SCIP_DECL_READERWRITE(), SCIPgetNVarsSetppc(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), strenghtenOrbitopeConstraint(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
SCIP_SETPPCTYPE SCIPgetTypeSetppc | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
gets type of set partitioning / packing / covering constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9272 of file cons_setppc.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDualsolSetppc().
Referenced by addSetppcConstraints(), cleanupHashDatas(), computeSymmetryGroup(), correctPresoldata(), createPresoldata(), findAggregation(), getLinearConsSides(), packingUpgrade(), presolveAddKKTSetppcConss(), saveConsLinear(), SCIP_DECL_READERWRITE(), SCIPgetVarsSetppc(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), strenghtenOrbitopeConstraint(), tryUpgradingSetppc(), writeFzn(), and writeOpbConstraints().
gets the dual solution of the set partitioning / packing / covering constraint in the current LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 9292 of file cons_setppc.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasSetppc(), and SCIProwGetDualsol().
Referenced by initPricing(), and SCIPgetTypeSetppc().
gets the dual Farkas value of the set partitioning / packing / covering constraint in the current infeasible LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 9316 of file cons_setppc.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowSetppc(), and SCIProwGetDualfarkas().
Referenced by SCIPgetDualsolSetppc().
returns the linear relaxation of the given set partitioning / packing / covering constraint; may return NULL if no LP row was yet created; the user must not modify the row!
scip | SCIP data structure |
cons | constraint data |
Definition at line 9342 of file cons_setppc.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNFixedonesSetppc().
Referenced by SCIPgetDualfarkasSetppc().
returns current number of variables fixed to one in the constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9363 of file cons_setppc.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNFixedzerosSetppc().
Referenced by addFixedVarsConss(), initPricing(), SCIP_DECL_PRICERREDCOST(), and SCIPgetRowSetppc().
returns current number of variables fixed to zero in the constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 9385 of file cons_setppc.c.
References SCIPABORT, SCIPconsGetData(), and SCIPerrorMessage.
Referenced by SCIPgetNFixedonesSetppc().
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 | ||
) |
creates and captures a second order cone constraint
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}) |
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 5169 of file cons_soc.c.
References BMSclearMemoryArray, catchVarEvents(), CONSHDLR_NAME, FALSE, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcaptureVar(), SCIPcomputeVarLbGlobal(), SCIPcomputeVarLbLocal(), SCIPcomputeVarUbGlobal(), SCIPcomputeVarUbLocal(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicSOC(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), and SCIPisTransformed().
Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicSOC(), and SCIPincludeConshdlrSOC().
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 | ||
) |
creates and captures a second order cone 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
creates and captures a second order cone constraint with all its constraint flags set to their default values
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 5298 of file cons_soc.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSOC(), SCIPgetNlRowSOC(), and TRUE.
Referenced by disaggregate(), SCIPcreateConsSOC(), and setupProblem().
SCIP_RETCODE SCIPgetNlRowSOC | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLROW ** | nlrow | ||
) |
Gets the SOC constraint as a nonlinear row representation.
scip | SCIP data structure |
cons | constraint |
nlrow | pointer to store nonlinear row |
Definition at line 5320 of file cons_soc.c.
References createNlRow(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPgetNLhsVarsSOC().
Referenced by createCoveringProblem(), and SCIPcreateConsBasicSOC().
Gets the number of variables on the left hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5345 of file cons_soc.c.
References SCIPconsGetData(), and SCIPgetLhsVarsSOC().
Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetNlRowSOC(), SCIPwriteGms(), and SCIPwriteLp().
Gets the variables on the left hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5357 of file cons_soc.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsCoefsSOC().
Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetNLhsVarsSOC(), SCIPwriteGms(), and SCIPwriteLp().
Gets the coefficients of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 1.0.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5369 of file cons_soc.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsOffsetsSOC().
Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsVarsSOC(), and SCIPwriteGms().
Gets the offsets of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 0.0.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5381 of file cons_soc.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetLhsConstantSOC().
Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsCoefsSOC(), and SCIPwriteGms().
Gets the constant on the left hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5393 of file cons_soc.c.
References SCIPconsGetData(), and SCIPgetRhsVarSOC().
Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsOffsetsSOC(), and SCIPwriteGms().
Gets the variable on the right hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5405 of file cons_soc.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetRhsCoefSOC().
Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsConstantSOC(), SCIPwriteGms(), and SCIPwriteLp().
Gets the coefficient of the variable on the right hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5417 of file cons_soc.c.
References SCIP_Real, SCIPconsGetData(), and SCIPgetRhsOffsetSOC().
Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetRhsVarSOC(), and SCIPwriteGms().
Gets the offset of the variables on the right hand side of a SOC constraint.
scip | SCIP data structure |
cons | constraint data |
Definition at line 5429 of file cons_soc.c.
References SCIPaddToNlpiProblemSOC(), and SCIPconsGetData().
Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetRhsCoefSOC(), and SCIPwriteGms().
SCIP_RETCODE SCIPaddToNlpiProblemSOC | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | scipvar2nlpivar, | ||
SCIP_Bool | names | ||
) |
Adds the constraint to an NLPI problem. Uses nonconvex formulation as quadratic function.
scip | SCIP data structure |
cons | SOC constraint |
nlpi | interface to NLP solver |
nlpiprob | NLPI problem where to add constraint |
scipvar2nlpivar | mapping from SCIP variables to variable indices in NLPI |
names | whether to pass constraint names to NLPI |
Definition at line 5443 of file cons_soc.c.
References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapGetImage(), SCIPinfinity(), and SCIPnlpiAddConstraints().
Referenced by SCIPgetRhsOffsetSOC().
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 | ||
) |
creates and captures an SOS1 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).
creates and captures a SOS1 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).
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 |
weights | weights determining the variable order, or NULL if natural order should be used |
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 10340 of file cons_sos1.c.
References CONSHDLR_NAME, FALSE, handleNewVariableSOS1(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_TRANSFORMED, SCIPallocBlockMemory, SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPcreateCons(), SCIPcreateConsBasicSOS1(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPmarkDoNotMultaggrVar(), SCIPsortRealPtr(), and SCIPvarIsTransformed().
Referenced by addBranchingComplementaritiesSOS1(), extensionOperatorSOS1(), performImplicationGraphAnalysis(), readSOS(), readSos(), readSOScons(), and SCIPcreateConsBasicSOS1().
SCIP_RETCODE SCIPcreateConsBasicSOS1 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | weights | ||
) |
creates and captures an SOS1 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
creates and captures a SOS1 constraint with all constraint flags set to their default values.
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 |
weights | weights determining the variable order, or NULL if natural order should be used |
Definition at line 10461 of file cons_sos1.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddVarSOS1(), SCIPcreateConsSOS1(), and TRUE.
Referenced by createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), and SCIPcreateConsSOS1().
SCIP_RETCODE SCIPaddVarSOS1 | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | weight | ||
) |
adds variable to SOS1 constraint, the position is determined by the given weight
scip | SCIP data structure |
cons | constraint |
var | variable to add to the constraint |
weight | weight determining position of variable |
Definition at line 10477 of file cons_sos1.c.
References addVarSOS1(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarSOS1(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().
Referenced by createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), readSOS(), readSos(), readSOScons(), and SCIPcreateConsBasicSOS1().
SCIP_RETCODE SCIPappendVarSOS1 | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
appends variable to SOS1 constraint
scip | SCIP data structure |
cons | constraint |
var | variable to add to the constraint |
Definition at line 10511 of file cons_sos1.c.
Referenced by SCIPaddVarSOS1().
gets number of variables in SOS1 constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 10544 of file cons_sos1.c.
Referenced by SCIP_DECL_READERWRITE(), SCIPwriteGms(), and SCIPwriteLp().
gets array of variables in SOS1 constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 10569 of file cons_sos1.c.
Referenced by SCIP_DECL_READERWRITE(), SCIPwriteGms(), and SCIPwriteLp().
gets array of weights in SOS1 constraint (or NULL if not existent)
scip | SCIP data structure |
cons | constraint data |
Definition at line 10594 of file cons_sos1.c.
Referenced by SCIP_DECL_READERWRITE(), and SCIPwriteLp().
SCIP_DIGRAPH* SCIPgetConflictgraphSOS1 | ( | SCIP_CONSHDLR * | conshdlr | ) |
gets conflict graph of SOS1 constraints (or NULL if not existent)
conshdlr | SOS1 constraint handler |
Definition at line 10622 of file cons_sos1.c.
Referenced by getDiveBdChgsSOS1conflictgraph(), makeSOS1conflictgraphFeasible(), SCIP_DECL_SEPAEXECLP(), and sepaBoundInequalitiesFromGraph().
int SCIPgetNSOS1Vars | ( | SCIP_CONSHDLR * | conshdlr | ) |
gets number of problem variables that are part of the SOS1 conflict graph
conshdlr | SOS1 constraint handler |
Definition at line 10644 of file cons_sos1.c.
Referenced by getDiveBdChgsSOS1conflictgraph(), makeSOS1conflictgraphFeasible(), SCIP_DECL_SEPAEXECLP(), SCIPperformGenericDivingAlgorithm(), and sepaBoundInequalitiesFromGraph().
SCIP_Bool SCIPvarIsSOS1 | ( | SCIP_CONSHDLR * | conshdlr, |
SCIP_VAR * | var | ||
) |
returns whether variable is part of the SOS1 conflict graph
conshdlr | SOS1 constraint handler |
var | variable |
Definition at line 10666 of file cons_sos1.c.
int SCIPvarGetNodeSOS1 | ( | SCIP_CONSHDLR * | conshdlr, |
SCIP_VAR * | var | ||
) |
returns node of variable in the conflict graph or -1 if variable is not part of the SOS1 conflict graph
returns SOS1 index of variable or -1 if variable is not part of the SOS1 conflict graph
conshdlr | SOS1 constraint handler |
var | variable |
Definition at line 10690 of file cons_sos1.c.
Referenced by markNeighborsMWISHeuristic().
SCIP_VAR* SCIPnodeGetVarSOS1 | ( | SCIP_DIGRAPH * | conflictgraph, |
int | node | ||
) |
returns variable that belongs to a given node from the conflict graph
conflictgraph | conflict graph |
node | node from the conflict graph |
Definition at line 10721 of file cons_sos1.c.
Referenced by addBranchingComplementaritiesSOS1(), enforceConflictgraph(), extensionOperatorSOS1(), getBranchingDecisionStrongbranchSOS1(), getBranchingPrioritiesSOS1(), getBranchingVerticesSOS1(), getDiveBdChgsSOS1conflictgraph(), getVectorOfWeights(), initImplGraphSOS1(), initTCliquegraph(), isViolatedSOS1(), makeSOS1conflictgraphFeasible(), markNeighborsMWISHeuristic(), nodeGetSolvalBinaryBigMSOS1(), performImplicationGraphAnalysis(), performStrongbranchSOS1(), presolRoundVarsSOS1(), propVariableNonzero(), SCIP_DECL_SEPAEXECLP(), tightenVarsBoundsSOS1(), and updateWeightsTCliquegraph().
SCIP_RETCODE SCIPmakeSOS1sFeasible | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool * | changed, | ||
SCIP_Bool * | success | ||
) |
based on solution values of the variables, fixes variables to zero to turn all SOS1 constraints feasible
scip | SCIP pointer |
conshdlr | SOS1 constraint handler |
sol | solution |
changed | pointer to store whether the solution has been changed |
success | pointer to store whether SOS1 constraints have been turned feasible and solution was good enough |
Definition at line 10746 of file cons_sos1.c.
References CONSHDLR_NAME, FALSE, makeSOS1conflictgraphFeasible(), makeSOS1constraintsFeasible(), SCIP_Bool, SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_Real, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPerrorMessage, SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPgetUpperbound(), SCIPisLT(), and TRUE.
Referenced by SCIPperformGenericDivingAlgorithm().
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 | ||
) |
creates and captures an SOS2 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).
creates and captures a SOS2 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).
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 |
weights | weights determining the variable order, or NULL if natural order should be used |
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 2295 of file cons_sos2.c.
References CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcreateCons(), SCIPcreateConsBasicSOS2(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPsortRealPtr().
Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicSOS2(), and SCIPincludeConshdlrSOS2().
SCIP_RETCODE SCIPcreateConsBasicSOS2 | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | weights | ||
) |
creates and captures a SOS2 constraint with all constraint flags set to their default values.
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 |
weights | weights determining the variable order, or NULL if natural order should be used |
Definition at line 2378 of file cons_sos2.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddVarSOS2(), SCIPcreateConsSOS2(), and TRUE.
Referenced by SCIPcreateConsSOS2().
SCIP_RETCODE SCIPaddVarSOS2 | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var, | ||
SCIP_Real | weight | ||
) |
adds variable to SOS2 constraint, the position is determined by the given weight
scip | SCIP data structure |
cons | constraint |
var | variable to add to the constraint |
weight | weight determining position of variable |
Definition at line 2394 of file cons_sos2.c.
References addVarSOS2(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarSOS2(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().
Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicSOS2().
SCIP_RETCODE SCIPappendVarSOS2 | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_VAR * | var | ||
) |
appends variable to SOS2 constraint
scip | SCIP data structure |
cons | constraint |
var | variable to add to the constraint |
Definition at line 2420 of file cons_sos2.c.
References appendVarSOS2(), CONSHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNVarsSOS2(), and SCIPvarGetName().
Referenced by SCIPaddVarSOS2().
gets number of variables in SOS2 constraint
scip | SCIP data structure |
cons | constraint |
Definition at line 2445 of file cons_sos2.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsSOS2().
Referenced by SCIP_DECL_READERWRITE(), SCIPappendVarSOS2(), SCIPwriteGms(), and SCIPwriteLp().
gets array of variables in SOS2 constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 2470 of file cons_sos2.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsSOS2().
Referenced by SCIP_DECL_READERWRITE(), SCIPgetNVarsSOS2(), SCIPwriteGms(), and SCIPwriteLp().
gets array of weights in SOS2 constraint (or NULL if not existent)
scip | SCIP data structure |
cons | constraint data |
Definition at line 2495 of file cons_sos2.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIP_DECL_READERWRITE(), SCIPgetVarsSOS2(), and SCIPwriteLp().
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 | ||
) |
creates and captures a superindicator constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
binvar | pointer to the indicator constraint |
slackcons | constraint corresponding to the handled 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 1975 of file cons_superindicator.c.
References consdataCreateSuperindicator(), CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCons(), SCIPcreateConsBasicSuperindicator(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPwarningMessage().
Referenced by SCIPcreateConsBasicSuperindicator(), SCIPincludeConshdlrSuperindicator(), and SCIPtransformMinUC().
SCIP_RETCODE SCIPcreateConsBasicSuperindicator | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_VAR * | binvar, | ||
SCIP_CONS * | slackcons | ||
) |
creates and captures a superindicator constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsSuperindicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
binvar | pointer to the indicator constraint |
slackcons | constraint corresponding to the handled constraint |
Definition at line 2086 of file cons_superindicator.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSuperindicator(), SCIPgetBinaryVarSuperindicator(), and TRUE.
Referenced by SCIPcreateConsSuperindicator().
gets binary variable corresponding to the superindicator constraint
gets binary variable corresponding to the general indicator constraint
cons | superindicator constraint |
Definition at line 2108 of file cons_superindicator.c.
References CONSHDLR_NAME, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetSlackConsSuperindicator().
Referenced by SCIPcreateConsBasicSuperindicator().
gets the slack constraint corresponding to the superindicator constraint
gets the slack constraint corresponding to the general indicator constraint
cons | superindicator constraint |
Definition at line 2120 of file cons_superindicator.c.
References CONSHDLR_NAME, SCIP_Bool, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPtransformMinUC().
Referenced by SCIPgetBinaryVarSuperindicator().
SCIP_RETCODE SCIPtransformMinUC | ( | SCIP * | scip, |
SCIP_Bool * | success | ||
) |
transforms the current problem into a MinUC problem (minimizing the number of unsatisfied constraints), a CIP generalization of the MinULR (min. unsatisfied linear relations) problem
scip | SCIP data structure |
success | pointer to store whether all constraints could be transformed |
Definition at line 2139 of file cons_superindicator.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_DECL_DIALOGEXEC(), SCIP_INVALIDCALL, SCIP_MAXSTRLEN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_BINARY, SCIPaddCons(), SCIPaddVar(), SCIPchgVarBranchPriority(), SCIPchgVarObj(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSuperindicator(), SCIPcreateVar(), SCIPdebugMsg, SCIPdelCons(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetConss(), SCIPgetNConss(), SCIPgetNegatedVar(), SCIPgetStage(), SCIPgetVarsData(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsetObjsense(), SCIPsnprintf(), SCIPvarGetBranchPriority(), and TRUE.
Referenced by SCIPgetSlackConsSuperindicator().
SCIP_DECL_DIALOGEXEC | ( | SCIPdialogExecChangeMinUC | ) |
dialog execution method for the SCIPtransformMinUC() command
dialog execution method for the SCIPtransformMinUC() method
Definition at line 2275 of file cons_superindicator.c.
Referenced by SCIPtransformMinUC().
SCIP_RETCODE SCIPcreateSymbreakCons | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int * | perm, | ||
SCIP_VAR ** | vars, | ||
int | nvars, | ||
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 a symmetry breaking constraint
Depending on the given permutation, either an orbisack or symresack constraint is created.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
perm | permutation |
vars | variables |
nvars | number of variables in vars array |
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 1292 of file cons_symresack.c.
References FALSE, orbisackUpgrade(), SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_OKAY, and SCIPcreateConsSymresack().
Referenced by addSymresackConss(), and orbisackUpgrade().
SCIP_RETCODE SCIPcreateConsSymresack | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int * | perm, | ||
SCIP_VAR ** | vars, | ||
int | nvars, | ||
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 symresack constraint
creates and captures a symresack constraint
In a presolving step, we check whether the permutation acts only on binary points. Otherwise, we eliminate the non-binary variables from the permutation.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
perm | permutation |
vars | variables |
nvars | number of variables in vars array |
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 2281 of file cons_symresack.c.
References consdataCreate(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicSymresack(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by SCIPcreateConsBasicSymresack(), SCIPcreateSymbreakCons(), and SCIPincludeConshdlrSymresack().
SCIP_RETCODE SCIPcreateConsBasicSymresack | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int * | perm, | ||
SCIP_VAR ** | vars, | ||
int | nvars | ||
) |
creates and captures a symresack 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
creates and captures a symresack constraint in its most basic variant, i.e., with all constraint flags set to their default values
In a presolving step, we remove all fixed points and cycles that act on non-binary variables of the permutation
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
perm | permutation |
vars | variables |
nvars | number of variables in vars array |
Definition at line 2345 of file cons_symresack.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSymresack(), and TRUE.
Referenced by SCIPcreateConsSymresack().
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 | ||
) |
creates and captures a variable bound constraint: lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
var | variable x that has variable bound |
vbdvar | binary, integer or implicit integer bounding variable y |
vbdcoef | coefficient c of bounding variable y |
lhs | left hand side of variable bound inequality |
rhs | right hand side of variable bound 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 4781 of file cons_varbound.c.
References catchEvents(), consdataCreate(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicVarbound(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPisTransformed().
Referenced by addVarbound(), createPrecedenceCons(), createVarUbs(), presolveTryAddLinearReform(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_LINCONSUPGD(), SCIPcreateConsBasicVarbound(), and SCIPincludeConshdlrVarbound().
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 | ||
) |
creates and captures a varbound constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsVarbound(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
creates and captures a variable bound constraint: lhs <= x + c*y <= rhs with all constraint flags set to their default values
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
var | variable x that has variable bound |
vbdvar | binary, integer or implicit integer bounding variable y |
vbdcoef | coefficient c of bounding variable y |
lhs | left hand side of variable bound inequality |
rhs | right hand side of variable bound inequality |
Definition at line 4851 of file cons_varbound.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcreateConsVarbound(), SCIPgetLhsVarbound(), and TRUE.
Referenced by addBranchingDecisionConss(), applyRepair(), and SCIPcreateConsVarbound().
gets left hand side of variable bound constraint lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | constraint data |
Definition at line 4869 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsVarbound().
Referenced by addVarboundConstraints(), checkVarbound(), computeSymmetryGroup(), presolveAddKKTVarboundConss(), printRangeSection(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPcreateConsBasicVarbound(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), and writeOpbConstraints().
gets right hand side of variable bound constraint lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | constraint data |
Definition at line 4890 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarVarbound().
Referenced by addVarboundConstraints(), checkVarbound(), computeSymmetryGroup(), presolveAddKKTVarboundConss(), printRangeSection(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPgetLhsVarbound(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), and writeOpbConstraints().
gets bounded variable x of variable bound constraint lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | constraint data |
Definition at line 4911 of file cons_varbound.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVbdvarVarbound().
Referenced by addVarboundConstraints(), checkVarbound(), computeSymmetryGroup(), presolveAddKKTVarboundConss(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPgetRhsVarbound(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets bounding variable y of variable bound constraint lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | constraint data |
Definition at line 4932 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVbdcoefVarbound().
Referenced by addVarboundConstraints(), checkVarbound(), computeSymmetryGroup(), presolveAddKKTVarboundConss(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPgetVarVarbound(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets bound coefficient c of variable bound constraint lhs <= x + c*y <= rhs
scip | SCIP data structure |
cons | constraint data |
Definition at line 4953 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDualsolVarbound().
Referenced by addVarboundConstraints(), checkVarbound(), computeSymmetryGroup(), presolveAddKKTVarboundConss(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPgetVbdvarVarbound(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().
gets the dual solution of the variable bound constraint in the current LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 4974 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasVarbound(), and SCIProwGetDualsol().
Referenced by SCIPgetVbdcoefVarbound().
gets the dual Farkas value of the variable bound constraint in the current infeasible LP
scip | SCIP data structure |
cons | constraint data |
Definition at line 4998 of file cons_varbound.c.
References CONSHDLR_NAME, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowVarbound(), and SCIProwGetDualfarkas().
Referenced by SCIPgetDualsolVarbound().
returns the linear relaxation of the given variable bound constraint; may return NULL if no LP row was yet created; the user must not modify the row!
scip | SCIP data structure |
cons | constraint data |
Definition at line 5024 of file cons_varbound.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIPgetDualfarkasVarbound().
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 | ||
) |
creates and captures an xor constraint
creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
rhs | right hand side of the constraint |
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 5630 of file cons_xor.c.
References consdataCreate(), CONSHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicXor(), SCIPerrorMessage, and SCIPfindConshdlr().
Referenced by CREATE_CONSTRAINT(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicXor(), SCIPincludeConshdlrXor(), and tryUpgradingXor().
SCIP_RETCODE SCIPcreateConsBasicXor | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_Bool | rhs, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
creates and captures an xor constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsXor(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs with all constraint flags set to their default values
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
rhs | right hand side of the constraint |
nvars | number of operator variables in the constraint |
vars | array with operator variables of constraint |
Definition at line 5688 of file cons_xor.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsXor(), SCIPgetNVarsXor(), and TRUE.
Referenced by createMIP(), and SCIPcreateConsXor().
gets number of variables in xor constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5704 of file cons_xor.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsXor().
Referenced by computeSymmetryGroup(), and SCIPcreateConsBasicXor().
gets array of variables in xor constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5725 of file cons_xor.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetIntVarXor().
Referenced by computeSymmetryGroup(), and SCIPgetNVarsXor().
gets integer variable in xor constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5746 of file cons_xor.c.
References CONSHDLR_NAME, SCIP_Bool, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsXor().
Referenced by computeSymmetryGroup(), and SCIPgetVarsXor().
gets the right hand side of the xor constraint
scip | SCIP data structure |
cons | constraint data |
Definition at line 5767 of file cons_xor.c.
References CONSHDLR_NAME, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetIntVarXor().