Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods and files provided by the default constraint handlers of SCIP

A detailed description what a constraint handler does and how to add a constraint handler to SCIP can be found here.

Data Structures

struct  SCIP_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.c
 Constraint handler for AND-constraints, \(r = x_1 \wedge x_2 \wedge \dots \wedge x_n\).
 
file  cons_and.h
 Constraint handler for AND constraints, \(r = x_1 \wedge x_2 \wedge \dots \wedge x_n\).
 
file  cons_benders.h
 constraint handler for Benders' decomposition
 
file  cons_benderslp.h
 constraint handler for benderslp decomposition
 
file  cons_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 a linking (continuous or integer) variable
 
file  cons_logicor.h
 Constraint handler for logicor constraints \(1^T x \ge 1\) (equivalent to set covering, but algorithms are suited for depth first search).
 
file  cons_nonlinear.h
 constraint handler for nonlinear constraints \(\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\).
 
file  cons_rpa.h
 constraint handler for ringpacking
 
file  cons_optcumulative.c
 constraint handler for cumulative constraints with optional activities
 

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

Stefan Vigerske
Decomposition of Multistage Stochastic Programs and a Constraint Integer Programming Approach to Mixed-Integer Nonlinear Programming
PhD Thesis, Humboldt-University Berlin, 2012, submitted.
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPgetNlRowAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
 
