Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for nonlinear data

Functions

void SCIPaddSquareLinearization (SCIP *scip, SCIP_Real sqrcoef, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
 
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)
 
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)
 
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)
 
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)
 
SCIP_RETCODE SCIPupdateNlpiProb (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2nlpiidx, SCIP_VAR **nlpivars, int nlpinvars, SCIP_Real cutoffbound)
 
SCIP_RETCODE SCIPaddNlpiProbRows (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2idx, SCIP_ROW **rows, int nrows)
 

Function Documentation

◆ SCIPaddSquareLinearization()

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

Parameters
scipSCIP data structure
sqrcoefcoefficient of square term
refpointpoint where to linearize
isintwhether corresponding variable is a discrete variable, and thus linearization could be moved
lincoefbuffer to add coefficient of linearization
linconstantbuffer to add constant of linearization
successbuffer 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().

◆ SCIPaddSquareSecant()

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

Parameters
scipSCIP data structure
sqrcoefcoefficient of square term
lblower bound on variable
ubupper bound on variable
refpointpoint for which to compute value of linearization
lincoefbuffer to add coefficient of secant
linconstantbuffer to add constant of secant
successbuffer 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().

◆ SCIPaddBilinLinearization()

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

Parameters
scipSCIP data structure
bilincoefcoefficient of bilinear term
refpointxpoint where to linearize first variable
refpointypoint where to linearize second variable
lincoefxbuffer to add coefficient of first variable in linearization
lincoefybuffer to add coefficient of second variable in linearization
linconstantbuffer to add constant of linearization
successbuffer 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().

◆ SCIPaddBilinMcCormick()

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

Parameters
scipSCIP data structure
bilincoefcoefficient of bilinear term
lbxlower bound on first variable
ubxupper bound on first variable
refpointxreference point for first variable
lbylower bound on second variable
ubyupper bound on second variable
refpointyreference point for second variable
overestimatewhether to compute an overestimator instead of an underestimator
lincoefxbuffer to add coefficient of first variable in linearization
lincoefybuffer to add coefficient of second variable in linearization
linconstantbuffer to add constant of linearization
successbuffer 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().

◆ SCIPcreateNlpiProb()

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

Note
the first row corresponds always to the cutoff row (even if cutoffbound is SCIPinfinity(scip))
Parameters
scipSCIP data structure
nlpiinterface to NLP solver
nlrowsnonlinear rows
nnlrowstotal number of nonlinear rows
nlpiprobempty nlpi problem
var2idxempty hash map to store mapping between variables and indices in nlpi problem
nlscorearray to store the score of each nonlinear variable (NULL if not needed)
cutoffboundcutoff bound
setobjshould the objective function be set?
onlyconvexfilter 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().

◆ SCIPupdateNlpiProb()

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

Parameters
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobnlpi problem representing the convex NLP relaxation
var2nlpiidxmapping between variables and nlpi indices
nlpivarsarray containing all variables of the nlpi
nlpinvarstotal number of nlpi variables
cutoffboundnew 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().

◆ SCIPaddNlpiProbRows()

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

Parameters
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobnlpi problem
var2idxempty hash map to store mapping between variables and indices in nlpi problem
rowsrows to add
nrowstotal 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().