methods for nonlinear data
void SCIPaddSquareLinearization | ( | SCIP * | scip, |
SCIP_Real | sqrcoef, | ||
SCIP_Real | refpoint, | ||
SCIP_Bool | isint, | ||
SCIP_Real * | lincoef, | ||
SCIP_Real * | linconstant, | ||
SCIP_Bool * | success | ||
) |
computes coefficients of linearization of a square term in a reference point
scip | SCIP data structure |
sqrcoef | coefficient of square term |
refpoint | point where to linearize |
isint | whether corresponding variable is a discrete variable, and thus linearization could be moved |
lincoef | buffer to add coefficient of linearization |
linconstant | buffer to add constant of linearization |
success | buffer to set to FALSE if linearization has failed due to large numbers |
Definition at line 33023 of file scip.c.
References FALSE, NULL, REALABS, SCIP_Real, SCIPfloor(), SCIPisInfinity(), and SCIPisIntegral().
Referenced by addBilinearTermToCut(), generateCutConvex(), and generateCutNonConvex().
void SCIPaddSquareSecant | ( | SCIP * | scip, |
SCIP_Real | sqrcoef, | ||
SCIP_Real | lb, | ||
SCIP_Real | ub, | ||
SCIP_Real | refpoint, | ||
SCIP_Real * | lincoef, | ||
SCIP_Real * | linconstant, | ||
SCIP_Bool * | success | ||
) |
computes coefficients of secant of a square term
scip | SCIP data structure |
sqrcoef | coefficient of square term |
lb | lower bound on variable |
ub | upper bound on variable |
refpoint | point for which to compute value of linearization |
lincoef | buffer to add coefficient of secant |
linconstant | buffer to add constant of secant |
success | buffer to set to FALSE if secant has failed due to large numbers or unboundedness |
Definition at line 33091 of file scip.c.
References FALSE, NULL, REALABS, SCIP_Real, SCIPisGE(), SCIPisInfinity(), and SCIPisLE().
Referenced by addBilinearTermToCut(), and generateCutNonConvex().
void SCIPaddBilinLinearization | ( | SCIP * | scip, |
SCIP_Real | bilincoef, | ||
SCIP_Real | refpointx, | ||
SCIP_Real | refpointy, | ||
SCIP_Real * | lincoefx, | ||
SCIP_Real * | lincoefy, | ||
SCIP_Real * | linconstant, | ||
SCIP_Bool * | success | ||
) |
computes coefficients of linearization of a bilinear term in a reference point
scip | SCIP data structure |
bilincoef | coefficient of bilinear term |
refpointx | point where to linearize first variable |
refpointy | point where to linearize second variable |
lincoefx | buffer to add coefficient of first variable in linearization |
lincoefy | buffer to add coefficient of second variable in linearization |
linconstant | buffer to add constant of linearization |
success | buffer to set to FALSE if linearization has failed due to large numbers |
Definition at line 33141 of file scip.c.
References FALSE, NULL, REALABS, SCIP_Real, and SCIPisInfinity().
Referenced by generateCutConvex().
void SCIPaddBilinMcCormick | ( | SCIP * | scip, |
SCIP_Real | bilincoef, | ||
SCIP_Real | lbx, | ||
SCIP_Real | ubx, | ||
SCIP_Real | refpointx, | ||
SCIP_Real | lby, | ||
SCIP_Real | uby, | ||
SCIP_Real | refpointy, | ||
SCIP_Bool | overestimate, | ||
SCIP_Real * | lincoefx, | ||
SCIP_Real * | lincoefy, | ||
SCIP_Real * | linconstant, | ||
SCIP_Bool * | success | ||
) |
computes coefficients of McCormick under- or overestimation of a bilinear term
scip | SCIP data structure |
bilincoef | coefficient of bilinear term |
lbx | lower bound on first variable |
ubx | upper bound on first variable |
refpointx | reference point for first variable |
lby | lower bound on second variable |
uby | upper bound on second variable |
refpointy | reference point for second variable |
overestimate | whether to compute an overestimator instead of an underestimator |
lincoefx | buffer to add coefficient of first variable in linearization |
lincoefy | buffer to add coefficient of second variable in linearization |
linconstant | buffer to add constant of linearization |
success | buffer to set to FALSE if linearization has failed due to large numbers |
Definition at line 33188 of file scip.c.
References FALSE, MAX, MIN, NULL, REALABS, SCIP_Real, SCIPdebugMsg, SCIPisGE(), SCIPisInfinity(), SCIPisLE(), and SCIPisRelEQ().
Referenced by addBilinearTermToCut(), and generateCutNonConvex().
SCIP_RETCODE SCIPcreateNlpiProb | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLROW ** | nlrows, | ||
int | nnlrows, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2idx, | ||
SCIP_Real * | nlscore, | ||
SCIP_Real | cutoffbound, | ||
SCIP_Bool | setobj, | ||
SCIP_Bool | onlyconvex | ||
) |
creates an NLP relaxation and stores it in a given NLPI problem; the function computes for each variable which the number of non-linearly occurrences and stores it in the nlscore array
scip | SCIP data structure |
nlpi | interface to NLP solver |
nlrows | nonlinear rows |
nnlrows | total number of nonlinear rows |
nlpiprob | empty nlpi problem |
var2idx | empty hash map to store mapping between variables and indices in nlpi problem |
nlscore | array to store the score of each nonlinear variable (NULL if not needed) |
cutoffbound | cutoff bound |
setobj | should the objective function be set? |
onlyconvex | filter only for convex constraints |
Definition at line 33395 of file scip.c.
References BMSclearMemoryArray, SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPinfinity(), SCIPisInfinity(), SCIPisZero(), SCIPnlpiAddConstraints(), SCIPnlpiAddVars(), SCIPnlpiSetObjective(), SCIPnlrowGetConstant(), SCIPnlrowGetCurvature(), SCIPnlrowGetExprtree(), SCIPnlrowGetLhs(), SCIPnlrowGetLinearCoefs(), SCIPnlrowGetLinearVars(), SCIPnlrowGetName(), SCIPnlrowGetNLinearVars(), SCIPnlrowGetNQuadElems(), SCIPnlrowGetQuadElems(), SCIPnlrowGetQuadVars(), SCIPnlrowGetRhs(), SCIPswapInts(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetUbLocal(), and TRUE.
Referenced by applyNlobbt(), computeInteriorPoint(), SCIP_DECL_RELAXEXEC(), and SCIP_DECL_SEPAEXECLP().
SCIP_RETCODE SCIPupdateNlpiProb | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2nlpiidx, | ||
SCIP_VAR ** | nlpivars, | ||
int | nlpinvars, | ||
SCIP_Real | cutoffbound | ||
) |
updates bounds of each variable and the cutoff row in the nlpiproblem
scip | SCIP data structure |
nlpi | interface to NLP solver |
nlpiprob | nlpi problem representing the convex NLP relaxation |
var2nlpiidx | mapping between variables and nlpi indices |
nlpivars | array containing all variables of the nlpi |
nlpinvars | total number of nlpi variables |
cutoffbound | new cutoff bound |
Definition at line 33718 of file scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPinfinity(), SCIPnlpiChgConsSides(), SCIPnlpiChgVarBounds(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by applyNlobbt(), and SCIP_DECL_SEPAEXECLP().
SCIP_RETCODE SCIPaddNlpiProbRows | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2idx, | ||
SCIP_ROW ** | rows, | ||
int | nrows | ||
) |
adds linear rows to the NLP relaxation
scip | SCIP data structure |
nlpi | interface to NLP solver |
nlpiprob | nlpi problem |
var2idx | empty hash map to store mapping between variables and indices in nlpi problem |
rows | rows to add |
nrows | total number of rows to add |
Definition at line 33770 of file scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcolGetVar(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetNVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPnlpiAddConstraints(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetRhs(), and SCIProwGetVals().
Referenced by applyNlobbt(), computeInteriorPoint(), SCIP_DECL_RELAXEXEC(), and SCIP_DECL_SEPAEXECLP().