Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for expressions and expression trees

Functions

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

Function Documentation

◆ SCIPexprtreeGetVars()

SCIP_EXPORT SCIP_VAR** SCIPexprtreeGetVars ( SCIP_EXPRTREE tree)

returns variables of expression tree

Parameters
treeexpression tree

Definition at line 102 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(), getLinearAndQuadraticCoefs(), initSepaData(), isConvexLocal(), nlpAddNlRows(), nlpSetupNlpiIndices(), nlrowCalcActivityBounds(), nlrowExprtreeChanged(), printNonlinearRow(), printRowNl(), processNlRow(), readObjective(), registerBranchingVariables(), registerLargeRelaxValueVariableForBranching(), removeFixedVariables(), replaceViolatedByLinearConstraints(), 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_EXPORT 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 144 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()

SCIP_EXPORT 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 206 of file nlp.c.

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

Referenced by nlpDelVarPos(), and nlrowRemoveFixedVar().

◆ SCIPgetExprtreeTransformedVars()

SCIP_EXPORT 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 74 of file scip_expr.c.

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

Referenced by SCIP_DECL_CONSTRANS().

◆ SCIPevalExprtreeSol()

SCIP_EXPORT 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 113 of file scip_expr.c.

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

◆ SCIPevalExprtreeGlobalBounds()

SCIP_EXPORT 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 168 of file scip_expr.c.

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

◆ SCIPevalExprtreeLocalBounds()

SCIP_EXPORT 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 233 of file scip_expr.c.

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

Referenced by enforceViolatedFixedNonlinear(), and replaceViolatedByLinearConstraints().