All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cons_quadratic.h File Reference Detailed Descriptionconstraint handler for quadratic constraints 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
Definition in file cons_quadratic.h. Go to the source code of this file.
Macro Definition Documentation
Value:
int nbinlin, int nbinquad, int nintlin, int nintquad, int nimpllin, int nimplquad, int ncontlin, int ncontquad, \
upgrading method for quadratic constraints into more specific constraints the method might upgrade a quadratic constraint into a set of quadratic constraints the caller provided an array upgdconss to store upgrade constraints the length of upgdconss is given by upgdconsssize if an upgrade is not possible, set *nupgdconss to zero if more than upgdconsssize many constraints shall replace cons, the function should return the required number as negated value in *nupgdconss i.e., if cons should be replaced by 3 constraints, the function should set *nupgdconss to -3 and return with SCIP_OKAY input:
Definition at line 128 of file cons_quadratic.h. Typedef Documentation
event data for variable bound changes in quadratic constraints Definition at line 71 of file cons_quadratic.h.
Definition at line 87 of file cons_quadratic.h.
Definition at line 98 of file cons_quadratic.h. Function Documentation
creates the handler for quadratic constraints and includes it in SCIP
Definition at line 11544 of file cons_quadratic.c. References BMSclearMemory, CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPRESOL, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, FALSE, NONLINCONSUPGD_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeNonlinconsUpgrade(), SCIPinfinity(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE. Referenced by SCIP_DECL_CONSHDLRCOPY(), and SCIPincludeDefaultPlugins().
includes a quadratic constraint upgrade method into the quadratic constraint handler includes a quadratic constraint update method into the quadratic constraint handler
Definition at line 11672 of file cons_quadratic.c. References SCIP_QuadConsUpgrade::active, CONSHDLR_NAME, conshdlrdataHasUpgrade(), FALSE, NULL, paramname, SCIP_QuadConsUpgrade::priority, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPaddBoolParam(), SCIPallocMemory, SCIPcalcMemGrowSize(), SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPreallocMemoryArray, and SCIPsnprintf(). Referenced by SCIPincludeConshdlrAbspower(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrBounddisjunction(), SCIPincludeConshdlrLinear(), SCIPincludeConshdlrSetppc(), and SCIPincludeConshdlrSOC().
Creates and captures a quadratic constraint. The constraint should be given in the form
where is possible.
Creates and captures a quadratic constraint. The constraint should be given in the form
where is possible.
Definition at line 11748 of file cons_quadratic.c. References addBilinearTerm(), addLinearCoef(), addQuadVarTerm(), catchVarEvents(), consdataCreateEmpty(), consdataEnsureBilinSize(), consdataEnsureLinearVarsSize(), CONSHDLR_NAME, FALSE, mergeAndCleanBilinearTerms(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindConshdlr(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPisTransformed(), and SCIPisZero(). Referenced by createQuadraticCons(), readConstraints(), readObjective(), readQCMatrix(), readQMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsBasicQuadratic(), SCIPcreateConsIndicator(), and SCIPcreateConsIndicatorLinCons().
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.
creates and captures a quadratic constraint with all its flags set to their default values. The constraint should be given in the form
where is possible.
Definition at line 11936 of file cons_quadratic.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsQuadratic(), and TRUE.
creates and captures a quadratic constraint. The constraint should be given in the form
Creates and captures a quadratic constraint. The constraint should be given in the form
Definition at line 11967 of file cons_quadratic.c. References catchVarEvents(), consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPisTransformed(), and TRUE. Referenced by presolveDisaggregate(), presolveRemoveFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_QUADCONSUPGD(), and SCIPcreateConsBasicQuadratic2().
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
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
Definition at line 12038 of file cons_quadratic.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsQuadratic2(), and TRUE. Adds a constant to the constraint function, that is, subtracts a constant from both sides
Definition at line 12062 of file cons_quadratic.c. References NULL, REALABS, SCIPconsGetData(), SCIPisEQ(), and SCIPisInfinity(). Referenced by SCIP_DECL_CONSPARSE(), and SCIP_DECL_NONLINCONSUPGD().
Adds a linear variable with coefficient to a quadratic constraint.
Definition at line 12092 of file cons_quadratic.c. References addLinearCoef(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, and SCIPisInfinity(). Referenced by presolveDisaggregate(), readObjective(), SCIP_DECL_CONSPARSE(), and SCIP_DECL_QUADCONSUPGD().
Adds a quadratic variable with linear and square coefficient to a quadratic constraint.
Definition at line 12111 of file cons_quadratic.c. References addQuadVarTerm(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIPconsIsTransformed(), and SCIPisInfinity(). Referenced by presolveDisaggregate(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), and SCIP_DECL_QUADCONSUPGD().
Adds a linear coefficient for a quadratic variable. Variable will be added with square coefficient 0.0 if not existing yet.
Definition at line 12134 of file cons_quadratic.c. References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPintervalSetEmpty(), SCIPisInfinity(), and SCIPisZero(). Referenced by SCIP_DECL_NONLINCONSUPGD(), and SCIP_DECL_QUADCONSUPGD().
Adds a square coefficient for a quadratic variable. Variable will be added with linear coefficient 0.0 if not existing yet.
Definition at line 12180 of file cons_quadratic.c. References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPintervalSetEmpty(), SCIPisInfinity(), and SCIPisZero(). Referenced by SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), and SCIPaddBilinTermQuadratic().
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.
Definition at line 12230 of file cons_quadratic.c. References addBilinearTerm(), addQuadVarTerm(), consdataFindQuadVarTerm(), consdataSortQuadVarTerms(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIPaddSquareCoefQuadratic(), SCIPconsGetData(), SCIPconsIsTransformed(), and SCIPisInfinity(). Referenced by presolveDisaggregate(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), and SCIP_DECL_QUADCONSUPGD().
Gets the quadratic constraint as a nonlinear row representation.
Definition at line 12290 of file cons_quadratic.c. References createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData(). Referenced by createCoveringProblem(). 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.
Definition at line 12316 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip(). Gets the variables in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.
Definition at line 12330 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip(). Gets the coefficients in the linear part of a quadratic constraint. Length is given by SCIPgetNQuadVarsQuadratic. Gets the coefficients in the linear part of a quadratic constraint. Length is given by SCIPgetNLinearVarsQuadratic.
Definition at line 12344 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip(). Gets the number of quadratic variable terms of a quadratic constraint.
Definition at line 12357 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the quadratic variable terms of a quadratic constraint. Length is given by SCIPgetNQuadVarTermsQuadratic.
Definition at line 12371 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Ensures that quadratic variable terms are sorted.
Definition at line 12383 of file cons_quadratic.c. References consdataSortQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData(). Referenced by readNonlinearExprs().
Finds the position of a quadratic variable term for a given variable.
Definition at line 12400 of file cons_quadratic.c. References consdataFindQuadVarTerm(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData(). Referenced by readNonlinearExprs(), SCIP_DECL_CONSPARSE(), and SCIP_DECL_QUADCONSUPGD(). Gets the number of bilinear terms of a quadratic constraint.
Definition at line 12419 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Gets the bilinear terms of a quadratic constraint. Length is given by SCIPgetNBilinTermQuadratic.
Definition at line 12433 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by readNonlinearExprs(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip(). Gets the left hand side of a quadratic constraint.
Definition at line 12446 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by checkConsnames(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip(). Gets the right hand side of a quadratic constraint.
Definition at line 12459 of file cons_quadratic.c. References NULL, and SCIPconsGetData(). Referenced by checkConsnames(), createCoveringProblem(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), and SCIPwritePip().
Check the quadratic function of a quadratic constraint for its semi-definiteness, if not done yet.
Definition at line 12472 of file cons_quadratic.c. References checkCurvature(), NULL, SCIP_CALL, SCIP_OKAY, and TRUE. Referenced by SCIP_DECL_QUADCONSUPGD(). Indicates whether the quadratic function of a quadratic constraint is (known to be) convex.
Definition at line 12486 of file cons_quadratic.c. References checkCurvatureEasy(), FALSE, NULL, SCIP_Bool, and SCIPconsGetData(). Referenced by createCoveringProblem(), and SCIP_DECL_QUADCONSUPGD(). Indicates whether the quadratic function of a quadratic constraint is (known to be) concave.
Definition at line 12504 of file cons_quadratic.c. References checkCurvatureEasy(), FALSE, NULL, SCIP_Bool, and SCIPconsGetData(). Referenced by createCoveringProblem(), and SCIP_DECL_QUADCONSUPGD().
Gets the violation of a constraint by a solution. Computes the violation of a constraint by a solution
Definition at line 12521 of file cons_quadratic.c. References computeViolation(), MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPconsGetHdlr(). 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.
Definition at line 12552 of file cons_quadratic.c. References FALSE, NULL, SCIPconsGetData(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Adds the constraint to an NLPI problem.
Definition at line 12598 of file cons_quadratic.c. References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArrayNull, SCIPhashmapExists(), SCIPhashmapGetImage(), and SCIPnlpiAddConstraints(). |