|
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Detailed Descriptionconstraint handler for quadratic constraints Definition in file cons_quadratic.c. #include <assert.h>#include <string.h>#include <ctype.h>#include <math.h>#include "scip/cons_nonlinear.h"#include "scip/cons_quadratic.h"#include "scip/cons_linear.h"#include "scip/cons_and.h"#include "scip/cons_varbound.h"#include "scip/intervalarith.h"#include "scip/heur_subnlp.h"#include "scip/heur_trysol.h"#include "scip/debug.h"#include "nlpi/nlpi.h"#include "nlpi/nlpi_ipopt.h"Go to the source code of this file.
Macro Definition Documentation
Definition at line 52 of file cons_quadratic.c. Referenced by SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSINITSOL(), SCIPchgBilinCoefQuadratic(), SCIPchgLhsQuadratic(), SCIPchgLinearCoefQuadratic(), SCIPchgRhsQuadratic(), SCIPchgSquareCoefQuadratic(), SCIPcreateConsQuadratic(), SCIPcreateConsQuadratic2(), SCIPgetActivityQuadratic(), SCIPgetFeasibilityQuadratic(), SCIPincludeConshdlrQuadratic(), and SCIPincludeQuadconsUpgrade().
Definition at line 53 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
priority of the constraint handler for separation Definition at line 54 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
priority of the constraint handler for constraint enforcing Definition at line 55 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
priority of the constraint handler for checking feasibility Definition at line 56 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
frequency for separating cuts; zero means to separate only in the root node Definition at line 57 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 58 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
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 59 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 62 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
should separation method be delayed, if other separators found cuts? Definition at line 63 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
should propagation method be delayed, if other propagators found reductions? Definition at line 64 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
should the constraint handler be skipped, if no constraints are available? Definition at line 65 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
propagation timing mask of the constraint handler Definition at line 67 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
presolving timing of the constraint handler (fast, medium, or exhaustive) Definition at line 68 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
maximal denominator for simple rational fixed values Definition at line 70 of file cons_quadratic.c. Referenced by presolveTryAddLinearReform().
priority of upgrading nonlinear constraints Definition at line 71 of file cons_quadratic.c. Referenced by SCIPincludeConshdlrQuadratic().
maximal absolute value of variable for still generating a linearization cut at that point in initlp Definition at line 72 of file cons_quadratic.c. Referenced by SCIP_DECL_CONSINITLP().
Definition at line 82 of file cons_quadratic.c.
Definition at line 85 of file cons_quadratic.c. Referenced by computeInteriorPoint().
Definition at line 88 of file cons_quadratic.c. Referenced by computeReferencePointGauge().
translate from one value of infinity to another if val is >= infty1, then give infty2, else give val Definition at line 268 of file cons_quadratic.c. Referenced by propagateBoundsBilinearTerm(), propagateBoundsCons(), and propagateBoundsGetQuadActivity(). Typedef Documentation
quadratic constraint update method Definition at line 182 of file cons_quadratic.c. Function Documentation
checks whether a quadratic constraint upgrade method has already be registered
Definition at line 234 of file cons_quadratic.c. References FALSE, NULL, SCIPwarningMessage(), and TRUE. Referenced by SCIPincludeQuadconsUpgrade().
catches variable bound change events on a linear variable in a quadratic constraint
Definition at line 272 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPcatchVarEvent(), SCIPconsGetData(), and SCIPisInfinity(). Referenced by addLinearCoef(), catchVarEvents(), and chgLinearCoefPos().
drops variable bound change events on a linear variable in a quadratic constraint
Definition at line 337 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), SCIPfreeBlockMemory, and SCIPisInfinity(). Referenced by chgLinearCoefPos(), delLinearCoefPos(), and dropVarEvents().
catches variable bound change events on a quadratic variable in a quadratic constraint
Definition at line 391 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPallocBlockMemory, SCIPcatchVarEvent(), SCIPconsGetData(), and SCIPintervalSetEmpty(). Referenced by addQuadVarTerm(), catchVarEvents(), and replaceQuadVarTermPos().
catches variable bound change events on a quadratic variable in a quadratic constraint
Definition at line 436 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), and SCIPfreeBlockMemory. Referenced by delQuadVarTermPos(), dropVarEvents(), and replaceQuadVarTermPos().
catch variable events
Definition at line 474 of file cons_quadratic.c. References catchLinearVarEvents(), catchQuadVarEvents(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPvarIsActive(), and TRUE. Referenced by SCIP_DECL_CONSENABLE().
drop variable events
Definition at line 518 of file cons_quadratic.c. References dropLinearVarEvents(), dropQuadVarEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPfreeBlockMemoryArray. Referenced by SCIP_DECL_CONSDISABLE().
locks a linear variable in a constraint
Definition at line 559 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPisInfinity(), and SCIPlockVarCons(). Referenced by addLinearCoef(), and chgLinearCoefPos().
unlocks a linear variable in a constraint
Definition at line 590 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPisInfinity(), and SCIPunlockVarCons(). Referenced by chgLinearCoefPos(), and delLinearCoefPos().
locks a quadratic variable in a constraint
Definition at line 621 of file cons_quadratic.c. References SCIP_CALL, SCIP_OKAY, SCIPlockVarCons(), and TRUE. Referenced by addQuadVarTerm(), and replaceQuadVarTermPos().
unlocks a quadratic variable in a constraint
Definition at line 634 of file cons_quadratic.c. References SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), and TRUE. Referenced by delQuadVarTermPos(), and replaceQuadVarTermPos().
computes the minimal and maximal activity for the linear part in a constraint data Only sums up terms that contribute finite values. Gives the number of terms that contribute infinite values. Only computes those activities where the corresponding side of the constraint is finite.
Definition at line 652 of file cons_quadratic.c. References MAX, MIN, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by propagateBoundsCons().
update the linear activities after a change in the lower bound of a variable
Definition at line 766 of file cons_quadratic.c. References NULL, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), and SCIPisInfinity(). Referenced by SCIP_DECL_EVENTEXEC().
update the linear activities after a change in the upper bound of a variable
Definition at line 869 of file cons_quadratic.c. References NULL, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), and SCIPisInfinity(). Referenced by SCIP_DECL_EVENTEXEC().
processes variable fixing or bound change event Definition at line 972 of file cons_quadratic.c. References consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), FALSE, NULL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPintervalSetEmpty(), SCIPvarIsBinary(), and TRUE.
ensures, that linear vars and coefs arrays can store at least num entries
Definition at line 1032 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addLinearCoef(), presolveDisaggregate(), removeFixedVariables(), and SCIPcreateConsQuadratic().
ensures, that quadratic variable terms array can store at least num entries
Definition at line 1062 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addQuadVarTerm(), and removeFixedVariables().
ensures, that adjacency array can store at least num entries
Definition at line 1087 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, SCIP_QuadVarTerm::adjbilinsize, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addBilinearTerm(), and mergeAndCleanQuadVarTerms().
ensures, that bilinear term arrays can store at least num entries
Definition at line 1112 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addBilinearTerm(), removeFixedVariables(), and SCIPcreateConsQuadratic().
creates empty constraint data structure
Definition at line 1137 of file cons_quadratic.c. References BMSclearMemory, FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPinfinity(), and TRUE. Referenced by SCIPcreateConsQuadratic().
creates constraint data structure
Definition at line 1177 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, BMSclearMemory, FALSE, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPintervalSet(), SCIPintervalSetEmpty(), SCIPisInfinity(), and TRUE. Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsQuadratic2().
frees constraint data structure
Definition at line 1297 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPfreeMemoryArrayNull, SCIPreleaseNlRow(), and SCIPreleaseVar(). Referenced by SCIP_DECL_CONSDELETE().
sorts linear part of constraint data
Definition at line 1358 of file cons_quadratic.c. References NULL, SCIPsortPtrPtrReal(), SCIPsortPtrReal(), and TRUE. Referenced by mergeAndCleanLinearVars().
index comparison method for quadratic variable terms: compares two indices of the quadratic variable set in the quadratic constraint Definition at line 1419 of file cons_quadratic.c. References NULL, and SCIPvarCompare().
sorting of quadratic variable terms
Definition at line 1432 of file cons_quadratic.c. References SCIP_QuadVarTerm::eventdata, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsort(), and TRUE. Referenced by checkFactorable(), consdataFindQuadVarTerm(), mergeAndCleanQuadVarTerms(), presolveDisaggregate(), propagateBoundsCons(), SCIP_DECL_CONSINITSOL(), SCIPaddBilinTermQuadratic(), and SCIPsortQuadVarTermsQuadratic().
returns the position of variable in the quadratic variable terms array of a constraint, or -1 if not found
Definition at line 1501 of file cons_quadratic.c. References consdataSortQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPvarCompare(). Referenced by checkFactorable(), createNlRow(), mergeAndCleanLinearVars(), presolveDisaggregateMarkComponent(), propagateBoundsCons(), SCIP_DECL_CONSINITSOL(), SCIPaddBilinTermQuadratic(), SCIPaddQuadVarLinearCoefQuadratic(), SCIPaddSquareCoefQuadratic(), and SCIPfindQuadVarTermQuadratic().
index comparison method for bilinear terms: compares two index pairs of the bilinear term set in the quadratic constraint Definition at line 1554 of file cons_quadratic.c. References NULL, and SCIPvarCompare().
checks if all bilinear terms are sorted correctly Definition at line 1573 of file cons_quadratic.c. References FALSE, NULL, and TRUE. Referenced by addBilinearTerm(), consdataSortBilinTerms(), and mergeAndCleanBilinearTerms().
sorting of bilinear terms
Definition at line 1596 of file cons_quadratic.c. References consdataCheckBilinTermsSort(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsort(), and TRUE. Referenced by mergeAndCleanBilinearTerms().
moves a linear variable from one position to another
Definition at line 1674 of file cons_quadratic.c. Referenced by delLinearCoefPos().
moves a quadratic variable from one position to another
Definition at line 1707 of file cons_quadratic.c. Referenced by delQuadVarTermPos().
adds linear coefficient in quadratic constraint
Definition at line 1737 of file cons_quadratic.c. References catchLinearVarEvents(), consdataEnsureLinearVarsSize(), FALSE, lockLinearVariable(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPgetTransformedVar(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarCompare(), SCIPvarIsActive(), SCIPvarIsTransformed(), and TRUE. Referenced by mergeAndCleanQuadVarTerms(), presolveDisaggregate(), presolveTryAddAND(), presolveTryAddLinearReform(), removeFixedVariables(), SCIPaddLinearVarQuadratic(), SCIPchgLinearCoefQuadratic(), and SCIPcreateConsQuadratic().
deletes linear coefficient at given position from quadratic constraint data
Definition at line 1828 of file cons_quadratic.c. References consdataMoveLinearVar(), dropLinearVarEvents(), FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPreleaseNlRow(), SCIPreleaseVar(), and unlockLinearVariable(). Referenced by mergeAndCleanLinearVars(), removeFixedVariables(), and SCIPchgLinearCoefQuadratic().
changes linear coefficient value at given position of quadratic constraint
Definition at line 1897 of file cons_quadratic.c. References catchLinearVarEvents(), dropLinearVarEvents(), FALSE, lockLinearVariable(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsLocked(), SCIPconsIsTransformed(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarIsTransformed(), and unlockLinearVariable(). Referenced by mergeAndCleanLinearVars(), and SCIPchgLinearCoefQuadratic().
adds quadratic variable term to quadratic constraint
Definition at line 1993 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, SCIP_QuadVarTerm::adjbilinsize, catchQuadVarEvents(), consdataEnsureQuadVarTermsSize(), SCIP_QuadVarTerm::eventdata, FALSE, SCIP_QuadVarTerm::lincoef, lockQuadraticVariable(), SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPgetTransformedVar(), SCIPintervalSetEmpty(), SCIPreleaseNlRow(), SCIPvarCompare(), SCIPvarIsActive(), SCIPvarIsTransformed(), SCIP_QuadVarTerm::sqrcoef, TRUE, and SCIP_QuadVarTerm::var. Referenced by removeFixedVariables(), SCIPaddBilinTermQuadratic(), SCIPaddQuadVarLinearCoefQuadratic(), SCIPaddQuadVarQuadratic(), SCIPaddSquareCoefQuadratic(), SCIPchgSquareCoefQuadratic(), and SCIPcreateConsQuadratic().
deletes quadratic variable term at given position from quadratic constraint data
Definition at line 2086 of file cons_quadratic.c. References consdataMoveQuadVarTerm(), dropQuadVarEvents(), FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPfreeBlockMemoryArrayNull, SCIPintervalSetEmpty(), SCIPreleaseNlRow(), SCIPreleaseVar(), and unlockQuadraticVariable(). Referenced by mergeAndCleanQuadVarTerms(), presolveDisaggregate(), and removeFixedVariables().
replace variable in quadratic variable term at given position of quadratic constraint data Allows to replace x by coef*y+offset, thereby maintaining linear and square coefficients and bilinear terms.
Definition at line 2158 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, catchQuadVarEvents(), SCIP_BilinTerm::coef, dropQuadVarEvents(), SCIP_QuadVarTerm::eventdata, FALSE, SCIP_QuadVarTerm::lincoef, lockQuadraticVariable(), SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPintervalSetEmpty(), SCIPisInfinity(), SCIPreleaseNlRow(), SCIPreleaseVar(), SCIPvarCompare(), SCIPvarIsActive(), SCIP_QuadVarTerm::sqrcoef, unlockQuadraticVariable(), SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by removeFixedVariables().
adds a bilinear term to quadratic constraint
Definition at line 2326 of file cons_quadratic.c. References SCIP_BilinTerm::coef, consdataCheckBilinTermsSort(), consdataEnsureAdjBilinSize(), consdataEnsureBilinSize(), FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetData(), SCIPerrorMessage, SCIPintervalSetEmpty(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarCompare(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by removeFixedVariables(), SCIPaddBilinTermQuadratic(), and SCIPcreateConsQuadratic().
removes a set of bilinear terms and updates adjacency information in quad var terms Note: this function sorts the given array termposs.
Definition at line 2428 of file cons_quadratic.c. References FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPintervalSetEmpty(), SCIPreleaseNlRow(), and SCIPsortInt(). Referenced by mergeAndCleanBilinearTerms(), presolveTryAddAND(), presolveTryAddLinearReform(), and removeFixedVariables().
merges quad var terms that correspond to the same variable and does additional cleanup If a quadratic variable terms is actually linear, makes a linear term out of it also replaces squares of binary variables by the binary variables, i.e., adds sqrcoef to lincoef.
Definition at line 2527 of file cons_quadratic.c. References addLinearCoef(), SCIP_QuadVarTerm::adjbilin, BMScopyMemoryArray, consdataEnsureAdjBilinSize(), consdataSortQuadVarTerms(), delQuadVarTermPos(), SCIP_QuadVarTerm::lincoef, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPdebugMessage, SCIPintervalSetEmpty(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarGetName(), SCIPvarIsBinary(), SCIP_QuadVarTerm::sqrcoef, TRUE, and SCIP_QuadVarTerm::var. Referenced by presolveDisaggregate(), removeFixedVariables(), SCIP_DECL_CONSENABLE(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
merges entries with same linear variable into one entry and cleans up entries with coefficient 0.0
Definition at line 2624 of file cons_quadratic.c. References chgLinearCoefPos(), consdataFindQuadVarTerm(), consdataSortLinearVars(), delLinearCoefPos(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPintervalSetEmpty(), SCIPisZero(), and TRUE. Referenced by removeFixedVariables(), SCIP_DECL_CONSENABLE(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
merges bilinear terms with same variables into a single term, removes bilinear terms with coefficient 0.0
Definition at line 2696 of file cons_quadratic.c. References SCIP_BilinTerm::coef, consdataCheckBilinTermsSort(), consdataSortBilinTerms(), NULL, removeBilinearTermsPos(), SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPisZero(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by presolveDisaggregate(), removeFixedVariables(), SCIP_DECL_CONSENABLE(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
removes fixes (or aggregated) variables from a quadratic constraint
Definition at line 2769 of file cons_quadratic.c. References addBilinearTerm(), addLinearCoef(), addQuadVarTerm(), SCIP_BilinTerm::coef, consdataEnsureBilinSize(), consdataEnsureLinearVarsSize(), consdataEnsureQuadVarTermsSize(), delLinearCoefPos(), delQuadVarTermPos(), FALSE, mergeAndCleanBilinearTerms(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), NULL, removeBilinearTermsPos(), replaceQuadVarTermPos(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPgetProbvarSum(), SCIPisInfinity(), SCIPvarCompare(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
create a nonlinear row representation of the constraint and stores them in consdata
Definition at line 3080 of file cons_quadratic.c. References SCIP_QuadElement::coef, consdataFindQuadVarTerm(), SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddLinearCoefsToNlRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPcreateNlRow(), SCIPfreeBufferArray, SCIPisZero(), and SCIPreleaseNlRow(). Referenced by computeInteriorPoint(), SCIP_DECL_CONSINITSOL(), and SCIPgetNlRowQuadratic().
solve constraint as presolving
Definition at line 3198 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPaggregateVars(), SCIPconsGetData(), SCIPdebugMessage, SCIPisEQ(), SCIPisZero(), SCIPvarGetName(), SCIPvarIsBinary(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
reformulates products of binary variables as AND constraint For a product x*y, with x and y binary variables, the product is replaced by a new auxiliary variable z and the constraint z = {x and y} is added.
Definition at line 3285 of file cons_quadratic.c. References addLinearCoef(), NULL, removeBilinearTermsPos(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsDynamic(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAnd(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarIsBinary(), SCIPvarIsInitial(), SCIPvarIsRemovable(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
gets bounds of variable y if x takes a certain value; checks whether x = xval has implications on y
Definition at line 3381 of file cons_quadratic.c. References FALSE, SCIP_Interval::inf, MAX, MIN, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_OKAY, SCIP_Real, SCIPhaveVarsCommonClique(), SCIPintervalSetBounds(), SCIPsortedvecFindPtr(), SCIPvarGetImplBounds(), SCIPvarGetImplTypes(), SCIPvarGetImplVars(), SCIPvarGetLbGlobal(), SCIPvarGetNImpls(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIP_Interval::sup, and TRUE. Referenced by presolveTryAddLinearReform().
Reformulates products of binary times bounded continuous variables as system of linear inequalities (plus auxiliary variable). For a product x*y, with y a binary variable and x a continous variable with finite bounds, an auxiliary variable z and the inequalities If x is a linear term consisting of more than one variable, it is split up in groups of linear terms of length at most maxnrvar. For each product of linear term of length at most maxnrvar with y, an auxiliary z and linear inequalities are added. If y is a binary variable, the AND constraint
Definition at line 3472 of file cons_quadratic.c. References addLinearCoef(), FALSE, getImpliedBounds(), SCIP_Interval::inf, MAX, MAXDNOM, MIN, NULL, REALABS, removeBilinearTermsPos(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCons(), SCIPaddVar(), SCIPcalcGreComDiv(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsDynamic(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAnd(), SCIPcreateConsLinear(), SCIPcreateConsVarbound(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMessage, SCIPdebugPrintCons, SCIPfeastol(), SCIPfreeBufferArrayNull, SCIPinfinity(), SCIPintervalAdd(), SCIPintervalDivScalar(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalMulScalar(), SCIPintervalSet(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPreleaseVar(), SCIPround(), SCIPselectSimpleValue(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarIsInitial(), SCIPvarIsRemovable(), SCIP_Interval::sup, and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
tries to automatically convert a quadratic constraint (or a part of it) into a more specific and more specialized constraint
Definition at line 3904 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdebugPrintf, SCIPdelCons(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPisIntegral(), SCIPisRelEQ(), SCIPisZero(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbLocal(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
helper function for presolveDisaggregate
Definition at line 4120 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, consdataFindQuadVarTerm(), SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), and SCIP_QuadVarTerm::var. Referenced by presolveDisaggregate().
for quadratic constraints that consists of a sum of quadratic terms, disaggregates the sum into a set of constraints by introducing auxiliary variables
Definition at line 4166 of file cons_quadratic.c. References addLinearCoef(), consdataEnsureLinearVarsSize(), consdataSortQuadVarTerms(), delQuadVarTermPos(), FALSE, mergeAndCleanBilinearTerms(), mergeAndCleanQuadVarTerms(), NULL, presolveDisaggregateMarkComponent(), REALABS, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddBilinTermQuadratic(), SCIPaddCons(), SCIPaddLinearVarQuadratic(), SCIPaddQuadVarQuadratic(), SCIPaddVar(), SCIPallocBufferArray, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDynamic(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPcreateConsQuadratic2(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPinfinity(), SCIPisInfinity(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
checks a quadratic constraint for convexity and/or concavity without checking multivariate functions
Definition at line 4441 of file cons_quadratic.c. References FALSE, NULL, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPisNegative(), SCIPisPositive(), and TRUE. Referenced by checkCurvature(), SCIPisConcaveQuadratic(), and SCIPisConvexQuadratic().
checks a quadratic constraint for convexity and/or concavity
Definition at line 4506 of file cons_quadratic.c. References BMSclearMemoryArray, checkCurvatureEasy(), FALSE, LapackDsyev(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_FULL, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPisInfinity(), SCIPisIpoptAvailableIpopt(), SCIPisNegative(), SCIPisPositive(), SCIPvarIsBinary(), SCIPverbMessage(), SCIPwarningMessage(), and TRUE. Referenced by addLinearizationCuts(), generateCut(), generateCutUnboundedLP(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSSEPALP(), and SCIPcheckCurvatureQuadratic().
check whether indefinite constraint function is factorable and store corresponding coefficients
Definition at line 4686 of file cons_quadratic.c. References BMSclearMemoryArray, SCIP_BilinTerm::coef, consdataFindQuadVarTerm(), consdataSortQuadVarTerms(), FALSE, LapackDsyev(), MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPisIpoptAvailableIpopt(), SCIPisNegative(), SCIPisPositive(), SCIPisRelEQ(), SCIPisZero(), SCIPvarGetName(), sqrt(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by SCIP_DECL_CONSINITSOL(). gets maximal absolute value in gradient of quadratic function
Definition at line 4892 of file cons_quadratic.c. References NULL, REALABS, SCIP_Real, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPgetSolVal(), SCIPgetStage(), and SCIPisInfinity(). Referenced by computeViolation().
computes activity and violation of a constraint
Definition at line 4944 of file cons_quadratic.c. References getGradientMaxElement(), MAX, MIN, NULL, REALABS, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPerrorMessage, SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by computeViolations(), proposeFeasibleSolution(), SCIP_DECL_CONSCHECK(), SCIPgetActivityQuadratic(), SCIPgetFeasibilityQuadratic(), and SCIPgetViolationQuadratic().
computes violation of a set of constraints
Definition at line 5107 of file cons_quadratic.c. References computeViolation(), MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPfeastol(), and SCIPisGT(). Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
tries to compute cut for multleft * <coefleft, x'> * multright <= rhs / (multright * <coefright, x'>) where x'=(x,1)
Definition at line 5152 of file cons_quadratic.c. References FALSE, NULL, SCIP_MAXSTRLEN, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPgetNLPs(), SCIPisFeasLE(), SCIPisInfinity(), SCIPisZero(), SCIPsnprintf(), and TRUE. Referenced by generateCutFactorable().
tries to generate a cut if constraint quadratic function is factorable and there are no linear variables (ax+b)(cx+d) <= rhs and cx+d >= 0 -> (ax+b) <= rhs / (cx+d), where the right hand side is concave and can be linearized
Definition at line 5260 of file cons_quadratic.c. References FALSE, generateCutFactorableDo(), NULL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_RIGHT, SCIPconsGetData(), SCIPinfinity(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by generateCut().
Definition at line 5476 of file cons_quadratic.c. References FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPdebugMessage, SCIPisRelEQ(), SCIPisZero(), sqrt(), and TRUE. Referenced by generateCutLTIcomputeCoefs().
generate coefficients for a plane through points (x1, y1_, x1*y1) and (x2, y2, x2*y2) such that intersecting it with one of them (the first if whichuse is FALSE, the second otherwise) gives a tangent to the curve x*y = k Returns TRUE on error and FALSE on success. Definition at line 5598 of file cons_quadratic.c. References FALSE, NULL, SCIP_Real, SCIPisZero(), and TRUE. Referenced by generateCutLTIcomputeCoefs().
computes coefficients of a lifted-tangent inequality for x*y = w The code is an adaptation of the methods in exprMul-upperHull.cpp in Couenne/stable/0.4 rev773, written by P. Belotti and licensed under Eclipse Public License.
Definition at line 5656 of file cons_quadratic.c. References FALSE, generateCutLTIfindIntersection(), generateCutLTIgenMulCoeff(), MAX, MIN, NULL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPdebugMessage, SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisZero(), and TRUE. Referenced by generateCutLTI().
tries to generate a cut if constraint quadratic function is factorable and there are linear variables Computes what is called a lifted tangent inequality described in
Definition at line 6015 of file cons_quadratic.c. References FALSE, generateCutLTIcomputeCoefs(), NULL, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetLPSolstat(), SCIPgetNLPs(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisRelEQ(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE. Referenced by generateCut().
computes coefficients of linearization of a square term in a reference point
Definition at line 6281 of file cons_quadratic.c. References FALSE, NULL, REALABS, SCIP_Real, SCIPfloor(), SCIPisInfinity(), and SCIPisIntegral(). Referenced by addBilinearTermToCut(), generateCutConvex(), and generateCutNonConvex().
computes coefficients of secant of a square term
Definition at line 6347 of file cons_quadratic.c. References FALSE, NULL, REALABS, SCIP_Real, SCIPisGE(), SCIPisInfinity(), and SCIPisLE(). Referenced by addBilinearTermToCut(), and generateCutNonConvex().
computes coefficients of linearization of a bilinear term in a reference point
Definition at line 6396 of file cons_quadratic.c. References FALSE, NULL, REALABS, SCIP_Real, and SCIPisInfinity(). Referenced by generateCutConvex().
computes coefficients of McCormick under- or overestimation of a bilinear term
Definition at line 6442 of file cons_quadratic.c. References FALSE, MAX, MIN, NULL, REALABS, SCIP_Real, SCIPisGE(), SCIPisInfinity(), SCIPisLE(), and SCIPisRelEQ(). Referenced by addBilinearTermToCut(), and generateCutNonConvex().
computes cut coefficients by linearizing a quadratic function
Definition at line 6643 of file cons_quadratic.c. References BMSclearMemoryArray, SCIP_BilinTerm::coef, NULL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_VARTYPE_CONTINUOUS, SCIPaddBilinLinearization(), SCIPaddSquareLinearization(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetNLPs(), SCIPinfinity(), SCIPsnprintf(), SCIPvarGetType(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by generateCut().
computes cut coefficients for a nonconvex quadratic function
Definition at line 6733 of file cons_quadratic.c. References BMSclearMemoryArray, SCIP_BilinTerm::coef, NULL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIP_VARTYPE_CONTINUOUS, SCIPaddBilinMcCormick(), SCIPaddSquareLinearization(), SCIPaddSquareSecant(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetNLPs(), SCIPinfinity(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbLocal(), TRUE, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by generateCut().
generates a cut based on linearization (if convex) or McCormick (if nonconvex) in a given reference point
Definition at line 6841 of file cons_quadratic.c. References checkCurvature(), FALSE, generateCutConvex(), generateCutFactorable(), generateCutLTI(), generateCutNonConvex(), MAX, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LPSOLSTAT_OPTIMAL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_LOOSE, SCIPABORT, SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPdebugMessage, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetSolVal(), SCIPgetStage(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisGT(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLT(), SCIPround(), SCIProwGetName(), SCIProwGetNNonz(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and TRUE. Referenced by generateCutSol(), generateCutUnboundedLP(), and SCIP_DECL_CONSINITLP().
computes an interior point for the quadratic part of the convex constraint There are different methods for computing the interior point
Definition at line 7212 of file cons_quadratic.c. References SCIP_QuadElement::coef, createNlRow(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, INTERIOR_EPS, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_NLPPAR_VERBLEVEL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OKAY, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPallocClearMemoryArray, SCIPallocMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPgetNlpis(), SCIPgetNNlpis(), SCIPgetProbName(), SCIPinfinity(), SCIPinfoMessage(), SCIPisFeasZero(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), SCIPnlpiAddConstraints(), SCIPnlpiAddVars(), SCIPnlpiCreateProblem(), SCIPnlpiFreeProblem(), SCIPnlpiGetSolstat(), SCIPnlpiGetSolution(), SCIPnlpiGetTermstat(), SCIPnlpiSetIntPar(), SCIPnlpiSetObjective(), SCIPnlpiSolve(), SCIPnlrowGetNQuadElems(), SCIPnlrowGetQuadElems(), SCIPnlrowGetQuadVars(), SCIPprintCons(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and TRUE. Referenced by computeGauge().
compute gauge function of the set Here, The method does:
Definition at line 7587 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, SCIP_BilinTerm::coef, computeInteriorPoint(), FALSE, SCIP_QuadVarTerm::lincoef, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPisInfinity(), SCIPvarGetName(), SCIP_QuadVarTerm::sqrcoef, TRUE, SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by SCIP_DECL_CONSINITSOL().
evaluates gauge function of the set
Definition at line 7730 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), sqrt(), and TRUE. Referenced by computeReferencePointGauge().
compute reference point suggested by gauge function
Definition at line 7903 of file cons_quadratic.c. References evaluateGauge(), FALSE, GAUGESCALE, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPisFeasLE(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal(). Referenced by generateCutSol().
generates a cut based on linearization (if convex) or McCormick (if nonconvex) in a solution
Definition at line 8009 of file cons_quadratic.c. References computeReferencePointGauge(), FALSE, generateCut(), MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetSolVal(), SCIPisCutApplicable(), SCIPisGT(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by addLinearizationCuts(), generateCutUnboundedLP(), and separatePoint().
tries to find a cut that intersects with an unbounded ray of the LP For convex functions, we do this by linearizing in the feasible solution of the LPI. For nonconvex functions, we just call generateCutSol with the unbounded solution as reference point.
Definition at line 8096 of file cons_quadratic.c. References checkCurvature(), SCIP_BilinTerm::coef, FALSE, generateCut(), generateCutSol(), NULL, REALABS, SCIP_CALL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPallocBufferArray, SCIPcolGetVar(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetLPSolstat(), SCIPgetPrimalRayVal(), SCIPhasPrimalRay(), SCIPinfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIProwGetCols(), SCIProwGetNNonz(), SCIProwGetVals(), SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by separatePoint().
tries to separate solution or LP solution by a linear cut assumes that constraint violations have been computed
Definition at line 8243 of file cons_quadratic.c. References FALSE, generateCutSol(), generateCutUnboundedLP(), MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_INVALIDDATA, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPABORT, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPepsilon(), SCIPerrorMessage, SCIPfeastol(), SCIPgetLPSolstat(), SCIPgetRelaxFeastolFactor(), SCIPgetRowMaxCoef(), SCIPisCutApplicable(), SCIPisGT(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPmarkRowNotRemovableLocal(), SCIPreleaseRow(), SCIPresetConsAge(), SCIProwGetLhs(), and SCIProwGetRhs(). Referenced by 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
Definition at line 8415 of file cons_quadratic.c. References checkCurvature(), FALSE, generateCutSol(), MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPABORT, SCIPaddCut(), SCIPaddPoolCut(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsLocal(), SCIPdebugMessage, SCIPerrorMessage, SCIPgetRowLPFeasibility(), SCIPgetRowMaxCoef(), SCIPinfinity(), SCIPisInfinity(), SCIPreleaseRow(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetRhs(), SCIProwIsLocal(), and TRUE. Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_EVENTEXEC().
processes the event that a new primal solution has been found Definition at line 8535 of file cons_quadratic.c. References addLinearizationCuts(), NULL, SCIP_CALL, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNConss(), SCIPdebugMessage, SCIPeventGetSol(), SCIPeventGetType(), SCIPheurGetName(), and SCIPsolGetHeur().
registers branching candidates according to convexification gap rule That is, computes for every nonconvex term the gap between the terms value in the LP solution and the value of the underestimator as it would be (and maybe has been) constructed by the separation routines of this constraint handler. Then it registers all variables occurring in each term with the computed gap. If variables appear in more than one term, they are registered several times.
Definition at line 8587 of file cons_quadratic.c. References MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfeastol(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasNegative(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), SCIPvarIsIntegral(), and sqrt(). Referenced by registerBranchingCandidates().
registers branching candidates according to constraint violation rule That is, registers all variables appearing in nonconvex terms^1 with a score that is the violation of the constraint. This is the same rule as is applied in cons_nonlinear and other nonlinear constraint handlers. 1) We mean all quadratic variables that appear either in a nonconvex square term or in a bilinear term, if the constraint itself is nonconvex. (and this under the assumption that the rhs is violated; for violated lhs, swap terms)
Definition at line 8801 of file cons_quadratic.c. References MAX, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfeastol(), SCIPgetSolVal(), SCIPisGE(), SCIPisGT(), SCIPisLE(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIP_QuadVarTerm::sqrcoef, and SCIP_QuadVarTerm::var. Referenced by registerBranchingCandidates().
registers branching candidates according to centrality rule That is, registers all variables appearing in nonconvex terms^1 with a score that is given by the distance of the variable value from its bounds. This rule should not make sense, as the distance to the bounds is also (often) considered by the branching rule later on. 1) We mean all quadratic variables that appear either in a nonconvex square term or in a bilinear term, if the constraint itself is nonconvex. (and this under the assumption that the rhs is violated; for violated lhs, swap terms)
Definition at line 8885 of file cons_quadratic.c. References MAX, MIN, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfeastol(), SCIPgetSolVal(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIP_QuadVarTerm::sqrcoef, and SCIP_QuadVarTerm::var. Referenced by registerBranchingCandidates().
registers branching candidates
Definition at line 8972 of file cons_quadratic.c. References NULL, registerBranchingCandidatesCentrality(), registerBranchingCandidatesGap(), registerBranchingCandidatesViolation(), SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPABORT, SCIPconshdlrGetData(), and SCIPerrorMessage. Referenced by SCIP_DECL_CONSENFOLP().
registers a quadratic variable from a violated constraint as branching candidate that has a large absolute value in the LP relaxation
Definition at line 9011 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPfeastol(), SCIPgetSolVal(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by SCIP_DECL_CONSENFOLP().
replaces violated quadratic constraints where all quadratic variables are fixed by linear constraints
Definition at line 9063 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INFEASIBLE, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPaddConsLocal(), SCIPcheckCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPfeastol(), SCIPgetLPSolstat(), SCIPinfinity(), SCIPisGT(), SCIPisInfinity(), SCIPisRelEQ(), SCIPisZero(), SCIPreleaseCons(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE. Referenced by SCIP_DECL_CONSENFOLP().
tightens a lower bound on a variable and checks the result
Definition at line 9242 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPadjustedVarLb(), SCIPconsGetName(), SCIPdebugMessage, SCIPinProbing(), SCIPisHugeValue(), SCIPisInfinity(), SCIPisLE(), SCIPresetConsAge(), SCIPtightenVarLb(), SCIPvarGetLbLocal(), and SCIPvarGetName(). Referenced by propagateBoundsBilinearTerm(), propagateBoundsCons(), and propagateBoundsQuadVar().
tightens an upper bound on a variable and checks the result
Definition at line 9303 of file cons_quadratic.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPadjustedVarUb(), SCIPconsGetName(), SCIPdebugMessage, SCIPinProbing(), SCIPisGE(), SCIPisHugeValue(), SCIPisInfinity(), SCIPresetConsAge(), SCIPtightenVarUb(), SCIPvarGetName(), and SCIPvarGetUbLocal(). Referenced by propagateBoundsBilinearTerm(), propagateBoundsCons(), and propagateBoundsQuadVar().
solves a quadratic equation
Definition at line 9364 of file cons_quadratic.c. References NULL, propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIPconsGetName(), SCIPdebugMessage, SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPisInfinity(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal(). Referenced by propagateBoundsCons().
tries to deduce domain reductions for x in xsqrcoef x^2 + xlincoef x + ysqrcoef y^2 + ylincoef y + bilincoef x y \in rhs
Definition at line 9563 of file cons_quadratic.c. References infty2infty, MAX, MIN, NULL, propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetName(), SCIPdebugMessage, SCIPinfinity(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPintervalSetBounds(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal(). Referenced by propagateBoundsCons().
computes the minimal and maximal activity for the quadratic part in a constraint data Only sums up terms that contribute finite values. Gives the number of terms that contribute infinite values. Only computes those activities where the corresponding side of the constraint is finite.
Definition at line 9637 of file cons_quadratic.c. References SCIP_Interval::inf, infty2infty, MAX, MIN, NULL, SCIP_Real, SCIPinfinity(), SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalGetRoundingMode(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalMulScalar(), SCIPintervalQuadUpperBound(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), sqrt(), and SCIP_Interval::sup. Referenced by propagateBoundsCons().
propagates bounds on a quadratic constraint
Definition at line 9772 of file cons_quadratic.c. References consdataFindQuadVarTerm(), consdataSortQuadVarTerms(), consdataUpdateLinearActivity(), FALSE, SCIP_Interval::inf, infty2infty, MAX, MIN, NULL, propagateBoundsBilinearTerm(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPepsilon(), SCIPfreeBufferArrayNull, SCIPinfinity(), SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalGetRoundingMode(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPintervalIsSubsetEQ(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulSup(), SCIPintervalNegateReal(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSub(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIP_Interval::sup, and TRUE. Referenced by propagateBounds(), and SCIP_DECL_CONSPRESOL().
calls domain propagation for a set of constraints
Definition at line 10306 of file cons_quadratic.c. References FALSE, NULL, propagateBoundsCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIP_STAGE_SOLVING, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPgetStage(), and TRUE. Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSPROP().
checks for a linear variable that can be increase or decreased without harming feasibility
Definition at line 10375 of file cons_quadratic.c. References SCIPdebugMessage, SCIPisInfinity(), SCIPvarGetName(), SCIPvarGetNLocksDown(), and SCIPvarGetObj(). Referenced by SCIP_DECL_CONSCHECK(), and SCIP_DECL_CONSINITSOL().
Given a solution where every quadratic constraint is either feasible or can be made feasible by moving a linear variable, construct the corresponding feasible solution and pass it to the trysol heuristic. The method assumes that this is always possible and that not all constraints are feasible already.
Definition at line 10440 of file cons_quadratic.c. References computeViolation(), FALSE, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPceil(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateLPSol(), SCIPcreateSolCopy(), SCIPdebugMessage, SCIPfeastol(), SCIPfloor(), SCIPfreeSol(), SCIPgetSolTransObj(), SCIPgetSolVal(), SCIPgetUpperbound(), SCIPheurGetName(), SCIPheurPassSolTrySol(), SCIPincSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisSumLT(), SCIPisZero(), SCIPsolGetHeur(), SCIPunlinkSol(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), and TRUE. Referenced by SCIP_DECL_CONSCHECK().
tries to upgrade a nonlinear constraint into a quadratic constraint Definition at line 10591 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LAST, SCIP_EXPR_LINEAR, SCIP_EXPR_LOG, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PARAM, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGN, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_SIN, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_EXPR_TAN, SCIP_EXPR_USER, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIPaddBilinTermQuadratic(), SCIPaddConstantQuadratic(), SCIPaddQuadVarLinearCoefQuadratic(), SCIPaddQuadVarQuadratic(), SCIPaddSquareCoefQuadratic(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPexprgraphAreAllNodeChildrenVars(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodeQuadraticConstant(), SCIPexprgraphGetNodeQuadraticLinearCoefs(), SCIPexprgraphGetNodeQuadraticNQuadElements(), SCIPexprgraphGetNodeQuadraticQuadElements(), SCIPexprgraphGetNodeVar(), SCIPgetExprgraphNodeNonlinear(), SCIPgetExprgraphNonlinear(), SCIPgetLhsNonlinear(), SCIPgetLinearCoefsNonlinear(), SCIPgetLinearVarsNonlinear(), SCIPgetNLinearVarsNonlinear(), SCIPgetRhsNonlinear(), and SCIPwarningMessage().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 10771 of file cons_quadratic.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrQuadratic(), and TRUE.
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 10787 of file cons_quadratic.c. References NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPfreeMemory, and SCIPfreeMemoryArrayNull.
initialization method of constraint handler (called after problem was transformed) Definition at line 10812 of file cons_quadratic.c. References NULL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfindHeur().
deinitialization method of constraint handler (called before transformed problem is freed) Definition at line 10831 of file cons_quadratic.c. References NULL, SCIP_OKAY, and SCIPconshdlrGetData().
presolving initialization method of constraint handler (called when presolving is about to begin) presolving deinitialization method of constraint handler (called after presolving has been finished) Definition at line 10869 of file cons_quadratic.c. References mergeAndCleanBilinearTerms(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), NULL, removeFixedVariables(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsAdded(), SCIPenableNLP(), and SCIPvarIsActive().
solving process initialization method of constraint handler (called when branch and bound process is about to begin)
Definition at line 10923 of file cons_quadratic.c. References checkCurvature(), checkFactorable(), computeGauge(), consdataFindQuadVarTerm(), consdataFindUnlockedLinearVar(), consdataSortQuadVarTerms(), CONSHDLR_NAME, createNlRow(), FALSE, MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_VERBLEVEL_HIGH, SCIPaddNlRow(), SCIPallocBlockMemoryArray, SCIPcatchEvent(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPfindEventhdlr(), SCIPgetStage(), SCIPgetSubscipDepth(), SCIPinfinity(), SCIPisInfinity(), SCIPisInRestart(), SCIPisIpoptAvailableIpopt(), SCIPisNLPConstructed(), and SCIPverbMessage().
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 11041 of file cons_quadratic.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIP_STAGE_EXITSOLVE, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdropEvent(), SCIPfindEventhdlr(), SCIPfreeBlockMemoryArrayNull, SCIPfreeMemoryArrayNull, SCIPgetStage(), and SCIPreleaseNlRow().
frees specific constraint data Definition at line 11099 of file cons_quadratic.c. References consdataFree(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
transforms constraint data into data belonging to the transformed problem Definition at line 11116 of file cons_quadratic.c. References consdataCreate(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPgetTransformedVar(), and SCIPvarCompare().
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 11173 of file cons_quadratic.c. References checkCurvature(), FALSE, generateCut(), INITLPMAXVARVAL, MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddCut(), SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPdebug, SCIPdebugMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPisInfinity(), SCIPprintRow(), SCIPreleaseRow(), SCIProwGetName(), SCIPvarGetBestBoundLocal(), SCIPvarGetBestBoundType(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarGetWorstBoundLocal(), and TRUE.
separation method of constraint handler for LP solutions Definition at line 11386 of file cons_quadratic.c. References addLinearizationCuts(), checkCurvature(), computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddLinearConsToNlpHeurSubNlp(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateNLPSol(), SCIPdebugMessage, SCIPfeastol(), SCIPfreeSol(), SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNContVars(), SCIPgetNIntVars(), SCIPgetNLPFracVars(), SCIPgetNLPSolstat(), SCIPgetNNlpis(), SCIPgetNVars(), SCIPgetSolOrigObj(), SCIPheurPassSolTrySol(), SCIPisGT(), SCIPisNLPConstructed(), SCIPsetNLPInitialGuessSol(), SCIPsolveNLP(), separatePoint(), and TRUE.
separation method of constraint handler for arbitrary primal solutions Definition at line 11531 of file cons_quadratic.c. References computeViolations(), FALSE, NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIPconshdlrGetData(), and separatePoint().
constraint enforcing method of constraint handler for LP solutions Definition at line 11558 of file cons_quadratic.c. References computeViolations(), MAX, MIN, NULL, propagateBounds(), registerBranchingCandidates(), registerLargeLPValueVariableForBranching(), replaceByLinearConstraints(), SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_VERBLEVEL_HIGH, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateChild(), SCIPdebugMessage, SCIPepsilon(), SCIPfeastol(), SCIPgetCurrentNode(), SCIPgetRelaxFeastolFactor(), SCIPgetSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisStopped(), SCIPnodeGetEstimate(), SCIPvarGetName(), SCIPverbMessage(), SCIPwarningMessage(), separatePoint(), and TRUE.
constraint enforcing method of constraint handler for pseudo solutions Definition at line 11745 of file cons_quadratic.c. References computeViolations(), MAX, NULL, propagateBounds(), SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALID, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SOLVELP, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfeastol(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
domain propagation method of constraint handler Definition at line 11825 of file cons_quadratic.c. References NULL, propagateBounds(), SCIP_CALL, and SCIP_OKAY.
presolving method of constraint handler Definition at line 11842 of file cons_quadratic.c. References FALSE, mergeAndCleanBilinearTerms(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), NULL, presolveDisaggregate(), presolveSolve(), presolveTryAddAND(), presolveTryAddLinearReform(), presolveUpgrade(), propagateBoundsCons(), removeFixedVariables(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_REDUCEDDOM, SCIP_SUCCESS, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPisEQ(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisIntegral(), SCIPisPresolveFinished(), SCIPvarGetName(), SCIPvarGetType(), and TRUE.
variable rounding lock method of constraint handler Definition at line 12122 of file cons_quadratic.c. References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocks(), SCIPconsGetData(), and SCIPisInfinity().
constraint enabling notification method of constraint handler Definition at line 12175 of file cons_quadratic.c. References catchVarEvents(), mergeAndCleanBilinearTerms(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_SOLVING, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsTransformed(), SCIPdebugMessage, and SCIPgetStage().
constraint disabling notification method of constraint handler Definition at line 12212 of file cons_quadratic.c. References dropVarEvents(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdebugMessage, and SCIPgetStage().
constraint display method of constraint handler Definition at line 12240 of file cons_quadratic.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), SCIPwriteVarsPolynomial(), and TRUE.
feasibility check method of constraint handler for integral solutions Definition at line 12373 of file cons_quadratic.c. References computeViolation(), consdataFindUnlockedLinearVar(), FALSE, NULL, proposeFeasibleSolution(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPfeastol(), SCIPgetStage(), SCIPinfoMessage(), SCIPisGT(), SCIPisInfinity(), SCIPprintCons(), and SCIPupdateStartpointHeurSubNlp().
constraint copying method of constraint handler Definition at line 12474 of file cons_quadratic.c. References SCIP_QuadVarTerm::adjbilin, SCIP_BilinTerm::coef, SCIP_QuadVarTerm::eventdata, FALSE, SCIP_QuadVarTerm::lincoef, SCIP_QuadVarTerm::nadjbilin, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPcreateConsQuadratic2(), SCIPfreeBufferArrayNull, SCIPgetVarCopy(), SCIP_QuadVarTerm::sqrcoef, TRUE, SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2.
constraint parsing method of constraint handler Definition at line 12587 of file cons_quadratic.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddBilinTermQuadratic(), SCIPaddConstantQuadratic(), SCIPaddLinearVarQuadratic(), SCIPaddQuadVarQuadratic(), SCIPcreateConsQuadratic(), SCIPerrorMessage, SCIPfindQuadVarTermQuadratic(), SCIPfreeParseVarsPolynomialData(), SCIPinfinity(), SCIPisInfinity(), SCIPparseVarsPolynomial(), SCIPreleaseCons(), and SCIPstrToRealValue().
constraint method of constraint handler which returns the variables (if possible) Definition at line 12780 of file cons_quadratic.c. References BMScopyMemoryArray, FALSE, NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
constraint method of constraint handler which returns the number of variables (if possible) Definition at line 12811 of file cons_quadratic.c. References NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
creates the handler for quadratic constraints and includes it in SCIP
Definition at line 12833 of file cons_quadratic.c. References BMSclearMemory, 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, NONLINCONSUPGD_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeNonlinconsUpgrade(), SCIPinfinity(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrDisable(), SCIPsetConshdlrEnable(), 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 update method into the quadratic constraint handler
Definition at line 12975 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(), and SCIPincludeConshdlrSOC().
Creates and captures a quadratic constraint. The constraint should be given in the form
where
Definition at line 13051 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(), SCIPcalcHashtableSize(), SCIPcreateCons(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindConshdlr(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), 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 with all its flags set to their default values. The constraint should be given in the form
where
Definition at line 13225 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
Definition at line 13256 of file cons_quadratic.c. References consdataCreate(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE. Referenced by presolveDisaggregate(), presolveRemoveFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_QUADCONSUPGD(), and SCIPcreateConsBasicQuadratic2().
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 13318 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 13342 of file cons_quadratic.c. References NULL, REALABS, SCIP_STAGE_SOLVING, SCIPABORT, SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), 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 13378 of file cons_quadratic.c. References addLinearCoef(), NULL, REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), 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 13403 of file cons_quadratic.c. References addQuadVarTerm(), NULL, REALABS, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), 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 13433 of file cons_quadratic.c. References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), 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 13486 of file cons_quadratic.c. References addQuadVarTerm(), consdataFindQuadVarTerm(), FALSE, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPconsIsEnabled(), SCIPerrorMessage, SCIPgetStage(), 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 13543 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, SCIPgetStage(), and SCIPisInfinity(). Referenced by presolveDisaggregate(), readQuadraticCoefs(), SCIP_DECL_CONSPARSE(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), and SCIPchgBilinCoefQuadratic().
Gets the quadratic constraint as a nonlinear row representation.
Definition at line 13609 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 term of a quadratic constraint.
Definition at line 13634 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 13648 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 SCIPgetNLinearVarsQuadratic.
Definition at line 13662 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 13675 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 13689 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 13701 of file cons_quadratic.c. References consdataSortQuadVarTerms(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData(). Referenced by readNonlinearExprs(), and SCIP_DECL_QUADCONSUPGD().
Finds the position of a quadratic variable term for a given variable.
Definition at line 13718 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 13736 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 13750 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 13762 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 13774 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 13786 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 13799 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 13816 of file cons_quadratic.c. References checkCurvatureEasy(), FALSE, NULL, SCIP_Bool, and SCIPconsGetData(). Referenced by createCoveringProblem(), and SCIP_DECL_QUADCONSUPGD().
Computes the violation of a constraint by a solution
Definition at line 13833 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 13864 of file cons_quadratic.c. References FALSE, NULL, SCIPconsGetData(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Adds the constraint to an NLPI problem.
Definition at line 13910 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().
sets the left hand side of a quadratic constraint
Definition at line 14045 of file cons_quadratic.c. References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().
sets the right hand side of a quadratic constraint
Definition at line 14090 of file cons_quadratic.c. References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), and SCIPisLE().
gets the feasibility of the quadratic constraint in the given solution
Definition at line 14132 of file cons_quadratic.c. References computeViolation(), CONSHDLR_NAME, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPinfinity(), and SCIPisInfinity().
gets the activity of the quadratic constraint in the given solution
Definition at line 14173 of file cons_quadratic.c. References computeViolation(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
changes the linear coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
Definition at line 14207 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, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE.
changes the square coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
Definition at line 14300 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, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsOriginal(), SCIPerrorMessage, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE. Referenced by SCIPchgBilinCoefQuadratic().
changes the bilinear coefficient value for a given quadratic variable in a quadratic constraint data; if not available, it adds it
Definition at line 14369 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, SCIPgetStage(), SCIPintervalSetEmpty(), SCIPisInfinity(), SCIPisZero(), SCIPvarIsOriginal(), and TRUE. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||