Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for expressions and expression trees

Functions

SCIP_VAR ** SCIPexprtreeGetVars (SCIP_EXPRTREE *tree)
 
SCIP_RETCODE SCIPexprtreeSetVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreeAddVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreePrintWithNames (SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
int SCIPexprtreeFindVar (SCIP_EXPRTREE *tree, SCIP_VAR *var)
 
SCIP_RETCODE SCIPgetExprtreeTransformedVars (SCIP *scip, SCIP_EXPRTREE *tree)
 
SCIP_RETCODE SCIPevalExprtreeSol (SCIP *scip, SCIP_EXPRTREE *tree, SCIP_SOL *sol, SCIP_Real *val)
 
SCIP_RETCODE SCIPevalExprtreeGlobalBounds (SCIP *scip, SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *val)
 
SCIP_RETCODE SCIPevalExprtreeLocalBounds (SCIP *scip, SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *val)
 

Function Documentation

◆ SCIPexprtreeGetVars()

SCIP_VAR** SCIPexprtreeGetVars ( SCIP_EXPRTREE tree)

returns variables of expression tree

Parameters
treeexpression tree

Definition at line 101 of file nlp.c.

References NULL, and SCIP_ExprTree::vars.

Referenced by addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), addIntervalGradientEstimator(), addLinearization(), addUserEstimator(), checkCurvature(), computeGradient(), computeViolation(), consdataAddExprtrees(), generate1ConvexIndefiniteUnderestimator(), generate1ConvexIndefiniteUnderestimatorAtBoundary(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateConvexConcaveEstimator(), generateConvexConcaveUnderestimator(), generateCut(), generateEstimatingHyperplane(), generateLinearizationCut(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateOverestimatingHyperplaneCut(), generateUnderestimatorParallelYFacets(), getGradientMaxElement(), getLinearAndQuadraticCoefs(), initSepaData(), isConvexLocal(), nlpAddNlRows(), nlpSetupNlpiIndices(), nlrowCalcActivityBounds(), nlrowExprtreeChanged(), printNonlinearRow(), printRowNl(), processNlRow(), readObjective(), registerBranchingVariables(), registerLargeRelaxValueVariableForBranching(), removeFixedVariables(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIPcreateConsBivariate(), SCIPcreateNlpiProb(), SCIPevalExprtreeGlobalBounds(), SCIPevalExprtreeLocalBounds(), SCIPevalExprtreeSol(), SCIPgetExprtreeTransformedVars(), SCIPnlpGetVarsNonlinearity(), SCIPnlpHasContinuousNonlinearity(), SCIPnlrowGetSolActivity(), SCIPnlrowRecalcNLPActivity(), SCIPnlrowRecalcPseudoActivity(), and SCIPwritePip().

◆ SCIPexprtreeSetVars()

◆ SCIPexprtreeAddVars()

SCIP_RETCODE SCIPexprtreeAddVars ( SCIP_EXPRTREE tree,
int  nvars,
SCIP_VAR **  vars 
)

adds variables to the expression tree variables array

Parameters
treeexpression tree
nvarsnumber of variables
varsvariables

Definition at line 143 of file nlp.c.

References SCIP_ExprTree::blkmem, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, BMSreallocBlockMemoryArray, NULL, SCIP_ExprTree::nvars, SCIP_ALLOC, SCIP_OKAY, and SCIP_ExprTree::vars.

Referenced by createNlRow(), and SCIPexprtreeRemoveFixedVars().

◆ SCIPexprtreePrintWithNames()

◆ SCIPexprtreeFindVar()

int SCIPexprtreeFindVar ( SCIP_EXPRTREE tree,
SCIP_VAR var 
)

searches the variables array of an expression tree for a variable and returns its position, or -1 if not found Note that this is an O(n) operation!

Parameters
treeexpression tree
varvariable to search for

Definition at line 205 of file nlp.c.

References NULL, SCIP_ExprTree::nvars, and SCIP_ExprTree::vars.

Referenced by nlpDelVarPos(), and nlrowRemoveFixedVar().

◆ SCIPgetExprtreeTransformedVars()

SCIP_RETCODE SCIPgetExprtreeTransformedVars ( SCIP scip,
SCIP_EXPRTREE tree 
)

replaces array of variables in expression tree by corresponding transformed variables

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
treeexpression tree

Definition at line 32674 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPgetTransformedVars(), and TRUE.

Referenced by SCIP_DECL_CONSTRANS().

◆ SCIPevalExprtreeSol()

SCIP_RETCODE SCIPevalExprtreeSol ( SCIP scip,
SCIP_EXPRTREE tree,
SCIP_SOL sol,
SCIP_Real val 
)

evaluates an expression tree for a primal solution or LP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
treeexpression tree
sola solution, or NULL for current LP solution
valbuffer to store value

Definition at line 32713 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPgetSolVals(), and TRUE.

◆ SCIPevalExprtreeGlobalBounds()

SCIP_RETCODE SCIPevalExprtreeGlobalBounds ( SCIP scip,
SCIP_EXPRTREE tree,
SCIP_Real  infinity,
SCIP_INTERVAL val 
)

evaluates an expression tree w.r.t. current global bounds

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
treeexpression tree
infinityvalue to use for infinity
valbuffer to store result

Definition at line 32768 of file scip.c.

References checkStage(), FALSE, infty2infty, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPexprtreeEvalInt(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPinfinity(), SCIPintervalSetBounds(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.

◆ SCIPevalExprtreeLocalBounds()

SCIP_RETCODE SCIPevalExprtreeLocalBounds ( SCIP scip,
SCIP_EXPRTREE tree,
SCIP_Real  infinity,
SCIP_INTERVAL val 
)

evaluates an expression tree w.r.t. current local bounds

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
treeexpression tree
infinityvalue to use for infinity
valbuffer to store result

Definition at line 32833 of file scip.c.

References checkStage(), FALSE, infty2infty, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPexprtreeEvalInt(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPinfinity(), SCIPintervalSetBounds(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.

Referenced by enforceViolatedFixedNonlinear(), and replaceViolatedByLinearConstraints().