Detailed Descriptionconstraint handler for second order cone constraints Definition in file cons_soc.c. #include <assert.h> #include <string.h> #include <math.h> #include <ctype.h> #include "scip/cons_soc.h" #include "scip/cons_quadratic.h" #include "scip/cons_linear.h" #include "scip/heur_subnlp.h" #include "scip/heur_trysol.h" #include "scip/intervalarith.h" #include "nlpi/nlpi.h" #include "nlpi/exprinterpret.h" #include "nlpi/nlpi_ipopt.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 44 of file cons_soc.c. Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSFREE(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRINT(), SCIP_DECL_CONSTRANS(), SCIP_DECL_QUADCONSUPGD(), SCIPcreateConsSOC(), and SCIPincludeConshdlrSOC().
Definition at line 45 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
priority of the constraint handler for separation Definition at line 46 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
priority of the constraint handler for constraint enforcing Definition at line 47 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
priority of the constraint handler for checking feasibility Definition at line 48 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
frequency for separating cuts; zero means to separate only in the root node Definition at line 49 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 50 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only Definition at line 51 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 54 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
should separation method be delayed, if other separators found cuts? Definition at line 55 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
should propagation method be delayed, if other propagators found reductions? Definition at line 56 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
should the constraint handler be skipped, if no constraints are available? Definition at line 57 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
propagation timing mask of the constraint handler Definition at line 59 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
presolving timing of the constraint handler (fast, medium, or exhaustive) Definition at line 60 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
priority of the constraint handler for upgrading of quadratic constraints Definition at line 62 of file cons_soc.c. Referenced by SCIPincludeConshdlrSOC().
Definition at line 65 of file cons_soc.c. Referenced by presolveCreateBenTalNemirovskiApproxDim3(), and presolveCreateGlineurApproxDim3().
Definition at line 68 of file cons_soc.c. Referenced by SCIP_DECL_QUADCONSUPGD(). Typedef Documentation
Definition at line 81 of file cons_soc.c. Function Documentation
catch left hand side variable events
Definition at line 142 of file cons_soc.c. References catchRhsVarEvents(), VarEventData::consdata, FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPconsGetData(), and VarEventData::varidx. Referenced by catchVarEvents(), and presolveRemoveFixedVariables().
catch right hand side variable events
Definition at line 172 of file cons_soc.c. References catchVarEvents(), VarEventData::consdata, FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIPcatchVarEvent(), and SCIPconsGetData(). Referenced by catchLhsVarEvents(), catchVarEvents(), and presolveRemoveFixedVariables().
catch variables events
Definition at line 198 of file cons_soc.c. References catchLhsVarEvents(), catchRhsVarEvents(), VarEventData::consdata, dropLhsVarEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPconsGetData(). Referenced by catchRhsVarEvents(), presolveRemoveFixedVariables(), SCIP_DECL_CONSTRANS(), and SCIPcreateConsSOC().
drop left hand side variable events
Definition at line 235 of file cons_soc.c. References VarEventData::consdata, dropRhsVarEvents(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), and VarEventData::varidx. Referenced by catchVarEvents(), dropVarEvents(), and presolveRemoveFixedVariables().
drop right hand side variable events
Definition at line 262 of file cons_soc.c. References VarEventData::consdata, dropVarEvents(), NULL, SCIP_CALL, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIPconsGetData(), and SCIPdropVarEvent(). Referenced by dropLhsVarEvents(), dropVarEvents(), and presolveRemoveFixedVariables().
drop variable events
Definition at line 285 of file cons_soc.c. References VarEventData::consdata, dropLhsVarEvents(), dropRhsVarEvents(), NULL, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_OKAY, SCIPconsGetData(), and SCIPfreeBlockMemoryArray. Referenced by dropRhsVarEvents(), presolveRemoveFixedVariables(), and SCIP_DECL_CONSDELETE().
process variable bound tightening event Definition at line 321 of file cons_soc.c. References VarEventData::consdata, createNlRow(), FALSE, NULL, and SCIP_OKAY. Referenced by addLinearizationCuts(), and dropVarEvents().
create a nonlinear row representation of the constraint and stores them in consdata
Definition at line 341 of file cons_soc.c. References SCIP_QuadElement::coef, VarEventData::consdata, evalLhs(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_CONST, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIPaddLinearCoefToNlRow(), SCIPaddQuadElementToNlRow(), SCIPaddQuadVarToNlRow(), SCIPallocBufferArray, SCIPblkmem(), SCIPchgNlRowRhs(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateNlRow(), SCIPdebug, SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreateMonomial(), SCIPexprCreatePolynomial(), SCIPexprtreeAddVars(), SCIPexprtreeCreate(), SCIPexprtreeFree(), SCIPexprtreeSetVars(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPnlrowSearchQuadVar(), SCIPprintNlRow(), SCIPreleaseNlRow(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal(). Referenced by SCIP_DECL_CONSINITSOL(), SCIP_DECL_EVENTEXEC(), and SCIPgetNlRowSOC().
evaluates the left hand side of a SOC constraint
Definition at line 674 of file cons_soc.c. References VarEventData::consdata, getGradientNorm(), MAX, MIN, NULL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and sqrt(). Referenced by addLinearizationCuts(), computeViolation(), and createNlRow().
Definition at line 727 of file cons_soc.c. References computeViolation(), VarEventData::consdata, NULL, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPisInfinity(), and sqrt(). Referenced by computeViolation(), and evalLhs().
computes violation of a SOC constraint
Definition at line 760 of file cons_soc.c. References computeViolations(), VarEventData::consdata, evalLhs(), getGradientNorm(), MAX, MIN, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPerrorMessage, SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by computeViolations(), getGradientNorm(), and SCIP_DECL_CONSCHECK().
computes violations for a set of constraints
Definition at line 873 of file cons_soc.c. References computeViolation(), VarEventData::consdata, generateCutSol(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPfeastol(), and SCIPisGT(). Referenced by computeViolation(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
generate supporting hyperplane in a given solution
Definition at line 912 of file cons_soc.c. References VarEventData::consdata, FALSE, generateCutPoint(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRow(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPfreeBufferArray, SCIPgetNLPs(), SCIPgetSolVal(), SCIPinfinity(), SCIPisInfinity(), SCIPisPositive(), SCIPsnprintf(), and TRUE. Referenced by addLinearizationCuts(), computeViolations(), generateCutProjectedPoint(), generateSparseCut(), and separatePoint().
generate supporting hyperplane in a given point
Definition at line 964 of file cons_soc.c. References VarEventData::consdata, FALSE, generateCutProjectedPoint(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRow(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPfreeBufferArray, SCIPgetNLPs(), SCIPinfinity(), SCIPisInfinity(), SCIPisZero(), SCIPsnprintf(), sqrt(), and TRUE. Referenced by generateCutSol(), and generateSparseCut().
generate supporting hyperplane w.r.t. solution projected on feasible set Instead of linearizing the SOC constraint in the given solution point, this function projects the point first onto the feasible set of the SOC constraint (w.r.t. euclidean norm (scaled by alpha)) and linearizes the SOC constraint there. The hope is that this produces somewhat tighter cuts. The projection has only be computed for the case gamma = 0. If gamma > 0, generateCut is called. Let be sol or the LP solution if sol == NULL. Then the projected point is given by
where
If lambda is very close to 1, generateCut is called. The generated cut is very similar to the unprojected form. The only difference is in the right hand side, which is (in the case beta = 0) multiplied by 1/(1-lambda).
Definition at line 1060 of file cons_soc.c. References VarEventData::consdata, FALSE, generateCutSol(), generateSparseCut(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRow(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetNLPs(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasEQ(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPsnprintf(), and TRUE. Referenced by generateCutPoint(), and separatePoint().
generates sparsified supporting hyperplane
Definition at line 1136 of file cons_soc.c. References VarEventData::consdata, generateCutPoint(), generateCutSol(), MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetRowMaxCoef(), SCIPgetRowSolFeasibility(), SCIPgetSolVal(), SCIPgetSolVals(), SCIPisGT(), SCIPisInfinity(), SCIPisPositive(), SCIPreleaseRow(), SCIProwGetLhs(), SCIProwGetRhs(), SCIPsortRealInt(), separatePoint(), and TRUE. Referenced by generateCutProjectedPoint(), and separatePoint().
separates a point, if possible
Definition at line 1275 of file cons_soc.c. References addLinearizationCuts(), VarEventData::consdata, FALSE, generateCutProjectedPoint(), generateCutSol(), generateSparseCut(), MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPaddCut(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPepsilon(), SCIPerrorMessage, SCIPfeastol(), SCIPgetCutEfficacy(), SCIPgetRelaxFeastolFactor(), SCIPgetRowMaxCoef(), SCIPgetRowSolFeasibility(), SCIPisCutApplicable(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPmarkRowNotRemovableLocal(), SCIPreleaseRow(), SCIPresetConsAge(), SCIProwGetLhs(), SCIProwGetRhs(), and TRUE. Referenced by generateSparseCut(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
adds linearizations cuts for convex constraints w.r.t. a given reference point to cutpool and sepastore if separatedlpsol is not NULL, then a cut that separates the LP solution is added to the sepastore and is forced to enter the LP if separatedlpsol is not NULL, but cut does not separate the LP solution, then it is added to the cutpool only if separatedlpsol is NULL, then cut is added to cutpool only
Definition at line 1415 of file cons_soc.c. References VarEventData::consdata, evalLhs(), FALSE, generateCutSol(), MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPaddCut(), SCIPaddPoolCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsLocal(), SCIPdebugMessage, SCIPerrorMessage, SCIPgetRowLPFeasibility(), SCIPgetRowMaxCoef(), SCIPisInfinity(), SCIPisPositive(), SCIPreleaseRow(), SCIProwGetLhs(), SCIProwGetRhs(), SCIProwIsLocal(), and TRUE. Referenced by SCIP_DECL_CONSSEPALP(), SCIP_DECL_EVENTEXEC(), and separatePoint().
processes the event that a new primal solution has been found Definition at line 1528 of file cons_soc.c. References addLinearizationCuts(), NULL, presolveRemoveFixedVariables(), SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNConss(), SCIPdebugMessage, SCIPeventGetSol(), SCIPeventGetType(), SCIPheurGetName(), and SCIPsolGetHeur().
removes fixed variables, replace aggregated and negated variables repeats replacements until no further change is found; takes care of capture/release and locks, but not of variable events (assumes that var events are not caught yet)
Definition at line 1581 of file cons_soc.c. References BMSclearMemoryArray, catchLhsVarEvents(), catchRhsVarEvents(), catchVarEvents(), VarEventData::consdata, dropLhsVarEvents(), dropRhsVarEvents(), dropVarEvents(), FALSE, SCIP_QuadVarTerm::lincoef, NULL, presolveCreateGlineurApproxDim3(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_ORIGINAL, SCIPaddCons(), SCIPallocBufferArray, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateConsQuadratic2(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPfixVar(), SCIPfreeBufferArray, SCIPgetProbvarSum(), SCIPinfinity(), SCIPisFeasLE(), SCIPisNegative(), SCIPisZero(), SCIPlockVarCons(), SCIPreallocBlockMemoryArray, SCIPreleaseCons(), SCIPreleaseNlRow(), SCIPreleaseVar(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPunlockVarCons(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIP_QuadVarTerm::sqrcoef, sqrt(), TRUE, and SCIP_QuadVarTerm::var. Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_EVENTEXEC().
adds the linear outer-approximation of Glineur et.al. for a SOC constraint of dimension 3 Input is the data for a constraint . Here constant >= 0.0, alpha3 > 0.0, and the lower bound of x3 >= -offset3. Also x2 = NULL is allowed, in which case the second term is assumed to be constant, and offset2 != 0 is needed.
Definition at line 2018 of file cons_soc.c. References cos(), FALSE, M_PI, NULL, presolveCreateBenTalNemirovskiApproxDim3(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPinfinity(), SCIPisGE(), SCIPisPositive(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPtightenVarLb(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPwarningMessage(), sin(), and TRUE. Referenced by presolveCreateOuterApproxDim3(), and presolveRemoveFixedVariables().
adds the linear outer-approximation of Ben-Tal and Nemirovski for a SOC constraint of dimension 3 Input is the data for a constraint . Here constant >= 0.0, alpha3 > 0.0, and the lower bound of x3 >= -offset3. Also x2 = NULL is allowed, in which case the second term is assumed to be constant, and offset2 != 0 is needed.
Definition at line 2252 of file cons_soc.c. References cos(), M_PI, NULL, pow(), presolveCreateOuterApproxDim3(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPchgVarLbGlobal(), SCIPchgVarLbNode(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPisGE(), SCIPisPositive(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), sin(), and TRUE. Referenced by presolveCreateGlineurApproxDim3(), and presolveCreateOuterApproxDim3().
adds a linear outer approx for a three dimensional SOC constraint chooses between Ben-Tan/Nemirovski and Glineur and calls the corresponding function
Definition at line 2498 of file cons_soc.c. References presolveCreateBenTalNemirovskiApproxDim3(), presolveCreateGlineurApproxDim3(), presolveCreateOuterApprox(), SCIP_CALL, and SCIP_OKAY. Referenced by presolveCreateBenTalNemirovskiApproxDim3(), and presolveCreateOuterApprox().
adds linear outer approximation of Ben-Tal and Nemirovski for a constraint to the LP if n>2, calls same function recursively; if n=2, calls presolveCreateBenTalNemirovskiApproxDim3
Definition at line 2534 of file cons_soc.c. References FALSE, NULL, presolveCreateOuterApproxDim3(), propagateBounds(), SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddVar(), SCIPcreateVar(), SCIPinfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPreleaseVar(), SCIPsnprintf(), sqrt(), and TRUE. Referenced by presolveCreateOuterApproxDim3(), and SCIP_DECL_CONSPRESOL().
propagates variable bounds
Definition at line 2670 of file cons_soc.c. References VarEventData::consdata, FALSE, SCIP_Interval::inf, MAX, MIN, NULL, polishSolution(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_VARSTATUS_MULTAGGR, SCIPallocBufferArray, SCIPcomputeVarLbLocal(), SCIPcomputeVarUbLocal(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPepsilon(), SCIPfreeBufferArray, SCIPinfinity(), SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalDivScalar(), SCIPintervalGetInf(), SCIPintervalGetRoundingMode(), SCIPintervalGetSup(), SCIPintervalMulScalar(), SCIPintervalSetBounds(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSquare(), SCIPintervalSquareRoot(), SCIPintervalSub(), SCIPintervalSubScalar(), SCIPisInfinity(), SCIPresetConsAge(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetName(), SCIPvarGetStatus(), SCIP_Interval::sup, and TRUE. Referenced by presolveCreateOuterApprox(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
tries to adjust a solution such that it satisfies a given constraint by increasing the value for the constraints right hand side variable
Definition at line 2853 of file cons_soc.c. References VarEventData::consdata, FALSE, NULL, SCIP_CALL, SCIP_DECL_QUADCONSUPGD(), SCIP_OKAY, SCIP_Real, SCIPceil(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfloor(), SCIPgetSolVal(), SCIPinfinity(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPisZero(), SCIPsetSolVal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), SCIPvarMayRoundDown(), SCIPvarMayRoundUp(), and TRUE. Referenced by propagateBounds(), and SCIP_DECL_CONSCHECK().
tries to upgrade a quadratic constraint to a SOC constraint We treat as special cases, quadratic with no bilinear terms and hyperbolic quadratic constraints with exactly on bilinear component containing nonnegative variables. For this we use the formula:
Definition at line 2953 of file cons_soc.c. References SCIP_BilinTerm::coef, CONSHDLR_NAME, FALSE, LapackDsyev(), SCIP_QuadVarTerm::lincoef, MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPcomputeVarLbGlobal(), SCIPcomputeVarUbGlobal(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateConsQuadratic2(), SCIPcreateConsSOC(), SCIPcreateVar(), SCIPcreateVarBasic(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfindConshdlr(), SCIPfindQuadVarTermQuadratic(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetBilinTermsQuadratic(), SCIPgetCoefsLinearVarsQuadratic(), SCIPgetLhsQuadratic(), SCIPgetLinearVarsQuadratic(), SCIPgetNBilinTermsQuadratic(), SCIPgetNLinearVarsQuadratic(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetQuadVarTermsQuadratic(), SCIPgetRhsQuadratic(), SCIPinfinity(), SCIPisEQ(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisIpoptAvailableIpopt(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisZero(), SCIPmarkDoNotMultaggrVar(), SCIPmultiaggregateVar(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPsortQuadVarTermsQuadratic(), SCIPvarGetLbGlobal(), SCIP_QuadVarTerm::sqrcoef, sqrt(), TRUE, UPGSCALE, SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by polishSolution().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 3761 of file cons_soc.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSFREE(), SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrSOC(), and TRUE. Referenced by SCIP_DECL_QUADCONSUPGD().
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 3777 of file cons_soc.c. References CONSHDLR_NAME, NULL, SCIP_DECL_CONSINIT(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPfreeBlockMemory. Referenced by SCIP_DECL_CONSHDLRCOPY().
initialization method of constraint handler (called after problem was transformed) Definition at line 3796 of file cons_soc.c. References NULL, SCIP_DECL_CONSEXIT(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPexprintGetName(), and SCIPfindHeur(). Referenced by SCIP_DECL_CONSFREE().
deinitialization method of constraint handler (called before transformed problem is freed) Definition at line 3816 of file cons_soc.c. References FALSE, NULL, SCIP_DECL_CONSEXITPRE(), SCIP_OKAY, and SCIPconshdlrGetData(). Referenced by SCIP_DECL_CONSINIT().
presolving deinitialization method of constraint handler (called after presolving has been finished) Definition at line 3835 of file cons_soc.c. References NULL, SCIP_DECL_CONSINITSOL(), SCIP_OKAY, SCIPconsIsAdded(), and SCIPenableNLP(). Referenced by SCIP_DECL_CONSEXIT().
solving process initialization method of constraint handler (called when branch and bound process is about to begin) Definition at line 3859 of file cons_soc.c. References VarEventData::consdata, CONSHDLR_NAME, createNlRow(), FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSEXITSOL(), SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPaddNlRow(), SCIPcatchEvent(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPfindEventhdlr(), and SCIPisNLPConstructed(). Referenced by SCIP_DECL_CONSEXITPRE().
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 3914 of file cons_soc.c. References VarEventData::consdata, CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdropEvent(), SCIPfindEventhdlr(), and SCIPreleaseNlRow(). Referenced by SCIP_DECL_CONSINITSOL().
frees specific constraint data Definition at line 3956 of file cons_soc.c. References VarEventData::consdata, CONSHDLR_NAME, dropVarEvents(), NULL, SCIP_CALL, SCIP_DECL_CONSTRANS(), SCIP_OKAY, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPreleaseVar(). Referenced by SCIP_DECL_CONSEXITSOL().
transforms constraint data into data belonging to the transformed problem Definition at line 4003 of file cons_soc.c. References catchVarEvents(), VarEventData::consdata, CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSSEPALP(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPgetTransformedVar(), SCIPgetTransformedVars(), and SCIPsnprintf(). Referenced by SCIP_DECL_CONSDELETE().
separation method of constraint handler for LP solutions Definition at line 4072 of file cons_soc.c. References addLinearizationCuts(), computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSSEPASOL(), SCIP_DIDNOTFIND, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddLinearConsToNlpHeurSubNlp(), SCIPconshdlrGetData(), SCIPcreateNLPSol(), SCIPdebugMessage, SCIPfreeSol(), SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNContVars(), SCIPgetNIntVars(), SCIPgetNLPFracVars(), SCIPgetNLPSolstat(), SCIPgetNNlpis(), SCIPgetNVars(), SCIPheurPassSolTrySol(), SCIPisNLPConstructed(), SCIPsetNLPInitialGuessSol(), SCIPsolveNLP(), separatePoint(), and TRUE. Referenced by SCIP_DECL_CONSTRANS().
separation method of constraint handler for arbitrary primal solutions Definition at line 4202 of file cons_soc.c. References computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, and separatePoint(). Referenced by SCIP_DECL_CONSSEPALP().
constraint enforcing method of constraint handler for LP solutions Definition at line 4231 of file cons_soc.c. References computeViolations(), VarEventData::consdata, CONSHDLR_NAME, NULL, propagateBounds(), SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOPS(), SCIP_FEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateChild(), SCIPdebugMessage, SCIPfeastol(), SCIPgetCurrentNode(), SCIPisGT(), SCIPisStopped(), SCIPnodeGetEstimate(), SCIPwarningMessage(), separatePoint(), and TRUE. Referenced by SCIP_DECL_CONSSEPASOL().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 4327 of file cons_soc.c. References computeViolations(), NULL, SCIP_CALL, SCIP_DECL_CONSCHECK(), SCIP_FEASIBLE, SCIP_INFEASIBLE, and SCIP_OKAY. Referenced by SCIP_DECL_CONSENFOLP().
feasibility check method of constraint handler for integral solutions Definition at line 4348 of file cons_soc.c. References computeViolation(), VarEventData::consdata, CONSHDLR_NAME, FALSE, NULL, polishSolution(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSPROP(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateLPSol(), SCIPcreateSolCopy(), SCIPfeastol(), SCIPfreeSol(), SCIPgetSolVal(), SCIPheurPassSolTrySol(), SCIPinfoMessage(), SCIPisGT(), SCIPisInfinity(), SCIPprintCons(), SCIPunlinkSol(), SCIPupdateStartpointHeurSubNlp(), SCIPvarGetStatus(), SCIPvarMayRoundDown(), and SCIPvarMayRoundUp(). Referenced by SCIP_DECL_CONSENFOPS().
domain propagation method of constraint handler Definition at line 4462 of file cons_soc.c. References NULL, propagateBounds(), SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSPRESOL(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, and SCIP_OKAY. Referenced by SCIP_DECL_CONSCHECK().
presolving method of constraint handler Definition at line 4488 of file cons_soc.c. References VarEventData::consdata, NULL, presolveCreateOuterApprox(), presolveRemoveFixedVariables(), propagateBounds(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_OKAY, SCIP_PRESOLTIMING_FAST, SCIP_REDUCEDDOM, SCIP_SUCCESS, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPerrorMessage, and TRUE. Referenced by SCIP_DECL_CONSPROP().
variable rounding lock method of constraint handler Definition at line 4559 of file cons_soc.c. References VarEventData::consdata, CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_OKAY, SCIPaddVarLocks(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), and SCIPdebugMessage. Referenced by SCIP_DECL_CONSPRESOL().
constraint display method of constraint handler Definition at line 4590 of file cons_soc.c. References VarEventData::consdata, CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPinfoMessage(), SCIPwriteVarName(), and TRUE. Referenced by SCIP_DECL_CONSLOCK().
constraint copying method of constraint handler Definition at line 4633 of file cons_soc.c. References VarEventData::consdata, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPcreateConsSOC(), SCIPfreeBufferArray, SCIPgetVarCopy(), and TRUE. Referenced by SCIP_DECL_CONSPRINT().
constraint parsing method of constraint handler Definition at line 4687 of file cons_soc.c. References FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPcreateConsSOC(), SCIPfreeBufferArray, SCIPparseVarName(), SCIPreallocBufferArray, SCIPstrToRealValue(), SCIPverbMessage(), and TRUE. Referenced by SCIP_DECL_CONSCOPY().
constraint method of constraint handler which returns the variables (if possible) Definition at line 4908 of file cons_soc.c. References BMScopyMemoryArray, VarEventData::consdata, FALSE, NULL, SCIP_DECL_CONSGETNVARS(), SCIP_OKAY, SCIPconsGetData(), and TRUE. Referenced by SCIP_DECL_CONSPARSE().
constraint method of constraint handler which returns the number of variable (if possible) Definition at line 4929 of file cons_soc.c. References VarEventData::consdata, NULL, SCIP_OKAY, SCIPconsGetData(), SCIPincludeConshdlrSOC(), and TRUE. Referenced by SCIP_DECL_CONSGETVARS().
creates the handler for second order cone constraints and includes it in SCIP
Definition at line 4949 of file cons_soc.c. References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PRESOLTIMING, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, FALSE, NULL, QUADCONSUPGD_PRIORITY, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocBlockMemory, SCIPcreateConsSOC(), SCIPfindConshdlr(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeQuadconsUpgrade(), SCIPinfinity(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE. Referenced by SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSHDLRCOPY(), and SCIPincludeDefaultPlugins().
creates and captures a second order cone constraint
Definition at line 5063 of file cons_soc.c. References BMSclearMemoryArray, catchVarEvents(), VarEventData::consdata, 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().
creates and captures a second order cone constraint with all its constraint flags set to their default values
Definition at line 5191 of file cons_soc.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSOC(), SCIPgetNlRowSOC(), and TRUE. Referenced by SCIPcreateConsSOC().
Gets the SOC constraint as a nonlinear row representation.
Definition at line 5214 of file cons_soc.c. References VarEventData::consdata, createNlRow(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), and SCIPgetNLhsVarsSOC(). Referenced by createCoveringProblem(), and SCIPcreateConsBasicSOC(). Gets the number of variables on the left hand side of a SOC constraint.
Definition at line 5240 of file cons_soc.c. References NULL, SCIPconsGetData(), and SCIPgetLhsVarsSOC(). Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetNlRowSOC(), SCIPwriteGms(), and SCIPwriteLp(). Gets the variables on the left hand side of a SOC constraint.
Definition at line 5253 of file cons_soc.c. References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsCoefsSOC(). Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetNLhsVarsSOC(), SCIPwriteGms(), and SCIPwriteLp(). Gets the coefficients of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 1.0.
Definition at line 5266 of file cons_soc.c. References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsOffsetsSOC(). Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsVarsSOC(), and SCIPwriteGms(). Gets the offsets of the variables on the left hand side of a SOC constraint, or NULL if all are equal to 0.0.
Definition at line 5279 of file cons_soc.c. References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetLhsConstantSOC(). Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsCoefsSOC(), and SCIPwriteGms(). Gets the constant on the left hand side of a SOC constraint.
Definition at line 5292 of file cons_soc.c. References NULL, SCIPconsGetData(), and SCIPgetRhsVarSOC(). Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsOffsetsSOC(), and SCIPwriteGms(). Gets the variable on the right hand side of a SOC constraint.
Definition at line 5305 of file cons_soc.c. References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsCoefSOC(). Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetLhsConstantSOC(), SCIPwriteGms(), and SCIPwriteLp(). Gets the coefficient of the variable on the right hand side of a SOC constraint.
Definition at line 5318 of file cons_soc.c. References NULL, SCIP_Real, SCIPconsGetData(), and SCIPgetRhsOffsetSOC(). Referenced by createCoveringProblem(), printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetRhsVarSOC(), and SCIPwriteGms(). Gets the offset of the variables on the right hand side of a SOC constraint.
Definition at line 5331 of file cons_soc.c. References NULL, SCIPaddToNlpiProblemSOC(), and SCIPconsGetData(). Referenced by printSOCCons(), SCIP_DECL_READERWRITE(), SCIPgetRhsCoefSOC(), and SCIPwriteGms().
Adds the constraint to an NLPI problem. Uses nonconvex formulation as quadratic function.
Definition at line 5345 of file cons_soc.c. References SCIP_QuadElement::coef, VarEventData::consdata, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapGetImage(), SCIPinfinity(), and SCIPnlpiAddConstraints(). Referenced by SCIPgetRhsOffsetSOC(). |