Detailed Description
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}\)
Definition in file cons_quadratic.h.
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_lp.h"
#include "scip/type_misc.h"
#include "scip/type_nlp.h"
#include "nlpi/type_nlpi.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sepa.h"
#include "scip/type_sol.h"
#include "scip/type_timing.h"
#include "scip/type_var.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_QuadVarTerm |
struct | SCIP_BilinTerm |
struct | SCIP_RowPrep |
Functions | |
SCIP_RETCODE | SCIPincludeConshdlrQuadratic (SCIP *scip) |
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
| |
#define | SCIP_DECL_QUADCONSUPGD(x) |
typedef struct SCIP_QuadVarEventData | SCIP_QUADVAREVENTDATA |
typedef struct SCIP_QuadVarTerm | SCIP_QUADVARTERM |
typedef struct SCIP_BilinTerm | SCIP_BILINTERM |
typedef struct SCIP_RowPrep | SCIP_ROWPREP |
SCIP_RETCODE | SCIPincludeQuadconsUpgrade (SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname) |
SCIP_RETCODE | SCIPcreateConsQuadratic (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoeffs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) |
SCIP_RETCODE | SCIPcreateConsBasicQuadratic (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs) |
SCIP_RETCODE | SCIPcreateConsQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) |
SCIP_RETCODE | SCIPcreateConsBasicQuadratic2 (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs) |
void | SCIPaddConstantQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real constant) |
SCIP_RETCODE | SCIPaddLinearVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddQuadVarQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real lincoef, SCIP_Real sqrcoef) |
SCIP_RETCODE | SCIPaddQuadVarLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPaddBilinTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
SCIP_RETCODE | SCIPgetNlRowQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
int | SCIPgetNLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR ** | SCIPgetLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real * | SCIPgetCoefsLinearVarsQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetNQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_QUADVARTERM * | SCIPgetQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsortQuadVarTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPfindQuadVarTermQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos) |
int | SCIPgetNBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_BILINTERM * | SCIPgetBilinTermsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetLinvarMayDecreaseQuadratic (SCIP *scip, SCIP_CONS *cons) |
int | SCIPgetLinvarMayIncreaseQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPcheckCurvatureQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPisConvexQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_Bool | SCIPisConcaveQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPgetViolationQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *violation) |
SCIP_Bool | SCIPisLinearLocalQuadratic (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPaddToNlpiProblemQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names) |
SCIP_RETCODE | SCIPchgLhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
SCIP_RETCODE | SCIPchgRhsQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
SCIP_RETCODE | SCIPgetFeasibilityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *feasibility) |
SCIP_RETCODE | SCIPgetActivityQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity) |
SCIP_RETCODE | SCIPchgLinearCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPchgSquareCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef) |
SCIP_RETCODE | SCIPchgBilinCoefQuadratic (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real coef) |
int | SCIPgetNAllBilinearTermsQuadratic (SCIP *scip) |
SCIP_RETCODE | SCIPgetAllBilinearTermsQuadratic (SCIP *scip, SCIP_VAR **RESTRICT x, SCIP_VAR **RESTRICT y, int *RESTRICT nbilinterms, int *RESTRICT nunderests, int *RESTRICT noverests, SCIP_Real *maxnonconvexity) |
SCIP_RETCODE | SCIPaddBilinearIneqQuadratic (SCIP *scip, SCIP_VAR *x, SCIP_VAR *y, int idx, SCIP_Real xcoef, SCIP_Real ycoef, SCIP_Real constant, SCIP_Bool *success) |