|
constraint handler for quadratic constraints
- Author
- Stefan Vigerske
This constraint handler handles constraints of the form
Constraints are enforced by separation, domain propagation, and spatial branching.
For semidefinite matrices , cuts based on linearization of are implemented. For underestimating a non-convex term, McCormick underestimators and secants for univariate concave quadratic terms are implemented. If 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.
Definition in file cons_quadratic.h.
#include "scip/scip.h"
#include "scip/intervalarith.h"
#include "nlpi/type_nlpi.h"
Go to the source code of this file.
|
SCIP_RETCODE | SCIPincludeConshdlrQuadratic (SCIP *scip) |
|
SCIP_RETCODE | SCIPincludeQuadconsUpgrade (SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname) |
|
SCIP_RETCODE | SCIPcreateConsQuadratic (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoeffs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) |
|
SCIP_RETCODE | SCIPcreateConsBasicQuadratic (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs) |
|
SCIP_RETCODE | SCIPcreateConsQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) |
|
SCIP_RETCODE | SCIPcreateConsBasicQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs) |
|
void | SCIPaddConstantQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real constant) |
|
SCIP_RETCODE | SCIPaddLinearVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPaddQuadVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real lincoef, SCIP_Real sqrcoef) |
|
SCIP_RETCODE | SCIPaddQuadVarLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPaddSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPaddBilinTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPgetNlRowQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
|
int | SCIPgetNLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_VAR ** | SCIPgetLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_Real * | SCIPgetCoefsLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
int | SCIPgetNQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_QUADVARTERM * | SCIPgetQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_RETCODE | SCIPsortQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_RETCODE | SCIPfindQuadVarTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos) |
|
int | SCIPgetNBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_BILINTERM * | SCIPgetBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_Real | SCIPgetLhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_Real | SCIPgetRhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_RETCODE | SCIPcheckCurvatureQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_Bool | SCIPisConvexQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_Bool | SCIPisConcaveQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_RETCODE | SCIPgetViolationQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation) |
|
SCIP_Bool | SCIPisLinearLocalQuadratic (SCIP *scip, SCIP_CONS *cons) |
|
SCIP_RETCODE | SCIPaddToNlpiProblemQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names) |
|
SCIP_RETCODE | SCIPchgLhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
|
SCIP_RETCODE | SCIPchgRhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
|
SCIP_RETCODE | SCIPgetFeasibilityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *feasibility) |
|
SCIP_RETCODE | SCIPgetActivityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity) |
|
SCIP_RETCODE | SCIPchgLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPchgSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
|
SCIP_RETCODE | SCIPchgBilinCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
|
#define SCIP_DECL_QUADCONSUPGD |
( |
|
x | ) |
|
Value: int nbinlin, int nbinquad, int nintlin, int nintquad, int nimpllin, int nimplquad, int ncontlin, int ncontquad, \ struct SCIP_Cons SCIP_CONS
enum SCIP_Retcode SCIP_RETCODE
unsigned int SCIP_PRESOLTIMING
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 129 of file cons_quadratic.h.
event data for variable bound changes in quadratic constraints
Definition at line 71 of file cons_quadratic.h.
creates the handler for quadratic constraints and includes it in SCIP
- Parameters
-
includes a quadratic constraint upgrade method into the quadratic constraint handler
- Parameters
-
scip | SCIP data structure |
priority | priority of upgrading method |
active | should the upgrading method be active by default? |
conshdlrname | name of the constraint handler |
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 |
|
) |
| |
Creates and captures a quadratic constraint.
The constraint should be given in the form
where is possible.
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | variables in linear part (x_i) or NULL if nlinvars == 0 |
lincoefs | coefficients of variables in linear part (b_i) or NULL if nlinvars == 0 |
nquadterms | number of quadratic terms (m) |
quadvars1 | array with first variables in quadratic terms (y_j) or NULL if nquadterms == 0 |
quadvars2 | array with second variables in quadratic terms (z_j) or NULL if nquadterms == 0 |
quadcoeffs | array with coefficients of quadratic terms (a_j) or NULL if nquadterms == 0 |
lhs | left hand side of quadratic equation (l) |
rhs | right hand side of quadratic equation (u) |
initial | should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. |
separate | should the constraint be separated during LP processing? Usually set to TRUE. |
enforce | should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. |
check | should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. |
propagate | should the constraint be propagated during node processing? Usually set to TRUE. |
local | is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. |
modifiable | is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. |
dynamic | is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. |
removable | should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. |
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
where 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()
- Parameters
-
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadterms | number of quadratic terms (m) |
quadvars1 | array with first variables in quadratic terms (y_j) |
quadvars2 | array with second variables in quadratic terms (z_j) |
quadcoefs | array with coefficients of quadratic terms (a_j) |
lhs | left hand side of quadratic equation (ell) |
rhs | right hand side of quadratic equation (u) |
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
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadvarterms | number of quadratic terms (m) |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms (p) |
bilinterms | bilinear terms |
lhs | constraint left hand side (ell) |
rhs | constraint right hand side (u) |
initial | should the LP relaxation of constraint be in the initial LP? |
separate | should the constraint be separated during LP processing? |
enforce | should the constraint be enforced during node processing? |
check | should the constraint be checked for feasibility? |
propagate | should the constraint be propagated during node processing? |
local | is constraint only valid locally? |
modifiable | is constraint modifiable (subject to column generation)? |
dynamic | is constraint dynamic? |
removable | should the constraint be removed from the LP due to aging or cleanup? |
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
- 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()
- Parameters
-
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nlinvars | number of linear terms (n) |
linvars | array with variables in linear part (x_i) |
lincoefs | array with coefficients of variables in linear part (b_i) |
nquadvarterms | number of quadratic terms (m) |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms (p) |
bilinterms | bilinear terms |
lhs | constraint left hand side (ell) |
rhs | constraint right hand side (u) |
Adds a constant to the constraint function, that is, subtracts a constant from both sides
- Parameters
-
scip | SCIP data structure |
cons | constraint |
constant | constant to subtract from both sides |
Adds a linear variable with coefficient to a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | coefficient of variable |
Adds a quadratic variable with linear and square coefficient to a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
var | variable |
lincoef | linear coefficient of variable |
sqrcoef | square coefficient of variable |
Adds a linear coefficient for a quadratic variable.
Variable will be added with square coefficient 0.0 if not existing yet.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | value to add to linear coefficient of variable |
Adds a square coefficient for a quadratic variable.
Variable will be added with linear coefficient 0.0 if not existing yet.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
var | variable |
coef | value to add to square coefficient of variable |
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
-
scip | SCIP data structure |
cons | constraint |
var1 | first variable |
var2 | second variable |
coef | coefficient of bilinear term |
Gets the quadratic constraint as a nonlinear row representation.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
nlrow | pointer to store nonlinear row |
int SCIPgetNLinearVarsQuadratic |
( |
SCIP * |
scip, |
|
|
SCIP_CONS * |
cons |
|
) |
| |
Gets the number of variables in the linear part of a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the variables in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the coefficients in the linear part of a quadratic constraint. Length is given by SCIPgetNQuadVarsQuadratic.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
int SCIPgetNQuadVarTermsQuadratic |
( |
SCIP * |
scip, |
|
|
SCIP_CONS * |
cons |
|
) |
| |
Gets the number of quadratic variable terms of a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the quadratic variable terms of a quadratic constraint. Length is given by SCIPgetNQuadVarTermsQuadratic.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Ensures that quadratic variable terms are sorted.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
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
-
scip | SCIP data structure |
cons | constraint |
var | variable to search for |
pos | buffer to store position of quadvarterm for var, or -1 if not found |
int SCIPgetNBilinTermsQuadratic |
( |
SCIP * |
scip, |
|
|
SCIP_CONS * |
cons |
|
) |
| |
Gets the number of bilinear terms of a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the bilinear terms of a quadratic constraint. Length is given by SCIPgetNBilinTermQuadratic.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the left hand side of a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the right hand side of a quadratic constraint.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Check the quadratic function of a quadratic constraint for its semi-definiteness, if not done yet.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Indicates whether the quadratic function of a quadratic constraint is (known to be) convex.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Indicates whether the quadratic function of a quadratic constraint is (known to be) concave.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
Gets the violation of a constraint by a solution.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
sol | solution which violation to calculate, or NULL for LP solution |
violation | pointer to store violation of constraint |
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
-
scip | SCIP data structure |
cons | constraint |
Adds the constraint to an NLPI problem.
- Parameters
-
scip | SCIP data structure |
cons | constraint |
nlpi | interface to NLP solver |
nlpiprob | NLPI problem where to add constraint |
scipvar2nlpivar | mapping from SCIP variables to variable indices in NLPI |
names | whether to pass constraint names to NLPI |
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
-
scip | SCIP data structure |
cons | constraint data |
lhs | new left hand side |
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
-
scip | SCIP data structure |
cons | constraint data |
rhs | new right hand side |
gets the feasibility of the quadratic constraint in the given solution
- Parameters
-
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
feasibility | pointer to store the feasibility |
gets the activity of the quadratic constraint in the given solution
- Parameters
-
scip | SCIP data structure |
cons | constraint data |
sol | solution, or NULL to use current node's solution |
activity | pointer to store the activity |
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
-
scip | SCIP data structure |
cons | constraint data |
var | quadratic variable |
coef | new coefficient |
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
-
scip | SCIP data structure |
cons | constraint data |
var | quadratic variable |
coef | new coefficient |
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
-
scip | SCIP data structure |
cons | constraint |
var1 | first quadratic variable |
var2 | second quadratic variable |
coef | coefficient of bilinear term |
|