SCIP_EXPORT SCIP_VARSCIPgetNonlinearVarAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetLinearVarAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetExponentAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetOffsetAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetCoefLinearAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsAbspower (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetViolationAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Bool SCIPisConvexAbspower (SCIP *scip, SCIP_CONS *cons)
 

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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicAnd (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT int SCIPgetNVarsAnd (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsAnd (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetResultantAnd (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Bool SCIPisAndConsSorted (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsortAndCons (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr (SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr (SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
 

Benders Constraints

Two constraint handlers are implemented for the generation of Benders' decomposition cuts. When included in a problem, the Benders' decomposition constraint handlers generate cuts during the enforcement of LP and relaxation solutions. Additionally, Benders' decomposition cuts can be generated when checking the feasibility of solutions with respect to the subproblem constraints.

This constraint handler has an enforcement priority that is less than the integer constraint handler. This means that only integer feasible solutions from the LP solver are enforced by this constraint handler. This is the traditional behaviour of the branch-and-check approach to Benders' decomposition. Additionally, the check priority is set low, such that this expensive constraint handler is only called as a final check on primal feasible solutions.

This constraint handler in the standard constraint handler that should be added when using Benders' decomposition. Additionally, there is a flag in SCIPincludeConshdlrBenders that permits the addition of the LP constraint handler, cons_benderslp. The use of both cons_benders and cons_benderslp allows the user to perform a multiphase Benders' decomposition algorithm.

SCIP_EXPORT SCIP_RETCODE SCIPconsBendersEnforceSolution (SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLR *conshdlr, SCIP_RESULT *result, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint)
 

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

Martin Ballerstein, Dennis Michaels, and Stefan Vigerske
Linear Underestimators for bivariate functions with a fixed convexity behavior
ZIB Report 13-02, 2013. http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/1764
enum  SCIP_BIVAR_CONVEXITY {
  SCIP_BIVAR_ALLCONVEX = 0,
  SCIP_BIVAR_1CONVEX_INDEFINITE = 1,
  SCIP_BIVAR_CONVEX_CONCAVE = 2,
  SCIP_BIVAR_UNKNOWN = 3
}
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_VARSCIPgetLinearVarBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLinearCoefBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_EXPRTREESCIPgetExprtreeBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsBivariate (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicBounddisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBounddisjunctionRedundant (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicBounddisjunctionRedundant (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
 
SCIP_EXPORT int SCIPgetNVarsBounddisjunction (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsBounddisjunction (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_BOUNDTYPESCIPgetBoundtypesBounddisjunction (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetBoundsBounddisjunction (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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPchgCardvalCardinality (SCIP *scip, SCIP_CONS *cons, int cardval)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddVarCardinality (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar, SCIP_Real weight)
 
SCIP_EXPORT SCIP_RETCODE SCIPappendVarCardinality (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar)
 
SCIP_EXPORT int SCIPgetNVarsCardinality (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsCardinality (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetCardvalCardinality (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetWeightsCardinality (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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicConjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss)
 
SCIP_EXPORT 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_EXPORT SCIP_DECL_DIALOGEXEC (SCIPdialogExecCountPresolve)
 
SCIP_EXPORT SCIP_DECL_DIALOGEXEC (SCIPdialogExecCount)
 
SCIP_EXPORT SCIP_DECL_DIALOGEXEC (SCIPdialogExecWriteAllsolutions)
 
SCIP_EXPORT SCIP_RETCODE SCIPcount (SCIP *scip)
 
SCIP_EXPORT SCIP_Longint SCIPgetNCountedSols (SCIP *scip, SCIP_Bool *valid)
 
SCIP_EXPORT void SCIPgetNCountedSolsstr (SCIP *scip, char **buffer, int buffersize, int *requiredsize)
 
SCIP_EXPORT SCIP_Longint SCIPgetNCountedFeasSubtrees (SCIP *scip)
 
SCIP_EXPORT void SCIPgetCountedSparseSols (SCIP *scip, SCIP_VAR ***vars, int *nvars, SCIP_SPARSESOL ***sols, int *nsols)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetParamsCountsols (SCIP *scip)
 

Cumulative Constraints

Given:

  • a set of jobs, represented by their integer start time variables \(S_j\), their array of processing times \(p_j\) and of their demands \(d_j\).
  • an integer resource capacity \(C\)

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.

Separation:
  • can be done using binary start time model, see Pritskers, Watters and Wolfe
  • or by just separating relatively weak cuts on the start time variables
Propagation:
  • time tabling, Klein & Scholl (1999)
  • Edge-finding from Petr Vilim, adjusted and simplified for dynamic repropagation (2009)
  • energetic reasoning, see Baptiste, Le Pape, Nuijten (2001)
SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicCumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetHminCumulative (SCIP *scip, SCIP_CONS *cons, int hmin)
 
SCIP_EXPORT int SCIPgetHminCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetHmaxCumulative (SCIP *scip, SCIP_CONS *cons, int hmax)
 
SCIP_EXPORT int SCIPgetHmaxCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetNVarsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetCapacityCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int * SCIPgetDurationsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int * SCIPgetDemandsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPnormalizeCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int *capacity, int *nchgcoefs, int *nchgsides)
 
SCIP_EXPORT SCIP_RETCODE SCIPsplitCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPvisualizeConsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetSolveCumulative (SCIP *scip, SCIP_DECL_SOLVECUMULATIVE((*solveCumulative)))
 
SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateWorstCaseProfile (SCIP *scip, SCIP_PROFILE *profile, int nvars, SCIP_VAR **vars, int *durations, int *demands)
 
SCIP_EXPORT int SCIPcomputeHmin (SCIP *scip, SCIP_PROFILE *profile, int capacity)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicDisjunction (SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_CONS *relaxcons)
 
SCIP_EXPORT 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\).

Note
The constraint only implements an implication not an equivalence, i.e., it does not ensure that \(z = 1\) if \(ax \leq b\) or equivalently if \(s = 0\) holds.

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_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddVarIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_CONSSCIPgetLinearConsIndicator (SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetLinearConsIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetBinaryVarIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
 
SCIP_EXPORT SCIP_VARSCIPgetBinaryVarIndicator (SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetSlackVarIndicator (SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetSlackVarUb (SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
 
SCIP_EXPORT SCIP_Bool SCIPisViolatedIndicator (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorFeasible (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
 
SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorsFeasible (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearConsIndicator (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicKnapsack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddCoefKnapsack (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Longint weight)
 
SCIP_EXPORT SCIP_Longint SCIPgetCapacityKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgCapacityKnapsack (SCIP *scip, SCIP_CONS *cons, SCIP_Longint capacity)
 
SCIP_EXPORT int SCIPgetNVarsKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_LongintSCIPgetWeightsKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowKnapsack (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcleanupConssKnapsack (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible)
 

Linear Constraints

This constraint handler handles linear constraints in their most general form. That is,

\[ lhs \leq \sum_{i=1}^n a_i x_i \leq rhs \]

with \(a_i \in Q, i = 1,\dots,n\), \(lhs\in Q \cup \{-\infty\}\), \(rhs\in Q \cup \{\infty\}\), and decision variables \(x_i, i = 1,\dots,n\) which can be binary, integer, or continuous.

Furthermore, this header offers the upgrade functionality of a general linear constraint into a more specific constraint, such as a knapsack constraint, via SCIP_DECL_LINCONSUPGD() and SCIPincludeLinconsUpgrade()

typedef struct SCIP_LinConsUpgrade SCIP_LINCONSUPGRADE
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeLinconsUpgrade (SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPaddCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPdelCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgLhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgRhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
 
SCIP_EXPORT int SCIPgetNVarsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetValsLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetActivityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPgetFeasibilityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowLinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPupgradeConsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons)
 
SCIP_EXPORT SCIP_RETCODE SCIPclassifyConstraintTypesLinear (SCIP *scip, SCIP_LINCONSSTATS *linconsstats)
 
SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssLinear (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible)
 
#define SCIP_DECL_LINCONSUPGD(x)
 

Linking Constraints

The constraints handler stores linking constraints between a linking variable (continuous or integer) and an array of binary variables. Such a linking constraint has the form:

\[ y = \sum_{i=1}^n {c_i * x_i} \]

with linking variable (continuous or integer) \( y \), binary variables \( x_1, \dots, x_n \) and offset \(b \in Q\), and with the additional side condition that exactly one binary variable has to be one (set partitioning condition).

This constraint can be created only with the linking variable, if it is an integer variable. In this case the binary variables are only created on demand. That is, whenever someone asks for the binary variables. Therefore, such constraints can be used to get a "binary representation" of the domain of the linking variable which will be dynamically created.

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLinking (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars)
 
SCIP_EXPORT SCIP_Bool SCIPexistsConsLinking (SCIP *scip, SCIP_VAR *linkvar)
 
SCIP_EXPORT SCIP_CONSSCIPgetConsLinking (SCIP *scip, SCIP_VAR *linkvar)
 
SCIP_EXPORT SCIP_VARSCIPgetLinkvarLinking (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsLinking (SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars)
 
SCIP_EXPORT int SCIPgetNBinvarsLinking (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetValsLinking (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsDataLinking (SCIP_CONS *cons, SCIP_VAR ***binvars, SCIP_Real **vals, int *nbinvars)
 

Logicor Constraints

This constraint handler handles a special type of linear constraints, namely logic or constraints. These are equivalent to set covering constraints, but are handled by special algorithms which are better suited for depth first search. For a set of binary variables \(x_i, i=1,\dots,n\), a logic or constraint has the form

\[ \sum_{i=1}^n x_i \ge 1. \]

SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicLogicor (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddCoefLogicor (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT int SCIPgetNVarsLogicor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsLogicor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolLogicor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasLogicor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowLogicor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssLogicor (SCIP *scip, SCIP_Bool onlychecked, int *naddconss, int *ndelconss, int *nchgcoefs)
 

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

Stefan Vigerske
Decomposition of Multistage Stochastic Programs and a Constraint Integer Programming Approach to Mixed-Integer Nonlinear Programming
PhD Thesis, Humboldt-University Berlin, 2012, submitted.
SCIP_EXPORT SCIP_RETCODE SCIPincludeNonlinconsUpgrade (SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd)), SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform)), int priority, SCIP_Bool active, const char *conshdlrname)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPaddLinearVarNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *coefs)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
 
SCIP_EXPORT int SCIPgetNLinearVarsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetLinearVarsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetLinearCoefsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetNExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_EXPRTREE ** SCIPgetExprtreesNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetExprtreeCoefsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_EXPRGRAPHNODESCIPgetExprgraphNodeNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPcheckCurvatureNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetCurvatureNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV *curvature)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetExprtreeCurvaturesNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkcurv, SCIP_EXPRCURV **curvatures)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetViolationNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation)
 
SCIP_EXPORT int SCIPgetLinvarMayDecreaseNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetLinvarMayIncreaseNonlinear (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_EXPRGRAPHSCIPgetExprgraphNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicOr (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT int SCIPgetNVarsOr (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsOr (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetResultantOr (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_EXPORT SCIP_RETCODE SCIPcheckSolutionOrbisack (SCIP *scip, SCIP_SOL *sol, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool printreason, SCIP_Bool *feasible)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsOrbisack (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *const *vars1, SCIP_VAR *const *vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicOrbisack (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons)
 

Orbitope Constraints

This constraint handler can be used to handle symmetries in certain 0/1-programs. The principle structure is that some variables can be ordered in matrix form, such that permuting columns does not change the validity and objective function value of a solution. That is, the symmetry group of the program contains the full symmetric group obtained by permuting the columns of this matrix. These symmetries can be handled by so-called full orbitopes.

Moreover, if the variables in each row are contained in set packing or partitioning constraint, these symmetries can be handled by specialized packing or partitioning orbitopes.

In more mathematical terms the structure has to be as follows: There are 0/1-variables \(x_{ij}\), \(i \in \{1, \dots, p\}\), \(j \in \{1, \dots, q\}\). The variables may be coupled through set packing or partitioning constraints:

\[ \sum_{j = 1}^q x_{ij} \leq 1 \quad \mbox{or} \quad \sum_{j = 1}^q x_{ij} = 1 \quad \mbox{for all }i = 1, \ldots, p. \]

Permuting columns of \(x\) does not change the validity and objective function value of any feasible solution.

We distinguish whether an orbitope is a model constraint or not. If it is a model constraint, then its information are copied to subSCIPs. Otherwise, the constraint was added just for the purpose of symmetry handling and we do not copy its information to subSCIPs.

enum  SCIP_OrbitopeType {
  SCIP_ORBITOPETYPE_FULL = 0,
  SCIP_ORBITOPETYPE_PARTITIONING = 1,
  SCIP_ORBITOPETYPE_PACKING = 2
}
 
typedef enum SCIP_OrbitopeType SCIP_ORBITOPETYPE
 
SCIP_EXPORT 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 ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicOrbitope (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool resolveprop, SCIP_Bool ismodelcons)
 

Pseudoboolean Constraints

The constraint handler deals with pseudo boolean constraints. These are constraints of the form

\[ \mbox{lhs} \leq \sum_{k=0}^m c_k \cdot x_k + \sum_{i=0}^n c_i \cdot \prod_{j \in I_i} x_j \leq \mbox{rhs} \]

where all \(x\) are binary.

enum  SCIP_LinearConsType {
  SCIP_LINEARCONSTYPE_INVALIDCONS = -1,
  SCIP_LINEARCONSTYPE_LINEAR = 0,
  SCIP_LINEARCONSTYPE_LOGICOR = 1,
  SCIP_LINEARCONSTYPE_KNAPSACK = 2,
  SCIP_LINEARCONSTYPE_SETPPC = 3
}
 
typedef enum SCIP_LinearConsType SCIP_LINEARCONSTYPE
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPaddCoefPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR *const var, SCIP_Real const val)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddTermPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const vars, int const nvars, SCIP_Real const val)
 
SCIP_EXPORT SCIP_VARSCIPgetIndVarPseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT SCIP_CONSSCIPgetLinearConsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT SCIP_LINEARCONSTYPE SCIPgetLinearConsTypePseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT int SCIPgetNLinVarsWithoutAndPseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetLinDatasWithoutAndPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const linvars, SCIP_Real *const lincoefs, int *const nlinvars)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetAndDatasPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_CONS **const andconss, SCIP_Real *const andcoefs, int *const nandconss)
 
SCIP_EXPORT int SCIPgetNAndsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgLhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const lhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgRhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const rhs)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsPseudoboolean (SCIP *const scip, SCIP_CONS *const cons)
 
SCIP_EXPORT 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

Timo Berthold and Stefan Heinz and Stefan Vigerske
Extending a CIP framework to solve MIQCPs
In: Jon Lee and Sven Leyffer (eds.), Mixed-integer nonlinear optimization: Algorithmic advances and applications, IMA volumes in Mathematics and its Applications, volume 154, 427-444, 2012.
Stefan Vigerske
Decomposition of Multistage Stochastic Programs and a Constraint Integer Programming Approach to Mixed-Integer Nonlinear Programming
PhD Thesis, Humboldt-University Berlin, 2012, submitted.
Pietro Belotti and Andrew J. Miller and Mahdi Namazifar
Linear inequalities for bounded products of variables
SIAG/OPT Views-and-News 22:1, 1-8, 2011.
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_EXPORT SCIP_RETCODE SCIPincludeQuadconsUpgrade (SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT 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)
 
SCIP_EXPORT void SCIPaddConstantQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real constant)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real lincoef, SCIP_Real sqrcoef)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadVarLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddBilinTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
 
SCIP_EXPORT int SCIPgetNLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetCoefsLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetNQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_QUADVARTERMSCIPgetQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPsortQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPfindQuadVarTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos)
 
SCIP_EXPORT int SCIPgetNBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_BILINTERMSCIPgetBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetLinvarMayDecreaseQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetLinvarMayIncreaseQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPcheckCurvatureQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Bool SCIPisConvexQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Bool SCIPisConcaveQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPisConvexConsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_HASHMAP *assumevarfixed, SCIP_Bool *result)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetViolationQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation)
 
SCIP_EXPORT SCIP_Bool SCIPisLinearLocalQuadratic (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddToNlpiProblemQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgLhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgRhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetFeasibilityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *feasibility)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetActivityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_EXPORT SCIP_RETCODE SCIPchgBilinCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef)
 
SCIP_EXPORT int SCIPgetNAllBilinearTermsQuadratic (SCIP *scip)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSetpart (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSetpack (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSetcover (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddCoefSetppc (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT int SCIPgetNVarsSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_SETPPCTYPE SCIPgetTypeSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetNFixedonesSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT int SCIPgetNFixedzerosSetppc (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssSetppc (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nfixedvars)
 

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

Timo Berthold and Stefan Heinz and Stefan Vigerske
Extending a CIP framework to solve MIQCPs
In: Jon Lee and Sven Leyffer (eds.), Mixed-integer nonlinear optimization: Algorithmic advances and applications, IMA volumes in Mathematics and its Applications, volume 154, 427-444, 2012.
Aharon Ben-Tal and Arkadi Nemirovski
On Polyhedral Approximations of the Second-order Cone
Mathematics of Operations Research 26:2, 193-205, 2001
François Glineur
Computational experiments with a linear approximation of second order cone optimization
Technical Report 2000:1, Faculté Polytechnique de Mons, Belgium
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPgetNlRowSOC (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
 
SCIP_EXPORT int SCIPgetNLhsVarsSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetLhsVarsSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetLhsCoefsSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetLhsOffsetsSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetLhsConstantSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetRhsVarSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsCoefSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsOffsetSOC (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSOS1 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddVarSOS1 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
 
SCIP_EXPORT SCIP_RETCODE SCIPappendVarSOS1 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT int SCIPgetNVarsSOS1 (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsSOS1 (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetWeightsSOS1 (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_DIGRAPHSCIPgetConflictgraphSOS1 (SCIP_CONSHDLR *conshdlr)
 
SCIP_EXPORT int SCIPgetNSOS1Vars (SCIP_CONSHDLR *conshdlr)
 
SCIP_EXPORT SCIP_Bool SCIPvarIsSOS1 (SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
 
SCIP_EXPORT int SCIPvarGetNodeSOS1 (SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
 
SCIP_EXPORT SCIP_VARSCIPnodeGetVarSOS1 (SCIP_DIGRAPH *conflictgraph, int node)
 
SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSOS2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddVarSOS2 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
 
SCIP_EXPORT SCIP_RETCODE SCIPappendVarSOS2 (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
 
SCIP_EXPORT int SCIPgetNVarsSOS2 (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsSOS2 (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RealSCIPgetWeightsSOS2 (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_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicSuperindicator (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons)
 
SCIP_EXPORT SCIP_VARSCIPgetBinaryVarSuperindicator (SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_CONSSCIPgetSlackConsSuperindicator (SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPtransformMinUC (SCIP *scip, SCIP_Bool *success)
 
SCIP_EXPORT 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.

Precondition
The permutation is encoded by an array perm for which perm[i] = j if and only if the image of i under the permutation is j.
The permutation given to the constraint handler has to be a symmetry of the underlying problem. This is NOT checked by the constraint handler.
SCIP_EXPORT SCIP_RETCODE SCIPcreateSymbreakCons (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsSymresack (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicSymresack (SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons)
 

Variable Bound Constraints

This constraint handler handles a special type of linear constraints, namely variable bound constraints. A variable bound constraint has the form

\[ lhs \leq x + c y \leq rhs \]

with coefficient \(c \in Q\), \(lhs\in Q \cup \{-\infty\}\), \(rhs\in Q \cup \{\infty\}\), and decision variables \(x\) (non-binary) and \(y\) (binary or integer).

SCIP_EXPORT 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_EXPORT 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_EXPORT SCIP_Real SCIPgetLhsVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetRhsVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetVarVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetVbdvarVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetVbdcoefVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualsolVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPgetDualfarkasVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_ROWSCIPgetRowVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssVarbound (SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgbds)
 

XOR Constraints

This constraint handler deals with "xor" constraint. These are constraint of the form:

\[ rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n \]

where \(x_i\) is a binary variable for all \(i\) and \(rhs\) is bool. The variables \(x\)'s are called operators. This constraint is satisfied if \(rhs\) is TRUE and an odd number of the operators are TRUE or if the \(rhs\) is FALSE and a even number of operators are TRUE. Hence, if the sum of \(rhs\) and operators is even.

SCIP_EXPORT 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_EXPORT SCIP_RETCODE SCIPcreateConsBasicXor (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)
 
SCIP_EXPORT int SCIPgetNVarsXor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VAR ** SCIPgetVarsXor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_VARSCIPgetIntVarXor (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Bool SCIPgetRhsXor (SCIP *scip, SCIP_CONS *cons)
 

Macro Definition Documentation

◆ SCIP_DECL_SOLVECUMULATIVE

#define SCIP_DECL_SOLVECUMULATIVE (   x)
Value:
SCIP_RETCODE x (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)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_VAR ** x
Definition: circlepacking.c:54
#define SCIP_Bool
Definition: def.h:70
#define SCIP_Real
Definition: def.h:163
#define SCIP_Longint
Definition: def.h:148

solves given cumulative condition as independent sub problem

Note
The time and memory limit should be respected.
If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.

input:

  • njobs : number of jobs (activities)
  • objvals : array of objective coefficients for each job (linear objective function), or NULL if none
  • durations : array of durations
  • demands : array of demands
  • capacity : cumulative capacity
  • hmin : left bound of time axis to be considered (including hmin)
  • hmax : right bound of time axis to be considered (not including hmax)
  • timelimit : time limit for solving in seconds
  • memorylimit : memory limit for solving in mega bytes (MB)
  • maxnodes : maximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit)

input/output:

  • ests : array of earliest start times for each job
  • lsts : array of latest start times for each job

output:

  • solved : pointer to store if the problem is solved (to optimality)
  • infeasible : pointer to store if the problem is infeasible
  • unbounded : pointer to store if the problem is unbounded
  • error : pointer to store if an error occurred

Definition at line 347 of file cons_cumulative.h.

◆ SCIP_DECL_LINCONSUPGD

#define SCIP_DECL_LINCONSUPGD (   x)
Value:
SCIP_RETCODE x (SCIP* scip, SCIP_CONS* cons, int nvars, SCIP_VAR** vars, SCIP_Real* vals, SCIP_Real lhs, SCIP_Real rhs, \
int nposbin, int nnegbin, int nposint, int nnegint, int nposimpl, int nnegimpl, int nposimplbin, int nnegimplbin, int nposcont, int nnegcont, \
int ncoeffspone, int ncoeffsnone, int ncoeffspint, int ncoeffsnint, int ncoeffspfrac, int ncoeffsnfrac, \
SCIP_Real poscoeffsum, SCIP_Real negcoeffsum, SCIP_Bool integral, SCIP_CONS** upgdcons)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_VAR ** x
Definition: circlepacking.c:54
#define SCIP_Bool
Definition: def.h:70
#define SCIP_Real
Definition: def.h:163

upgrading method for linear constraints into more specific constraints

input:

  • scip : SCIP main data structure
  • cons : the linear constraint to upgrade
  • nvars : number of variables in the constraint
  • vars : array with constraint variables
  • vals : array with constraint coefficients
  • lhs : left hand side of linear constraint
  • rhs : right hand side of linear constraint
  • nposbin : number of binary variables with positive coefficient
  • nnegbin : number of binary variables with negative coefficient
  • nposint : number of integer variables with positive coefficient
  • nnegint : number of integer variables with negative coefficient
  • nposimpl : number of implicit integer variables with positive coefficient (including implicit binary variables)
  • nnegimpl : number of implicit integer variables with negative coefficient (including implicit binary variables)
  • nposimplbin : number of implicit binary variables with positive coefficient
  • nnegimplbin : number of implicit binary variables with negative coefficient
  • nposcont : number of continuous variables with positive coefficient
  • nnegcont : number of continuous variables with negative coefficient
  • ncoeffspone : number of +1 coefficients
  • ncoeffsnone : number of -1 coefficients
  • ncoeffspint : number of positive integral coefficients other than +1
  • ncoeffsnint : number of negative integral coefficients other than -1
  • ncoeffspfrac : number of positive fractional coefficients
  • ncoeffsnfrac : number of negative fractional coefficients
  • poscoeffsum : sum of all positive coefficients
  • negcoeffsum : sum of all negative coefficients
  • integral : TRUE iff constraints activity value is always integral
  • upgdcons : pointer to store the upgraded constraint

Definition at line 111 of file cons_linear.h.

Referenced by consdataEnsureVarsSize().

◆ SCIP_DECL_QUADCONSUPGD

#define SCIP_DECL_QUADCONSUPGD (   x)
Value:
int nbinlin, int nbinquad, int nintlin, int nintquad, int nimpllin, int nimplquad, int ncontlin, int ncontquad, \
SCIP_Bool integral, int* nupgdconss, SCIP_CONS** upgdconss, int upgdconsssize, SCIP_PRESOLTIMING presoltiming)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_VAR ** x
Definition: circlepacking.c:54
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
#define SCIP_Bool
Definition: def.h:70

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:

  • scip : SCIP main data structure
  • cons : the quadratic constraint to upgrade
  • nbinlin : number of binary variables in linear part
  • nbinquad : number of binary variables in quadratic part
  • nintlin : number of integer variables in linear part
  • nintquad : number of integer variables in quadratic part
  • nimpllin : number of implicit integer variables in linear part
  • nimplquad : number of implicit integer variables in quadratic part
  • ncontlin : number of continuous variables in linear part
  • ncontquad : number of continuous variables in quadratic part
  • integral : TRUE iff constraints activity value is always integral
  • nupgdconss : pointer to store number of constraints that replace this constraint
  • upgdconss : array to store constraints that replace this constraint
  • upgdconsssize : length of the provided upgdconss array
  • presoltiming : current presolve timing

Definition at line 175 of file cons_quadratic.h.

Typedef Documentation

◆ SCIP_LINCONSUPGRADE

linear constraint update method

Definition at line 78 of file cons_linear.h.

◆ SCIP_ORBITOPETYPE

Definition at line 86 of file cons_orbitope.h.

◆ SCIP_LINEARCONSTYPE

Definition at line 81 of file cons_pseudoboolean.h.

◆ SCIP_QUADVAREVENTDATA

typedef struct SCIP_QuadVarEventData SCIP_QUADVAREVENTDATA

event data for variable bound changes in quadratic constraints

Definition at line 100 of file cons_quadratic.h.

◆ SCIP_QUADVARTERM

Definition at line 116 of file cons_quadratic.h.

◆ SCIP_BILINTERM

Definition at line 127 of file cons_quadratic.h.

◆ SCIP_ROWPREP

typedef struct SCIP_RowPrep SCIP_ROWPREP

Definition at line 145 of file cons_quadratic.h.

◆ SCIP_SETPPCTYPE

Definition at line 82 of file cons_setppc.h.

Enumeration Type Documentation

◆ SCIP_BIVAR_CONVEXITY

Enumerator
SCIP_BIVAR_ALLCONVEX 
SCIP_BIVAR_1CONVEX_INDEFINITE 
SCIP_BIVAR_CONVEX_CONCAVE 
SCIP_BIVAR_UNKNOWN 

Definition at line 74 of file cons_bivariate.h.

◆ SCIP_OrbitopeType

type of orbitope constraint: full, packing, or partitioning orbitope

Enumerator
SCIP_ORBITOPETYPE_FULL 

constraint is a full orbitope constraint: rowsum(x) unrestricted

SCIP_ORBITOPETYPE_PARTITIONING 

constraint is a partitioning orbitope constraint: rowsum(x) == 1

SCIP_ORBITOPETYPE_PACKING 

constraint is a packing orbitope constraint: rowsum(x) <= 1

Definition at line 80 of file cons_orbitope.h.

◆ SCIP_LinearConsType

solution status after solving LP

Enumerator
SCIP_LINEARCONSTYPE_INVALIDCONS 

this is no valid linear constraint type

SCIP_LINEARCONSTYPE_LINEAR 

this is the common linear constraint

SCIP_LINEARCONSTYPE_LOGICOR 

this is a logicor constraint

SCIP_LINEARCONSTYPE_KNAPSACK 

this is a knapsack constraint

SCIP_LINEARCONSTYPE_SETPPC 

this is a setppc constraint

Definition at line 68 of file cons_pseudoboolean.h.

◆ SCIP_SetppcType

type of setppc constraint: set partitioning, set packing, or set covering

Enumerator
SCIP_SETPPCTYPE_PARTITIONING 

constraint is a set partitioning constraint: sum(x) == 1

SCIP_SETPPCTYPE_PACKING 

constraint is a set packing constraint: sum(x) <= 1

SCIP_SETPPCTYPE_COVERING 

constraint is a set covering constraint: sum(x) >= 1

Definition at line 76 of file cons_setppc.h.

Function Documentation

◆ SCIPcreateConsAbspower()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
xnonlinear variable x in constraint
zlinear variable z in constraint
exponentexponent n of |x+offset|^n term in constraint
xoffsetoffset in |x+offset|^n term in constraint
zcoefcoefficient of z in constraint
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 7272 of file cons_abspower.c.

References BMSclearMemory, CONSHDLR_NAME, NULL, pow(), REALABS, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcreateCons(), SCIPcreateConsBasicAbspower(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPvarIsActive(), square(), and x.

Referenced by presolveFindDuplicates(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicAbspower(), and SCIPincludeConshdlrAbspower().

◆ SCIPcreateConsBasicAbspower()

SCIP_EXPORT 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

See also
SCIPcreateConsAbspower() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

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

See also
SCIPcreateConsAbspower() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
xnonlinear variable x in constraint
zlinear variable z in constraint
exponentexponent n of |x+offset|^n term in constraint
xoffsetoffset in |x+offset|^n term in constraint
zcoefcoefficient of z in constraint
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 7373 of file cons_abspower.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsAbspower(), SCIPgetNlRowAbspower(), and TRUE.

Referenced by SCIPcreateConsAbspower(), and setupProblem().

◆ SCIPgetNlRowAbspower()

SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowAbspower ( SCIP scip,
SCIP_CONS cons,
SCIP_NLROW **  nlrow 
)

gets the absolute power constraint as a nonlinear row representation

Parameters
scipSCIP data structure
consconstraint
nlrowa buffer where to store pointer to nonlinear row

Definition at line 7395 of file cons_abspower.c.

References CONSHDLR_NAME, createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetNonlinearVarAbspower().

Referenced by SCIPcreateConsBasicAbspower().

◆ SCIPgetNonlinearVarAbspower()

SCIP_EXPORT SCIP_VAR* SCIPgetNonlinearVarAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets nonlinear variable x in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7421 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetLinearVarAbspower().

Referenced by SCIPgetNlRowAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLinearVarAbspower()

SCIP_EXPORT SCIP_VAR* SCIPgetLinearVarAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets linear variable z in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7438 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetExponentAbspower().

Referenced by SCIPgetNonlinearVarAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetExponentAbspower()

SCIP_EXPORT SCIP_Real SCIPgetExponentAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets exponent in power term in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7455 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetOffsetAbspower().

Referenced by SCIPgetLinearVarAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetOffsetAbspower()

SCIP_EXPORT SCIP_Real SCIPgetOffsetAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets offset in power term in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7472 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetCoefLinearAbspower().

Referenced by SCIPgetExponentAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetCoefLinearAbspower()

SCIP_EXPORT SCIP_Real SCIPgetCoefLinearAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets coefficient of linear variable in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7489 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetLhsAbspower().

Referenced by SCIPgetOffsetAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLhsAbspower()

SCIP_EXPORT SCIP_Real SCIPgetLhsAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets left hand side in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7506 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetRhsAbspower().

Referenced by SCIPconsNonlinearGetLhs(), SCIPgetCoefLinearAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetRhsAbspower()

SCIP_EXPORT SCIP_Real SCIPgetRhsAbspower ( SCIP scip,
SCIP_CONS cons 
)

gets right hand side in absolute power constraint

Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7523 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetViolationAbspower().

Referenced by SCIPconsNonlinearGetRhs(), SCIPgetLhsAbspower(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetViolationAbspower()

SCIP_EXPORT SCIP_Real SCIPgetViolationAbspower ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol 
)

gets the absolute violation of a absolute power constraint by a solution

Parameters
scipSCIP data structure
consabsolute power constraint
solLP solution

Definition at line 7540 of file cons_abspower.c.

References CONSHDLR_NAME, NULL, pow(), REALABS, SCIP_Bool, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetSolVal(), SCIPisConvexAbspower(), and SIGN.

Referenced by SCIPgetRhsAbspower().

◆ SCIPisConvexAbspower()

SCIP_EXPORT SCIP_Bool SCIPisConvexAbspower ( SCIP scip,
SCIP_CONS cons 
)

returns whether constraint is convex w.r.t. global bounds

Note
in difference to SCIPisConvexQuadratic, we put convexity/concavity of the constraint function in relation to the constraint sides here
Parameters
scipSCIP data structure
consabsolute power constraint

Definition at line 7575 of file cons_abspower.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), and SCIPvarGetLbGlobal().

Referenced by checkSubproblemConvexity(), and SCIPgetViolationAbspower().

◆ SCIPcreateConsAnd()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsAnd ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR resvar,
int  nvars,
SCIP_VAR **  vars,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures an and constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a AND-constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
resvarresultant variable of the operation
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 5007 of file cons_and.c.

References ARTIFICIALVARNAMEPREFIX, consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIPchgVarType(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicAnd(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPisTransformed(), SCIPvarGetName(), SCIPvarGetProbvar(), and SCIPvarGetType().

Referenced by CREATE_CONSTRAINT(), createAndAddAndCons(), extractGates(), findAggregation(), presolveTryAddAND(), presolveTryAddLinearReform(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIPcreateConsBasicAnd(), SCIPincludeConshdlrAnd(), setObjective(), and upgradeCons().

◆ SCIPcreateConsBasicAnd()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicAnd ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR resvar,
int  nvars,
SCIP_VAR **  vars 
)

creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsAnd(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsAnd() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an AND-constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsAnd(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsAnd() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
resvarresultant variable of the operation
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint

Definition at line 5117 of file cons_and.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsAnd(), SCIPgetNVarsAnd(), and TRUE.

Referenced by SCIPcreateConsAnd().

◆ SCIPgetNVarsAnd()

◆ SCIPgetVarsAnd()

◆ SCIPgetResultantAnd()

◆ SCIPisAndConsSorted()

SCIP_EXPORT SCIP_Bool SCIPisAndConsSorted ( SCIP scip,
SCIP_CONS cons 
)

return if the variables of the AND-constraint are sorted with respect to their indices

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5208 of file cons_and.c.

References CONSHDLR_NAME, FALSE, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsortAndCons().

Referenced by computeConsAndDataChanges(), and SCIPgetResultantAnd().

◆ SCIPsortAndCons()

SCIP_EXPORT SCIP_RETCODE SCIPsortAndCons ( SCIP scip,
SCIP_CONS cons 
)

sort the variables of the AND-constraint with respect to their indices

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5232 of file cons_and.c.

References consdataSort(), CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsCheckFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by computeConsAndDataChanges(), and SCIPisAndConsSorted().

◆ SCIPchgAndConsCheckFlagWhenUpgr()

SCIP_EXPORT SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr ( SCIP scip,
SCIP_CONS cons,
SCIP_Bool  flag 
)

when 'upgrading' the given AND-constraint, should the check flag for the upgraded constraint be set to TRUE, even if the check flag of this AND-constraint is set to FALSE?

Parameters
scipSCIP data structure
consconstraint data
flagshould 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 5261 of file cons_and.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPchgAndConsRemovableFlagWhenUpgr(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by createAndAddAndCons(), and SCIPsortAndCons().

◆ SCIPchgAndConsRemovableFlagWhenUpgr()

SCIP_EXPORT SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr ( SCIP scip,
SCIP_CONS cons,
SCIP_Bool  flag 
)

when 'upgrading' the given AND-constraint, should the removable flag for the upgraded constraint be set to FALSE, even if the removable flag of this AND-constraint is set to TRUE?

Parameters
scipSCIP data structure
consconstraint data
flagshould 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 5292 of file cons_and.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by createAndAddAndCons(), and SCIPchgAndConsCheckFlagWhenUpgr().

◆ SCIPconsBendersEnforceSolution()

SCIP_EXPORT SCIP_RETCODE SCIPconsBendersEnforceSolution ( SCIP scip,
SCIP_SOL sol,
SCIP_CONSHDLR conshdlr,
SCIP_RESULT result,
SCIP_BENDERSENFOTYPE  type,
SCIP_Bool  checkint 
)

enforces Benders' constraints for given solution

This method is called from cons_benderslp and cons_benders. If the method is called from cons_benderslp, then the solutions are not guaranteed to be integer feasible. This is because the default priority is set greater than the integer constraint handler. If this method is called from cons_benders, then, because the default enforcement priority is set less than that of the integer constraint handler, then it can be assumed that the solutions are integer feasible.

The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint == FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e. checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check solution feasibility.

Parameters
scipthe SCIP instance
solthe primal solution to enforce, or NULL for the current LP/pseudo sol
conshdlrthe constraint handler
resultthe result of the enforcement
typethe type of solution being enforced
checkintshould integrality be considered when checking the subproblems

Definition at line 252 of file cons_benders.c.

References constructValidSolution(), FALSE, NULL, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSENFOTYPE_RELAX, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPbendersCutLP(), SCIPbendersCutPseudo(), SCIPbendersCutRelaxation(), SCIPgetBenders(), SCIPgetLPSolstat(), SCIPgetNActiveBenders(), SCIPsolveBendersSubproblems(), SCIPwarningMessage(), TRUE, and unboundedAuxiliaryVariables().

Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSENFORELAX(), and unboundedAuxiliaryVariables().

◆ SCIPcreateConsBivariate()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
fexpression tree specifying bivariate function f(x,y)
convextypekind of convexity of f(x,y)
zlinear variable in constraint
zcoefcoefficient of linear variable
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 7956 of file cons_bivariate.c.

References BMSclearMemory, CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicBivariate()

SCIP_EXPORT 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

See also
SCIPcreateConsBivariate() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an 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

See also
SCIPcreateConsBivariate() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
fexpression tree specifying bivariate function f(x,y)
convextypekind of convexity of f(x,y)
zlinear variable in constraint
zcoefcoefficient of linear variable
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 8040 of file cons_bivariate.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBivariate(), SCIPgetLinearVarBivariate(), and TRUE.

Referenced by SCIPcreateConsBivariate().

◆ SCIPgetLinearVarBivariate()

SCIP_EXPORT SCIP_VAR* SCIPgetLinearVarBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the linear variable of a bivariate constraint, or NULL if no such variable

Parameters
scipSCIP data structure
consconstraint

Definition at line 8061 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLinearCoefBivariate().

Referenced by SCIPcreateConsBasicBivariate(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLinearCoefBivariate()

SCIP_EXPORT SCIP_Real SCIPgetLinearCoefBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the coefficients of the linear variable of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8073 of file cons_bivariate.c.

References NULL, SCIPconsGetData(), and SCIPgetExprtreeBivariate().

Referenced by SCIPgetLinearVarBivariate(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetExprtreeBivariate()

SCIP_EXPORT SCIP_EXPRTREE* SCIPgetExprtreeBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the expression tree of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8085 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsBivariate().

Referenced by SCIPgetLinearCoefBivariate(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLhsBivariate()

SCIP_EXPORT SCIP_Real SCIPgetLhsBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the left hand side of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8097 of file cons_bivariate.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsBivariate().

Referenced by SCIPgetExprtreeBivariate(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetRhsBivariate()

SCIP_EXPORT SCIP_Real SCIPgetRhsBivariate ( SCIP scip,
SCIP_CONS cons 
)

gets the right hand side of a bivariate constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 8109 of file cons_bivariate.c.

References NULL, and SCIPconsGetData().

Referenced by SCIPgetLhsBivariate(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPcreateConsBounddisjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBounddisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_BOUNDTYPE boundtypes,
SCIP_Real bounds,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a bound disjunction constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsvariables of the literals in the constraint
boundtypestypes of bounds of the literals (lower or upper bounds)
boundsbounds of the literals
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 3507 of file cons_bounddisjunction.c.

References consdataCreate(), CONSHDLR_NAME, isOverlapping(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPboundtypeOpposite(), SCIPcreateCons(), SCIPcreateConsBasicBounddisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by addLowerboundCons(), adjustOversizedJobBounds(), createConflict(), CUTOFF_CONSTRAINT(), forbidFixation(), readBounds(), readSemicontinuous(), readVariables(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicBounddisjunction(), and SCIPincludeConshdlrBounddisjunction().

◆ SCIPcreateConsBasicBounddisjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicBounddisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_BOUNDTYPE boundtypes,
SCIP_Real bounds 
)

creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a bound disjunction constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsvariables of the literals in the constraint
boundtypestypes of bounds of the literals (lower or upper bounds)
boundsbounds of the literals

Definition at line 3587 of file cons_bounddisjunction.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBounddisjunction(), SCIPcreateConsBounddisjunctionRedundant(), and TRUE.

Referenced by createBounddisjunctionCons(), SCIPcreateConsBounddisjunction(), and SCIPreoptApplyGlbConss().

◆ SCIPcreateConsBounddisjunctionRedundant()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBounddisjunctionRedundant ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_BOUNDTYPE boundtypes,
SCIP_Real bounds,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a bound disjunction constraint with possibly redundant literals

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsvariables of the literals in the constraint
boundtypestypes of bounds of the literals (lower or upper bounds)
boundsbounds of the literals
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 3609 of file cons_bounddisjunction.c.

References consdataCreateRedundant(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicBounddisjunctionRedundant(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by addLocalConss(), addSplitcons(), SCIPcreateConsBasicBounddisjunction(), and SCIPcreateConsBasicBounddisjunctionRedundant().

◆ SCIPcreateConsBasicBounddisjunctionRedundant()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicBounddisjunctionRedundant ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_BOUNDTYPE boundtypes,
SCIP_Real bounds 
)

creates and captures an and constraint with possibly redundant literals in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a bound disjunction constraint with possibly redundant literals in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsBounddisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsBounddisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsvariables of the literals in the constraint
boundtypestypes of bounds of the literals (lower or upper bounds)
boundsbounds of the literals

Definition at line 3673 of file cons_bounddisjunction.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsBounddisjunctionRedundant(), SCIPgetNVarsBounddisjunction(), and TRUE.

Referenced by SCIPcreateConsBounddisjunctionRedundant().

◆ SCIPgetNVarsBounddisjunction()

SCIP_EXPORT int SCIPgetNVarsBounddisjunction ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in bound disjunction constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3692 of file cons_bounddisjunction.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsBounddisjunction().

Referenced by checkBounddisjunction(), computeSymmetryGroup(), createCoveringProblem(), SCIP_DECL_CONSCOPY(), and SCIPcreateConsBasicBounddisjunctionRedundant().

◆ SCIPgetVarsBounddisjunction()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsBounddisjunction ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in bound disjunction constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3713 of file cons_bounddisjunction.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundtypesBounddisjunction().

Referenced by checkBounddisjunction(), computeSymmetryGroup(), createCoveringProblem(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetNVarsBounddisjunction().

◆ SCIPgetBoundtypesBounddisjunction()

SCIP_EXPORT SCIP_BOUNDTYPE* SCIPgetBoundtypesBounddisjunction ( SCIP scip,
SCIP_CONS cons 
)

gets array of bound types in bound disjunction constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3734 of file cons_bounddisjunction.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetBoundsBounddisjunction().

Referenced by checkBounddisjunction(), computeSymmetryGroup(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetVarsBounddisjunction().

◆ SCIPgetBoundsBounddisjunction()

SCIP_EXPORT SCIP_Real* SCIPgetBoundsBounddisjunction ( SCIP scip,
SCIP_CONS cons 
)

gets array of bounds in bound disjunction constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3755 of file cons_bounddisjunction.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by checkBounddisjunction(), computeSymmetryGroup(), saveConsBounddisjuction(), SCIP_DECL_CONSCOPY(), and SCIPgetBoundtypesBounddisjunction().

◆ SCIPcreateConsCardinality()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsCardinality ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int  cardval,
SCIP_VAR **  indvars,
SCIP_Real weights,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures an cardinality constraint

We set the constraint to not be modifable. If the weights are non NULL, the variables are ordered according to these weights (in ascending order).

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a cardinality constraint

We set the constraint to not be modifable. If the weights are non NULL, the variables are ordered according to these weights (in ascending order).

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
cardvalnumber of variables allowed to be nonzero
indvarsindicator variables indicating which variables may be treated as nonzero in cardinality constraint, or NULL if new indicator variables should be introduced automatically
weightsweights determining the variable order, or NULL if variables should be ordered in the same way they were added to the constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 3310 of file cons_cardinality.c.

References CONSHDLR_NAME, FALSE, handleNewVariableCardinality(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_TRANSFORMED, SCIP_VARTYPE_BINARY, SCIPaddVar(), SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicCardinality(), SCIPcreateVar(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNTotalVars(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPreleaseVar(), SCIPsnprintf(), SCIPsortRealPtrPtrInt(), SCIPvarGetName(), SCIPvarIsBinary(), and SCIPvarIsTransformed().

Referenced by branchBalancedCardinality(), SCIPcreateConsBasicCardinality(), and SCIPincludeConshdlrCardinality().

◆ SCIPcreateConsBasicCardinality()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicCardinality ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int  cardval,
SCIP_VAR **  indvars,
SCIP_Real weights 
)

creates and captures an cardinality constraint in its most basic variant, i. e., with all constraint flags set to their default values, which can be set afterwards using SCIPsetConsFLAGNAME() in scip.h

See also
SCIPcreateConsCardinality() for the default constraint flag configuration
Warning
Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a cardinality constraint with all constraint flags set to their default values.

Warning
Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
cardvalnumber of variables allowed to be nonzero
indvarsindicator variables indicating which variables may be treated as nonzero in cardinality constraint, or NULL if new indicator variables should be introduced automatically
weightsweights determining the variable order, or NULL if variables should be ordered in the same way they were added to the constraint

Definition at line 3510 of file cons_cardinality.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPchgCardvalCardinality(), SCIPcreateConsCardinality(), and TRUE.

Referenced by SCIPcreateConsCardinality().

◆ SCIPchgCardvalCardinality()

SCIP_EXPORT SCIP_RETCODE SCIPchgCardvalCardinality ( SCIP scip,
SCIP_CONS cons,
int  cardval 
)

changes cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)

Parameters
scipSCIP data structure
conspointer to hold the created constraint
cardvalnumber of variables allowed to be nonzero

Definition at line 3531 of file cons_cardinality.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPaddVarCardinality(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMsg, and SCIPerrorMessage.

Referenced by SCIPcreateConsBasicCardinality().

◆ SCIPaddVarCardinality()

SCIP_EXPORT SCIP_RETCODE SCIPaddVarCardinality ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_VAR indvar,
SCIP_Real  weight 
)

adds variable to cardinality constraint, the position is determined by the given weight

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint
indvarindicator variable indicating whether variable may be treated as nonzero in cardinality constraint (or NULL if this variable should be created automatically)
weightweight determining position of variable

Definition at line 3560 of file cons_cardinality.c.

References addVarCardinality(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarCardinality(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().

Referenced by SCIPchgCardvalCardinality().

◆ SCIPappendVarCardinality()

SCIP_EXPORT SCIP_RETCODE SCIPappendVarCardinality ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_VAR indvar 
)

appends variable to cardinality constraint

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint
indvarindicator variable indicating whether variable may be treated as nonzero in cardinality constraint (or NULL if this variable should be created automatically)

Definition at line 3597 of file cons_cardinality.c.

References appendVarCardinality(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNVarsCardinality(), and SCIPvarGetName().

Referenced by SCIPaddVarCardinality().

◆ SCIPgetNVarsCardinality()

SCIP_EXPORT int SCIPgetNVarsCardinality ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in cardinality constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 3632 of file cons_cardinality.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCardinality().

Referenced by SCIPappendVarCardinality().

◆ SCIPgetVarsCardinality()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsCardinality ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in cardinality constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3656 of file cons_cardinality.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCardvalCardinality().

Referenced by SCIPgetNVarsCardinality().

◆ SCIPgetCardvalCardinality()

SCIP_EXPORT int SCIPgetCardvalCardinality ( SCIP scip,
SCIP_CONS cons 
)

gets cardinality value of cardinality constraint (i.e., right hand side of cardinality constraint)

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3680 of file cons_cardinality.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsCardinality().

Referenced by SCIPgetVarsCardinality().

◆ SCIPgetWeightsCardinality()

SCIP_EXPORT SCIP_Real* SCIPgetWeightsCardinality ( SCIP scip,
SCIP_CONS cons 
)

gets array of weights in cardinality constraint (or NULL if not existent)

Parameters
scipSCIP data structure
consconstraint data

Definition at line 3703 of file cons_cardinality.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetCardvalCardinality().

◆ SCIPcreateConsConjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsConjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic 
)

creates and captures a conjunction constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in conjunction
conssinitial constraint in conjunction
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.

Definition at line 800 of file cons_conjunction.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicConjunction(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicConjunction(), and SCIPincludeConshdlrConjunction().

◆ SCIPcreateConsBasicConjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicConjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss 
)

creates and captures an and constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsConjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsConjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in conjunction
conssinitial constraint in conjunction

Definition at line 849 of file cons_conjunction.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemConjunction(), SCIPcreateConsConjunction(), and TRUE.

Referenced by SCIPcreateConsConjunction().

◆ SCIPaddConsElemConjunction()

SCIP_EXPORT SCIP_RETCODE SCIPaddConsElemConjunction ( SCIP scip,
SCIP_CONS cons,
SCIP_CONS addcons 
)

adds constraint to the conjunction of constraints

Parameters
scipSCIP data structure
consconjunction constraint
addconsadditional constraint in conjunction

Definition at line 866 of file cons_conjunction.c.

References consdataAddCons(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPcreateConsBasicConjunction().

◆ SCIP_DECL_DIALOGEXEC() [1/4]

◆ SCIP_DECL_DIALOGEXEC() [2/4]

◆ SCIP_DECL_DIALOGEXEC() [3/4]

◆ SCIPcount()

SCIP_EXPORT SCIP_RETCODE SCIPcount ( SCIP scip)

◆ SCIPgetNCountedSols()

SCIP_EXPORT SCIP_Longint SCIPgetNCountedSols ( SCIP scip,
SCIP_Bool valid 
)

returns number of feasible solutions found as SCIP_Longint; if the number does not fit into a SCIP_Longint the valid flag is set to FALSE

Parameters
scipSCIP data structure
validpointer to store if the return value is valid

Definition at line 2725 of file cons_countsols.c.

References CONSHDLR_NAME, getNCountedSols(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetNCountedSolsstr().

Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPcount().

◆ SCIPgetNCountedSolsstr()

SCIP_EXPORT void SCIPgetNCountedSolsstr ( SCIP scip,
char **  buffer,
int  buffersize,
int *  requiredsize 
)

returns number of counted solutions as string

puts the number of counted solutions in the given char* buffer

Parameters
scipSCIP data structure
bufferbuffer to store the number for counted solutions
buffersizebuffer size
requiredsizepointer to store the required size

Definition at line 2745 of file cons_countsols.c.

References CONSHDLR_NAME, NULL, pow(), SCIP_Longint, SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetNCountedFeasSubtrees(), and toString().

Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPgetNCountedSols().

◆ SCIPgetNCountedFeasSubtrees()

SCIP_EXPORT SCIP_Longint SCIPgetNCountedFeasSubtrees ( SCIP scip)

returns number of counted feasible subtrees

returns number of counted non trivial feasible subtrees

Parameters
scipSCIP data structure

Definition at line 2783 of file cons_countsols.c.

References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetCountedSparseSols().

Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPOUTPUT(), and SCIPgetNCountedSolsstr().

◆ SCIPgetCountedSparseSols()

SCIP_EXPORT void SCIPgetCountedSparseSols ( SCIP scip,
SCIP_VAR ***  vars,
int *  nvars,
SCIP_SPARSESOL ***  sols,
int *  nsols 
)

Method to get the sparse solution.

Note
You get the pointer to the sparse solutions stored in the constraint handler (not a copy).
The sparse solutions are stored w.r.t. the active variables. This are the variables which got not removed during presolving. For none active variables the value has to be computed depending on their aggregation type. See for more details about that Collect all feasible solutions.

Method to get the sparse solution.

Note
You get the pointer to the sparse solutions stored in the constraint handler (not a copy).
The sparse solutions are stored w.r.t. the active variables. There are the variables which have not been removed during presolving. For none active variables the value has to be computed depending on their aggregation type. See for more details about that Collect all feasible solutions.
Parameters
scipSCIP data structure
varspointer to active variable array defining to variable order
nvarsnumber of active variables
solspointer to the solutions
nsolspointer to number of solutions

Definition at line 2811 of file cons_countsols.c.

References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPsetParamsCountsols().

Referenced by SCIPgetNCountedFeasSubtrees().

◆ SCIPsetParamsCountsols()

SCIP_EXPORT SCIP_RETCODE SCIPsetParamsCountsols ( SCIP scip)

setting SCIP parameters for such that a valid counting process is possible

Parameters
scipSCIP data structure

Definition at line 2838 of file cons_countsols.c.

References SCIP_CALL, SCIP_OKAY, SCIP_PARAMEMPHASIS_COUNTER, SCIPsetEmphasis(), and TRUE.

Referenced by SCIPgetCountedSparseSols().

◆ SCIPcreateConsCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsCumulative ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a cumulative constraint

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 13736 of file cons_cumulative.c.

References consdataCatchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_PROBLEM, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicCumulative(), SCIPdebugMsg, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPgetStage().

Referenced by CREATE_CONSTRAINT(), createConsCumulative(), createCumulativeCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), SCIPcreateSchedulingProblem(), SCIPincludeConshdlrCumulative(), and upgradeCons().

◆ SCIPcreateConsBasicCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicCumulative ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity 
)

creates and captures an absolute power constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsCumulative() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsCumulative() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity

Definition at line 13817 of file cons_cumulative.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsCumulative(), SCIPsetHminCumulative(), and TRUE.

Referenced by SCIPcreateConsCumulative(), and setupAndSolveCumulativeSubscip().

◆ SCIPsetHminCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPsetHminCumulative ( SCIP scip,
SCIP_CONS cons,
int  hmin 
)

set the left bound of effective horizon

set the left bound of the time axis to be considered (including hmin)

Parameters
scipSCIP data structure
consconstraint data
hminleft bound of time axis to be considered

Definition at line 13837 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHminCumulative().

Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), setupAndSolveCumulativeSubscip(), and upgradeCons().

◆ SCIPgetHminCumulative()

SCIP_EXPORT int SCIPgetHminCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the left bound of the effective horizon

returns the left bound of the time axis to be considered

Parameters
scipSCIP data structure
consconstraint

Definition at line 13861 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsetHmaxCumulative().

Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHminCumulative().

◆ SCIPsetHmaxCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPsetHmaxCumulative ( SCIP scip,
SCIP_CONS cons,
int  hmax 
)

set the right bound of the effective horizon

set the right bound of the time axis to be considered (not including hmax)

Parameters
scipSCIP data structure
consconstraint data
hmaxright bound of time axis to be considered

Definition at line 13881 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHmaxCumulative().

Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPgetHminCumulative(), setupAndSolveCumulativeSubscip(), and upgradeCons().

◆ SCIPgetHmaxCumulative()

SCIP_EXPORT int SCIPgetHmaxCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the right bound of effective horizon

returns the right bound of the time axis to be considered

Parameters
scipSCIP data structure
consconstraint

Definition at line 13905 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCumulative().

Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHmaxCumulative().

◆ SCIPgetVarsCumulative()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the start time variables of the cumulative constraint

returns the activities of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13925 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsCumulative().

Referenced by SCIPgetHmaxCumulative(), and writeFzn().

◆ SCIPgetNVarsCumulative()

SCIP_EXPORT int SCIPgetNVarsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the number of start time variables of the cumulative constraint

returns the activities of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13946 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCapacityCumulative().

Referenced by SCIPgetVarsCumulative(), and writeFzn().

◆ SCIPgetCapacityCumulative()

SCIP_EXPORT int SCIPgetCapacityCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the capacity of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13967 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDurationsCumulative().

Referenced by SCIPgetNVarsCumulative(), and writeFzn().

◆ SCIPgetDurationsCumulative()

SCIP_EXPORT int* SCIPgetDurationsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the durations of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13988 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDemandsCumulative().

Referenced by SCIPgetCapacityCumulative(), and writeFzn().

◆ SCIPgetDemandsCumulative()

SCIP_EXPORT int* SCIPgetDemandsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the demands of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 14009 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetDurationsCumulative(), and writeFzn().

◆ SCIPcheckCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPcheckCumulativeCondition ( SCIP scip,
SCIP_SOL sol,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_Bool violated,
SCIP_CONS cons,
SCIP_Bool  printreason 
)

check for the given starting time variables with their demands and durations if the cumulative conditions for the given solution is satisfied

Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
violatedpointer to store if the cumulative condition is violated
consconstraint which is checked
printreasonshould the reason for the violation be printed?

Definition at line 14032 of file cons_cumulative.c.

References checkCumulativeCondition(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnormalizeCumulativeCondition().

Referenced by checkCons(), enfopsCons(), and SCIPgetDemandsCumulative().

◆ SCIPnormalizeCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPnormalizeCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int *  capacity,
int *  nchgcoefs,
int *  nchgsides 
)

normalize cumulative condition

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
demandsarray of demands
capacitypointer to store the changed cumulative capacity
nchgcoefspointer to count total number of changed coefficients
nchgsidespointer to count number of side changes

Definition at line 14057 of file cons_cumulative.c.

References normalizeCumulativeCondition(), SCIP_OKAY, and SCIPsplitCumulativeCondition().

Referenced by SCIP_DECL_CONSPRESOL(), and SCIPcheckCumulativeCondition().

◆ SCIPsplitCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPsplitCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int *  hmin,
int *  hmax,
int *  split 
)

searches for a time point within the cumulative condition were the cumulative condition can be split

Parameters
scipSCIP data structure
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminpointer to store the left bound of the effective horizon
hmaxpointer to store the right bound of the effective horizon
splitpoint were the cumulative condition can be split

Definition at line 14074 of file cons_cumulative.c.

References computeEffectiveHorizonCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPpresolveCumulativeCondition().

Referenced by SCIP_DECL_CONSPRESOL(), and SCIPnormalizeCumulativeCondition().

◆ SCIPpresolveCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPpresolveCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int  hmin,
int  hmax,
SCIP_Bool downlocks,
SCIP_Bool uplocks,
SCIP_CONS cons,
SCIP_Bool irrelevants,
int *  nfixedvars,
int *  nchgsides,
SCIP_Bool cutoff 
)

presolve cumulative condition w.r.t. effective horizon by detecting irrelevant variables

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
hminleft bound of time axis to be considered
hmaxright bound of time axis to be considered (not including hmax)
downlocksarray storing if the variable has a down lock, or NULL
uplocksarray storing if the variable has an up lock, or NULL
consconstraint which gets propagated, or NULL
irrelevantsarray mark those variables which are irrelevant for the cumulative condition
nfixedvarspointer to store the number of fixed variables
nchgsidespointer to store the number of changed sides
cutoffbuffer to store whether a cutoff is detected

Definition at line 14093 of file cons_cumulative.c.

References presolveConsEst(), presolveConsLct(), SCIP_CALL, SCIP_OKAY, and SCIPpropCumulativeCondition().

Referenced by presolveCumulativeCondition(), and SCIPsplitCumulativeCondition().

◆ SCIPpropCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPpropCumulativeCondition ( SCIP scip,
SCIP_PRESOLTIMING  presoltiming,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_CONS cons,
int *  nchgbds,
SCIP_Bool initialized,
SCIP_Bool explanation,
SCIP_Bool cutoff 
)

propagate the given cumulative condition

Parameters
scipSCIP data structure
presoltimingcurrent presolving timing
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
consconstraint which gets propagated
nchgbdspointer to store the number of variable bound changes
initializedwas conflict analysis initialized
explanationbool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL
cutoffpointer to store if the cumulative condition is violated

Definition at line 14124 of file cons_cumulative.c.

References CONSHDLR_NAME, FALSE, NULL, propagateCumulativeCondition(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPrespropCumulativeCondition().

Referenced by propagateCons(), and SCIPpresolveCumulativeCondition().

◆ SCIPrespropCumulativeCondition()

SCIP_EXPORT SCIP_RETCODE SCIPrespropCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_VAR infervar,
int  inferinfo,
SCIP_BOUNDTYPE  boundtype,
SCIP_BDCHGIDX bdchgidx,
SCIP_Real  relaxedbd,
SCIP_Bool explanation,
SCIP_RESULT result 
)

resolve propagation w.r.t. the cumulative condition

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
demandsarray of demands
capacitycumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
infervarthe conflict variable whose bound change has to be resolved
inferinfothe user information
boundtypethe type of the changed bound (lower or upper bound)
bdchgidxthe index of the bound change, representing the point of time where the change took place
relaxedbdthe relaxed bound which is sufficient to be explained
explanationbool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL
resultpointer to store the result of the propagation conflict resolving call

Definition at line 14173 of file cons_cumulative.c.

References intToInferInfo(), respropCumulativeCondition(), SCIP_CALL, SCIP_OKAY, SCIPvisualizeConsCumulative(), and TRUE.

Referenced by SCIP_DECL_CONSRESPROP(), and SCIPpropCumulativeCondition().

◆ SCIPvisualizeConsCumulative()

◆ SCIPsetSolveCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPsetSolveCumulative ( SCIP scip,
SCIP_DECL_SOLVECUMULATIVE((*solveCumulative))   
)

sets method to solve an individual cumulative condition

Parameters
scipSCIP data structure

Definition at line 14301 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPsolveCumulative(), and solveCumulative().

Referenced by runShell(), and SCIPvisualizeConsCumulative().

◆ SCIPsolveCumulative()

SCIP_EXPORT SCIP_RETCODE SCIPsolveCumulative ( SCIP scip,
int  njobs,
SCIP_Real ests,
SCIP_Real lsts,
SCIP_Real objvals,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_Real  timelimit,
SCIP_Real  memorylimit,
SCIP_Longint  maxnodes,
SCIP_Bool solved,
SCIP_Bool infeasible,
SCIP_Bool unbounded,
SCIP_Bool error 
)

solves given cumulative condition as independent sub problem

Note
If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.
Parameters
scipSCIP data structure
njobsnumber of jobs (activities)
estsarray with the earlier start time for each job
lstsarray with the latest start time for each job
objvalsarray of objective coefficients for each job (linear objective function), or NULL if none
durationsarray of durations
demandsarray of demands
capacitycumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
timelimittime limit for solving in seconds
memorylimitmemory limit for solving in mega bytes (MB)
maxnodesmaximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit)
solvedpointer to store if the problem is solved (to optimality)
infeasiblepointer to store if the problem is infeasible
unboundedpointer to store if the problem is unbounded
errorpointer to store if an error occurred

Definition at line 14331 of file cons_cumulative.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateWorstCaseProfile(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.

Referenced by applyOptcumulative(), SCIPsetSolveCumulative(), solveCumulative(), and solveIndependentCons().

◆ SCIPcreateWorstCaseProfile()

SCIP_EXPORT SCIP_RETCODE SCIPcreateWorstCaseProfile ( SCIP scip,
SCIP_PROFILE profile,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands 
)

creates the worst case resource profile, that is, all jobs are inserted with the earliest start and latest completion time

Parameters
scipSCIP data structure
profileresource profile
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands

Definition at line 14387 of file cons_cumulative.c.

References computeImpliedEst(), computeImpliedLct(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPcomputeHmin(), SCIPconvertRealToInt(), SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsertInt(), SCIPprofileInsertCore(), SCIPsortDownIntInt(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), propagateCons(), and SCIPsolveCumulative().

◆ SCIPcomputeHmin()

SCIP_EXPORT int SCIPcomputeHmin ( SCIP scip,
SCIP_PROFILE profile,
int  capacity 
)

computes w.r.t. the given worst case resource profile the first time point where the given capacity can be violated

Parameters
scipSCIP data structure
profileworst case resource profile
capacitycapacity to check

Definition at line 14466 of file cons_cumulative.c.

References SCIPcomputeHmax(), SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), propagateCons(), and SCIPcreateWorstCaseProfile().

◆ SCIPcomputeHmax()

SCIP_EXPORT int SCIPcomputeHmax ( SCIP scip,
SCIP_PROFILE profile,
int  capacity 
)

computes w.r.t. the given worst case resource profile the first time point where the given capacity is satisfied for sure

Parameters
scipSCIP data structure
profileworst case profile
capacitycapacity to check

Definition at line 14496 of file cons_cumulative.c.

References SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcomputeHmin().

◆ SCIPcreateConsDisjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsDisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss,
SCIP_CONS relaxcons,
SCIP_Bool  initial,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic 
)

creates and captures a disjunction constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in disjunction
conssinitial constraint in disjunction
relaxconsa conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.

Definition at line 1080 of file cons_disjunction.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicDisjunction(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by SCIPcreateConsBasicDisjunction(), and SCIPincludeConshdlrDisjunction().

◆ SCIPcreateConsBasicDisjunction()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicDisjunction ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nconss,
SCIP_CONS **  conss,
SCIP_CONS relaxcons 
)

creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsDisjunction(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsDisjunction() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nconssnumber of initial constraints in disjunction
conssinitial constraint in disjunction
relaxconsa conjunction constraint containing the linear relaxation of the disjunction constraint, or NULL

Definition at line 1132 of file cons_disjunction.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsElemDisjunction(), SCIPcreateConsDisjunction(), and TRUE.

Referenced by SCIPcreateConsDisjunction().

◆ SCIPaddConsElemDisjunction()

SCIP_EXPORT SCIP_RETCODE SCIPaddConsElemDisjunction ( SCIP scip,
SCIP_CONS cons,
SCIP_CONS addcons 
)

adds constraint to the disjunction of constraints

Parameters
scipSCIP data structure
consdisjunction constraint
addconsadditional constraint in disjunction

Definition at line 1151 of file cons_disjunction.c.

References consdataAddCons(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPcreateConsBasicDisjunction().

◆ SCIPcreateConsIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsIndicator ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR binvar,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  rhs,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures an indicator constraint

Note
binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint (indicator or quadratic)
namename of constraint
binvarbinary indicator variable (or NULL)
nvarsnumber of variables in the inequality
varsarray with variables of inequality (or NULL)
valsvalues of variables in inequality (or NULL)
rhsrhs of the inequality
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 7402 of file cons_indicator.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPblkmem(), SCIPceil(), SCIPconsAddUpgradeLocks(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicIndicator(), SCIPcreateConsLinear(), SCIPcreateConsQuadratic(), SCIPcreateVar(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNOrigVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPinfinity(), SCIPisIntegral(), SCIPisTransformed(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPsnprintf(), SCIPvarGetType(), SCIPvarIsIntegral(), and TRUE.

Referenced by createIndicatorConstraint(), readIndicators(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_LINCONSUPGD(), SCIPcreateConsBasicIndicator(), SCIPincludeConshdlrIndicator(), and upgradeIndicatorSuperindicator().

◆ SCIPcreateConsBasicIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicIndicator ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR binvar,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  rhs 
)

creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsIndicator() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint (indicator or quadratic)
namename of constraint
binvarbinary indicator variable (or NULL)
nvarsnumber of variables in the inequality
varsarray with variables of inequality (or NULL)
valsvalues of variables in inequality (or NULL)
rhsrhs of the inequality

Definition at line 7612 of file cons_indicator.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsIndicator(), SCIPcreateConsIndicatorLinCons(), and TRUE.

Referenced by SCIPcreateConsIndicator().

◆ SCIPcreateConsIndicatorLinCons()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsIndicatorLinCons ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR binvar,
SCIP_CONS lincons,
SCIP_VAR slackvar,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures an indicator constraint with given linear constraint and slack variable

Note
binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
we assume that slackvar actually appears in lincons and we also assume that it takes the role of a slack variable!
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
binvarbinary indicator variable (or NULL)
linconslinear constraint
slackvarslack variable
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 7641 of file cons_indicator.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPcaptureVar(), SCIPconsAddUpgradeLocks(), SCIPconsGetHdlr(), SCIPconsGetNUpgradeLocks(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCons(), SCIPcreateConsBasicIndicatorLinCons(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetNVarsLinear(), SCIPgetVarsLinear(), SCIPmarkDoNotMultaggrVar(), SCIPvarGetType(), and TRUE.

Referenced by createSubSCIP(), readIndicators(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicIndicator(), and SCIPcreateConsBasicIndicatorLinCons().

◆ SCIPcreateConsBasicIndicatorLinCons()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR binvar,
SCIP_CONS lincons,
SCIP_VAR slackvar 
)

creates and captures an indicator constraint with given linear constraint and slack variable in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

Note
binvar is checked to be binary only later. This enables a change of the type in procedures reading an instance.
we assume that slackvar actually appears in lincons and we also assume that it takes the role of a slack variable!
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
See also
SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
binvarbinary indicator variable (or NULL)
linconslinear constraint
slackvarslack variable

Definition at line 7783 of file cons_indicator.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarIndicator(), SCIPcreateConsIndicatorLinCons(), and TRUE.

Referenced by SCIPcreateConsIndicatorLinCons().

◆ SCIPaddVarIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPaddVarIndicator ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Real  val 
)

adds variable to the inequality of the indicator constraint

Parameters
scipSCIP data structure
consindicator constraint
varvariable to add to the inequality
valvalue of variable

Definition at line 7802 of file cons_indicator.c.

References CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetLinearConsIndicator(), SCIPisIntegral(), SCIPvarGetType(), and SCIPvarIsIntegral().

Referenced by SCIPcreateConsBasicIndicatorLinCons().

◆ SCIPgetLinearConsIndicator()

SCIP_EXPORT SCIP_CONS* SCIPgetLinearConsIndicator ( SCIP_CONS cons)

gets the linear constraint corresponding to the indicator constraint (may be NULL)

Parameters
consindicator constraint

Definition at line 7833 of file cons_indicator.c.

References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetLinearConsIndicator().

Referenced by computeRanks(), createSubSCIP(), SCIP_DECL_LINCONSUPGD(), SCIPaddVarIndicator(), SCIPwriteLp(), SCIPwriteMps(), and writeOpbConstraints().

◆ SCIPsetLinearConsIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPsetLinearConsIndicator ( SCIP scip,
SCIP_CONS cons,
SCIP_CONS lincons 
)

sets the linear constraint corresponding to the indicator constraint (may be NULL)

Parameters
scipSCIP data structure
consindicator constraint
linconslinear constraint

Definition at line 7850 of file cons_indicator.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPcaptureCons(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdelCons(), SCIPerrorMessage, SCIPgetBinaryVarIndicator(), SCIPgetNVarsLinear(), SCIPgetStage(), SCIPgetVarsLinear(), SCIPreleaseCons(), SCIPvarGetType(), and TRUE.

Referenced by SCIPgetLinearConsIndicator().

◆ SCIPsetBinaryVarIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPsetBinaryVarIndicator ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR binvar 
)

◆ SCIPgetBinaryVarIndicator()

◆ SCIPgetSlackVarIndicator()

SCIP_EXPORT SCIP_VAR* SCIPgetSlackVarIndicator ( SCIP_CONS cons)

gets slack variable corresponding to indicator constraint

Parameters
consindicator constraint

Definition at line 8012 of file cons_indicator.c.

References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPsetSlackVarUb().

Referenced by createSubSCIP(), SCIP_DECL_CONFLICTEXEC(), SCIPsetBinaryVarIndicator(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and writeOpbConstraints().

◆ SCIPsetSlackVarUb()

SCIP_EXPORT SCIP_RETCODE SCIPsetSlackVarUb ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  ub 
)

sets upper bound for slack variable corresponding to indicator constraint

Use with care if you know that the maximal violation of the corresponding constraint is at most ub. This bound might be improved automatically during the solution process.

Precondition
This method should only be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
consindicator constraint
ubupper bound for slack variable

Definition at line 8037 of file cons_indicator.c.

References CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgVarUb(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetStage(), and SCIPisViolatedIndicator().

Referenced by SCIPgetSlackVarIndicator().

◆ SCIPisViolatedIndicator()

SCIP_EXPORT SCIP_Bool SCIPisViolatedIndicator ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol 
)

checks whether indicator constraint is violated w.r.t. sol

Parameters
scipSCIP data structure
consindicator constraint
solsolution, or NULL to use current node's solution

Definition at line 8063 of file cons_indicator.c.

References FALSE, NULL, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPgetSolVal(), SCIPisFeasPositive(), SCIPmakeIndicatorFeasible(), and TRUE.

Referenced by SCIP_DECL_CONSGETDIVEBDCHGS(), and SCIPsetSlackVarUb().

◆ SCIPmakeIndicatorFeasible()

SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorFeasible ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol,
SCIP_Bool changed 
)

based on values of other variables, computes slack and binary variable to turn constraint feasible

based on values of other variables, computes slack and binary variable to turn constraint feasible

It will also clean up the solution, i.e., shift slack variable, as follows:

If the inequality is \(a^T x + \gamma\, s \leq \beta\), the value of the slack variable \(s\) to achieve equality is

\[ s^* = \frac{\beta - a^T x^*}{\gamma}, \]

where \(x^*\) is the given solution. In case of \(a^T x + \gamma\, s \geq \alpha\), we arrive at

\[ s^* = \frac{\alpha - a^T x^*}{\gamma}. \]

The typical values of \(\gamma\) in the first case is -1 and +1 in the second case.

Now, let \(\sigma\) be the sign of \(\gamma\) in the first case and \(-\gamma\) in the second case. Thus, if \(\sigma > 0\) and \(s^* < 0\), the inequality cannot be satisfied by a nonnegative value for the slack variable; in this case, we have to leave the values as they are. If \(\sigma < 0\) and \(s^* > 0\), the solution violates the indicator constraint (we can set the slack variable to value \(s^*\)). If \(\sigma < 0\) and \(s^* \leq 0\) or \(\sigma > 0\) and \(s^* \geq 0\), the constraint is satisfied, and we can set the slack variable to 0.

Parameters
scipSCIP data structure
consindicator constraint
solsolution
changedpointer to store whether the solution has been changed

Definition at line 8118 of file cons_indicator.c.

References CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPmakeIndicatorsFeasible(), SCIPsetSolVal(), SCIPvarGetLbLocal(), SCIPvarGetNegationVar(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetStatus(), TRUE, and varGetObjDelta().

Referenced by SCIP_DECL_CONSCHECK(), SCIPisViolatedIndicator(), and SCIPmakeIndicatorsFeasible().

◆ SCIPmakeIndicatorsFeasible()

SCIP_EXPORT SCIP_RETCODE SCIPmakeIndicatorsFeasible ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_SOL sol,
SCIP_Bool changed 
)

based on values of other variables, computes slack and binary variable to turn all constraints feasible

Parameters
scipSCIP data structure
conshdlrindicator constraint handler
solsolution
changedpointer to store whether the solution has been changed

Definition at line 8293 of file cons_indicator.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITPRESOLVE, SCIPaddLinearConsIndicator(), SCIPconsGetData(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPgetStage(), and SCIPmakeIndicatorFeasible().

Referenced by SCIPmakeIndicatorFeasible(), and SCIPperformGenericDivingAlgorithm().

◆ SCIPaddLinearConsIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPaddLinearConsIndicator ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS lincons 
)

adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation

Parameters
scipSCIP data structure
conshdlrindicator constraint handler
linconslinear constraint

Definition at line 8340 of file cons_indicator.c.

References consdataEnsureAddLinConsSize(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddRowIndicator(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconsIsLocal().

Referenced by SCIPmakeIndicatorsFeasible().

◆ SCIPaddRowIndicator()

SCIP_EXPORT SCIP_RETCODE SCIPaddRowIndicator ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_ROW row 
)

adds additional globally valid row that is not connected with an indicator constraint, but can be used for separation

adds additional row that is not connected with an indicator constraint, but can be used for separation

Note
The row is directly added to the alternative polyhedron and is not stored.
Parameters
scipSCIP data structure
conshdlrindicator constraint handler
rowrow to add

Definition at line 8372 of file cons_indicator.c.

References addAltLPRow(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIProwGetName(), and SCIProwIsLocal().

Referenced by SCIP_DECL_CONSINITLP(), SCIPaddLinearConsIndicator(), and separatePoint().

◆ SCIPcreateConsKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsKnapsack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_Longint weights,
SCIP_Longint  capacity,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a knapsack constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a knapsack constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()! [SnippetConsCreationKnapsack]
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of items in the knapsack
varsarray with item variables
weightsarray with item weights
capacitycapacity of knapsack (right hand side of inequality)
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 13440 of file cons_knapsack.c.

References catchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicKnapsack(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPisTransformed().

Referenced by createAndAddLinearCons(), createCapacityRestriction(), createMipCpFormulation(), createNormalizedKnapsack(), createRow(), presolRoundCardinality(), and SCIPcreateConsBasicKnapsack().

◆ SCIPcreateConsBasicKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicKnapsack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_Longint weights,
SCIP_Longint  capacity 
)

creates and captures a knapsack constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsKnapsack(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsKnapsack() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

! [SnippetConsCreationKnapsack] creates and captures a knapsack constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsKnapsack(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsKnapsack() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of items in the knapsack
varsarray with item variables
weightsarray with item weights
capacitycapacity of knapsack

Definition at line 13515 of file cons_knapsack.c.

References FALSE, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddCoefKnapsack(), SCIPcreateConsKnapsack(), and TRUE.

Referenced by createIntervalRelaxation(), createMipFormulation(), initPricing(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsKnapsack().

◆ SCIPaddCoefKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPaddCoefKnapsack ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Longint  weight 
)

adds new item to knapsack constraint

Parameters
scipSCIP data structure
consconstraint data
varitem variable
weightitem weight

Definition at line 13534 of file cons_knapsack.c.

Referenced by addCoefTerm(), createCapacityRestriction(), createIntervalRelaxation(), createMipCpFormulation(), createMipFormulation(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddCoefPseudoboolean(), SCIPconsAddCoef(), and SCIPcreateConsBasicKnapsack().

◆ SCIPgetCapacityKnapsack()

◆ SCIPchgCapacityKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPchgCapacityKnapsack ( SCIP scip,
SCIP_CONS cons,
SCIP_Longint  capacity 
)

changes capacity of the knapsack constraint

Note
This method can only be called during problem creation stage (SCIP_STAGE_PROBLEM)
Parameters
scipSCIP data structure
consconstraint data
capacitynew capacity of knapsack

Definition at line 13582 of file cons_knapsack.c.

Referenced by SCIPgetCapacityKnapsack().

◆ SCIPgetNVarsKnapsack()

◆ SCIPgetVarsKnapsack()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsKnapsack ( SCIP scip,
SCIP_CONS cons 
)

◆ SCIPgetWeightsKnapsack()

SCIP_EXPORT SCIP_Longint* SCIPgetWeightsKnapsack ( SCIP scip,
SCIP_CONS cons 
)

◆ SCIPgetDualsolKnapsack()

SCIP_EXPORT SCIP_Real SCIPgetDualsolKnapsack ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the knapsack constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13682 of file cons_knapsack.c.

References NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetDualfarkasKnapsack(), and SCIProwGetDualsol().

Referenced by SCIPconsGetDualsol(), and SCIPgetWeightsKnapsack().

◆ SCIPgetDualfarkasKnapsack()

SCIP_EXPORT SCIP_Real SCIPgetDualfarkasKnapsack ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the knapsack constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13708 of file cons_knapsack.c.

References NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetRowKnapsack(), and SCIProwGetDualfarkas().

Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolKnapsack().

◆ SCIPgetRowKnapsack()

SCIP_EXPORT SCIP_ROW* SCIPgetRowKnapsack ( SCIP scip,
SCIP_CONS cons 
)

returns the linear relaxation of the given knapsack constraint; may return NULL if no LP row was yet created; the user must not modify the row!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13736 of file cons_knapsack.c.

References NULL, SCIP_Bool, SCIPABORT, SCIPcleanupConssKnapsack(), SCIPconsGetData(), and SCIPerrorMessage.

Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasKnapsack().

◆ SCIPsolveKnapsackExactly()

SCIP_EXPORT SCIP_RETCODE SCIPsolveKnapsackExactly ( SCIP scip,
int  nitems,
SCIP_Longint weights,
SCIP_Real profits,
SCIP_Longint  capacity,
int *  items,
int *  solitems,
int *  nonsolitems,
int *  nsolitems,
int *  nnonsolitems,
SCIP_Real solval,
SCIP_Bool success 
)

solves knapsack problem in maximization form exactly using dynamic programming; if needed, one can provide arrays to store all selected items and all not selected items

Note
in case you provide the solitems or nonsolitems array you also have to provide the counter part, as well
the algorithm will first compute a greedy solution and terminate if the greedy solution is proven to be optimal. The dynamic programming algorithm runs with a time and space complexity of O(nitems * capacity).

solves knapsack problem in maximization form exactly using dynamic programming; if needed, one can provide arrays to store all selected items and all not selected items

Note
in case you provide the solitems or nonsolitems array you also have to provide the counter part, as well
the algorithm will first compute a greedy solution and terminate if the greedy solution is proven to be optimal. The dynamic programming algorithm runs with a time and space complexity of O(nitems * capacity).
Parameters
scipSCIP data structure
nitemsnumber of available items
weightsitem weights
profitsitem profits
capacitycapacity of knapsack
itemsitem numbers
solitemsarray to store items in solution, or NULL
nonsolitemsarray to store items not in solution, or NULL
nsolitemspointer to store number of items in solution, or NULL
nnonsolitemspointer to store number of items not in solution, or NULL
solvalpointer to store optimal solution value, or NULL
successpointer to store if an error occured during solving (normally a memory problem)

Definition at line 1043 of file cons_knapsack.c.

References FALSE, IDX, MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_NOMEMORY, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcGreComDiv(), SCIPdebugMsg, SCIPfloor(), SCIPfreeBufferArray, SCIPisGE(), SCIPisIntegral(), SCIPselectWeightedDownRealLongRealInt(), SCIPsolveKnapsackApproximately(), SCIPsortDownRealIntLong(), and TRUE.

Referenced by buildFlowCover(), and getHighestCapacityUsage().

◆ SCIPsolveKnapsackApproximately()

SCIP_EXPORT SCIP_RETCODE SCIPsolveKnapsackApproximately ( SCIP scip,
int  nitems,
SCIP_Longint weights,
SCIP_Real profits,
SCIP_Longint  capacity,
int *  items,
int *  solitems,
int *  nonsolitems,
int *  nsolitems,
int *  nnonsolitems,
SCIP_Real solval 
)

solves knapsack problem in maximization form approximately by solving the LP-relaxation of the problem using Dantzig's method and rounding down the solution; if needed, one can provide arrays to store all selected items and all not selected items

Parameters
scipSCIP data structure
nitemsnumber of available items
weightsitem weights
profitsitem profits
capacitycapacity of knapsack
itemsitem numbers
solitemsarray to store items in solution, or NULL
nonsolitemsarray to store items not in solution, or NULL
nsolitemspointer to store number of items in solution, or NULL
nnonsolitemspointer to store number of items not in solution, or NULL
solvalpointer 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, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPisFeasGT(), SCIPselectWeightedDownRealLongRealInt(), and SCIPvarGetName().

Referenced by getCover(), and SCIPsolveKnapsackExactly().

◆ SCIPseparateKnapsackCuts()

SCIP_EXPORT SCIP_RETCODE SCIPseparateKnapsackCuts ( SCIP scip,
SCIP_CONS cons,
SCIP_SEPA sepa,
SCIP_VAR **  vars,
int  nvars,
SCIP_Longint weights,
SCIP_Longint  capacity,
SCIP_SOL sol,
SCIP_Bool  usegubs,
SCIP_Bool cutoff,
int *  ncuts 
)

separates different classes of valid inequalities for the 0-1 knapsack problem

Parameters
scipSCIP data structure
consoriginating constraint of the knapsack problem, or NULL
sepaoriginating separator of the knapsack problem, or NULL
varsvariables in knapsack constraint
nvarsnumber of variables in knapsack constraint
weightsweights of variables in knapsack constraint
capacitycapacity of knapsack
solprimal SCIP solution to separate, NULL for current LP solution
usegubsshould GUB information be used for separation?
cutoffpointer to store whether a cutoff has been detected
ncutspointer to add up the number of found cuts

Definition at line 5508 of file cons_knapsack.c.

References FALSE, getCover(), getFeasibleSet(), GUBsetCreate(), GUBsetFree(), GUBsetGetCliquePartition(), makeCoverMinimal(), SCIP_GUBSet::ngubconss, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPfreeBufferArray, SCIPgetSolVals(), SCIPincConsAge(), SCIPseparateRelaxedKnapsack(), SCIPvarGetName(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), TRUE, and USESUPADDLIFT.

Referenced by getFeasibleSet(), SCIPseparateRelaxedKnapsack(), and separateCons().

◆ SCIPseparateRelaxedKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPseparateRelaxedKnapsack ( SCIP scip,
SCIP_CONS cons,
SCIP_SEPA sepa,
int  nknapvars,
SCIP_VAR **  knapvars,
SCIP_Real knapvals,
SCIP_Real  valscale,
SCIP_Real  rhs,
SCIP_SOL sol,
SCIP_Bool cutoff,
int *  ncuts 
)
Parameters
scipSCIP data structure
consoriginating constraint of the knapsack problem, or NULL
sepaoriginating separator of the knapsack problem, or NULL
nknapvarsnumber of variables in the continuous knapsack constraint
knapvarsvariables in the continuous knapsack constraint
knapvalscoefficients 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
rhsright hand side of the continuous knapsack constraint
solprimal CIP solution, NULL for current LP solution
cutoffpointer to store whether a cutoff was found
ncutspointer to add up the number of found cuts

Definition at line 5725 of file cons_knapsack.c.

References BMSclearMemoryArray, CONSHDLR_NAME, DEFAULT_USEGUBS, FALSE, KNAPSACKRELAX_MAXDELTA, KNAPSACKRELAX_MAXDNOM, KNAPSACKRELAX_MAXSCALE, MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcIntegralScalar(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPepsilon(), SCIPfeasFloor(), SCIPfindConshdlr(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetNContVars(), SCIPgetNegatedVar(), SCIPgetNVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPreallocBlockMemoryArray, SCIPseparateKnapsackCuts(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), SCIPvarIsBinary(), separateCons(), and TRUE.

Referenced by addCut(), and SCIPseparateKnapsackCuts().

◆ SCIPcleanupConssKnapsack()

SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssKnapsack ( SCIP scip,
SCIP_Bool  onlychecked,
SCIP_Bool infeasible 
)

cleans up (multi-)aggregations and fixings from knapsack constraints

Parameters
scipSCIP data structure
onlycheckedshould only checked constraints be cleaned up?
infeasiblepointer to return whether the problem was detected to be infeasible

Definition at line 13759 of file cons_knapsack.c.

Referenced by SCIPgetRowKnapsack(), and SCIPmatrixCreate().

◆ SCIPincludeLinconsUpgrade()

SCIP_EXPORT SCIP_RETCODE SCIPincludeLinconsUpgrade ( SCIP scip,
SCIP_DECL_LINCONSUPGD((*linconsupgd))  ,
int  priority,
const char *  conshdlrname 
)

includes a linear constraint update method into the linear constraint handler

Parameters
scipSCIP data structure
prioritypriority of upgrading method
conshdlrnamename of the constraint handler

Definition at line 17696 of file cons_linear.c.

Referenced by SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrLogicor(), SCIPincludeConshdlrVarbound(), and SCIPincludeConshdlrXor().

◆ SCIPcreateConsLinear()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLinear ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a linear constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of nonzeros in the constraint
varsarray with variables of constraint entries
valsarray with coefficients of constraint entries
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 17748 of file cons_linear.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIPABORT, SCIPcreateCons(), SCIPcreateConsBasicLinear(), SCIPcreateConsLinear(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarIsRelaxationOnly(), and TRUE.

Referenced by addBranchingComplementaritiesSOS1(), addExtendedAsymmetricFormulation(), addExtendedFlowFormulation(), addLocalBranchingConstraint(), addLocalbranchingConstraintAndObjcutoff(), addLocalConss(), addTrustRegionConstraints(), aggregateConstraints(), aggregation(), applyFixings(), branchOnVertex(), cancelRow(), consdataLinearize(), copyCuts(), CREATE_CONSTRAINT(), createAndAddLinearCons(), createAndAddProofcons(), createConstraints(), createCoveringProblem(), createDegreeConstraints(), createHopConstraint(), createLinearCons(), createMipCpFormulation(), createNAryBranch(), createPrizeConstraints(), createProbOnlyEdge(), createProbSimplified(), createProbSimplifiedTest(), createRows(), createSubSCIP(), createSubscip(), dualPresolve(), execmain(), fixDeleteOrUpgradeCons(), fixVariableZeroNode(), forbidCover(), getFixedVariable(), preprocessConstraintPairs(), presolveCreateBenTalNemirovskiApproxDim3(), presolveCreateGlineurApproxDim3(), presolveFindDuplicates(), presolveFindDuplicatesUpgradeCons(), presolveRemoveFixedVariables(), presolveTryAddLinearReform(), propIndicator(), scipexamples::QueensSolver::QueensSolver(), readCnf(), readConstraints(), readOPBFile(), readRows(), readRowsMop(), replaceByLinearConstraints(), replaceViolatedByLinearConstraints(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERREAD(), SCIPaddTrustregionNeighborhoodConstraint(), SCIPcopyConsLinear(), SCIPcreateConsIndicator(), SCIPcreateConsLinear(), SCIPgetVarCopy(), SCIPStpDualAscent(), SCIPStpDualAscentPcMw(), selectVarMultAggrBranching(), setupAndSolveSubscip(), setupSubproblem(), setupSubScip(), tightenBounds(), tightenSingleVar(), tryUpgradingLogicor(), tryUpgradingSetppc(), and upgradeLinearSuperindicator().

◆ SCIPcreateConsBasicLinear()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLinear ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  lhs,
SCIP_Real  rhs 
)

creates and captures a linear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsLinear() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of nonzeros in the constraint
varsarray with variables of constraint entries
valsarray with coefficients of constraint entries
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 17937 of file cons_linear.c.

Referenced by addLocalBranchingConstraint(), applyRepair(), polyscip::Polyscip::computeNondomPoints(), createAndAddTransferredCut(), createAndApplyStoredBendersCut(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMasterproblem(), createMIP(), createMipFormulation(), createOriginalproblem(), createProbSimplified(), createProbSimplifiedTest(), createSubproblem(), createSubproblems(), disaggregate(), generateAndApplyBendersCuts(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), infinityCountUpdate(), main(), readLIBSVM(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcreateConsLinear(), SCIPgenerateAndApplyBendersOptCut(), SCIPincludePresolMILP(), SCIPverifyCircularPatternNLP(), setupAndSolveFiniteSolSubscip(), setupProblem(), and solvePricingMINLP().

◆ SCIPcopyConsLinear()

SCIP_EXPORT SCIP_RETCODE SCIPcopyConsLinear ( SCIP scip,
SCIP_CONS **  cons,
SCIP sourcescip,
const char *  name,
int  nvars,
SCIP_VAR **  sourcevars,
SCIP_Real sourcecoefs,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_HASHMAP varmap,
SCIP_HASHMAP consmap,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode,
SCIP_Bool  global,
SCIP_Bool valid 
)

creates by copying and captures a linear constraint

Parameters
sciptarget SCIP data structure
conspointer to store the created target constraint
sourcescipsource SCIP data structure
namename of constraint
nvarsnumber of variables in source variable array
sourcevarssource variables of the linear constraints
sourcecoefscoefficient array of the linear constraint, or NULL if all coefficients are one
lhsleft hand side of the linear constraint
rhsright hand side of the linear constraint
varmapa SCIP_HASHMAP mapping variables of the source SCIP to corresponding variables of the target SCIP
consmapa hashmap to store the mapping of source constraints to the corresponding target constraints
initialshould the LP relaxation of constraint be in the initial LP?
separateshould the constraint be separated during LP processing?
enforceshould the constraint be enforced during node processing?
checkshould the constraint be checked for feasibility?
propagateshould the constraint be propagated during node processing?
localis constraint only valid locally?
modifiableis constraint modifiable (subject to column generation)?
dynamicis constraint subject to aging?
removableshould the relaxation be removed from the LP due to aging or cleanup?
stickingatnodeshould the constraint always be kept at the node where it was added, even if it may be moved to a more global node?
globalcreate a global or a local copy?
validpointer to store if the copying was valid

Definition at line 17957 of file cons_linear.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPcreateConsLinear(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetVarCopy(), SCIPisGT(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), SCIPvarIsRelaxationOnly(), and TRUE.

Referenced by SCIP_DECL_CONSCOPY().

◆ SCIPaddCoefLinear()

SCIP_EXPORT SCIP_RETCODE SCIPaddCoefLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Real  val 
)

adds coefficient to linear constraint (if it is not zero)

Parameters
scipSCIP data structure
consconstraint data
varvariable of constraint entry
valcoefficient of constraint entry

Definition at line 18089 of file cons_linear.c.

References addCoef(), chgLhs(), chgRhs(), CONSHDLR_NAME, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPchgCoefLinear(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPinfinity(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetName(), and TRUE.

Referenced by ObjPricerVRP::add_tour_variable(), addAuxiliaryVariableToCut(), addCoefTerm(), addVariable(), applyFixings(), applyRepair(), branchOnVertex(), computeNogoodCut(), computeStandardIntegerOptCut(), consdataLinearize(), createAndAddLinearCons(), createAndAddProofcons(), createAndAddTransferredCut(), createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), createKKTDualCons(), createMasterproblem(), createMIP(), createMipCpFormulation(), createMipFormulation(), createOriginalproblem(), createProbOnlyEdge(), createProbSimplified(), createProbSimplifiedTest(), createSubproblem(), createSubproblems(), createSubSCIP(), createVariables(), execmain(), getBoundConsFromVertices(), main(), presolveAddKKTLinearCons(), presolveAddKKTQuadBilinearTerms(), presolveAddKKTQuadLinearTerms(), presolveAddKKTQuadQuadraticTerms(), pricing(), scipexamples::QueensSolver::QueensSolver(), readCols(), readColsMop(), readIndicators(), readLinearCoefs(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERREAD(), SCIPaddCoefPseudoboolean(), SCIPaddVarIndicator(), SCIPapplyProximity(), SCIPbendersMergeSubproblemIntoMaster(), SCIPchgCoefLinear(), SCIPconsAddCoef(), SCIPcopyConsLinear(), SCIPcreateConsIndicator(), SCIPgenerateAndApplyBendersOptCut(), SCIPgetVarCopy(), SCIPprobdataAddNewSol(), SCIPStpDualAscent(), SCIPStpDualAscentPcMw(), SCIPverifyCircularPatternNLP(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscip(), setupProblem(), setupSubproblem(), setupSubScip(), solvePricingMINLP(), tightenSingleVar(), tryUpgradingLogicor(), and tryUpgradingSetppc().

◆ SCIPchgCoefLinear()

SCIP_EXPORT SCIP_RETCODE SCIPchgCoefLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Real  val 
)

changes coefficient of variable in linear constraint; deletes the variable if coefficient is zero; adds variable if not yet contained in the constraint

Note
This method may only be called during problem creation stage for an original constraint and variable.
This method requires linear time to search for occurences of the variable in the constraint data.
Parameters
scipSCIP data structure
consconstraint data
varvariable of constraint entry
valnew coefficient of constraint entry

Definition at line 18250 of file cons_linear.c.

References chgCoefPos(), delCoefPos(), FALSE, NULL, 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 addScenarioVarsAndConsToProb(), SCIPaddCoefLinear(), and SCIPchgCoefLinear().

◆ SCIPdelCoefLinear()

SCIP_EXPORT SCIP_RETCODE SCIPdelCoefLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var 
)

deletes variable from linear constraint

Note
This method may only be called during problem creation stage for an original constraint and variable.
This method requires linear time to search for occurences of the variable in the constraint data.
Parameters
scipSCIP data structure
consconstraint data
varvariable of constraint entry

Definition at line 18318 of file cons_linear.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPchgCoefLinear().

◆ SCIPgetLhsLinear()

◆ SCIPgetRhsLinear()

◆ SCIPchgLhsLinear()

◆ SCIPchgRhsLinear()

◆ SCIPgetNVarsLinear()

◆ SCIPgetVarsLinear()

◆ SCIPgetValsLinear()

◆ SCIPgetActivityLinear()

SCIP_EXPORT SCIP_Real SCIPgetActivityLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol 
)

gets the activity of the linear constraint in the given solution

Note
if the solution contains values at infinity, this method will return SCIP_INVALID in case the activity comprises positive and negative infinity contributions
Parameters
scipSCIP data structure
consconstraint data
solsolution, or NULL to use current node's solution

Definition at line 18497 of file cons_linear.c.

Referenced by computeNogoodCut(), computeStandardIntegerOptCut(), generateAndApplyBendersCuts(), and SCIPgenerateAndApplyBendersOptCut().

◆ SCIPgetFeasibilityLinear()

SCIP_EXPORT SCIP_Real SCIPgetFeasibilityLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol 
)

gets the feasibility of the linear constraint in the given solution

Parameters
scipSCIP data structure
consconstraint data
solsolution, or NULL to use current node's solution

Definition at line 18525 of file cons_linear.c.

◆ SCIPgetDualsolLinear()

SCIP_EXPORT SCIP_Real SCIPgetDualsolLinear ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the linear constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 18553 of file cons_linear.c.

Referenced by ObjPricerVRP::pricing(), pricing(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_PRICERREDCOST(), SCIPconsGetDualsol(), and SCIPgetDualSolVal().

◆ SCIPgetDualfarkasLinear()

SCIP_EXPORT SCIP_Real SCIPgetDualfarkasLinear ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the linear constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 18581 of file cons_linear.c.

Referenced by ObjPricerVRP::pricing(), pricing(), and SCIPconsGetDualfarkas().

◆ SCIPgetRowLinear()

SCIP_EXPORT SCIP_ROW* SCIPgetRowLinear ( SCIP scip,
SCIP_CONS cons 
)

returns the linear relaxation of the given linear constraint; may return NULL if no LP row was yet created; the user must not modify the row!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 18611 of file cons_linear.c.

Referenced by SCIPconsGetRow().

◆ SCIPupgradeConsLinear()

SCIP_EXPORT SCIP_RETCODE SCIPupgradeConsLinear ( SCIP scip,
SCIP_CONS cons,
SCIP_CONS **  upgdcons 
)

tries to automatically convert a linear constraint into a more specific and more specialized constraint

Parameters
scipSCIP data structure
conssource constraint to try to convert
upgdconspointer to store upgraded constraint, or NULL if not successful

Definition at line 18635 of file cons_linear.c.

Referenced by createAndAddProofcons().

◆ SCIPclassifyConstraintTypesLinear()

SCIP_EXPORT SCIP_RETCODE SCIPclassifyConstraintTypesLinear ( SCIP scip,
SCIP_LINCONSSTATS linconsstats 
)

performs linear constraint type classification as used for MIPLIB

iterates through all linear constraints and stores relevant statistics in the linear constraint statistics linconsstats.

Note
only constraints are iterated that belong to the linear constraint handler. If the problem has been presolved already, constraints that were upgraded to more special types such as, e.g., varbound constraints, will not be shown correctly anymore. Similarly, if specialized constraints were created through the API, these are currently not present.
Parameters
scipSCIP data structure
linconsstatslinear constraint type classification

Definition at line 15257 of file cons_linear.c.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPcleanupConssLinear()

SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssLinear ( SCIP scip,
SCIP_Bool  onlychecked,
SCIP_Bool infeasible 
)

cleans up (multi-)aggregations and fixings from linear constraints

Parameters
scipSCIP data structure
onlycheckedshould only checked constraints be cleaned up?
infeasiblepointer to return whether the problem was detected to be infeasible

Definition at line 18875 of file cons_linear.c.

References applyFixings(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPmatrixCreate().

◆ SCIPcreateConsLinking()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLinking ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR linkvar,
SCIP_VAR **  binvars,
SCIP_Real vals,
int  nbinvars,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a linking constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
linkvarlinking variable (continuous or integer) which should be linked
binvarsbinary variables
valscoefficients of the binary variables
nbinvarsnumber of binary starting variables
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 3335 of file cons_linking.c.

References consdataCreate(), consdataCreateBinvars(), CONSHDLR_NAME, getHashmapKey(), HASHSIZE_BINVARSCONS, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPblkmem(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPdebugMsg, SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetName(), and SCIPvarGetUbGlobal().

Referenced by consdataCollectLinkingCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicLinking().

◆ SCIPcreateConsBasicLinking()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLinking ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR linkvar,
SCIP_VAR **  binvars,
SCIP_Real vals,
int  nbinvars 
)

creates and captures a linking constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinking(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsLinking() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a linking constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinking(); all flags can be set via SCIPsetCons<Flagname>-methods in scip.h

See also
SCIPcreateConsLinking() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
linkvarlinking variable (continuous or integer) which should be linked
binvarsbinary variables, or NULL
valscoefficients of the binary variables
nbinvarsnumber of binary variables

Definition at line 3432 of file cons_linking.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsLinking(), and TRUE.

◆ SCIPexistsConsLinking()

SCIP_EXPORT SCIP_Bool SCIPexistsConsLinking ( SCIP scip,
SCIP_VAR linkvar 
)

checks if for the given linking variable (continuous or integer) a linking constraint exists

Parameters
scipSCIP data structure
linkvarlinking variable (continuous or integer) which should be linked

Definition at line 3451 of file cons_linking.c.

References CONSHDLR_NAME, getHashmapKey(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapExists().

Referenced by collectBinaryVars(), and consdataCollectLinkingCons().

◆ SCIPgetConsLinking()

SCIP_EXPORT SCIP_CONS* SCIPgetConsLinking ( SCIP scip,
SCIP_VAR linkvar 
)

returns the linking constraint belonging the given linking variable (continuous or integer) or NULL if it does not exist yet

Parameters
scipSCIP data structure
linkvarlinking variable (continuous or integer) which should be linked

Definition at line 3469 of file cons_linking.c.

References CONSHDLR_NAME, getHashmapKey(), NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPhashmapGetImage().

Referenced by collectBinaryVars(), consdataCollectLinkingCons(), and consdataCreate().

◆ SCIPgetLinkvarLinking()

SCIP_EXPORT SCIP_VAR* SCIPgetLinkvarLinking ( SCIP scip,
SCIP_CONS cons 
)

returns the linking variable (continuous or integer) of the linking constraint

Parameters
scipSCIP data structure
conslinking constraint

Definition at line 3490 of file cons_linking.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by computeSymmetryGroup().

◆ SCIPgetBinvarsLinking()

SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsLinking ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR ***  binvars,
int *  nbinvars 
)

returns the binary variables of the linking constraint

Parameters
scipSCIP data structure
conslinking constraint
binvarspointer to store the binary variables array pointer
nbinvarspointer to store the number of returned binary variables

Definition at line 3513 of file cons_linking.c.

References consdataCreateBinvars(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by collectBinaryVars(), computeSymmetryGroup(), createCoverCutsTimepoint(), and SCIPmatrixCreate().

◆ SCIPgetNBinvarsLinking()

SCIP_EXPORT int SCIPgetNBinvarsLinking ( SCIP scip,
SCIP_CONS cons 
)

returns the number of binary variables of the linking constraint

Parameters
scipSCIP data structure
conslinking constraint

Definition at line 3559 of file cons_linking.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

◆ SCIPgetValsLinking()

SCIP_EXPORT SCIP_Real* SCIPgetValsLinking ( SCIP scip,
SCIP_CONS cons 
)

returns the coefficients of the binary variables

Parameters
scipSCIP data structure
conslinking constraint

Definition at line 3582 of file cons_linking.c.

References consdataSort(), CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by collectBinaryVars(), computeSymmetryGroup(), createCoverCutsTimepoint(), and SCIPmatrixCreate().

◆ SCIPgetBinvarsDataLinking()

SCIP_EXPORT SCIP_RETCODE SCIPgetBinvarsDataLinking ( SCIP_CONS cons,
SCIP_VAR ***  binvars,
SCIP_Real **  vals,
int *  nbinvars 
)

return all binary variable information of the linking constraint

Parameters
conslinking constraint
binvarspointer to store binary variables, or NULL
valspointer to store the binary coefficients, or NULL
nbinvarspointer to store the number of binary variables, or NULL

Definition at line 3606 of file cons_linking.c.

References consdataSort(), CONSHDLR_NAME, NULL, SCIP_ERROR, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

◆ SCIPcreateConsLogicor()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsLogicor ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a logic or constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 5207 of file cons_logicor.c.

References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARFIXED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIPcatchVarEvent(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicLogicor(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), and SCIPisTransformed().

Referenced by addSplitcons(), applyCliqueFixings(), BENDERS_CUTORACLE(), consdataLinearize(), createAndAddLinearCons(), createConflict(), createConflictCons(), createNormalizedLogicor(), extendToCover(), readCnf(), SCIP_DECL_CONFLICTEXEC(), SCIPcreateConsBasicLogicor(), SCIPincludeConshdlrLogicor(), SCIPreoptApplyGlbConss(), and upgradeCons().

◆ SCIPcreateConsBasicLogicor()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicLogicor ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars 
)

creates and captures a logicor constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLogicor(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsLogicor() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries

Definition at line 5284 of file cons_logicor.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLogicor(), SCIPcreateConsLogicor(), and TRUE.

Referenced by addFixedVarsConss(), createProbQP(), createProbSimplified(), createProbSimplifiedTest(), and SCIPcreateConsLogicor().

◆ SCIPaddCoefLogicor()

SCIP_EXPORT SCIP_RETCODE SCIPaddCoefLogicor ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var 
)

adds coefficient in logic or constraint

Parameters
scipSCIP data structure
conslogicor constraint
varvariable to add to the constraint

Definition at line 5301 of file cons_logicor.c.

References addCoef(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsLogicor().

Referenced by addCoefTerm(), createConflictCons(), createProbQP(), createProbSimplified(), createProbSimplifiedTest(), SCIPaddCoefPseudoboolean(), SCIPconsAddCoef(), and SCIPcreateConsBasicLogicor().

◆ SCIPgetNVarsLogicor()

◆ SCIPgetVarsLogicor()

◆ SCIPgetDualsolLogicor()

SCIP_EXPORT SCIP_Real SCIPgetDualsolLogicor ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the logic or constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5370 of file cons_logicor.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasLogicor(), and SCIProwGetDualsol().

Referenced by SCIPconsGetDualsol(), and SCIPgetVarsLogicor().

◆ SCIPgetDualfarkasLogicor()

SCIP_EXPORT SCIP_Real SCIPgetDualfarkasLogicor ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the logic or constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5396 of file cons_logicor.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowLogicor(), and SCIProwGetDualfarkas().

Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolLogicor().

◆ SCIPgetRowLogicor()

SCIP_EXPORT SCIP_ROW* SCIPgetRowLogicor ( SCIP scip,
SCIP_CONS cons 
)

returns the linear relaxation of the given logic or constraint; may return NULL if no LP row was yet created; the user must not modify the row!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5424 of file cons_logicor.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcleanupConssLogicor(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasLogicor().

◆ SCIPcleanupConssLogicor()

SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssLogicor ( SCIP scip,
SCIP_Bool  onlychecked,
int *  naddconss,
int *  ndelconss,
int *  nchgcoefs 
)

cleans up (multi-)aggregations and fixings from logicor constraints

Parameters
scipSCIP data structure
onlycheckedshould only checked constraints be cleaned up?
naddconsspointer to count number of added (linear) constraints
ndelconsspointer to count number of deleted (logicor) constraints
nchgcoefspointer to count number of changed coefficients

Definition at line 5447 of file cons_logicor.c.

References applyFixings(), CONSHDLR_NAME, FALSE, mergeMultiples(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetNCheckConss(), SCIPconsIsDeleted(), SCIPdelCons(), SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNContVars(), and SCIPgetNVars().

Referenced by SCIPgetRowLogicor(), and SCIPmatrixCreate().

◆ SCIPincludeNonlinconsUpgrade()

SCIP_EXPORT SCIP_RETCODE SCIPincludeNonlinconsUpgrade ( SCIP scip,
SCIP_DECL_NONLINCONSUPGD((*nonlinconsupgd))  ,
SCIP_DECL_EXPRGRAPHNODEREFORM((*nodereform))  ,
int  priority,
SCIP_Bool  active,
const char *  conshdlrname 
)

◆ SCIPcreateConsNonlinear()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear variables in the constraint
linvarsarray with linear variables of constraint entries
lincoefsarray with coefficients of constraint linear entries
nexprtreesnumber of expression trees for nonlinear part of constraint
exprtreesexpression trees for nonlinear part of constraint
nonlincoefscoefficients for expression trees for nonlinear part, or NULL if all 1.0
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 9461 of file cons_nonlinear.c.

References addLinearCoef(), consdataCreateEmpty(), consdataEnsureLinearVarsSize(), consdataSetExprtrees(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicNonlinear()

SCIP_EXPORT 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

See also
SCIPcreateConsNonlinear() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear variables in the constraint
linvarsarray with linear variables of constraint entries
lincoefsarray with coefficients of constraint linear entries
nexprtreesnumber of expression trees for nonlinear part of constraint
exprtreesexpression trees for nonlinear part of constraint
nonlincoefscoefficients for expression trees for nonlinear part, or NULL if all 1.0
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 9554 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsNonlinear(), SCIPcreateConsNonlinear2(), and TRUE.

Referenced by SCIPcreateConsNonlinear(), and setupProblem().

◆ SCIPcreateConsNonlinear2()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear variables in the constraint
linvarsarray with linear variables of constraint entries
lincoefsarray with coefficients of constraint linear entries
exprgraphnodeexpression graph node associated to nonlinear expression
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 9584 of file cons_nonlinear.c.

References addLinearCoef(), consdataCreateEmpty(), consdataEnsureLinearVarsSize(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicNonlinear2()

SCIP_EXPORT 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

See also
SCIPcreateConsNonlinear2() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a 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

See also
SCIPcreateConsNonlinear() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear variables in the constraint
linvarsarray with linear variables of constraint entries
lincoefsarray with coefficients of constraint linear entries
exprgraphnodeexpression graph node associated to nonlinear expression
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 9682 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddLinearVarNonlinear(), SCIPcreateConsNonlinear2(), and TRUE.

Referenced by SCIPcreateConsNonlinear2().

◆ SCIPaddLinearVarNonlinear()

SCIP_EXPORT SCIP_RETCODE SCIPaddLinearVarNonlinear ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Real  coef 
)

adds a linear variable with coefficient to a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint
varvariable
coefcoefficient of variable

Definition at line 9703 of file cons_nonlinear.c.

References addLinearCoef(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIPisInfinity(), and SCIPsetExprtreesNonlinear().

Referenced by SCIPconsNonlinearAddLinearCoef(), and SCIPcreateConsBasicNonlinear2().

◆ SCIPsetExprtreesNonlinear()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
nexprtreesnumber of expression trees
exprtreesnew expression trees, or NULL if nexprtrees is 0
coefscoefficients of expression trees, or NULL if all 1.0

Definition at line 9723 of file cons_nonlinear.c.

References consdataSetExprtrees(), NULL, SCIP_CALL, SCIP_OKAY, SCIPaddExprtreesNonlinear(), SCIPconsGetData(), SCIPconsIsActive(), and TRUE.

Referenced by SCIPaddLinearVarNonlinear().

◆ SCIPaddExprtreesNonlinear()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
nexprtreesnumber of expression trees
exprtreesnew expression trees, or NULL if nexprtrees is 0
coefscoefficients of expression trees, or NULL if all 1.0

Definition at line 9745 of file cons_nonlinear.c.

References consdataAddExprtrees(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsActive(), SCIPgetNlRowNonlinear(), and TRUE.

Referenced by readNonlinearExprs(), and SCIPsetExprtreesNonlinear().

◆ SCIPgetNlRowNonlinear()

SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowNonlinear ( SCIP scip,
SCIP_CONS cons,
SCIP_NLROW **  nlrow 
)

gets the nonlinear constraint as a nonlinear row representation

Parameters
scipSCIP data structure
consconstraint
nlrowpointer to store nonlinear row

Definition at line 9765 of file cons_nonlinear.c.

References createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNLinearVarsNonlinear().

Referenced by SCIPaddExprtreesNonlinear().

◆ SCIPgetNLinearVarsNonlinear()

SCIP_EXPORT int SCIPgetNLinearVarsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the number of variables in the linear term of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9790 of file cons_nonlinear.c.

References NULL, SCIPconsGetData(), and SCIPgetLinearVarsNonlinear().

Referenced by findAggregation(), readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNlRowNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLinearVarsNonlinear()

SCIP_EXPORT SCIP_VAR** SCIPgetLinearVarsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the variables in the linear part of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9803 of file cons_nonlinear.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLinearCoefsNonlinear().

Referenced by findAggregation(), readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetNLinearVarsNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetLinearCoefsNonlinear()

SCIP_EXPORT SCIP_Real* SCIPgetLinearCoefsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the coefficients in the linear part of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9816 of file cons_nonlinear.c.

References NULL, SCIPconsGetData(), and SCIPgetNExprtreesNonlinear().

Referenced by findAggregation(), readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetLinearVarsNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetNExprtreesNonlinear()

SCIP_EXPORT int SCIPgetNExprtreesNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the number of expression trees of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9829 of file cons_nonlinear.c.

References NULL, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprtreesNonlinear(), and SCIPgetStage().

Referenced by SCIPgetLinearCoefsNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetExprtreesNonlinear()

SCIP_EXPORT SCIP_EXPRTREE** SCIPgetExprtreesNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the expression trees of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9843 of file cons_nonlinear.c.

References NULL, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprtreeCoefsNonlinear(), and SCIPgetStage().

Referenced by SCIPgetNExprtreesNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetExprtreeCoefsNonlinear()

SCIP_EXPORT SCIP_Real* SCIPgetExprtreeCoefsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the coefficients of the expression trees of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9857 of file cons_nonlinear.c.

References NULL, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPgetExprgraphNodeNonlinear(), and SCIPgetStage().

Referenced by SCIPgetExprtreesNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetExprgraphNodeNonlinear()

SCIP_EXPORT SCIP_EXPRGRAPHNODE* SCIPgetExprgraphNodeNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the expression graph node of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9871 of file cons_nonlinear.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsNonlinear().

Referenced by findAggregation(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPgetExprtreeCoefsNonlinear(), and SCIPwriteGms().

◆ SCIPgetLhsNonlinear()

SCIP_EXPORT SCIP_Real SCIPgetLhsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the left hand side of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9884 of file cons_nonlinear.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsNonlinear().

Referenced by checkSubproblemConvexity(), findAggregation(), readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPconsNonlinearGetLhs(), SCIPgetExprgraphNodeNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPgetRhsNonlinear()

SCIP_EXPORT SCIP_Real SCIPgetRhsNonlinear ( SCIP scip,
SCIP_CONS cons 
)

gets the right hand side of a nonlinear constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 9897 of file cons_nonlinear.c.

References NULL, SCIPcheckCurvatureNonlinear(), and SCIPconsGetData().

Referenced by checkSubproblemConvexity(), findAggregation(), readNonlinearExprs(), SCIP_DECL_NONLINCONSUPGD(), SCIPconsNonlinearGetRhs(), SCIPgetLhsNonlinear(), SCIPwriteGms(), and SCIPwritePip().

◆ SCIPcheckCurvatureNonlinear()

SCIP_EXPORT SCIP_RETCODE SCIPcheckCurvatureNonlinear ( SCIP scip,
SCIP_CONS cons 
)

check the function of a nonlinear constraint for convexity/concavity, if not done yet

Parameters
scipSCIP data structure
consconstraint

Definition at line 9910 of file cons_nonlinear.c.

References checkCurvature(), LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetData(), and SCIPgetCurvatureNonlinear().

Referenced by SCIPgetRhsNonlinear().

◆ SCIPgetCurvatureNonlinear()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
checkcurvwhether to check constraint curvature, if not checked before
curvaturepointer to store curvature of constraint

Definition at line 9932 of file cons_nonlinear.c.

References checkCurvature(), LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), and SCIPgetExprtreeCurvaturesNonlinear().

Referenced by checkSubproblemConvexity(), and SCIPcheckCurvatureNonlinear().

◆ SCIPgetExprtreeCurvaturesNonlinear()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
checkcurvwhether to check constraint curvature, if not checked before
curvaturesbuffer to store curvatures of exprtrees

Definition at line 9966 of file cons_nonlinear.c.

References checkCurvature(), LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPgetStage(), and SCIPgetViolationNonlinear().

Referenced by SCIPgetCurvatureNonlinear().

◆ SCIPgetViolationNonlinear()

SCIP_EXPORT SCIP_RETCODE SCIPgetViolationNonlinear ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol,
SCIP_Real violation 
)

computes the violation of a nonlinear constraint by a solution

Parameters
scipSCIP data structure
consconstraint
solsolution which violation to calculate, or NULL for LP solution
violationpointer to store violation of constraint

Definition at line 10003 of file cons_nonlinear.c.

References computeViolation(), MAX, NULL, 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().

◆ SCIPgetLinvarMayDecreaseNonlinear()

SCIP_EXPORT int SCIPgetLinvarMayDecreaseNonlinear ( SCIP scip,
SCIP_CONS cons 
)

get index of a linear variable of a nonlinear constraint that may be decreased without making any other constraint infeasible, or -1 if none

Parameters
scipSCIP data structure
consconstraint

Definition at line 10046 of file cons_nonlinear.c.

References consdataFindUnlockedLinearVar(), NULL, SCIPconsGetData(), and SCIPgetLinvarMayIncreaseNonlinear().

Referenced by SCIPgetViolationNonlinear().

◆ SCIPgetLinvarMayIncreaseNonlinear()

SCIP_EXPORT int SCIPgetLinvarMayIncreaseNonlinear ( SCIP scip,
SCIP_CONS cons 
)

get index of a linear variable of a nonlinear constraint that may be increased without making any other constraint infeasible, or -1 if none

Parameters
scipSCIP data structure
consconstraint

Definition at line 10066 of file cons_nonlinear.c.

References consdataFindUnlockedLinearVar(), NULL, SCIPconsGetData(), and SCIPgetExprgraphNonlinear().

Referenced by SCIPgetLinvarMayDecreaseNonlinear().

◆ SCIPgetExprgraphNonlinear()

SCIP_EXPORT SCIP_EXPRGRAPH* SCIPgetExprgraphNonlinear ( SCIP scip,
SCIP_CONSHDLR conshdlr 
)

gets expression graph of nonlinear constraint handler

Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler

Definition at line 10086 of file cons_nonlinear.c.

References LinVarEventData::conshdlrdata, NULL, SCIPcomputeHyperplaneThreePoints(), and SCIPconshdlrGetData().

Referenced by findAggregation(), SCIP_DECL_NONLINCONSUPGD(), SCIPgetLinvarMayIncreaseNonlinear(), and SCIPwriteGms().

◆ SCIPcomputeHyperplaneThreePoints()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
a1first coordinate of a
a2second coordinate of a
a3third coordinate of a
b1first coordinate of b
b2second coordinate of b
b3third coordinate of b
c1first coordinate of c
c2second coordinate of c
c3third coordinate of c
alphacoefficient of first coordinate
betacoefficient of second coordinate
gamma_coefficient of third coordinate
deltaconstant right-hand side

Definition at line 10108 of file cons_nonlinear.c.

References NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPisInfinity(), SCIPisRelEQ(), and SCIPsolveLinearProb().

Referenced by addConcaveEstimatorBivariate(), generateEstimatingHyperplane(), and SCIPgetExprgraphNonlinear().

◆ SCIPcreateConsOr()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
resvarresultant variable of the operation
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 2091 of file cons_or.c.

References consdataCreate(), CONSHDLR_NAME, NULL, 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().

◆ SCIPcreateConsBasicOr()

SCIP_EXPORT 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

See also
SCIPcreateConsOr() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an or constraint in its most basic variant, i. e., with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
resvarresultant variable of the operation
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint

Definition at line 2153 of file cons_or.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOr(), SCIPgetNVarsOr(), and TRUE.

Referenced by SCIPcreateConsOr().

◆ SCIPgetNVarsOr()

SCIP_EXPORT int SCIPgetNVarsOr ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in or constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 2169 of file cons_or.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsOr().

Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPcreateConsBasicOr().

◆ SCIPgetVarsOr()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsOr ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in or constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 2192 of file cons_or.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetResultantOr().

Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetNVarsOr().

◆ SCIPgetResultantOr()

SCIP_EXPORT SCIP_VAR* SCIPgetResultantOr ( SCIP scip,
SCIP_CONS cons 
)

gets the resultant variable in or constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 2215 of file cons_or.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetVarsOr().

◆ SCIPcheckSolutionOrbisack()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
solsolution to check for feasibility
vars1variables of first column
vars2variables of second column
nrowsnumber of rows
printreasonwhether reason for infeasibility should be printed
feasiblememory address to store whether sol is feasible

Definition at line 1893 of file cons_orbisack.c.

References FALSE, NULL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasIntegral(), and TRUE.

Referenced by checkFullOrbitopeSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSPRINT().

◆ SCIPcreateConsOrbisack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsOrbisack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR *const *  vars1,
SCIP_VAR *const *  vars2,
int  nrows,
SCIP_Bool  ispporbisack,
SCIP_Bool  isparttype,
SCIP_Bool  ismodelcons,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a orbisack constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
vars1first column of matrix of variables on which the symmetry acts
vars2second column of matrix of variables on which the symmetry acts
nrowsnumber of rows in variable matrix
ispporbisackwhether the orbisack is a packing/partitioning orbisack
isparttypewhether the orbisack is a partitioning orbisack
ismodelconswhether the orbisack is a model constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 2065 of file cons_orbisack.c.

References consdataCreate(), CONSHDLR_NAME, NULL, 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(), SCIP_DECL_CONSCOPY(), SCIPcreateConsBasicOrbisack(), and SCIPincludeConshdlrOrbisack().

◆ SCIPcreateConsBasicOrbisack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicOrbisack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR **  vars1,
SCIP_VAR **  vars2,
int  nrows,
SCIP_Bool  ispporbisack,
SCIP_Bool  isparttype,
SCIP_Bool  ismodelcons 
)

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.

See also
SCIPcreateConsOrbisack() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an 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.

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
vars1first column of matrix of variables on which the symmetry acts
vars2second column of matrix of variables on which the symmetry acts
nrowsnumber of rows in constraint matrix
ispporbisackwhether the orbisack is a packing/partitioning orbisack
isparttypewhether the orbisack is a partitioning orbisack
ismodelconswhether the orbisack is a model constraint

Definition at line 2171 of file cons_orbisack.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOrbisack(), and TRUE.

Referenced by SCIPcreateConsOrbisack().

◆ SCIPcreateConsOrbitope()

SCIP_EXPORT 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  ismodelcons,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a orbitope constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a orbitope constraint

Precondition
If packing/partitioning orbitopes are used, this constraint handler assumes that constraints which enforce the packing/partitioning constraints are contained in the problem. It does not implement, e.g., separation and propagation of set packing/partitioning constraints, since this would just copy large parts of the code of the setppc constraint handler.
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varsmatrix of variables on which the symmetry acts
orbitopetypetype of orbitope constraint
nspconsnumber of set partitioning/packing constraints <=> p
nblocksnumber of symmetric variable blocks <=> q
resolvepropshould propagation be resolved?
ismodelconswhether the orbitope is a model constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 3806 of file cons_orbitope.c.

References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, 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 strengthenOrbitopeConstraint().

Referenced by detectOrbitopes(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicOrbitope(), SCIPcreateConsOrbisack(), and SCIPincludeConshdlrOrbitope().

◆ SCIPcreateConsBasicOrbitope()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicOrbitope ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR ***  vars,
SCIP_ORBITOPETYPE  orbitopetype,
int  nspcons,
int  nblocks,
SCIP_Bool  resolveprop,
SCIP_Bool  ismodelcons 
)

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

See also
SCIPcreateConsOrbitope() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures an orbitope constraint in its most basic variant, i. e., with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varsmatrix of variables on which the symmetry acts
orbitopetypetype of orbitope constraint
nspconsnumber of set partitioning/packing constraints <=> p
nblocksnumber of symmetric variable blocks <=> q
resolvepropshould propagation be resolved?
ismodelconswhether the orbitope is a model constraint

Definition at line 3924 of file cons_orbitope.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOrbitope(), and TRUE.

Referenced by SCIPcreateConsOrbitope().

◆ SCIPcreateConsPseudobooleanWithConss()

SCIP_EXPORT 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

Note
intvar must currently be NULL
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
linconsassociated linear constraint
linconstypelinear constraint type of associated linear constraint
andconssassociated and-constraints
andcoefsassociated coefficients of and-constraints
nandconssnumber of associated and-constraints
indvarindicator variable if it's a soft constraint, or NULL
weightweight of the soft constraint, if it is one
issoftconsis this a soft constraint
intvaran 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
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould 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'.
stickingatnodeshould 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 9116 of file cons_pseudoboolean.c.

References BMScopyMemoryArray, ConsAndData::cons, consdataCreate(), CONSHDLR_NAME, FALSE, inithashmapandtable(), ConsAndData::isoriginal, ConsAndData::istransformed, ConsAndData::newvars, ConsAndData::nnewvars, ConsAndData::noriguses, NULL, ConsAndData::nuses, ConsAndData::nvars, ConsAndData::origcons, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, 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().

◆ SCIPcreateConsPseudoboolean()

SCIP_EXPORT 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

Note
linear and nonlinear terms can be added using SCIPaddCoefPseudoboolean() and SCIPaddTermPseudoboolean(), respectively
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
intvar must currently be NULL
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
linvarsvariables of the linear part, or NULL
nlinvarsnumber of variables of the linear part
linvalscoefficients of linear part, or NULL
termsnonlinear terms of variables, or NULL
ntermsnumber of terms of variables of nonlinear term
ntermvarsnumber of variables in nonlinear terms, or NULL
termvalscoefficients of nonlinear parts, or NULL
indvarindicator variable if it's a soft constraint, or NULL
weightweight of the soft constraint, if it is one
issoftconsis this a soft constraint
intvaran 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
lhsleft hand side of constraint
rhsright hand side of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 9395 of file cons_pseudoboolean.c.

References consdataCreate(), CONSHDLR_NAME, createAndAddAnds(), createAndAddLinearCons(), FALSE, inithashmapandtable(), nterms, NULL, 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 findAggregation(), readConstraints(), SCIPcreateConsBasicPseudoboolean(), SCIPcreateConsPseudobooleanWithConss(), and setObjective().

◆ SCIPcreateConsBasicPseudoboolean()

SCIP_EXPORT 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

See also
SCIPcreateConsPseudoboolean() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
intvar must currently be NULL

creates and captures a pseudoboolean constraint in its most basic variant, i. e., with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
intvar must currently be NULL
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
linvarsvariables of the linear part, or NULL
nlinvarsnumber of variables of the linear part
linvalscoefficients of linear part, or NULL
termsnonlinear terms of variables, or NULL
ntermsnumber of terms of variables of nonlinear term
ntermvarsnumber of variables in nonlinear terms, or NULL
termvalscoefficients of nonlinear parts, or NULL
indvarindicator variable if it's a soft constraint, or NULL
weightweight of the soft constraint, if it is one
issoftconsis this a soft constraint
intvara 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
lhsleft hand side of constraint
rhsright hand side of constraint

Definition at line 9551 of file cons_pseudoboolean.c.

References FALSE, nterms, SCIP_CALL, SCIP_OKAY, SCIPaddCoefPseudoboolean(), SCIPcreateConsPseudoboolean(), and TRUE.

Referenced by SCIPcreateConsPseudoboolean().

◆ SCIPaddCoefPseudoboolean()

SCIP_EXPORT 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)

Note
you can only add a coefficient if the special type of linear constraint won't changed

adds a variable to the pseudo boolean constraint (if it is not zero)

Note
you can only add a coefficient if the special type of linear constraint won't changed
Parameters
scipSCIP data structure
consconstraint data
varvariable of constraint entry
valcoefficient of constraint entry

Definition at line 9586 of file cons_pseudoboolean.c.

References CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPaddTermPseudoboolean()

SCIP_EXPORT 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)

Note
you can only add a coefficient if the special type of linear constraint won't changed

adds nonlinear term to pseudo boolean constraint (if it is not zero)

Note
you can only add a coefficient if the special type of linear constraint won't changed
Parameters
scipSCIP data structure
conspseudoboolean constraint
varsvariables of the nonlinear term
nvarsnumber of variables of the nonlinear term
valcoefficient of constraint entry

Definition at line 9663 of file cons_pseudoboolean.c.

References addCoefTerm(), CONSHDLR_NAME, NULL, ConsAndData::nvars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetIndVarPseudoboolean().

Referenced by SCIPaddCoefPseudoboolean().

◆ SCIPgetIndVarPseudoboolean()

SCIP_EXPORT SCIP_VAR* SCIPgetIndVarPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

gets indicator variable of pseudoboolean constraint, or NULL if there is no

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9688 of file cons_pseudoboolean.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinearConsPseudoboolean().

Referenced by SCIPaddTermPseudoboolean(), and writeOpbConstraints().

◆ SCIPgetLinearConsPseudoboolean()

SCIP_EXPORT SCIP_CONS* SCIPgetLinearConsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

gets linear constraint of pseudoboolean constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9712 of file cons_pseudoboolean.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinearConsTypePseudoboolean().

Referenced by SCIPgetIndVarPseudoboolean(), and writeOpbConstraints().

◆ SCIPgetLinearConsTypePseudoboolean()

SCIP_EXPORT SCIP_LINEARCONSTYPE SCIPgetLinearConsTypePseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

gets type of linear constraint of pseudoboolean constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9736 of file cons_pseudoboolean.c.

References CONSHDLR_NAME, NULL, SCIP_LINEARCONSTYPE_INVALIDCONS, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNLinVarsWithoutAndPseudoboolean().

Referenced by SCIPgetLinearConsPseudoboolean().

◆ SCIPgetNLinVarsWithoutAndPseudoboolean()

SCIP_EXPORT int SCIPgetNLinVarsWithoutAndPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

gets number of linear variables without artificial terms variables of pseudoboolean constraint

Parameters
scipSCIP data structure
conspseudoboolean constraint

Definition at line 9760 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetLinDatasWithoutAndPseudoboolean().

Referenced by SCIPgetLinearConsTypePseudoboolean(), and writeOpbConstraints().

◆ SCIPgetLinDatasWithoutAndPseudoboolean()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
conspseudoboolean constraint
linvarsarray to store and-constraints
lincoefsarray to store and-coefficients
nlinvarspointer to store the required array size for and-constraints, have to be initialized with size of given array

Definition at line 9786 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, getLinearConsNVars(), getLinearConsVarsData(), getLinVarsAndAndRess(), NULL, 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().

◆ SCIPgetAndDatasPseudoboolean()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
conspseudoboolean constraint
andconssarray to store and-constraints
andcoefsarray to store and-coefficients
nandconsspointer to store the required array size for and-constraints, have to be initialized with size of given array

Definition at line 9846 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetNAndsPseudoboolean(), and TRUE.

Referenced by SCIPgetLinDatasWithoutAndPseudoboolean(), and writeOpbConstraints().

◆ SCIPgetNAndsPseudoboolean()

SCIP_EXPORT int SCIPgetNAndsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

gets number of and constraints of pseudoboolean constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9906 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, NULL, SCIPABORT, SCIPchgLhsPseudoboolean(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetAndDatasPseudoboolean(), and writeOpbConstraints().

◆ SCIPchgLhsPseudoboolean()

SCIP_EXPORT SCIP_RETCODE SCIPchgLhsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons,
SCIP_Real const  lhs 
)

changes left hand side of pseudoboolean constraint

Note
you can only change the left hand side if the special type of linear constraint won't changed

changes left hand side of pseudoboolean constraint

Note
you can only change the left hand side if the special type of linear constraint won't changed
Parameters
scipSCIP data structure
consconstraint data
lhsnew left hand side

Definition at line 9938 of file cons_pseudoboolean.c.

References checkConsConsistency, chgLhs(), CONSHDLR_NAME, NULL, 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().

◆ SCIPchgRhsPseudoboolean()

SCIP_EXPORT SCIP_RETCODE SCIPchgRhsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons,
SCIP_Real const  rhs 
)

changes right hand side of pseudoboolean constraint

Note
you can only change the right hand side if the special type of linear constraint won't changed

changes right hand side of pseudoboolean constraint

Note
you can only change the right hand side if the special type of linear constraint won't changed
Parameters
scipSCIP data structure
consconstraint data
rhsnew right hand side

Definition at line 9989 of file cons_pseudoboolean.c.

References checkConsConsistency, chgRhs(), CONSHDLR_NAME, NULL, 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().

◆ SCIPgetLhsPseudoboolean()

SCIP_EXPORT SCIP_Real SCIPgetLhsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

get left hand side of pseudoboolean constraint

Parameters
scipSCIP data structure
conspseudoboolean constraint

Definition at line 10031 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsPseudoboolean().

Referenced by SCIPchgRhsPseudoboolean(), and writeOpbConstraints().

◆ SCIPgetRhsPseudoboolean()

SCIP_EXPORT SCIP_Real SCIPgetRhsPseudoboolean ( SCIP *const  scip,
SCIP_CONS *const  cons 
)

get right hand side of pseudoboolean constraint

Parameters
scipSCIP data structure
conspseudoboolean constraint

Definition at line 10056 of file cons_pseudoboolean.c.

References checkConsConsistency, CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetLhsPseudoboolean(), and writeOpbConstraints().

◆ SCIPincludeQuadconsUpgrade()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
prioritypriority of upgrading method
activeshould the upgrading method be active by default?
conshdlrnamename of the constraint handler

Definition at line 14321 of file cons_quadratic.c.

References active, SCIP_QuadConsUpgrade::active, CONSHDLR_NAME, conshdlrdataHasUpgrade(), FALSE, NULL, paramname, 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().

◆ SCIPcreateConsQuadratic()

SCIP_EXPORT 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.

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear terms (n)
linvarsarray with variables in linear part (x_i)
lincoefsarray with coefficients of variables in linear part (b_i)
nquadtermsnumber of quadratic terms (m)
quadvars1array with first variables in quadratic terms (y_j)
quadvars2array with second variables in quadratic terms (z_j)
quadcoefsarray with coefficients of quadratic terms (a_j)
lhsleft hand side of quadratic equation (ell)
rhsright hand side of quadratic equation (u)
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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 14397 of file cons_quadratic.c.

References addBilinearTerm(), addLinearCoef(), addQuadVarTerm(), consdataCreateEmpty(), consdataEnsureBilinSize(), consdataEnsureLinearVarsSize(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPblkmem(), SCIPcreateCons(), SCIPcreateConsBasicQuadratic(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindConshdlr(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), and SCIPisZero().

Referenced by createQuadraticCons(), readConstraints(), readObjective(), readQCMatrix(), readQMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicQuadratic(), SCIPcreateConsIndicator(), SCIPcreateConsIndicatorLinCons(), and SCIPincludeQuadconsUpgrade().

◆ SCIPcreateConsBasicQuadratic()

SCIP_EXPORT 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.

See also
SCIPcreateConsQuadratic() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a 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.

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear terms (n)
linvarsarray with variables in linear part (x_i)
lincoefsarray with coefficients of variables in linear part (b_i)
nquadtermsnumber of quadratic terms (m)
quadvars1array with first variables in quadratic terms (y_j)
quadvars2array with second variables in quadratic terms (z_j)
quadcoefsarray with coefficients of quadratic terms (a_j)
lhsleft hand side of quadratic equation (ell)
rhsright hand side of quadratic equation (u)

Definition at line 14579 of file cons_quadratic.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsQuadratic(), SCIPcreateConsQuadratic2(), and TRUE.

Referenced by createOriginalproblem(), createProbQP(), createSubproblems(), SCIPcreateConsQuadratic(), SCIPverifyCircularPatternNLP(), setupProblem(), and solvePricingMINLP().

◆ SCIPcreateConsQuadratic2()

SCIP_EXPORT 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. \]

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

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. \]

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear terms (n)
linvarsarray with variables in linear part (x_i)
lincoefsarray with coefficients of variables in linear part (b_i)
nquadvartermsnumber of quadratic terms (m)
quadvartermsquadratic variable terms
nbilintermsnumber of bilinear terms (p)
bilintermsbilinear terms
lhsconstraint left hand side (ell)
rhsconstraint right hand side (u)
initialshould the LP relaxation of constraint be in the initial LP?
separateshould the constraint be separated during LP processing?
enforceshould the constraint be enforced during node processing?
checkshould the constraint be checked for feasibility?
propagateshould the constraint be propagated during node processing?
localis constraint only valid locally?
modifiableis constraint modifiable (subject to column generation)?
dynamicis constraint dynamic?
removableshould the constraint be removed from the LP due to aging or cleanup?

Definition at line 14610 of file cons_quadratic.c.

References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicQuadratic2()

SCIP_EXPORT 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. \]

See also
SCIPcreateConsQuadratic2() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a 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. \]

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nlinvarsnumber of linear terms (n)
linvarsarray with variables in linear part (x_i)
lincoefsarray with coefficients of variables in linear part (b_i)
nquadvartermsnumber of quadratic terms (m)
quadvartermsquadratic variable terms
nbilintermsnumber of bilinear terms (p)
bilintermsbilinear terms
lhsconstraint left hand side (ell)
rhsconstraint right hand side (u)

Definition at line 14672 of file cons_quadratic.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddConstantQuadratic(), SCIPcreateConsQuadratic2(), and TRUE.

Referenced by SCIPcreateConsQuadratic2().

◆ SCIPaddConstantQuadratic()

SCIP_EXPORT void SCIPaddConstantQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  constant 
)

Adds a constant to the constraint function, that is, subtracts a constant from both sides

Parameters
scipSCIP data structure
consconstraint
constantconstant to subtract from both sides

Definition at line 14696 of file cons_quadratic.c.

References NULL, REALABS, SCIP_STAGE_SOLVING, SCIPABORT, SCIPaddLinearVarQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), SCIPisEQ(), and SCIPisInfinity().

Referenced by SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), and SCIPcreateConsBasicQuadratic2().

◆ SCIPaddLinearVarQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPaddLinearVarQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var,
SCIP_Real  coef 
)

Adds a linear variable with coefficient to a quadratic constraint.

Parameters
scipSCIP data structure
consconstraint
varvariable
coefcoefficient of variable

Definition at line 14732 of file cons_quadratic.c.

References addLinearCoef(), NULL, REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddQuadVarQuadratic(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), and SCIPisInfinity().

Referenced by createProbQP(), presolveDisaggregate(), readObjective(), SCIP_DECL_CONSPARSE(), SCIP_DECL_QUADCONSUPGD(), SCIPaddConstantQuadratic(), SCIPconsNonlinearAddLinearCoef(), and setupProblem().

◆ SCIPaddQuadVarQuadratic()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consconstraint
varvariable
lincoeflinear coefficient of variable
sqrcoefsquare coefficient of variable

Definition at line 14757 of file cons_quadratic.c.

References addQuadVarTerm(), NULL, 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().

◆ SCIPaddQuadVarLinearCoefQuadratic()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consconstraint
varvariable
coefvalue to add to linear coefficient of variable

Definition at line 14787 of file cons_quadratic.c.

References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, 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().

◆ SCIPaddSquareCoefQuadratic()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consconstraint
varvariable
coefvalue to add to square coefficient of variable

Definition at line 14840 of file cons_quadratic.c.

References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, 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().

◆ SCIPaddBilinTermQuadratic()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consconstraint
var1first variable
var2second variable
coefcoefficient of bilinear term

Definition at line 14897 of file cons_quadratic.c.

References addBilinearTerm(), addQuadVarTerm(), consdataFindQuadVarTerm(), consdataSortQuadVarTerms(), NULL, REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetNlRowQuadratic(), SCIPgetStage(), and SCIPisInfinity().

Referenced by createProbQP(), presolveDisaggregate(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPaddSquareCoefQuadratic(), SCIPchgBilinCoefQuadratic(), and setupProblem().

◆ SCIPgetNlRowQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_NLROW **  nlrow 
)

Gets the quadratic constraint as a nonlinear row representation.

Parameters
scipSCIP data structure
consconstraint
nlrowpointer to store nonlinear row

Definition at line 14963 of file cons_quadratic.c.

References createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNLinearVarsQuadratic().

Referenced by createCoveringProblem(), and SCIPaddBilinTermQuadratic().

◆ SCIPgetNLinearVarsQuadratic()

SCIP_EXPORT int SCIPgetNLinearVarsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

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.

Parameters
scipSCIP data structure
consconstraint

Definition at line 14988 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPgetLinearVarsQuadratic().

Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNlRowQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetLinearVarsQuadratic()

SCIP_EXPORT SCIP_VAR** SCIPgetLinearVarsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the variables in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15003 of file cons_quadratic.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetCoefsLinearVarsQuadratic().

Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetCoefsLinearVarsQuadratic()

SCIP_EXPORT SCIP_Real* SCIPgetCoefsLinearVarsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the coefficients in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15018 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPgetNQuadVarTermsQuadratic().

Referenced by checkConsQuadraticProblem(), SCIP_DECL_QUADCONSUPGD(), SCIPgetLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetNQuadVarTermsQuadratic()

SCIP_EXPORT int SCIPgetNQuadVarTermsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the number of quadratic variable terms of a quadratic constraint.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15032 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPgetQuadVarTermsQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIPgetCoefsLinearVarsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetQuadVarTermsQuadratic()

SCIP_EXPORT SCIP_QUADVARTERM* SCIPgetQuadVarTermsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the quadratic variable terms of a quadratic constraint. Length is given by SCIPgetNQuadVarTermsQuadratic.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15047 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPsortQuadVarTermsQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNQuadVarTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPsortQuadVarTermsQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPsortQuadVarTermsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Ensures that quadratic variable terms are sorted.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15060 of file cons_quadratic.c.

References consdataSortQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPfindQuadVarTermQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), and SCIPgetQuadVarTermsQuadratic().

◆ SCIPfindQuadVarTermQuadratic()

SCIP_EXPORT 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.

Note
If the quadratic variable terms have not been sorted before, then a search may reorder the current order of the terms.
Parameters
scipSCIP data structure
consconstraint
varvariable to search for
posbuffer to store position of quadvarterm for var, or -1 if not found

Definition at line 15078 of file cons_quadratic.c.

References consdataFindQuadVarTerm(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPgetNBilinTermsQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_QUADCONSUPGD(), and SCIPsortQuadVarTermsQuadratic().

◆ SCIPgetNBilinTermsQuadratic()

SCIP_EXPORT int SCIPgetNBilinTermsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the number of bilinear terms of a quadratic constraint.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15097 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPgetBilinTermsQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIPfindQuadVarTermQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetBilinTermsQuadratic()

SCIP_EXPORT SCIP_BILINTERM* SCIPgetBilinTermsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the bilinear terms of a quadratic constraint. Length is given by SCIPgetNBilinTermQuadratic.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15112 of file cons_quadratic.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsQuadratic().

Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIPgetNBilinTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetLhsQuadratic()

SCIP_EXPORT SCIP_Real SCIPgetLhsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the left hand side of a quadratic constraint.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15125 of file cons_quadratic.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsQuadratic().

Referenced by checkConsnames(), checkConsQuadraticProblem(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIPconsNonlinearGetLhs(), SCIPgetBilinTermsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetRhsQuadratic()

SCIP_EXPORT SCIP_Real SCIPgetRhsQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Gets the right hand side of a quadratic constraint.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15138 of file cons_quadratic.c.

References NULL, SCIPconsGetData(), and SCIPgetLinvarMayDecreaseQuadratic().

Referenced by checkConsnames(), checkConsQuadraticProblem(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIPconsNonlinearGetRhs(), SCIPgetLhsQuadratic(), SCIPwriteGms(), SCIPwriteLp(), SCIPwriteMps(), and SCIPwritePip().

◆ SCIPgetLinvarMayDecreaseQuadratic()

SCIP_EXPORT int SCIPgetLinvarMayDecreaseQuadratic ( SCIP scip,
SCIP_CONS cons 
)

get index of a variable in linvars that may be decreased without making any other constraint infeasible, or -1 if none

Parameters
scipSCIP data structure
consconstraint

Definition at line 15151 of file cons_quadratic.c.

References consdataFindUnlockedLinearVar(), NULL, SCIPconsGetData(), and SCIPgetLinvarMayIncreaseQuadratic().

Referenced by checkConsQuadraticProblem(), and SCIPgetRhsQuadratic().

◆ SCIPgetLinvarMayIncreaseQuadratic()

SCIP_EXPORT int SCIPgetLinvarMayIncreaseQuadratic ( SCIP scip,
SCIP_CONS cons 
)

get index of a variable in linvars that may be increased without making any other constraint infeasible, or -1 if none

Parameters
scipSCIP data structure
consconstraint

Definition at line 15171 of file cons_quadratic.c.

References consdataFindUnlockedLinearVar(), NULL, SCIPcheckCurvatureQuadratic(), and SCIPconsGetData().

Referenced by checkConsQuadraticProblem(), and SCIPgetLinvarMayDecreaseQuadratic().

◆ SCIPcheckCurvatureQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPcheckCurvatureQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Check the quadratic function of a quadratic constraint for its semi-definiteness, if not done yet.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15191 of file cons_quadratic.c.

References checkCurvature(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPisConvexQuadratic(), and TRUE.

Referenced by SCIP_DECL_QUADCONSUPGD(), and SCIPgetLinvarMayIncreaseQuadratic().

◆ SCIPisConvexQuadratic()

SCIP_EXPORT SCIP_Bool SCIPisConvexQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Indicates whether the quadratic function of a quadratic constraint is (known to be) convex.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15205 of file cons_quadratic.c.

References checkCurvatureEasy(), NULL, SCIP_Bool, SCIPconsGetData(), SCIPisConcaveQuadratic(), and TRUE.

Referenced by createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), and SCIPcheckCurvatureQuadratic().

◆ SCIPisConcaveQuadratic()

SCIP_EXPORT SCIP_Bool SCIPisConcaveQuadratic ( SCIP scip,
SCIP_CONS cons 
)

Indicates whether the quadratic function of a quadratic constraint is (known to be) concave.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15238 of file cons_quadratic.c.

References checkCurvatureEasy(), NULL, SCIP_Bool, SCIPconsGetData(), SCIPisConvexConsQuadratic(), and TRUE.

Referenced by createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), and SCIPisConvexQuadratic().

◆ SCIPisConvexConsQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPisConvexConsQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_HASHMAP assumevarfixed,
SCIP_Bool result 
)

Checks and indicates whether the quadratic constraint is convex.

Parameters
scipSCIP data structure
consconstraint
assumevarfixedhashmap containing variables that should be assumed to be fixed, or NULL
resultbuffer where to store whether constraint is convex (under given variable fixing)

Definition at line 15271 of file cons_quadratic.c.

References checkCurvatureEasy(), checkCurvatureExpensive(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetViolationQuadratic(), SCIPisInfinity(), and TRUE.

Referenced by checkSubproblemConvexity(), and SCIPisConcaveQuadratic().

◆ SCIPgetViolationQuadratic()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
solsolution which violation to calculate, or NULL for LP solution
violationpointer to store violation of constraint

Definition at line 15337 of file cons_quadratic.c.

References computeViolation(), MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPisLinearLocalQuadratic().

Referenced by SCIPisConvexConsQuadratic().

◆ SCIPisLinearLocalQuadratic()

SCIP_EXPORT SCIP_Bool SCIPisLinearLocalQuadratic ( SCIP scip,
SCIP_CONS cons 
)

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.

Parameters
scipSCIP data structure
consconstraint

Definition at line 15366 of file cons_quadratic.c.

References FALSE, NULL, SCIPaddToNlpiProblemQuadratic(), SCIPconsGetData(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPgetViolationQuadratic().

◆ SCIPaddToNlpiProblemQuadratic()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consconstraint
nlpiinterface to NLP solver
nlpiprobNLPI problem where to add constraint
scipvar2nlpivarmapping from SCIP variables to variable indices in NLPI
nameswhether to pass constraint names to NLPI

Definition at line 15412 of file cons_quadratic.c.

References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPchgLhsQuadratic(), SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArrayNull, SCIPhashmapExists(), SCIPhashmapGetImageInt(), and SCIPnlpiAddConstraints().

Referenced by SCIPisLinearLocalQuadratic().

◆ SCIPchgLhsQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPchgLhsQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  lhs 
)

sets the left hand side of a quadratic constraint

Note
This method may only be called during problem creation stage for an original constraint.
Parameters
scipSCIP data structure
consconstraint data
lhsnew left hand side

Definition at line 15550 of file cons_quadratic.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPchgRhsQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().

Referenced by SCIPaddToNlpiProblemQuadratic().

◆ SCIPchgRhsQuadratic()

SCIP_EXPORT SCIP_RETCODE SCIPchgRhsQuadratic ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  rhs 
)

sets the right hand side of a quadratic constraint

Note
This method may only be called during problem creation stage for an original constraint.
Parameters
scipSCIP data structure
consconstraint data
rhsnew right hand side

Definition at line 15595 of file cons_quadratic.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetFeasibilityQuadratic(), SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().

Referenced by SCIPchgLhsQuadratic().

◆ SCIPgetFeasibilityQuadratic()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint data
solsolution, or NULL to use current node's solution
feasibilitypointer to store the feasibility

Definition at line 15637 of file cons_quadratic.c.

References computeViolation(), CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetActivityQuadratic(), SCIPinfinity(), and SCIPisInfinity().

Referenced by SCIPchgRhsQuadratic().

◆ SCIPgetActivityQuadratic()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint data
solsolution, or NULL to use current node's solution
activitypointer to store the activity

Definition at line 15679 of file cons_quadratic.c.

References computeViolation(), CONSHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPchgLinearCoefQuadratic(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetFeasibilityQuadratic().

◆ SCIPchgLinearCoefQuadratic()

SCIP_EXPORT 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

Note
this is only allowed for original constraints and variables in problem creation stage
Parameters
scipSCIP data structure
consconstraint data
varquadratic variable
coefnew coefficient

Definition at line 15714 of file cons_quadratic.c.

References addLinearCoef(), chgLinearCoefPos(), CONSHDLR_NAME, delLinearCoefPos(), FALSE, NULL, 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().

◆ SCIPchgSquareCoefQuadratic()

SCIP_EXPORT 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

Note
this is only allowed for original constraints and variables in problem creation stage
Parameters
scipSCIP data structure
consconstraint data
varquadratic variable
coefnew coefficient

Definition at line 15807 of file cons_quadratic.c.

References addQuadVarTerm(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPchgBilinCoefQuadratic()

SCIP_EXPORT 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

Note
this is only allowed for original constraints and variables in problem creation stage
Parameters
scipSCIP data structure
consconstraint
var1first variable
var2second variable
coefcoefficient of bilinear term

Definition at line 15876 of file cons_quadratic.c.

References CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPgetNAllBilinearTermsQuadratic()

SCIP_EXPORT int SCIPgetNAllBilinearTermsQuadratic ( SCIP scip)

returns the total number of bilinear terms that are contained in all quadratic constraints

Parameters
scipSCIP data structure

Definition at line 15955 of file cons_quadratic.c.

References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPgetAllBilinearTermsQuadratic().

Referenced by SCIPchgBilinCoefQuadratic().

◆ SCIPgetAllBilinearTermsQuadratic()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
xarray to store first variable of each bilinear term
yarray to second variable of each bilinear term
nbilintermsbuffer to store the total number of bilinear terms
nunderestsarray to store the total number of constraints that require to underestimate a bilinear term
noverestsarray to store the total number of constraints that require to overestimate a bilinear term
maxnonconvexitylargest absolute value of nonconvex eigenvalues of all quadratic constraints containing a bilinear term

Definition at line 15976 of file cons_quadratic.c.

References CONSHDLR_NAME, getIneqViol(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfindConshdlr().

Referenced by SCIPgetNAllBilinearTermsQuadratic().

◆ SCIPaddBilinearIneqQuadratic()

SCIP_EXPORT 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)

Note
the indices of bilinear terms match with the entries of bilinear terms returned by SCIPgetAllBilinearTermsQuadratic
Parameters
scipSCIP data structure
xfirst variable
ysecond variable
idxindex of the bilinear term
xcoefx coefficient
ycoefy coefficient
constantconstant part
successbuffer to store whether inequality has been accepted

Definition at line 16065 of file cons_quadratic.c.

References CONSHDLR_NAME, FALSE, getIneqViol(), BilinearEstimator::ineqoverest, BilinearEstimator::inequnderest, MAX, BilinearEstimator::nineqoverest, BilinearEstimator::ninequnderest, NULL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconshdlrGetData(), SCIPcreateRowprep(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPisFeasEQ(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisGT(), SCIPvarGetName(), TRUE, BilinearEstimator::x, and BilinearEstimator::y.

Referenced by getIneqViol().

◆ SCIPcreateConsSetpart()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 9056 of file cons_setppc.c.

References createConsSetppc(), SCIP_SETPPCTYPE_PARTITIONING, and SCIPcreateConsBasicSetpart().

Referenced by branchOnVertex(), cliquePresolve(), consdataLinearize(), createAndAddLinearCons(), createMipCpFormulation(), createProbQP(), createProbSimplified(), createProbSimplifiedTest(), extractGates(), and processRealBoundChg().

◆ SCIPcreateConsBasicSetpart()

SCIP_EXPORT 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

See also
SCIPcreateConsSetpart() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a set partitioning constraint with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries

Definition at line 9096 of file cons_setppc.c.

Referenced by createCipFormulation(), createMipFormulation(), SCIP_DECL_SOLVECUMULATIVE(), SCIPcreateConsSetpart(), and setupProblem().

◆ SCIPcreateConsSetpack()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 9114 of file cons_setppc.c.

References createConsSetppc(), SCIP_SETPPCTYPE_PACKING, and SCIPcreateConsBasicSetpack().

Referenced by addCliques(), addExtraCliques(), cliquePresolve(), consdataLinearize(), createAndAddLinearCons(), createCoveringProblem(), createPrizeConstraints(), deleteRedundantVars(), detectRedundantVars(), dualWeightsTightening(), fixDeleteOrUpgradeCons(), presolRoundConsSOS1(), removeConstraintsDueToNegCliques(), tightenWeights(), upgradeCons(), and upgradeConss().

◆ SCIPcreateConsBasicSetpack()

SCIP_EXPORT 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

See also
SCIPcreateConsSetpack() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a set packing constraint with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries

Definition at line 9154 of file cons_setppc.c.

Referenced by createSetPackingCons(), and SCIPcreateConsSetpack().

◆ SCIPcreateConsSetcover()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 9172 of file cons_setppc.c.

References createConsSetppc(), SCIP_SETPPCTYPE_COVERING, and SCIPcreateConsBasicSetcover().

Referenced by COLORprobSetUpArrayOfCons(), createAndAddLinearCons(), CUTOFF_CONSTRAINT(), forbidCover(), forbidFixation(), processNlRow(), and readCnf().

◆ SCIPcreateConsBasicSetcover()

SCIP_EXPORT 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

See also
SCIPcreateConsSetpack() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a set covering constraint with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries

Definition at line 9212 of file cons_setppc.c.

Referenced by SCIPcreateConsSetcover(), and SCIPprobdataCreate().

◆ SCIPaddCoefSetppc()

◆ SCIPgetNVarsSetppc()

◆ SCIPgetVarsSetppc()

◆ SCIPgetTypeSetppc()

◆ SCIPgetDualsolSetppc()

SCIP_EXPORT SCIP_Real SCIPgetDualsolSetppc ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the set partitioning / packing / covering constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9318 of file cons_setppc.c.

References NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetDualfarkasSetppc(), and SCIProwGetDualsol().

Referenced by initPricing(), SCIP_DECL_PRICERREDCOST(), SCIPconsGetDualsol(), and SCIPgetTypeSetppc().

◆ SCIPgetDualfarkasSetppc()

SCIP_EXPORT SCIP_Real SCIPgetDualfarkasSetppc ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the set partitioning / packing / covering constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9344 of file cons_setppc.c.

References NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetRowSetppc(), and SCIProwGetDualfarkas().

Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolSetppc().

◆ SCIPgetRowSetppc()

SCIP_EXPORT SCIP_ROW* SCIPgetRowSetppc ( SCIP scip,
SCIP_CONS cons 
)

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!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9372 of file cons_setppc.c.

References NULL, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetNFixedonesSetppc().

Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasSetppc().

◆ SCIPgetNFixedonesSetppc()

SCIP_EXPORT int SCIPgetNFixedonesSetppc ( SCIP scip,
SCIP_CONS cons 
)

returns current number of variables fixed to one in the constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9395 of file cons_setppc.c.

References NULL, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetNFixedzerosSetppc().

Referenced by addFixedVarsConss(), initPricing(), SCIP_DECL_PRICERREDCOST(), and SCIPgetRowSetppc().

◆ SCIPgetNFixedzerosSetppc()

SCIP_EXPORT int SCIPgetNFixedzerosSetppc ( SCIP scip,
SCIP_CONS cons 
)

returns current number of variables fixed to zero in the constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 9419 of file cons_setppc.c.

References NULL, SCIP_Bool, SCIPABORT, SCIPcleanupConssSetppc(), SCIPconsGetData(), and SCIPerrorMessage.

Referenced by SCIPgetNFixedonesSetppc().

◆ SCIPcleanupConssSetppc()

SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssSetppc ( SCIP scip,
SCIP_Bool  onlychecked,
SCIP_Bool infeasible,
int *  naddconss,
int *  ndelconss,
int *  nchgcoefs,
int *  nfixedvars 
)

cleans up (multi-)aggregations and fixings from setppc constraints

Parameters
scipSCIP data structure
onlycheckedshould only checked constraints be cleaned up?
infeasiblepointer to return whether problem was detected to be infeasible
naddconsspointer to count number of added (linear) constraints
ndelconsspointer to count number of deleted (setppc) constraints
nchgcoefspointer to count number of changed coefficients
nfixedvarspointer to count number of fixed variables

Definition at line 9442 of file cons_setppc.c.

References applyFixings(), CONSHDLR_NAME, FALSE, mergeMultiples(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetNCheckConss(), SCIPconsIsDeleted(), and SCIPfindConshdlr().

Referenced by SCIPgetNFixedzerosSetppc(), and SCIPmatrixCreate().

◆ SCIPcreateConsSOC()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables on left hand side of constraint (n)
varsarray with variables on left hand side (x_i)
coefsarray with coefficients of left hand side variables (alpha_i), or NULL if all 1.0
offsetsarray with offsets of variables (beta_i), or NULL if all 0.0
constantconstant on left hand side (gamma)
rhsvarvariable on right hand side of constraint (x_{n+1})
rhscoeffcoefficient of variable on right hand side (alpha_{n+1})
rhsoffsetoffset of variable on right hand side (beta_{n+1})
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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 5294 of file cons_soc.c.

References BMSclearMemoryArray, catchVarEvents(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicSOC()

SCIP_EXPORT 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

See also
SCIPcreateConsSOC() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a second order cone constraint with all its constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables on left hand side of constraint (n)
varsarray with variables on left hand side (x_i)
coefsarray with coefficients of left hand side variables (alpha_i), or NULL if all 1.0
offsetsarray with offsets of variables (beta_i), or NULL if all 0.0
constantconstant on left hand side (gamma)
rhsvarvariable on right hand side of constraint (x_{n+1})
rhscoeffcoefficient of variable on right hand side (alpha_{n+1})
rhsoffsetoffset of variable on right hand side (beta_{n+1})

Definition at line 5423 of file cons_soc.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSOC(), SCIPgetNlRowSOC(), and TRUE.

Referenced by disaggregate(), SCIPcreateConsSOC(), and setupProblem().

◆ SCIPgetNlRowSOC()

SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowSOC ( SCIP scip,
SCIP_CONS cons,
SCIP_NLROW **  nlrow 
)

Gets the SOC constraint as a nonlinear row representation.

Parameters
scipSCIP data structure
consconstraint
nlrowpointer to store nonlinear row

Definition at line 5445 of file cons_soc.c.

References createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPgetNLhsVarsSOC().

Referenced by createCoveringProblem(), and SCIPcreateConsBasicSOC().

◆ SCIPgetNLhsVarsSOC()

SCIP_EXPORT int SCIPgetNLhsVarsSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the number of variables on the left hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5470 of file cons_soc.c.

References NULL, SCIPconsGetData(), and SCIPgetLhsVarsSOC().

Referenced by createCoveringProblem(), printSOCCons(), SCIPgetNlRowSOC(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetLhsVarsSOC()

SCIP_EXPORT SCIP_VAR** SCIPgetLhsVarsSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the variables on the left hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5483 of file cons_soc.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsCoefsSOC().

Referenced by createCoveringProblem(), printSOCCons(), SCIPgetNLhsVarsSOC(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetLhsCoefsSOC()

SCIP_EXPORT SCIP_Real* SCIPgetLhsCoefsSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the coefficients of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 1.0.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5496 of file cons_soc.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsOffsetsSOC().

Referenced by createCoveringProblem(), printSOCCons(), SCIPgetLhsVarsSOC(), SCIPwriteGms(), and SCIPwriteMps().

◆ SCIPgetLhsOffsetsSOC()

SCIP_EXPORT SCIP_Real* SCIPgetLhsOffsetsSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the offsets of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 0.0.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5509 of file cons_soc.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsConstantSOC().

Referenced by printSOCCons(), SCIPgetLhsCoefsSOC(), SCIPwriteGms(), and SCIPwriteMps().

◆ SCIPgetLhsConstantSOC()

SCIP_EXPORT SCIP_Real SCIPgetLhsConstantSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the constant on the left hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5522 of file cons_soc.c.

References NULL, SCIPconsGetData(), and SCIPgetRhsVarSOC().

Referenced by printSOCCons(), SCIPgetLhsOffsetsSOC(), SCIPwriteGms(), and SCIPwriteMps().

◆ SCIPgetRhsVarSOC()

SCIP_EXPORT SCIP_VAR* SCIPgetRhsVarSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the variable on the right hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5535 of file cons_soc.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsCoefSOC().

Referenced by createCoveringProblem(), printSOCCons(), SCIPgetLhsConstantSOC(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetRhsCoefSOC()

SCIP_EXPORT SCIP_Real SCIPgetRhsCoefSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the coefficient of the variable on the right hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5548 of file cons_soc.c.

References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsOffsetSOC().

Referenced by createCoveringProblem(), printSOCCons(), SCIPgetRhsVarSOC(), SCIPwriteGms(), and SCIPwriteMps().

◆ SCIPgetRhsOffsetSOC()

SCIP_EXPORT SCIP_Real SCIPgetRhsOffsetSOC ( SCIP scip,
SCIP_CONS cons 
)

Gets the offset of the variables on the right hand side of a SOC constraint.

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5561 of file cons_soc.c.

References NULL, SCIPaddToNlpiProblemSOC(), and SCIPconsGetData().

Referenced by printSOCCons(), SCIPgetRhsCoefSOC(), SCIPwriteGms(), and SCIPwriteMps().

◆ SCIPaddToNlpiProblemSOC()

SCIP_EXPORT 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.

Parameters
scipSCIP data structure
consSOC constraint
nlpiinterface to NLP solver
nlpiprobNLPI problem where to add constraint
scipvar2nlpivarmapping from SCIP variables to variable indices in NLPI
nameswhether to pass constraint names to NLPI

Definition at line 5576 of file cons_soc.c.

References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapGetImageInt(), SCIPinfinity(), and SCIPnlpiAddConstraints().

Referenced by SCIPgetRhsOffsetSOC().

◆ SCIPcreateConsSOS1()

SCIP_EXPORT 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).

Note
The constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons().

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).

Note
The constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons().
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
weightsweights determining the variable order, or NULL if natural order should be used
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 10376 of file cons_sos1.c.

References CONSHDLR_NAME, FALSE, handleNewVariableSOS1(), NULL, 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().

◆ SCIPcreateConsBasicSOS1()

SCIP_EXPORT 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

See also
SCIPcreateConsSOS1() for the default constraint flag configuration
Warning
Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a SOS1 constraint with all constraint flags set to their default values.

Warning
Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
weightsweights determining the variable order, or NULL if natural order should be used

Definition at line 10497 of file cons_sos1.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddVarSOS1(), SCIPcreateConsSOS1(), and TRUE.

Referenced by createKKTComplementarityBinary(), createKKTComplementarityBounds(), createKKTComplementarityLinear(), and SCIPcreateConsSOS1().

◆ SCIPaddVarSOS1()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint
weightweight determining position of variable

Definition at line 10513 of file cons_sos1.c.

References addVarSOS1(), CONSHDLR_NAME, NULL, 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().

◆ SCIPappendVarSOS1()

SCIP_EXPORT SCIP_RETCODE SCIPappendVarSOS1 ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var 
)

appends variable to SOS1 constraint

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint

Definition at line 10547 of file cons_sos1.c.

Referenced by SCIPaddVarSOS1().

◆ SCIPgetNVarsSOS1()

SCIP_EXPORT int SCIPgetNVarsSOS1 ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in SOS1 constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 10580 of file cons_sos1.c.

Referenced by SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetVarsSOS1()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsSOS1 ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in SOS1 constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 10605 of file cons_sos1.c.

Referenced by SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetWeightsSOS1()

SCIP_EXPORT SCIP_Real* SCIPgetWeightsSOS1 ( SCIP scip,
SCIP_CONS cons 
)

gets array of weights in SOS1 constraint (or NULL if not existent)

Parameters
scipSCIP data structure
consconstraint data

Definition at line 10630 of file cons_sos1.c.

Referenced by SCIPgetConsVals(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetConflictgraphSOS1()

SCIP_EXPORT SCIP_DIGRAPH* SCIPgetConflictgraphSOS1 ( SCIP_CONSHDLR conshdlr)

gets conflict graph of SOS1 constraints (or NULL if not existent)

Note
The conflict graph is globally valid; local changes are not taken into account.
Parameters
conshdlrSOS1 constraint handler

Definition at line 10658 of file cons_sos1.c.

Referenced by getDiveBdChgsSOS1conflictgraph(), makeSOS1conflictgraphFeasible(), SCIP_DECL_SEPAEXECLP(), and sepaBoundInequalitiesFromGraph().

◆ SCIPgetNSOS1Vars()

SCIP_EXPORT int SCIPgetNSOS1Vars ( SCIP_CONSHDLR conshdlr)

gets number of problem variables that are part of the SOS1 conflict graph

Parameters
conshdlrSOS1 constraint handler

Definition at line 10680 of file cons_sos1.c.

Referenced by getDiveBdChgsSOS1conflictgraph(), makeSOS1conflictgraphFeasible(), SCIP_DECL_SEPAEXECLP(), SCIPperformGenericDivingAlgorithm(), and sepaBoundInequalitiesFromGraph().

◆ SCIPvarIsSOS1()

SCIP_EXPORT SCIP_Bool SCIPvarIsSOS1 ( SCIP_CONSHDLR conshdlr,
SCIP_VAR var 
)

returns whether variable is part of the SOS1 conflict graph

Parameters
conshdlrSOS1 constraint handler
varvariable

Definition at line 10702 of file cons_sos1.c.

◆ SCIPvarGetNodeSOS1()

SCIP_EXPORT 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

Parameters
conshdlrSOS1 constraint handler
varvariable

Definition at line 10726 of file cons_sos1.c.

Referenced by markNeighborsMWISHeuristic().

◆ SCIPnodeGetVarSOS1()

◆ SCIPmakeSOS1sFeasible()

SCIP_EXPORT 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

Parameters
scipSCIP pointer
conshdlrSOS1 constraint handler
solsolution
changedpointer to store whether the solution has been changed
successpointer to store whether SOS1 constraints have been turned feasible and solution was good enough

Definition at line 10782 of file cons_sos1.c.

References CONSHDLR_NAME, FALSE, makeSOS1conflictgraphFeasible(), makeSOS1constraintsFeasible(), NULL, 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().

◆ SCIPcreateConsSOS2()

SCIP_EXPORT 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).

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

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).

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
weightsweights determining the variable order, or NULL if natural order should be used
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 2351 of file cons_sos2.c.

References CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicSOS2()

SCIP_EXPORT 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.

Warning
Do NOT set the constraint to be modifiable manually, because this might lead to wrong results as the variable array will not be resorted
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables in the constraint
varsarray with variables of constraint entries
weightsweights determining the variable order, or NULL if natural order should be used

Definition at line 2434 of file cons_sos2.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddVarSOS2(), SCIPcreateConsSOS2(), and TRUE.

Referenced by SCIPcreateConsSOS2().

◆ SCIPaddVarSOS2()

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint
weightweight determining position of variable

Definition at line 2450 of file cons_sos2.c.

References addVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarSOS2(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, and SCIPvarGetName().

Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicSOS2().

◆ SCIPappendVarSOS2()

SCIP_EXPORT SCIP_RETCODE SCIPappendVarSOS2 ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR var 
)

appends variable to SOS2 constraint

Parameters
scipSCIP data structure
consconstraint
varvariable to add to the constraint

Definition at line 2476 of file cons_sos2.c.

References appendVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetNVarsSOS2(), and SCIPvarGetName().

Referenced by SCIPaddVarSOS2().

◆ SCIPgetNVarsSOS2()

SCIP_EXPORT int SCIPgetNVarsSOS2 ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in SOS2 constraint

Parameters
scipSCIP data structure
consconstraint

Definition at line 2501 of file cons_sos2.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsSOS2().

Referenced by SCIPappendVarSOS2(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetVarsSOS2()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsSOS2 ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in SOS2 constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 2526 of file cons_sos2.c.

References CONSHDLR_NAME, NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsSOS2().

Referenced by SCIPgetNVarsSOS2(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPgetWeightsSOS2()

SCIP_EXPORT SCIP_Real* SCIPgetWeightsSOS2 ( SCIP scip,
SCIP_CONS cons 
)

gets array of weights in SOS2 constraint (or NULL if not existent)

Parameters
scipSCIP data structure
consconstraint data

Definition at line 2551 of file cons_sos2.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetConsVals(), SCIPgetVarsSOS2(), SCIPwriteLp(), and SCIPwriteMps().

◆ SCIPcreateConsSuperindicator()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
binvarpointer to the indicator constraint
slackconsconstraint corresponding to the handled constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 1991 of file cons_superindicator.c.

References consdataCreateSuperindicator(), CONSHDLR_NAME, FALSE, NULL, 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().

◆ SCIPcreateConsBasicSuperindicator()

SCIP_EXPORT 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

See also
SCIPcreateConsSuperindicator() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
binvarpointer to the indicator constraint
slackconsconstraint corresponding to the handled constraint

Definition at line 2102 of file cons_superindicator.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSuperindicator(), SCIPgetBinaryVarSuperindicator(), and TRUE.

Referenced by SCIPcreateConsSuperindicator().

◆ SCIPgetBinaryVarSuperindicator()

SCIP_EXPORT SCIP_VAR* SCIPgetBinaryVarSuperindicator ( SCIP_CONS cons)

gets binary variable corresponding to the superindicator constraint

gets binary variable corresponding to the general indicator constraint

Parameters
conssuperindicator constraint

Definition at line 2124 of file cons_superindicator.c.

References CONSHDLR_NAME, NULL, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPgetSlackConsSuperindicator().

Referenced by SCIPcreateConsBasicSuperindicator().

◆ SCIPgetSlackConsSuperindicator()

SCIP_EXPORT SCIP_CONS* SCIPgetSlackConsSuperindicator ( SCIP_CONS cons)

gets the slack constraint corresponding to the superindicator constraint

gets the slack constraint corresponding to the general indicator constraint

Parameters
conssuperindicator constraint

Definition at line 2136 of file cons_superindicator.c.

References CONSHDLR_NAME, NULL, SCIP_Bool, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPtransformMinUC().

Referenced by SCIPgetBinaryVarSuperindicator().

◆ SCIPtransformMinUC()

◆ SCIP_DECL_DIALOGEXEC() [4/4]

SCIP_EXPORT SCIP_DECL_DIALOGEXEC ( SCIPdialogExecChangeMinUC  )

dialog execution method for the SCIPtransformMinUC() command

dialog execution method for the SCIPtransformMinUC() method

Definition at line 2291 of file cons_superindicator.c.

Referenced by SCIPtransformMinUC().

◆ SCIPcreateSymbreakCons()

SCIP_EXPORT SCIP_RETCODE SCIPcreateSymbreakCons ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int *  perm,
SCIP_VAR **  vars,
int  nvars,
SCIP_Bool  ismodelcons,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates a symmetry breaking constraint

Depending on the given permutation, either an orbisack or symresack constraint is created.

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
permpermutation
varsvariables
nvarsnumber of variables in vars array
ismodelconswhether the added constraint is a model constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 1430 of file cons_symresack.c.

References FALSE, NULL, orbisackUpgrade(), SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_OKAY, and SCIPcreateConsSymresack().

Referenced by addSymresackConss(), and orbisackUpgrade().

◆ SCIPcreateConsSymresack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsSymresack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int *  perm,
SCIP_VAR **  vars,
int  nvars,
SCIP_Bool  ismodelcons,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a symresack constraint

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

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.

Note
The constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons().
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
permpermutation
varsvariables
nvarsnumber of variables in vars array
ismodelconswhether the symresack is a model constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 2617 of file cons_symresack.c.

References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicSymresack(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by SCIP_DECL_CONSCOPY(), SCIPcreateConsBasicSymresack(), SCIPcreateSymbreakCons(), and SCIPincludeConshdlrSymresack().

◆ SCIPcreateConsBasicSymresack()

SCIP_EXPORT SCIP_RETCODE SCIPcreateConsBasicSymresack ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int *  perm,
SCIP_VAR **  vars,
int  nvars,
SCIP_Bool  ismodelcons 
)

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

See also
SCIPcreateConsSymresack() for the default constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a 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

Note
The constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons().
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
permpermutation
varsvariables
nvarsnumber of variables in vars array
ismodelconswhether the symresack is a model constraint

Definition at line 2682 of file cons_symresack.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSymresack(), and TRUE.

Referenced by SCIPcreateConsSymresack().

◆ SCIPcreateConsVarbound()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
vbdcoefcoefficient c of bounding variable y
lhsleft hand side of variable bound inequality
rhsright hand side of variable bound inequality
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 5047 of file cons_varbound.c.

References catchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, 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(), SCIPcreateSchedulingProblem(), and SCIPincludeConshdlrVarbound().

◆ SCIPcreateConsBasicVarbound()

SCIP_EXPORT 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

See also
SCIPcreateConsVarbound() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a variable bound constraint: lhs <= x + c*y <= rhs with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
vbdcoefcoefficient c of bounding variable y
lhsleft hand side of variable bound inequality
rhsright hand side of variable bound inequality

Definition at line 5117 of file cons_varbound.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcreateConsVarbound(), SCIPgetLhsVarbound(), and TRUE.

Referenced by addBranchingDecisionConss(), applyRepair(), createVarboundCons(), and SCIPcreateConsVarbound().

◆ SCIPgetLhsVarbound()

◆ SCIPgetRhsVarbound()

◆ SCIPgetVarVarbound()

◆ SCIPgetVbdvarVarbound()

◆ SCIPgetVbdcoefVarbound()

◆ SCIPgetDualsolVarbound()

SCIP_EXPORT SCIP_Real SCIPgetDualsolVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the variable bound constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5250 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetDualfarkasVarbound(), and SCIProwGetDualsol().

Referenced by SCIPconsGetDualsol(), and SCIPgetVbdcoefVarbound().

◆ SCIPgetDualfarkasVarbound()

SCIP_EXPORT SCIP_Real SCIPgetDualfarkasVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the variable bound constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5276 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetRowVarbound(), and SCIProwGetDualfarkas().

Referenced by SCIPconsGetDualfarkas(), and SCIPgetDualsolVarbound().

◆ SCIPgetRowVarbound()

SCIP_EXPORT SCIP_ROW* SCIPgetRowVarbound ( SCIP scip,
SCIP_CONS cons 
)

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!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5304 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcleanupConssVarbound(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPconsGetRow(), and SCIPgetDualfarkasVarbound().

◆ SCIPcleanupConssVarbound()

SCIP_EXPORT SCIP_RETCODE SCIPcleanupConssVarbound ( SCIP scip,
SCIP_Bool  onlychecked,
SCIP_Bool infeasible,
int *  naddconss,
int *  ndelconss,
int *  nchgbds 
)

cleans up (multi-)aggregations and fixings from varbound constraints

Parameters
scipSCIP data structure
onlycheckedshould only checked constraints be cleaned up?
infeasiblepointer to return whether the problem was detected to be infeasible
naddconsspointer to count number of added (linear) constraints
ndelconsspointer to count number of deleted (varbound) constraints
nchgbdspointer to count number of bound changes

Definition at line 5327 of file cons_varbound.c.

References applyFixings(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetNCheckConss(), and SCIPfindConshdlr().

Referenced by SCIPgetRowVarbound(), and SCIPmatrixCreate().

◆ SCIPcreateConsXor()

SCIP_EXPORT 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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
rhsright hand side of the constraint
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould 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'.
stickingatnodeshould 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 5842 of file cons_xor.c.

References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicXor(), SCIPerrorMessage, and SCIPfindConshdlr().

Referenced by CREATE_CONSTRAINT(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicXor(), SCIPincludeConshdlrXor(), and tryUpgradingXor().

◆ SCIPcreateConsBasicXor()

SCIP_EXPORT 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

See also
SCIPcreateConsXor() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
rhsright hand side of the constraint
nvarsnumber of operator variables in the constraint
varsarray with operator variables of constraint

Definition at line 5900 of file cons_xor.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsXor(), SCIPgetNVarsXor(), and TRUE.

Referenced by createMIP(), and SCIPcreateConsXor().

◆ SCIPgetNVarsXor()

SCIP_EXPORT int SCIPgetNVarsXor ( SCIP scip,
SCIP_CONS cons 
)

gets number of variables in xor constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5916 of file cons_xor.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsXor().

Referenced by computeSymmetryGroup(), and SCIPcreateConsBasicXor().

◆ SCIPgetVarsXor()

SCIP_EXPORT SCIP_VAR** SCIPgetVarsXor ( SCIP scip,
SCIP_CONS cons 
)

gets array of variables in xor constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5939 of file cons_xor.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetIntVarXor().

Referenced by computeSymmetryGroup(), and SCIPgetNVarsXor().

◆ SCIPgetIntVarXor()

SCIP_EXPORT SCIP_VAR* SCIPgetIntVarXor ( SCIP scip,
SCIP_CONS cons 
)

gets integer variable in xor constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5962 of file cons_xor.c.

References CONSHDLR_NAME, NULL, SCIP_Bool, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsXor().

Referenced by computeSymmetryGroup(), and SCIPgetVarsXor().

◆ SCIPgetRhsXor()

SCIP_EXPORT SCIP_Bool SCIPgetRhsXor ( SCIP scip,
SCIP_CONS cons 
)

gets the right hand side of the xor constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 5985 of file cons_xor.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by computeSymmetryGroup(), SCIP_DECL_CONSCOPY(), and SCIPgetIntVarXor().