All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
expr.c File Reference Detailed Descriptionmethods for expressions, expression trees, expression graphs, and related Definition in file expr.c. #include <stdarg.h> #include <string.h> #include <math.h> #include <ctype.h> #include "nlpi/pub_expr.h" #include "nlpi/struct_expr.h" #include "nlpi/exprinterpret.h" #include "scip/intervalarith.h" #include "scip/pub_misc.h" #include "scip/pub_message.h" Go to the source code of this file.
Macro Definition Documentation
estimate on maximal number of children Definition at line 39 of file expr.c. Referenced by exprgraphNodeEval(), exprgraphNodeUpdateBounds(), SCIPexprCheckCurvature(), SCIPexprEval(), SCIPexprEvalInt(), and SCIPexprgraphUpdateNodeBoundsCurvature().
sign of a value (-1 or +1) 0.0 has sign +1 Definition at line 44 of file expr.c. Referenced by SCIP_DECL_EXPREVAL().
Value:
do { \
int __newsize; \
assert((blkmem) != NULL); \
if( *(cursize) >= (minsize) ) \
break; \
__newsize = calcGrowSize(minsize); \
assert(__newsize >= (minsize)); \
SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, array1, *(cursize), __newsize) ); \
*(cursize) = __newsize; \
} while( FALSE )
ensures that a block memory array has at least a given size if cursize is 0, then *array1 can be NULL Definition at line 49 of file expr.c. Referenced by exprgraphMoveNode(), exprgraphNodeAddParent(), exprgraphNodeSimplify(), polynomialdataEnsureMonomialsSize(), SCIPexprgraphAddConst(), SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), SCIPexprgraphReplaceVarByLinearSum(), and SCIPexprgraphSimplify().
Value:
do { \
int __newsize; \
assert((blkmem) != NULL); \
if( *(cursize) >= (minsize) ) \
break; \
__newsize = calcGrowSize(minsize); \
assert(__newsize >= (minsize)); \
SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, array1, *(cursize), __newsize) ); \
SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, array2, *(cursize), __newsize) ); \
SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, array3, *(cursize), __newsize) ); \
*(cursize) = __newsize; \
} while( FALSE )
ensures that three block memory arrays have at least a given size if cursize is 0, then arrays can be NULL Definition at line 82 of file expr.c. Referenced by exprgraphEnsureDepth(), SCIPexprgraphAddVars(), SCIPexprgraphCreate(), and SCIPexprgraphReplaceVarByLinearSum().
comparing two quadratic elements a is better than b if index1 of a is smaller than index1 of b or index1 of both is equal but index2 of a is smaller than index2 of b Definition at line 8419 of file expr.c. Referenced by quadelemsQuickSort(), and SCIPquadelemSqueeze().
Value:
swaps two quadratic elements Definition at line 8422 of file expr.c. Referenced by quadelemsQuickSort(). Function Documentation
calculate memory size for dynamically allocated arrays (copied from scip/set.c)
Definition at line 101 of file expr.c. Referenced by exprsimplifyFlattenPolynomials(), and monomialdataEnsureFactorsSize().
checks if a given new lower bound is tighter (w.r.t. given bound strengthening epsilon) than the old one (copied from scip/set.c)
Definition at line 128 of file expr.c. References EPSGT, FALSE, MAX, MIN, REALABS, and SCIP_Real. Referenced by exprgraphNodeUpdateBounds(), exprgraphUpdateVarNodeBounds(), SCIPexprgraphTightenNodeBounds(), and SCIPexprgraphUpdateNodeBoundsCurvature().
checks if a given new upper bound is tighter (w.r.t. given bound strengthening epsilon) than the old one (copied from scip/set.c)
Definition at line 148 of file expr.c. References EPSLT, FALSE, MAX, MIN, REALABS, and SCIP_Real. Referenced by exprgraphNodeUpdateBounds(), exprgraphUpdateVarNodeBounds(), SCIPexprgraphTightenNodeBounds(), and SCIPexprgraphUpdateNodeBoundsCurvature().
gives curvature for a sum of two functions with given curvature
Definition at line 184 of file expr.c. Referenced by checkCurvature(), and SCIP_DECL_EXPRCURV().
gives the curvature for the negation of a function with given curvature
Definition at line 193 of file expr.c. References SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIPABORT, and SCIPerrorMessage. Referenced by reformulate(), SCIP_DECL_EXPRCURV(), SCIPexprcurvMonomial(), and SCIPexprcurvMultiply().
gives curvature for a functions with given curvature multiplied by a constant factor
Definition at line 219 of file expr.c. References SCIP_EXPRCURV_LINEAR, and SCIPexprcurvNegate(). Referenced by checkCurvature(), reformulate(), SCIP_DECL_EXPRCURV(), and SCIPexprcurvMonomial().
gives curvature for base^exponent for given bounds and curvature of base-function and constant exponent
Definition at line 232 of file expr.c. References EPSISINT, SCIP_Interval::inf, SCIP_Bool, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_Real, SCIPexprcurvPower(), SCIPintervalSetBounds(), sign(), and SCIP_Interval::sup. Referenced by reformulate(), SCIP_DECL_EXPRCURV(), SCIPexprcurvMonomial(), and SCIPexprcurvPower().
gives curvature for a monomial with given curvatures and bounds for each factor
Definition at line 339 of file expr.c. References EPSGE, EPSISINT, EPSLE, FALSE, NULL, SCIP_Bool, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_Real, SCIPexprcurvMultiply(), SCIPexprcurvNegate(), SCIPexprcurvPower(), and TRUE. Referenced by SCIP_DECL_EXPRCURV().
gives name as string for a curvature
Definition at line 452 of file expr.c. References curvnames, and SCIP_EXPRCURV_LINEAR. Referenced by checkCurvature(), reformEnsureChildrenMinCurvature(), reformulate(), and registerBranchingVariables().
creates SCIP_EXPRDATA_QUADRATIC data structure from given quadratic elements
Definition at line 468 of file expr.c. References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIP_DECL_EXPRCOPYDATA(), SCIPexprCreateQuadratic(), and SCIPexprgraphCreateNodeQuadratic().
sorts quadratic elements in a SCIP_EXPRDATA_QUADRATIC data structure
Definition at line 506 of file expr.c. References SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprData_Quadratic::quadelems, SCIPquadelemSort(), SCIP_ExprData_Quadratic::sorted, and TRUE. Referenced by SCIP_DECL_EXPRINTEVAL(), SCIPexprGetMaxDegree(), and SCIPexprSortQuadElems().
compares two monomials gives 0 if monomials are equal Definition at line 541 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, and SCIPexprSortMonomialFactors().
ensures that the factors arrays of a monomial have at least a given size
Definition at line 580 of file expr.c. References BMSreallocBlockMemoryArray, calcGrowSize(), SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::factorssize, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by exprConvertToPolynomial(), polynomialdataExpandMonomialFactor(), and SCIPexprAddMonomialFactors().
creates SCIP_EXPRDATA_POLYNOMIAL data structure from given monomials
Definition at line 605 of file expr.c. References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPexprCreateMonomial(). Referenced by exprConvertToPolynomial(), exprsimplifyFlattenPolynomials(), SCIPexprCreatePolynomial(), and SCIPexprgraphCreateNodePolynomial().
creates a copy of a SCIP_EXPRDATA_POLYNOMIAL data structure
Definition at line 652 of file expr.c. References BMSallocBlockMemoryArray, BMSduplicateBlockMemory, SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPexprCreateMonomial(), and SCIP_ExprData_Monomial::sorted. Referenced by polynomialdataExpandMonomialFactor(), polynomialdataPower(), and SCIP_DECL_EXPRCOPYDATA().
frees a SCIP_EXPRDATA_POLYNOMIAL data structure
Definition at line 689 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, NULL, and SCIPexprFreeMonomial(). Referenced by exprgraphNodeSimplify(), exprsimplifyFlattenPolynomials(), exprUnconvertPolynomial(), polynomialdataExpandMonomialFactor(), polynomialdataPower(), and SCIP_DECL_EXPRFREEDATA().
ensures that the monomials array of a polynomial has at least a given size
Definition at line 718 of file expr.c. References ensureBlockMemoryArraySize, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::monomialssize, NULL, and SCIP_OKAY. Referenced by exprConvertToPolynomial(), polynomialdataAddMonomials(), polynomialdataMultiplyByMonomial(), and polynomialdataMultiplyByPolynomial().
adds an array of monomials to a polynomial
Definition at line 735 of file expr.c. References BMScopyMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::monomialssize, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataEnsureMonomialsSize(), SCIP_CALL, SCIP_OKAY, SCIPexprCreateMonomial(), and SCIP_ExprData_Polynomial::sorted. Referenced by exprConvertToPolynomial(), polynomialdataExpandMonomialFactor(), polynomialdataMultiplyByPolynomial(), SCIPexprAddMonomials(), and SCIPexprgraphNodePolynomialAddMonomials().
ensures that monomials of a polynomial are sorted
Definition at line 777 of file expr.c. References SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIPsortPtr(), SCIP_ExprData_Polynomial::sorted, SCIP_ExprData_Monomial::sorted, and TRUE. Referenced by exprgraphFindParentByOperator(), polynomialdataMergeMonomials(), and SCIPexprSortMonomials().
merges monomials that differ only in coefficient into a single monomial eliminates monomials with coefficient between -eps and eps
Definition at line 809 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, EPSZ, FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataSortMonomials(), SCIPexprFreeMonomial(), SCIPexprMergeMonomialFactors(), and SCIP_ExprData_Polynomial::sorted. Referenced by exprgraphNodeSimplify(), exprsimplifySeparateLinearFromPolynomial(), exprUnconvertPolynomial(), polynomialdataPower(), SCIPexprgraphNodeSplitOffLinear(), and SCIPexprMergeMonomials().
multiplies each summand of a polynomial by a given constant
Definition at line 902 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIPexprChgMonomialCoef(), and SCIPexprFreeMonomial(). Referenced by polynomialdataMultiplyByMonomial(), polynomialdataMultiplyByPolynomial(), and SCIPexprMultiplyPolynomialByConstant().
multiplies each summand of a polynomial by a given monomial
Definition at line 932 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataEnsureMonomialsSize(), polynomialdataMultiplyByConstant(), SCIP_CALL, SCIP_OKAY, SCIPexprCreateMonomial(), SCIPexprMultiplyMonomialByMonomial(), and SCIP_ExprData_Polynomial::sorted. Referenced by polynomialdataExpandMonomialFactor(), polynomialdataMultiplyByPolynomial(), and SCIPexprMultiplyPolynomialByMonomial().
multiplies a polynomial by a polynomial factors need to be different
Definition at line 974 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataAddMonomials(), polynomialdataEnsureMonomialsSize(), polynomialdataMultiplyByConstant(), polynomialdataMultiplyByMonomial(), SCIP_CALL, SCIP_OKAY, SCIPexprChgMonomialCoef(), SCIPexprCreateMonomial(), SCIPexprMultiplyMonomialByMonomial(), SCIP_ExprData_Polynomial::sorted, and TRUE. Referenced by polynomialdataPower(), and SCIPexprMultiplyPolynomialByPolynomial().
takes a power of a polynomial exponent need to be an integer polynomial need to be a monomial, if exponent is negative
Definition at line 1062 of file expr.c. References SCIP_ExprData_Polynomial::constant, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataCopy(), polynomialdataFree(), polynomialdataMergeMonomials(), polynomialdataMultiplyByPolynomial(), pow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprFreeMonomial(), SCIPexprMonomialPower(), and TRUE. Referenced by polynomialdataExpandMonomialFactor(), and SCIPexprPolynomialPower().
applies a mapping of child indices to the indices used in polynomial monomials
Definition at line 1132 of file expr.c. References SCIP_ExprData_Monomial::childidxs, FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_ExprData_Polynomial::sorted, and SCIP_ExprData_Monomial::sorted. Referenced by exprgraphFindParentByOperator(), exprgraphNodeRemovePolynomialDuplicateChildren(), exprgraphNodeRemovePolynomialNullChildren(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), and polynomialdataExpandMonomialFactor().
Definition at line 1161 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, EPSFLOOR, EPSISINT, SCIP_ExprData_Monomial::exponents, FALSE, monomialdataEnsureFactorsSize(), SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataAddMonomials(), polynomialdataApplyChildmap(), polynomialdataCopy(), polynomialdataFree(), polynomialdataMultiplyByMonomial(), polynomialdataPower(), pow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprAddMonomialFactors(), SCIPexprFreeMonomial(), SCIPmessagePrintWarning(), SCIP_ExprData_Polynomial::sorted, SCIP_ExprData_Monomial::sorted, and TRUE. Referenced by exprgraphNodeSimplify(), and exprsimplifyFlattenPolynomials().
a default implementation of expression interval evaluation that always gives a correct result Definition at line 1382 of file expr.c. References SCIP_OKAY, and SCIPintervalSetEntire().
a default implementation of expression curvature check that always gives a correct result Definition at line 1391 of file expr.c. References SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
curvature for EXPR_VAR Definition at line 1424 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, and SCIP_OKAY.
interval evaluation for EXPR_CONST Definition at line 1446 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSet().
curvature for EXPR_CONST Definition at line 1457 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, and SCIP_OKAY.
interval evaluation for EXPR_PARAM Definition at line 1480 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSet().
curvature for EXPR_PARAM Definition at line 1492 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, and SCIP_OKAY.
interval evaluation for EXPR_PLUS Definition at line 1515 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalAdd().
curvature for EXPR_PLUS Definition at line 1527 of file expr.c. References NULL, SCIP_OKAY, and SCIPexprcurvAdd().
interval evaluation for EXPR_MINUS Definition at line 1551 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSub().
curvature for EXPR_MINUS Definition at line 1563 of file expr.c. References NULL, SCIP_OKAY, SCIPexprcurvAdd(), and SCIPexprcurvNegate().
interval evaluation for EXPR_MUL Definition at line 1587 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalMul().
curvature for EXPR_MUL Definition at line 1599 of file expr.c. References NULL, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, and SCIPexprcurvMultiply().
interval evaluation for EXPR_DIV Definition at line 1642 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalDiv().
curvature for EXPR_DIV Definition at line 1654 of file expr.c. References NULL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, and SCIPexprcurvMultiply().
interval evaluation for EXPR_SQUARE Definition at line 1716 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSquare().
curvature for EXPR_SQUARE Definition at line 1728 of file expr.c. References NULL, SCIP_OKAY, and SCIPexprcurvPower().
interval evaluation for EXPR_SQRT Definition at line 1753 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSquareRoot().
curvature for EXPR_SQRT Definition at line 1765 of file expr.c. References NULL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_REALPOWER Definition at line 1796 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalPowerScalar().
curvature for EXPR_REALPOWER Definition at line 1808 of file expr.c. References NULL, SCIP_OKAY, and SCIPexprcurvPower().
interval evaluation for EXPR_SIGNPOWER Definition at line 1893 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSignPowerScalar().
curvature for EXPR_SIGNPOWER Definition at line 1905 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIPexprcurvNegate(), SCIPexprcurvPower(), and SCIPintervalSetBounds().
interval evaluation for EXPR_EXP Definition at line 1960 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalExp().
curvature for EXPR_EXP Definition at line 1972 of file expr.c. References NULL, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_LOG Definition at line 2002 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalLog().
curvature for EXPR_LOG Definition at line 2014 of file expr.c. References NULL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_SIN Definition at line 2044 of file expr.c. References NULL, SCIP_OKAY, SCIPerrorMessage, and SCIPintervalSetBounds().
interval evaluation for EXPR_COS Definition at line 2073 of file expr.c. References NULL, SCIP_OKAY, SCIPerrorMessage, and SCIPintervalSetBounds().
interval evaluation for EXPR_MIN Definition at line 2157 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalMin().
curvature for EXPR_MIN Definition at line 2169 of file expr.c. References NULL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_MAX Definition at line 2200 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalMax().
curvature for EXPR_MAX Definition at line 2212 of file expr.c. References NULL, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_ABS Definition at line 2242 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalAbs().
curvature for EXPR_ABS Definition at line 2254 of file expr.c. References NULL, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, and SCIPexprcurvMultiply().
interval evaluation for EXPR_SIGN Definition at line 2291 of file expr.c. References NULL, SCIP_OKAY, and SCIPintervalSign().
curvature for EXPR_SIGN Definition at line 2303 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, and SCIP_OKAY.
interval evaluation for EXPR_SUM Definition at line 2337 of file expr.c. References NULL, SCIP_OKAY, SCIPintervalAdd(), and SCIPintervalSet().
curvature for EXPR_SUM Definition at line 2354 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, and SCIPexprcurvAdd().
interval evaluation for EXPR_PRODUCT Definition at line 2389 of file expr.c. References NULL, SCIP_OKAY, SCIPintervalMul(), and SCIPintervalSet().
curvature for EXPR_PRODUCT Definition at line 2406 of file expr.c. References FALSE, NULL, SCIP_Bool, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPexprcurvMultiply(), and TRUE.
interval evaluation for EXPR_LINEAR Definition at line 2472 of file expr.c. References NULL, SCIP_OKAY, SCIP_Real, SCIPintervalAddScalar(), and SCIPintervalScalprodScalars().
curvature for EXPR_LINEAR Definition at line 2486 of file expr.c. References NULL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIPexprcurvAdd(), and SCIPexprcurvMultiply().
expression data copy for EXPR_LINEAR Definition at line 2507 of file expr.c. References BMSduplicateBlockMemoryArray, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIP_Real.
expression data free for EXPR_LINEAR Definition at line 2525 of file expr.c. References BMSfreeBlockMemoryArray, NULL, and SCIP_Real.
point evaluation for EXPR_QUADRATIC Definition at line 2540 of file expr.c. References SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprData_Quadratic::quadelems, SCIP_OKAY, and SCIP_Real.
interval evaluation for EXPR_QUADRATIC Definition at line 2575 of file expr.c. References SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprData_Quadratic::quadelems, quadraticdataSort(), SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalMulScalar(), SCIPintervalQuad(), SCIPintervalQuadBivar(), and SCIPintervalSet().
curvature for EXPR_QUADRATIC Definition at line 2702 of file expr.c. References SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprData_Quadratic::quadelems, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPexprcurvAdd(), SCIPexprcurvMultiply(), and SCIPexprcurvPower().
expression data copy for EXPR_QUADRATIC Definition at line 2770 of file expr.c. References SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprData_Quadratic::quadelems, quadraticdataCreate(), SCIP_CALL, and SCIP_OKAY.
expression data free for EXPR_QUADRATIC Definition at line 2788 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Quadratic::nquadelems, NULL, and SCIP_ExprData_Quadratic::quadelems.
point evaluation for EXPR_POLYNOMIAL Definition at line 2814 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, SCIP_ExprData_Monomial::exponents, log(), SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, pow(), SCIP_OKAY, SCIP_Real, and sqrt().
interval evaluation for EXPR_POLYNOMIAL Definition at line 2907 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_OKAY, SCIP_Real, SCIPintervalAdd(), SCIPintervalDiv(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPintervalMul(), SCIPintervalPowerScalar(), SCIPintervalSet(), SCIPintervalSetEmpty(), SCIPintervalSquare(), and SCIPintervalSquareRoot().
curvature for EXPR_POLYNOMIAL Definition at line 3001 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIPexprcurvAdd(), SCIPexprcurvMonomial(), and SCIPexprcurvMultiply().
expression data free for EXPR_POLYNOMIAL Definition at line 3055 of file expr.c. References NULL, and polynomialdataFree().
gives the name of an operand as string
Definition at line 3129 of file expr.c. References SCIP_EXPR_LAST. Referenced by exprgraphNodeUpdateBounds(), exprgraphPrintNodeExpression(), printExpr(), printRowNl(), reformulate(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprgraphReleaseNode(), SCIPexprgraphUpdateNodeBoundsCurvature(), and SCIPwritePip().
gives the number of children of a simple operand
Definition at line 3139 of file expr.c. References SCIP_EXPR_LAST.
creates an expression Note, that the expression is allocated but for the children only the pointer is copied.
Definition at line 3157 of file expr.c. References BMSallocBlockMemory, SCIP_Expr::data, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreatePolynomial(), and SCIPexprCreateQuadratic().
tries to convert a given (operator,operatordata) pair into a polynomial operator with corresponding data does not do this for constants if conversion is not possible or operator is already polynomial, *op and *data are left untouched
Definition at line 3186 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, EPSISINT, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, monomialdataEnsureFactorsSize(), SCIP_ExprData_Polynomial::monomialssize, SCIP_ExprData_Quadratic::nquadelems, NULL, polynomialdataAddMonomials(), polynomialdataCreate(), polynomialdataEnsureMonomialsSize(), SCIP_ExprData_Quadratic::quadelems, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, 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_VARIDX, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprAddMonomialFactors(), SCIPexprCreateMonomial(), SCIPexprFreeMonomial(), and TRUE. Referenced by exprgraphNodeSimplify(), and exprsimplifyConvertToPolynomials().
converts polynomial expression back into simpler expression, if possible
Definition at line 3626 of file expr.c. References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSclearMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, EPSISINT, EPSROUND, SCIP_ExprData_Monomial::exponents, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, MAX, MIN, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, polynomialdataFree(), polynomialdataMergeMonomials(), SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, SCIP_EXPR_DEGREEINFINITY, SCIP_EXPR_DIV, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIP_ExprData_Quadratic::sorted, and TRUE. Referenced by exprsimplifyUnconvertPolynomials(), and SCIPexprgraphSimplify().
adds copies of expressions to the array of children of a sum, product, linear, quadratic, or polynomial expression for a sum or product expression, this corresponds to add additional summands and factors, resp. for a linear expression, this corresponds to add each expression with coefficient 1.0 for a quadratic or polynomial expression, only the children array may be enlarged, the expression itself remains the same
Definition at line 4005 of file expr.c. References BMSclearMemoryArray, BMSreallocBlockMemoryArray, SCIP_Expr::children, SCIP_Expr::data, FALSE, SCIP_ExprData_Quadratic::lincoefs, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_LINEAR, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_SUM, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprAreEqual(), SCIPexprCopyDeep(), and TRUE. Referenced by exprsimplifyFlattenPolynomials().
converts expressions into polynomials, where possible and obvious
Definition at line 4125 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, exprConvertToPolynomial(), SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, and SCIP_OKAY. Referenced by SCIPexprSimplify().
removes duplicate children in a polynomial expression leaves NULL's in children array
Definition at line 4147 of file expr.c. References BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_Expr::children, SCIP_Expr::data, FALSE, SCIP_Expr::nchildren, NULL, polynomialdataApplyChildmap(), SCIP_ALLOC, SCIP_Bool, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, SCIPexprAreEqual(), SCIPexprFreeDeep(), SCIPexprGetOperator(), and TRUE. Referenced by exprsimplifyFlattenPolynomials().
eliminates NULL's in children array and shrinks it to actual size
Definition at line 4201 of file expr.c. References BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, polynomialdataApplyChildmap(), SCIP_ALLOC, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, and SCIPexprGetOperator(). Referenced by exprsimplifyFlattenPolynomials(), and exprsimplifySeparateLinearFromPolynomial().
checks which children are still in use and frees those which are not
Definition at line 4267 of file expr.c. References BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_Expr::children, SCIP_Expr::data, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIPexprFreeDeep(), and TRUE. Referenced by exprsimplifyFlattenPolynomials().
flattens polynomials in polynomials, check for constants in non-polynomials expressions exprsimplifyConvertToPolynomials should have been called before to eliminate simple polynomial operands
Definition at line 4317 of file expr.c. References BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSreallocBlockMemoryArray, calcGrowSize(), SCIP_ExprData_Monomial::childidxs, SCIP_Expr::children, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, SCIP_Expr::data, EPSISINT, SCIP_ExprData_Monomial::exponents, exprsimplifyAddChildren(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), exprsimplifyRemovePolynomialUnusedChildren(), FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_Expr::op, polynomialdataCreate(), polynomialdataExpandMonomialFactor(), polynomialdataFree(), pow(), SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, 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_VARIDX, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPdebugPrintf, SCIPerrorMessage, SCIPexprEval(), SCIPexprFindMonomialFactor(), SCIPexprFreeDeep(), SCIPexprGetNChildren(), SCIPexprGetNMonomials(), SCIPexprGetOperator(), SCIPexprGetOpReal(), SCIPexprMergeMonomials(), SCIPexprPrint(), SCIPmessagePrintWarning(), SCIP_ExprData_Polynomial::sorted, SCIP_ExprData_Monomial::sorted, and TRUE. Referenced by SCIPexprSimplify().
separates linear monomials from an expression, if it is a polynomial expression separates only those linear terms which variable is not used otherwise in the expression
Definition at line 4644 of file expr.c. References BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_Expr::children, SCIP_ExprData_Monomial::coef, SCIP_Expr::data, SCIP_ExprData_Monomial::exponents, exprsimplifyRemovePolynomialNullChildren(), FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, polynomialdataMergeMonomials(), SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPexprFreeDeep(), SCIPexprGetNChildren(), SCIPexprGetOperator(), SCIPexprGetOpIndex(), and SCIPexprGetVarsUsage(). Referenced by SCIPexprSimplify().
converts polynomial expressions back into simpler expressions, where possible
Definition at line 4745 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, exprUnconvertPolynomial(), SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY. Referenced by SCIPexprSimplify().
parses a variable name from a string and creates corresponding expression creates a new variable index if variable not seen before, updates varnames and vartable structures
Definition at line 4779 of file expr.c. References NULL, SCIP_CALL, SCIP_EXPR_VARIDX, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIP_VARTYPE_BINARY_CHAR, SCIP_VARTYPE_CONTINUOUS_CHAR, SCIP_VARTYPE_IMPLINT_CHAR, SCIP_VARTYPE_INTEGER_CHAR, SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPhashtableInsert(), and SCIPhashtableRetrieve(). Referenced by exprParse().
Definition at line 4874 of file expr.c. References SCIP_OKAY, SCIP_READERROR, and SCIPerrorMessage. Referenced by exprParse().
parses an expression from a string
Definition at line 4908 of file expr.c. References EPSISINT, exprparseFindClosingParenthesis(), exprparseReadVariable(), NULL, SCIP_CALL, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LOG, SCIP_EXPR_MUL, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIN, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_TAN, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPerrorMessage, SCIPexprAdd(), SCIPexprCreate(), SCIPexprGetOperator(), SCIPexprGetOpReal(), SCIPexprMulConstant(), SCIPexprPrint(), SCIPmessagePrintInfo(), and SCIPstrToRealValue(). Referenced by SCIPexprParse().
gives operator of expression
Definition at line 5350 of file expr.c. References NULL, and SCIP_Expr::op. Referenced by eval(), exprIsNonSmooth(), exprParse(), exprsimplifyFlattenPolynomials(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), exprsimplifySeparateLinearFromPolynomial(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), getLinearAndQuadraticCoefs(), initSepaDataCreateVred(), needAlwaysRetape(), printExpr(), printRowNl(), readConstraints(), readExpression(), readObjective(), SCIPexprAdd(), SCIPexprMulConstant(), and SCIPwritePip().
gives number of children of an expression
Definition at line 5360 of file expr.c. References SCIP_Expr::nchildren, and NULL. Referenced by eval(), exprIsNonSmooth(), exprsimplifyFlattenPolynomials(), exprsimplifySeparateLinearFromPolynomial(), getLinearAndQuadraticCoefs(), needAlwaysRetape(), printExpr(), printRowNl(), readObjective(), SCIPexprAdd(), SCIPexprMulConstant(), and SCIPwritePip(). gives pointer to array with children of an expression
Definition at line 5370 of file expr.c. References SCIP_Expr::children, and NULL. Referenced by eval(), exprIsNonSmooth(), getLinearAndQuadraticCoefs(), needAlwaysRetape(), printExpr(), printRowNl(), readObjective(), SCIPexprAdd(), and SCIPwritePip().
gives index belonging to a SCIP_EXPR_VARIDX or SCIP_EXPR_PARAM operand
Definition at line 5380 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, SCIP_EXPR_PARAM, and SCIP_EXPR_VARIDX. Referenced by eval(), exprsimplifySeparateLinearFromPolynomial(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), and readObjective(). gives real belonging to a SCIP_EXPR_CONST operand
Definition at line 5391 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_CONST. Referenced by eval(), exprParse(), exprsimplifyFlattenPolynomials(), printExpr(), printRowNl(), readExpression(), SCIPexprAdd(), and SCIPexprMulConstant().
gives void* belonging to a complex operand
Definition at line 5402 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_SUM. gives exponent belonging to a SCIP_EXPR_REALPOWER expression
Definition at line 5413 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_REALPOWER. Referenced by eval(), printExpr(), printRowNl(), and SCIPwritePip().
gives exponent belonging to a SCIP_EXPR_INTPOWER expression
Definition at line 5424 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_INTPOWER. Referenced by eval(), printExpr(), printRowNl(), and SCIPwritePip(). gives exponent belonging to a SCIP_EXPR_SIGNPOWER expression
Definition at line 5435 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_SIGNPOWER. Referenced by printExpr(). gives linear coefficients belonging to a SCIP_EXPR_LINEAR expression
Definition at line 5446 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by eval(), printExpr(), printRowNl(), and SCIPexprAdd(). gives constant belonging to a SCIP_EXPR_LINEAR expression
Definition at line 5459 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by eval(), printExpr(), printRowNl(), and SCIPexprAdd().
gives quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 5472 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_QUADRATIC. Referenced by eval(), printExpr(), and printRowNl(). gives constant belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 5484 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_QUADRATIC. Referenced by eval(), printExpr(), and printRowNl(). gives linear coefficients belonging to a SCIP_EXPR_QUADRATIC expression can be NULL if all coefficients are 0.0
Definition at line 5497 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_QUADRATIC. Referenced by eval(), printExpr(), and printRowNl().
gives number of quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 5509 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_QUADRATIC. Referenced by eval(), printExpr(), and printRowNl().
gives the monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 5521 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_POLYNOMIAL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), and SCIPwritePip().
gives the number of monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 5533 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_POLYNOMIAL. Referenced by eval(), exprsimplifyFlattenPolynomials(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readConstraints(), readObjective(), and SCIPwritePip(). gives the constant belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 5545 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_POLYNOMIAL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), and readObjective().
gets coefficient of a monomial
Definition at line 5557 of file expr.c. References SCIP_ExprData_Monomial::coef, and NULL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets number of factors of a monomial
Definition at line 5567 of file expr.c. References SCIP_ExprData_Monomial::nfactors, and NULL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), and SCIPwritePip().
gets indices of children corresponding to factors of a monomial
Definition at line 5577 of file expr.c. References SCIP_ExprData_Monomial::childidxs, and NULL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), and reformulate().
gets exponents in factors of a monomial
Definition at line 5587 of file expr.c. References SCIP_ExprData_Monomial::exponents, and NULL. Referenced by eval(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), and SCIPwritePip().
creates a simple expression
Definition at line 5599 of file expr.c. References BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, SCIP_Expr::data, exprCreate(), NULL, SCIP_ALLOC, SCIP_CALL, 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_VARIDX, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, and SCIPerrorMessage. Referenced by createConsFromQuadTerm(), createExprtreeFromMonomial(), createNlRow(), exprgraphNodeCreateExpr(), exprParse(), exprparseReadVariable(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initSepaData(), initSepaDataCreateVred(), readExpression(), readNonlinearExprs(), readPolynomial(), removeFixedVariables(), SCIPexprAdd(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), SCIPexprMulConstant(), SCIPexprtreeAddExpr(), SCIPexprtreeRemoveFixedVars(), and SCIPwritePip().
copies an expression including its children
Definition at line 5765 of file expr.c. References BMSallocBlockMemoryArray, BMSduplicateBlockMemory, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPexprCopyDeep(). Referenced by exprsimplifyAddChildren(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initSepaData(), initSepaDataCreateVred(), SCIPexprCopyDeep(), SCIPexprintCompile(), SCIPexprSubstituteVars(), SCIPexprtreeAddExpr(), SCIPexprtreeCopy(), and SCIPexprtreeSubstituteVars().
frees an expression including its children
Definition at line 5807 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, NULL, and SCIPexprFreeDeep(). Referenced by exprsimplifyFlattenPolynomials(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialUnusedChildren(), exprsimplifySeparateLinearFromPolynomial(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initSepaData(), initSepaDataCreateVred(), readExpression(), removeFixedVariables(), SCIPexprAdd(), SCIPexprFreeDeep(), SCIPexprintCompile(), SCIPexprintFreeData(), SCIPexprMulConstant(), SCIPexprSubstituteVars(), SCIPexprtreeFree(), SCIPexprtreeRemoveFixedVars(), and SCIPexprtreeSubstituteVars().
frees an expression but not its children
Definition at line 5845 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, and NULL. Referenced by SCIPexprAdd().
creates an expression from the addition of two given expression, with coefficients, and a constant the given expressions may be modified or freed, otherwise it will be used a child expression favors creation and maintaining of SCIP_EXPR_LINEAR over SCIP_EXPR_PLUS or SCIP_EXPR_SUM
Definition at line 5870 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_OKAY, SCIP_Real, SCIPexprAddToLinear(), SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprFreeDeep(), SCIPexprFreeShallow(), SCIPexprGetChildren(), SCIPexprGetLinearCoefs(), SCIPexprGetLinearConstant(), SCIPexprGetNChildren(), SCIPexprGetOperator(), and SCIPexprGetOpReal(). Referenced by exprParse(), and readExpression().
creates an expression from the multiplication of an expression with a constant the given expressions may be modified or freed, otherwise it will be used a child expression favors creation and maintaining SCIP_EXPR_LINEAR over SCIP_EXPR_PLUS or SCIP_EXPR_SUM
Definition at line 6028 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_Expr::data, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, NULL, SCIP_ExprData_Quadratic::quadelems, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_QUADRATIC, SCIP_OKAY, SCIP_Real, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprFreeDeep(), SCIPexprGetNChildren(), SCIPexprGetOperator(), and SCIPexprGetOpReal(). Referenced by exprParse(), and readExpression().
creates a SCIP_EXPR_LINEAR expression that is (affine) linear in its children: constant + sum_i coef_i child_i
Definition at line 6126 of file expr.c. References BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, exprCreate(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_LINEAR, SCIP_OKAY, and SCIP_Real. Referenced by createNlRow(), exprgraphNodeCreateExpr(), exprparseReadVariable(), initSepaData(), initSepaDataCreateVred(), readExpression(), removeFixedVariables(), SCIPexprAdd(), SCIPexprgraphGetSeparableTrees(), SCIPexprMulConstant(), and SCIPexprtreeRemoveFixedVars().
adds new terms to a linear expression
Definition at line 6163 of file expr.c. References BMScopyMemoryArray, BMSreallocBlockMemoryArray, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_EXPR_LINEAR, SCIP_OKAY, and SCIP_Real. Referenced by SCIPexprAdd().
creates a SCIP_EXPR_QUADRATIC expression: constant + sum_i coef_i child_i + sum_i coef_i child1_i child2_i
Definition at line 6208 of file expr.c. References BMSduplicateBlockMemoryArray, exprCreate(), NULL, quadraticdataCreate(), SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_QUADRATIC, and SCIP_OKAY. Referenced by createConsFromQuadTerm(), exprgraphNodeCreateExpr(), readExpression(), readNonlinearExprs(), and SCIPexprgraphGetSeparableTrees().
ensures that quadratic elements of a quadratic expression are sorted
Definition at line 6244 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, quadraticdataSort(), and SCIP_EXPR_QUADRATIC. Referenced by eval(), and SCIPexprAreEqual().
creates a SCIP_EXPR_POLYNOMIAL expression from an array of monomials: constant + sum_i monomial_i
Definition at line 6256 of file expr.c. References BMSduplicateBlockMemoryArray, exprCreate(), NULL, polynomialdataCreate(), SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY. Referenced by createExprtreeFromMonomial(), createNlRow(), exprgraphNodeCreateExpr(), readPolynomial(), SCIPexprgraphGetSeparableTrees(), and SCIPexprgraphGetSumTrees().
adds an array of monomials to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 6291 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataAddMonomials(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY. changes the constant in a SCIP_EXPR_POLYNOMIAL expression
Definition at line 6313 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_POLYNOMIAL.
multiplies each summand of a polynomial by a given constant
Definition at line 6326 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataMultiplyByConstant(), and SCIP_EXPR_POLYNOMIAL.
multiplies each summand of a polynomial by a given monomial
Definition at line 6340 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataMultiplyByMonomial(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY.
multiplies this polynomial by a polynomial factor needs to be different from expr children of factor need to be children of expr already, w.r.t. an optional mapping of child indices
Definition at line 6361 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, polynomialdataMultiplyByPolynomial(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, and SCIPexprAreEqual().
takes a power of the polynomial exponent need to be an integer polynomial need to be a monomial, if exponent is negative
Definition at line 6406 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataPower(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY.
merges monomials in a polynomial expression that differ only in coefficient into a single monomial eliminates monomials with coefficient between -eps and eps
Definition at line 6425 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataMergeMonomials(), and SCIP_EXPR_POLYNOMIAL. Referenced by exprsimplifyFlattenPolynomials().
checks if two monomials are equal
Definition at line 6440 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, EPSEQ, SCIP_ExprData_Monomial::exponents, FALSE, SCIP_ExprData_Monomial::nfactors, NULL, SCIPexprSortMonomialFactors(), and TRUE. Referenced by exprgraphFindParentByOperator(), and SCIPexprAreEqual().
changes coefficient of monomial
Definition at line 6471 of file expr.c. References SCIP_ExprData_Monomial::coef, and NULL. Referenced by polynomialdataMultiplyByConstant(), and polynomialdataMultiplyByPolynomial().
adds factors to a monomial
Definition at line 6482 of file expr.c. References BMScopyMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::exponents, monomialdataEnsureFactorsSize(), SCIP_ExprData_Monomial::nfactors, NULL, SCIP_CALL, SCIP_OKAY, and SCIP_ExprData_Monomial::sorted. Referenced by exprConvertToPolynomial(), polynomialdataExpandMonomialFactor(), and SCIPexprMultiplyMonomialByMonomial().
multiplies a monomial with a monomial
Definition at line 6511 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, SCIP_CALL, SCIP_OKAY, and SCIPexprAddMonomialFactors(). Referenced by polynomialdataMultiplyByMonomial(), and polynomialdataMultiplyByPolynomial().
replaces the monomial by a power of the monomial allows only integers as exponent
Definition at line 6545 of file expr.c. References SCIP_ExprData_Monomial::coef, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, pow(), and SCIP_Real. Referenced by polynomialdataPower().
merges factors that correspond to the same child by adding exponents eliminates factors with exponent between -eps and eps
Definition at line 6574 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::coef, EPSEQ, EPSISINT, EPSROUND, EPSZ, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, and SCIPexprSortMonomialFactors(). Referenced by polynomialdataMergeMonomials().
ensures that monomials of a polynomial are sorted
Definition at line 6641 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataSortMonomials(), and SCIP_EXPR_POLYNOMIAL. Referenced by SCIPexprAreEqual().
creates a monomial
Definition at line 6653 of file expr.c. References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by createExprtreeFromMonomial(), createNlRow(), exprConvertToPolynomial(), polynomialdataAddMonomials(), polynomialdataCopy(), polynomialdataCreate(), polynomialdataMultiplyByMonomial(), polynomialdataMultiplyByPolynomial(), readPolynomial(), reformulate(), SCIPexprgraphGetSeparableTrees(), and SCIPexprgraphGetSumTrees().
frees a monomial
Definition at line 6710 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, and NULL. Referenced by exprConvertToPolynomial(), polynomialdataExpandMonomialFactor(), polynomialdataFree(), polynomialdataMergeMonomials(), polynomialdataMultiplyByConstant(), and polynomialdataPower().
ensures that factors in a monomial are sorted
Definition at line 6734 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, SCIPsortIntReal(), SCIP_ExprData_Monomial::sorted, and TRUE. Referenced by SCIP_DECL_SORTPTRCOMP(), SCIPexprAreMonomialsEqual(), SCIPexprFindMonomialFactor(), and SCIPexprMergeMonomialFactors().
finds a factor corresponding to a given child index in a monomial note that if the factors have not been merged, the position of some factor corresponding to a given child is given returns TRUE if a factor is found, FALSE if not
Definition at line 6753 of file expr.c. References SCIP_ExprData_Monomial::childidxs, FALSE, SCIP_ExprData_Monomial::nfactors, NULL, SCIPexprSortMonomialFactors(), and SCIPsortedvecFindInt(). Referenced by exprgraphNodeSimplify(), and exprsimplifyFlattenPolynomials(). indicates whether the expression contains a SCIP_EXPR_PARAM
Definition at line 6770 of file expr.c. References SCIP_Expr::children, FALSE, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_PARAM, SCIPexprHasParam(), and TRUE. Referenced by SCIPexprHasParam(), and SCIPexprtreeHasParam().
gets maximal degree of expression, or SCIP_EXPR_DEGREEINFINITY if not a polynomial
Definition at line 6789 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_Expr::children, SCIP_Expr::data, SCIP_ExprData_Monomial::exponents, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, MAX, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_Expr::op, SCIP_ExprData_Quadratic::quadelems, quadraticdataSort(), SCIP_CALL, SCIP_ERROR, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DEGREEINFINITY, 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_VARIDX, SCIP_OKAY, SCIPerrorMessage, and SCIPexprGetMaxDegree(). Referenced by SCIPexprGetMaxDegree(), and SCIPexprtreeGetMaxDegree().
counts usage of variables in expression
Definition at line 7114 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_VARIDX, and SCIPexprGetVarsUsage(). Referenced by exprsimplifySeparateLinearFromPolynomial(), SCIPexprGetVarsUsage(), and SCIPexprtreeGetVarsUsage(). compares whether two expressions are the same inconclusive, i.e., may give FALSE even if expressions are equivalent (x*y != y*x)
Definition at line 7136 of file expr.c. References SCIP_Expr::children, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_Expr::data, EPSEQ, EPSZ, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_Expr::op, SCIP_ExprData_Quadratic::quadelems, 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_VARIDX, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIPexprAreEqual(), SCIPexprAreMonomialsEqual(), SCIPexprSortMonomials(), SCIPexprSortQuadElems(), and TRUE. Referenced by exprsimplifyAddChildren(), exprsimplifyRemoveDuplicatePolynomialChildren(), SCIPexprAreEqual(), and SCIPexprMultiplyPolynomialByPolynomial().
aims at simplifying an expression and splitting of a linear expression if linear variables are split off, expression interpreter data, if stored in the tree, is freed
Definition at line 7339 of file expr.c. References exprsimplifyConvertToPolynomials(), exprsimplifyFlattenPolynomials(), exprsimplifySeparateLinearFromPolynomial(), exprsimplifyUnconvertPolynomials(), NULL, SCIP_CALL, SCIP_OKAY, SCIPdebug, SCIPdebugMessage, SCIPdebugPrintf, and SCIPexprPrint(). Referenced by SCIPexprtreeSimplify().
evaluates an expression w.r.t. a point
Definition at line 7391 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_CALL, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, SCIP_Real, and SCIPexprEval(). Referenced by exprsimplifyFlattenPolynomials(), SCIPexprEval(), and SCIPexprtreeEval().
evaluates an expression w.r.t. an interval
Definition at line 7432 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_CALL, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, and SCIPexprEvalInt(). Referenced by SCIPexprEvalInt(), and SCIPexprtreeEvalInt().
tries to determine the curvature type of an expression w.r.t. given variable domains
Definition at line 7474 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_ALLOC, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, and SCIPexprCheckCurvature(). Referenced by SCIPexprCheckCurvature(), and SCIPexprtreeCheckCurvature().
substitutes variables (SCIP_EXPR_VARIDX) by expressions Note that only the children of the given expr are checked! A variable with index i is replaced by a copy of substexprs[i], if that latter is not NULL if substexprs[i] == NULL, then the variable expression i is not touched
Definition at line 7536 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPexprCopyDeep(), SCIPexprFreeDeep(), and SCIPexprSubstituteVars(). Referenced by generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initSepaDataCreateVred(), SCIPexprSubstituteVars(), and SCIPexprtreeSubstituteVars().
updates variable indices in expression tree
Definition at line 7574 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_VARIDX, and SCIPexprReindexVars(). Referenced by initSepaData(), removeFixedVariables(), SCIPexprReindexVars(), and SCIPexprtreeRemoveFixedVars().
updates parameter indices in expression tree
Definition at line 7595 of file expr.c. References SCIP_Expr::children, SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_PARAM, and SCIPexprReindexParams(). Referenced by SCIPexprReindexParams().
prints an expression
Definition at line 7616 of file expr.c. References SCIP_ExprData_Monomial::childidxs, SCIP_Expr::children, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_Expr::data, SCIP_ExprData_Monomial::exponents, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_Expr::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_Expr::op, SCIP_ExprData_Quadratic::quadelems, 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_VARIDX, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIPexprPrint(), and SCIPmessageFPrintInfo(). Referenced by exprParse(), exprsimplifyFlattenPolynomials(), SCIPexprPrint(), SCIPexprSimplify(), and SCIPexprtreePrint().
parses an expression from a string
Definition at line 7897 of file expr.c. References exprParse(), NULL, SCIP_CALL, SCIP_OKAY, SCIPhashtableCreate(), and SCIPhashtableFree(). Referenced by SCIP_DECL_CONSPARSE().
returns root expression of an expression tree
Definition at line 7958 of file expr.c. References NULL, and SCIP_ExprTree::root. Referenced by generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), getLinearAndQuadraticCoefs(), initSepaData(), initSepaDataCreateVred(), printNonlinearRow(), printRowNl(), readConstraints(), readObjective(), removeFixedVariables(), SCIPexprintCompile(), SCIPexprintEval(), SCIPexprintEvalInt(), SCIPnlpiOraclePrintProblemGams(), and SCIPwritePip().
returns number of variables in expression tree
Definition at line 7968 of file expr.c. References NULL, and SCIP_ExprTree::nvars. Referenced by addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), addIntervalGradientEstimator(), addLinearization(), checkCurvature(), computeViolation(), consdataAddExprtrees(), createConstraint(), evalFunctionGradient(), evalFunctionValue(), freeConstraint(), generateCut(), getGradientMaxElement(), getLinearAndQuadraticCoefs(), hessLagAddExprtree(), hessLagSparsitySetNzFlagForExprtree(), nlpAddNlRows(), nlpSetupNlpiIndices(), nlrowCalcActivityBounds(), nlrowExprtreeChanged(), nlrowRemoveFixedExprtreeVars(), printFunction(), printRowNl(), processNlRow(), readObjective(), registerBranchingVariables(), registerLargeLPValueVariableForBranching(), removeFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSINITLP(), SCIP_DECL_HEUREXEC(), SCIPcreateConsBivariate(), SCIPevalExprtreeGlobalBounds(), SCIPevalExprtreeLocalBounds(), SCIPevalExprtreeSol(), SCIPexprintCompile(), SCIPexprintEval(), SCIPexprintEvalInt(), SCIPexprintGrad(), SCIPexprintGradInt(), SCIPexprintHessianDense(), SCIPexprintHessianSparsityDense(), SCIPexprtreeSimplify(), SCIPgetExprtreeTransformedVars(), SCIPnlpGetVarsNonlinearity(), SCIPnlpHasContinuousNonlinearity(), SCIPnlpiOracleChgExprtree(), SCIPnlpiOracleDelVarSet(), SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleGetJacobianSparsity(), SCIPnlrowGetSolActivity(), SCIPnlrowRecalcNLPActivity(), SCIPnlrowRecalcPseudoActivity(), SCIPwritePip(), solveDerivativeEquation(), and updateVariableDegreesCons().
returns number of parameters in expression tree
Definition at line 7978 of file expr.c. References SCIP_ExprTree::nparams, and NULL. Referenced by nlrowExprtreeParamChanged(), nlrowRemoveFixedExprtreeVars(), SCIPnlpiOracleChgExprParam(), and SCIPnlrowChgExprtreeParams().
returns values of parameters or NULL if none
Definition at line 7988 of file expr.c. References NULL, and SCIP_ExprTree::params. Referenced by nlrowExprtreeParamChanged(), SCIPexprintEval(), and SCIPexprintEvalInt().
sets value of a single parameter in expression tree
Definition at line 7998 of file expr.c. References NULL, and SCIP_ExprTree::params. Referenced by generateConvexConcaveUnderestimator(), SCIPnlpiOracleChgExprParam(), and SCIPnlrowChgExprtreeParam().
gets data of expression tree interpreter, or NULL if not set
Definition at line 8013 of file expr.c. References SCIP_ExprTree::interpreterdata, and NULL. Referenced by addIntervalGradientEstimator(), addLinearization(), computeViolation(), generateLinearizationCut(), getGradientMaxElement(), initSepaData(), SCIP_DECL_CONSINITLP(), SCIPexprintCompile(), SCIPexprintEval(), SCIPexprintEvalInt(), SCIPexprintGrad(), SCIPexprintGradInt(), SCIPexprintHessianDense(), SCIPexprintHessianSparsityDense(), SCIPexprintNewParametrization(), and solveDerivativeEquation().
sets data of expression tree interpreter
Definition at line 8023 of file expr.c. References SCIP_ExprTree::interpreterdata, and NULL. Referenced by SCIPexprintCompile().
frees data of expression tree interpreter, if any
Definition at line 8036 of file expr.c. References SCIP_ExprTree::interpreterdata, NULL, SCIP_CALL, SCIP_OKAY, and SCIPexprintFreeData(). Referenced by SCIPexprtreeAddExpr(), SCIPexprtreeFree(), SCIPexprtreeSimplify(), and SCIPexprtreeSubstituteVars().
indicates whether there are parameterized constants (SCIP_EXPR_PARAM) in expression tree
Definition at line 8050 of file expr.c. References NULL, SCIP_ExprTree::root, and SCIPexprHasParam().
Gives maximal degree of expression in expression tree. If constant expression, gives 0, if linear expression, gives 1, if polynomial expression, gives its maximal degree, otherwise (nonpolynomial nonconstant expressions) gives at least SCIP_EXPR_DEGREEINFINITY.
Definition at line 8065 of file expr.c. References NULL, SCIP_ExprTree::root, SCIP_CALL, SCIP_OKAY, and SCIPexprGetMaxDegree(). Referenced by SCIPwriteGms().
evaluates an expression tree w.r.t. a point
Definition at line 8078 of file expr.c. References NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::params, SCIP_ExprTree::root, SCIP_CALL, SCIP_OKAY, and SCIPexprEval(). Referenced by addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), generateConvexConcaveUnderestimator(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), nlrowRemoveFixedExprtreeVars(), SCIPevalExprtreeSol(), SCIPexprtreeSimplify(), SCIPnlrowGetSolActivity(), SCIPnlrowRecalcNLPActivity(), and SCIPnlrowRecalcPseudoActivity().
evaluates an expression tree w.r.t. an interval
Definition at line 8094 of file expr.c. References NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::params, SCIP_ExprTree::root, SCIP_CALL, SCIP_OKAY, and SCIPexprEvalInt(). Referenced by nlrowCalcActivityBounds(), SCIPevalExprtreeGlobalBounds(), and SCIPevalExprtreeLocalBounds().
prints an expression tree
Definition at line 8111 of file expr.c. References NULL, SCIP_ExprTree::params, SCIP_ExprTree::root, and SCIPexprPrint(). Referenced by generateConvexConcaveUnderestimator(), printFunction(), and SCIPexprtreePrintWithNames().
creates an expression tree
Definition at line 8126 of file expr.c. References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSduplicateBlockMemoryArray, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by createConsFromQuadTerm(), createExprtreeFromMonomial(), createNlRow(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initSepaData(), initSepaDataCreateVred(), readNonlinearExprs(), readPolynomial(), SCIP_DECL_CONSPARSE(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), SCIPexprgraphGetTree(), and SCIPwritePip().
copies an expression tree
Definition at line 8167 of file expr.c. References BMSduplicateBlockMemory, BMSduplicateBlockMemoryArray, SCIP_ExprTree::nparams, NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::params, SCIP_ExprTree::root, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPexprCopyDeep(), and SCIP_ExprTree::vars. Referenced by consdataAddExprtrees(), createConstraint(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), initSepaData(), removeFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSTRANS(), SCIPcreateConsBivariate(), SCIPnlpiOracleChgExprtree(), SCIPnlrowChgExprtree(), and SCIPnlrowCreate().
frees an expression tree
Definition at line 8207 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprFreeDeep(), and SCIPexprtreeFreeInterpreterData(). Referenced by consdataFree(), consdataSetExprtrees(), createConsFromMonomial(), createConsFromQuadTerm(), createNlRow(), freeConstraint(), freeSepaData(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), nlrowRemoveFixedExprtreeVars(), readConstraints(), readNonlinearExprs(), readObjective(), removeFixedVariables(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRINT(), SCIPnlpiOracleChgExprtree(), SCIPnlpiOracleDelVarSet(), SCIPnlrowChgExprtree(), SCIPnlrowFree(), SCIPwriteGms(), and SCIPwritePip().
sets number and values of all parameters in expression tree
Definition at line 8231 of file expr.c. References SCIP_ExprTree::blkmem, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSreallocBlockMemoryArray, SCIP_ExprTree::nparams, NULL, SCIP_ExprTree::params, SCIP_ALLOC, and SCIP_OKAY. Referenced by generateConvexConcaveUnderestimator(), initSepaData(), and SCIPnlrowChgExprtreeParams().
gives the number of usages for each variable in the expression tree
Definition at line 8262 of file expr.c. References BMSclearMemoryArray, NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::root, and SCIPexprGetVarsUsage().
aims at simplifying an expression and splitting of a linear expression if linear variables are split off, expression interpreter data, if stored in the tree, is freed
Definition at line 8280 of file expr.c. References SCIP_ExprTree::blkmem, BMSallocMemoryArray, BMSfreeMemoryArray, EPSZ, NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::root, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprSimplify(), SCIPexprtreeEval(), SCIPexprtreeFreeInterpreterData(), SCIPexprtreeGetNVars(), SCIPgetRandomReal(), and SCIPrelDiff().
adds an expression to the root expression of the tree the root is replaced with an SCIP_EXPR_PLUS expression which has the previous root and the given expression (or a copy of it) as children
Definition at line 8330 of file expr.c. References SCIP_ExprTree::blkmem, NULL, SCIP_ExprTree::root, SCIP_CALL, SCIP_EXPR_PLUS, SCIP_OKAY, SCIPexprCopyDeep(), SCIPexprCreate(), and SCIPexprtreeFreeInterpreterData(). Referenced by SCIPexprgraphGetSumTrees().
tries to determine the curvature type of an expression tree w.r.t. given variable domains
Definition at line 8353 of file expr.c. References NULL, SCIP_ExprTree::params, SCIP_ExprTree::root, SCIP_CALL, SCIP_OKAY, and SCIPexprCheckCurvature(). Referenced by checkCurvature().
substitutes variables (SCIP_EXPR_VARIDX) in an expression tree by expressions A variable with index i is replaced by a copy of substexprs[i], if that latter is not NULL if substexprs[i] == NULL, then the variable expression i is not touched
Definition at line 8378 of file expr.c. References SCIP_ExprTree::blkmem, SCIP_Expr::data, NULL, SCIP_Expr::op, SCIP_ExprTree::root, SCIP_CALL, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPexprCopyDeep(), SCIPexprFreeDeep(), SCIPexprSubstituteVars(), and SCIPexprtreeFreeInterpreterData(). Referenced by generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), initSepaData(), removeFixedVariables(), and SCIPexprtreeRemoveFixedVars().
quicksort an array of quadratic elements; pivot is the medial element (taken from scip/sorttpl.c)
Definition at line 8431 of file expr.c. References QUADELEMS_ISBETTER, and QUADELEMS_SWAP. Referenced by SCIPquadelemSort().
sorts an array of quadratic elements The elements are sorted such that the first index is increasing and such that among elements with the same first index, the second index is increasing. For elements with same first and second index, the order is not defined.
Definition at line 8540 of file expr.c. References quadelemsQuickSort(). Referenced by createConstraint(), exprgraphFindParentByOperator(), nlrowSortQuadElem(), quadraticdataSort(), SCIPnlpiOracleChgQuadCoefs(), and SCIPnlpiOracleDelVarSet().
Finds an index pair in a sorted array of quadratic elements. If (idx1,idx2) is found in quadelems, then returns TRUE and stores position of quadratic element in *pos. If (idx1,idx2) is not found in quadelems, then returns FALSE and stores position where a quadratic element with these indices would be inserted in *pos. Assumes that idx1 <= idx2.
Definition at line 8564 of file expr.c. References FALSE, NULL, and TRUE. Referenced by nlrowSearchQuadElem(), and SCIPnlpiOracleChgQuadCoefs().
Adds quadratic elements with same index and removes elements with coefficient 0.0. Assumes that elements have been sorted before.
Definition at line 8615 of file expr.c. References SCIP_QuadElement::coef, NULL, and QUADELEMS_ISBETTER. Referenced by createConstraint(), and SCIPnlpiOracleChgQuadCoefs().
adds a parent to an expression graph node
Definition at line 8671 of file expr.c. References SCIP_ExprGraphNode::depth, ensureBlockMemoryArraySize, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::parentssize, SCIP_ExprGraphNode::parentssorted, SCIP_ExprGraphNode::pos, and SCIP_OKAY. Referenced by exprgraphNodeAddChildren(), exprgraphNodeReplaceChild(), SCIPexprgraphAddNode(), and SCIPexprgraphReplaceVarByLinearSum().
ensures that array of parents in a node is sorted
Definition at line 8700 of file expr.c. References SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::parentssorted, SCIPsortPtr(), and TRUE. Referenced by exprgraphNodeIsParent(), and exprgraphNodeRemoveParent().
removes a parent from an expression graph node if the node is not used and has no other parents, then it is freed
Definition at line 8725 of file expr.c. References SCIP_ExprGraphNode::depth, exprgraphNodeSortParents(), SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::nuses, SCIP_ExprGraphNode::pos, SCIP_CALL, SCIP_OKAY, SCIPexprgraphCaptureNode(), SCIPexprgraphReleaseNode(), and SCIPsortedvecFindPtr(). Referenced by exprgraphNodeRemovePolynomialDuplicateChildren(), exprgraphNodeReplaceChild(), exprgraphNodeSimplify(), SCIPexprgraphNodeSplitOffLinear(), and SCIPexprgraphReleaseNode().
checks if a node is parent of a node
Definition at line 8776 of file expr.c. References SCIP_ExprGraphNode::depth, exprgraphNodeSortParents(), FALSE, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::parents, and SCIPsortedvecFindPtr(). Referenced by exprgraphFindParentByOperator(), and exprgraphNodeRemovePolynomialDuplicateChildren().
adds expression graph nodes to the array of children of a sum, product, linear, quadratic, or polynomial expression for a sum or product expression, this corresponds to add additional summands and factors, resp. for a linear expression, this corresponds to add each expression with coefficient 1.0 for a quadratic or polynomial expression, only the children array may be enlarged, the expression itself remains the same it is assumed that node and all exprs are in the expression graph already it is assumed that all expressions that are added have lower depth than node
Definition at line 8806 of file expr.c. References BMSclearMemoryArray, BMSreallocBlockMemoryArray, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, exprgraphNodeAddParent(), FALSE, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_LINEAR, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIP_ExprGraphNode::simplified, and TRUE. Referenced by exprgraphNodeSimplify().
replaces a child node by another node assumes that both nodes represent the same expression if this node was the last parent of oldchild and oldchild is not in use, then it is freed newchild must have deeper depth than node
Definition at line 8906 of file expr.c. References SCIP_ExprGraph::blkmem, SCIP_ExprGraphNode::children, exprgraphNodeAddParent(), exprgraphNodeRemoveParent(), FALSE, SCIP_ExprGraphNode::nchildren, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIP_ExprGraphNode::simplified. Referenced by SCIPexprgraphMoveNodeParents(), and SCIPexprgraphSimplify().
comparison of SCIP_EXPRGRAPHNODE's that are of type SCIP_EXPR_CONST a node is larger than another node, if their corresponding constants are related that way Definition at line 8955 of file expr.c. References NULL, and SCIP_EXPR_CONST.
sort array of nodes that holds constants
Definition at line 8974 of file expr.c. References SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssorted, SCIP_ExprGraph::nconsts, NULL, SCIPsortPtr(), and TRUE. Referenced by exprgraphFindConstNodePos(), and SCIPexprgraphFindConstNode().
finds position of expression graph node corresponding to a constant in constnodes array
Definition at line 8990 of file expr.c. References SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, exprgraphSortConstNodes(), FALSE, SCIP_ExprGraph::nconsts, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, and SCIP_EXPR_CONST. Referenced by SCIPexprgraphReleaseNode().
creates an expression graph node
Definition at line 9045 of file expr.c. References BMSallocBlockMemory, BMSclearMemory, NULL, SCIP_ALLOC, SCIP_EXPR_CONST, SCIP_EXPR_PARAM, SCIP_EXPR_VARIDX, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_INVALID, SCIP_OKAY, SCIP_REAL_MAX, SCIPintervalSetEntire(), and TRUE. Referenced by exprgraphAddExpr(), SCIPexprgraphAddConst(), SCIPexprgraphAddExprtreeSum(), SCIPexprgraphAddVars(), SCIPexprgraphCreateNode(), SCIPexprgraphCreateNodeLinear(), SCIPexprgraphCreateNodePolynomial(), SCIPexprgraphCreateNodeQuadratic(), and SCIPexprgraphNodeSplitOffLinear().
prints the expression corresponding to a node (not recursively) < gaussian error function (1 operand) < imaginary part of gaussian error function (1 operand)
Definition at line 9089 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprData_Monomial::exponents, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_Interval::inf, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraphNode::op, SCIP_ExprData_Quadratic::quadelems, 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_VARIDX, SCIP_Real, SCIPexpropGetName(), SCIPmessageFPrintInfo(), and SCIP_Interval::sup. Referenced by exprgraphNodeSimplify(), exprgraphPrintNodeDot(), and SCIPexprgraphPrintNode().
prints a node of an expression graph
Definition at line 9342 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, exprgraphPrintNodeExpression(), FALSE, SCIP_Interval::inf, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_EXPR_LAST, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT, SCIP_Real, SCIPmessageFPrintInfo(), and SCIP_Interval::sup. Referenced by SCIPexprgraphPrintDot().
evaluate node of expression graph w.r.t. values stored in children
Definition at line 9384 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, SCIP_ALLOC, SCIP_CALL, SCIP_EXPRESSION_MAXCHILDEST, SCIP_INVALID, SCIP_OKAY, SCIP_Real, and SCIP_ExprGraphNode::value. Referenced by exprgraphNodeEvalWithChildren(), SCIPexprgraphAddNode(), SCIPexprgraphEval(), and SCIPexprgraphSimplify().
evaluates node including subtree
Definition at line 9428 of file expr.c. References SCIP_ExprGraphNode::children, exprgraphNodeEval(), SCIP_ExprGraphNode::nchildren, NULL, SCIP_CALL, and SCIP_OKAY. Referenced by exprgraphNodeSimplify().
updates bounds of a node if a children has changed its bounds
Definition at line 9449 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, SCIP_Interval::inf, isLbBetter(), isUbBetter(), SCIP_ExprGraphNode::nchildren, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_PARAM, SCIP_EXPR_VARIDX, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, SCIPdebugMessage, SCIPexpropGetName(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), and SCIP_Interval::sup. Referenced by SCIPexprgraphPropagateVarBounds().
propagate bounds of a node into children by reverting the nodes expression
Definition at line 9542 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, SCIP_ExprData_Monomial::exponents, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_Interval::inf, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ExprData_Quadratic::quadelems, 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_VARIDX, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTFORCE, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT, SCIP_Real, SCIPABORT, SCIPdebugMessage, SCIPdebugPrintf, SCIPerrorMessage, SCIPexprgraphTightenNodeBounds(), SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalDiv(), SCIPintervalExp(), SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPintervalLog(), SCIPintervalMul(), SCIPintervalMulScalar(), SCIPintervalNegateReal(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarInverse(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetEntire(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSquare(), SCIPintervalSquareRoot(), SCIPintervalSub(), SCIPintervalSubScalar(), SCIP_Interval::sup, and TRUE. Referenced by SCIPexprgraphPropagateNodeBounds().
removes duplicate children in a polynomial expression node leaves NULL's in children array
Definition at line 10575 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, exprgraphNodeIsParent(), exprgraphNodeRemoveParent(), FALSE, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, polynomialdataApplyChildmap(), SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, and TRUE. Referenced by exprgraphNodeSimplify().
eliminates NULL's in children array and shrinks it to actual size
Definition at line 10633 of file expr.c. References BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, polynomialdataApplyChildmap(), SCIP_ALLOC, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY. Referenced by exprgraphNodeSimplify(), and SCIPexprgraphNodeSplitOffLinear().
aims at simplifying a node in an expression graph, assuming all children have been simplified converts node into polynomial, if possible and not constant
Definition at line 10701 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, ensureBlockMemoryArraySize, EPSISINT, SCIP_ExprData_Monomial::exponents, exprConvertToPolynomial(), exprgraphNodeAddChildren(), exprgraphNodeEvalWithChildren(), exprgraphNodeRemoveParent(), exprgraphNodeRemovePolynomialDuplicateChildren(), exprgraphNodeRemovePolynomialNullChildren(), exprgraphPrintNodeExpression(), FALSE, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, NULL, SCIP_ExprGraphNode::op, polynomialdataExpandMonomialFactor(), polynomialdataFree(), polynomialdataMergeMonomials(), SCIP_ExprGraphNode::pos, pow(), SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_POLYNOMIAL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPdebugPrintf, SCIPexprFindMonomialFactor(), SCIPmessagePrintWarning(), SCIP_ExprGraphNode::simplified, SCIP_ExprData_Polynomial::sorted, SCIP_ExprData_Monomial::sorted, TRUE, and SCIP_ExprGraphNode::value. Referenced by SCIPexprgraphSimplify().
creates an expression from a given node in an expression graph assembles mapping of variables from graph to tree
Definition at line 11025 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_ExprGraphNode::children, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, 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_VARIDX, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreatePolynomial(), SCIPexprCreateQuadratic(), and TRUE. Referenced by SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), and SCIPexprgraphGetTree().
counts how often expression graph variables are used in a subtree of the expression graph
Definition at line 11183 of file expr.c. References SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_VARIDX. Referenced by SCIPexprgraphGetSubtreeVarsUsage(), and SCIPexprgraphNodeSplitOffLinear().
Definition at line 11207 of file expr.c. References SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_VARIDX. Referenced by SCIPexprgraphGetSeparableTrees().
assert that expression tree has at least a given depth
Definition at line 11267 of file expr.c. References SCIP_ExprGraph::blkmem, BMSclearMemoryArray, SCIP_ExprGraph::depth, ensureBlockMemoryArraySize3, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraph::nodessize, NULL, and SCIP_OKAY. Referenced by exprgraphMoveNode(), SCIPexprgraphAddNode(), and SCIPexprgraphCreate().
remove a variable from the variables arrays, assuming that its node will be removed or converted next
Definition at line 11294 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraph::nvars, SCIP_CALL, SCIP_OKAY, SCIPhashmapRemove(), SCIPhashmapSetImage(), SCIP_ExprGraph::userdata, SCIP_ExprGraph::varbounds, SCIP_ExprGraph::varidxs, SCIP_ExprGraph::varnodes, and SCIP_ExprGraph::vars. Referenced by SCIPexprgraphReleaseNode(), and SCIPexprgraphReplaceVarByLinearSum().
moves a node in an expression graph to a different depth new depth must be larger than children depth moves parent nodes to higher depth, if needed variable nodes cannot be moved
Definition at line 11346 of file expr.c. References SCIP_ExprGraph::blkmem, SCIP_ExprGraphNode::children, SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssize, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::curv, SCIP_ExprGraphNode::depth, SCIP_ExprGraph::depth, ensureBlockMemoryArraySize, exprgraphEnsureDepth(), SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::nconsts, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraph::nodessize, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::pos, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIPdebugMessage, and SCIPerrorMessage. Referenced by SCIPexprgraphMoveNodeParents(), SCIPexprgraphReplaceVarByLinearSum(), and SCIPexprgraphSimplify().
given a list of children, tries to find a common parent that represents a given operator with the same given data
Definition at line 11434 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, exprgraphNodeIsParent(), SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprGraphNode::nparents, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraphNode::parents, polynomialdataApplyChildmap(), polynomialdataSortMonomials(), SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, 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_VARIDX, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPexprAreMonomialsEqual(), SCIPquadelemSort(), SCIPsortPtr(), SCIPsortPtrInt(), SCIPsortPtrPtrInt(), SCIPsortPtrPtrReal(), SCIPsortPtrPtrRealInt(), SCIPsortPtrReal(), SCIPsortPtrRealInt(), SCIP_ExprData_Quadratic::sorted, and TRUE. Referenced by exprgraphAddExpr(), and SCIPexprgraphAddExprtreeSum().
adds an expression into an expression graph enables corresponding nodes
Definition at line 11895 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_Expr::children, SCIP_Expr::data, exprgraphCreateNode(), exprgraphFindParentByOperator(), FALSE, SCIP_Expr::nchildren, NULL, SCIP_ExprGraph::nvars, SCIP_Expr::op, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPdebugMessage, SCIPexprgraphAddConst(), SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), TRUE, and SCIP_ExprGraph::vars. Referenced by SCIPexprgraphAddExprtreeSum().
sets bounds in variable nodes to those stored in exprgraph's varbounds array
Definition at line 12010 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, FALSE, SCIP_Interval::inf, isLbBetter(), isUbBetter(), MAX, MIN, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::parents, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_Real, SCIPdebugMessage, SCIP_Interval::sup, TRUE, SCIP_ExprGraph::varbounds, and SCIP_ExprGraph::varnodes. Referenced by SCIPexprgraphCheckCurvature(), and SCIPexprgraphPropagateVarBounds().
captures node, i.e., increases number of uses
Definition at line 12121 of file expr.c. References SCIP_ExprGraphNode::nuses, and SCIPdebugMessage. Referenced by exprgraphNodeRemoveParent(), reformReplaceNode(), SCIPcreateConsNonlinear2(), SCIPexprgraphAddExprtreeSum(), and SCIPexprgraphNodeSplitOffLinear().
returns whether a node is currently enabled
Definition at line 12133 of file expr.c. References SCIP_ExprGraphNode::enabled, and NULL. Referenced by reformulate().
gets number of children of a node in an expression graph
Definition at line 12143 of file expr.c. References SCIP_ExprGraphNode::nchildren, and NULL. Referenced by reformEnsureChildrenMinCurvature(), reformMonomial(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), and splitOffLinearPart().
gets children of a node in an expression graph
Definition at line 12153 of file expr.c. References SCIP_ExprGraphNode::children, and NULL. Referenced by reformEnsureChildrenMinCurvature(), reformMonomial(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets number of parents of a node in an expression graph
Definition at line 12163 of file expr.c. References SCIP_ExprGraphNode::nparents, and NULL. Referenced by reformMonomial(), reformReplaceNode(), and reformulate().
gets parents of a node in an expression graph
Definition at line 12173 of file expr.c. References NULL, and SCIP_ExprGraphNode::parents. Referenced by reformMonomial().
gets depth of node in expression graph
Definition at line 12183 of file expr.c. References SCIP_ExprGraphNode::depth, and NULL. Referenced by reformEnsureChildrenMinCurvature(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets position of node in expression graph at its depth level
Definition at line 12193 of file expr.c. References NULL, and SCIP_ExprGraphNode::pos. Referenced by reformEnsureChildrenMinCurvature(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets operator of a node in an expression graph
Definition at line 12203 of file expr.c. References NULL, and SCIP_ExprGraphNode::op. Referenced by reformEnsureChildrenMinCurvature(), reformMonomial(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), and SCIPexprgraphNodePolynomialAddMonomials().
gives index belonging to a SCIP_EXPR_VARIDX or SCIP_EXPR_PARAM operand
Definition at line 12213 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_PARAM, and SCIP_EXPR_VARIDX.
gives real belonging to a SCIP_EXPR_CONST operand
Definition at line 12224 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_CONST.
gives variable belonging to a SCIP_EXPR_VARIDX expression
Definition at line 12235 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_EXPR_VARIDX, and SCIP_ExprGraph::vars. Referenced by SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives exponent belonging to a SCIP_EXPR_REALPOWER expression
Definition at line 12250 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_REALPOWER. Referenced by reformMonomial(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives exponent belonging to a SCIP_EXPR_INTPOWER expression
Definition at line 12261 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_INTPOWER. Referenced by reformMonomial(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives exponent belonging to a SCIP_EXPR_SIGNPOWER expression
Definition at line 12272 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_SIGNPOWER. Referenced by reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives linear coefficients belonging to a SCIP_EXPR_LINEAR expression
Definition at line 12283 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives constant belonging to a SCIP_EXPR_LINEAR expression
Definition at line 12294 of file expr.c. References SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives constant belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 12306 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_QUADRATIC. Referenced by SCIP_DECL_NONLINCONSUPGD().
gives linear coefficients belonging to a SCIP_EXPR_QUADRATIC expression, or NULL if all coefficients are 0.0
Definition at line 12318 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_QUADRATIC. Referenced by SCIP_DECL_NONLINCONSUPGD().
gives quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 12330 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_QUADRATIC. Referenced by SCIP_DECL_NONLINCONSUPGD().
gives number of quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 12342 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_QUADRATIC. Referenced by SCIP_DECL_NONLINCONSUPGD().
gives the monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 12354 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_POLYNOMIAL. Referenced by reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives the number of monomials belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 12366 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_POLYNOMIAL. Referenced by reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gives the constant belonging to a SCIP_EXPR_POLYNOMIAL expression
Definition at line 12378 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_POLYNOMIAL. Referenced by reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets bounds of a node in an expression graph
Definition at line 12390 of file expr.c. References SCIP_ExprGraphNode::bounds, and NULL. Referenced by propagateBounds(), propagateBoundsCons(), propagateConstraintSides(), reformEnsureChildrenMinCurvature(), reformMonomial(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
gets value of expression associated to node from last evaluation call
Definition at line 12400 of file expr.c. References NULL, and SCIP_ExprGraphNode::value. Referenced by computeViolation(), reformMonomial(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), and SCIPexprgraphSimplify().
gets curvature of expression associated to node from last curvature check call
Definition at line 12410 of file expr.c. References SCIP_ExprGraphNode::curv, and NULL. Referenced by reformEnsureChildrenMinCurvature(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIP_DECL_NONLINCONSUPGD().
creates an expression graph node
Definition at line 12420 of file expr.c. References exprgraphCreateNode(), 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_VARIDX, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, and SCIPerrorMessage. Referenced by reformMonomial(), and reformulate().
creates an expression graph node for a linear expression
Definition at line 12503 of file expr.c. References BMSallocBlockMemoryArray, BMScopyMemoryArray, exprgraphCreateNode(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_LINEAR, SCIP_OKAY, and SCIP_Real. Referenced by reformulate(), and SCIP_DECL_EXPRGRAPHNODEREFORM().
creates an expression graph node for a quadratic expression
Definition at line 12529 of file expr.c. References exprgraphCreateNode(), NULL, quadraticdataCreate(), SCIP_CALL, SCIP_EXPR_QUADRATIC, and SCIP_OKAY. Referenced by reformulate().
creates an expression graph node for a polynomial expression
Definition at line 12555 of file expr.c. References exprgraphCreateNode(), NULL, polynomialdataCreate(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, and SCIP_OKAY. Referenced by reformulate().
adds monomials to an expression graph node that is a polynomial expression
Definition at line 12580 of file expr.c. References SCIP_ExprGraphNode::data, NULL, polynomialdataAddMonomials(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, and SCIPexprgraphGetNodeOperator().
given a node of an expression graph, splitup a linear part which variables are not used somewhere else in the same expression E.g., if the expression is 1 + x + y + y^2, one gets 1 + x and the node remains at y + y^2. If the node is a linear expression, it may be freed. If it is not linear, the node may change, i.e., the remaining nonlinear part may be stored in a new node. It is assumed that the user had captured the node. It is assumed that the expression graph has been simplified before.
Definition at line 12605 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprData_Monomial::exponents, exprgraphCreateNode(), exprgraphNodeGetVarsUsage(), exprgraphNodeRemoveParent(), exprgraphNodeRemovePolynomialNullChildren(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::needvarboundprop, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, polynomialdataMergeMonomials(), SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_LOG, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, 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_VARIDX, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIPdebugMessage, SCIPexprgraphAddNode(), SCIPexprgraphCaptureNode(), SCIPexprgraphReleaseNode(), SCIPexpropGetName(), SCIPintervalSetEntire(), SCIP_ExprData_Quadratic::sorted, SCIP_ExprData_Polynomial::sorted, TRUE, and SCIP_ExprGraph::vars. Referenced by splitOffLinearPart().
moves parents from a one node to another node in other words, replaces the child srcnode by targetnode in all parents of srcnode srcnode may be freed, if not captured it is assumes that targetnode represents the same expression as srcnode
Definition at line 13415 of file expr.c. References SCIP_ExprGraphNode::depth, exprgraphMoveNode(), exprgraphNodeReplaceChild(), NULL, SCIP_CALL, and SCIP_OKAY. Referenced by reformReplaceNode(), SCIPexprgraphReplaceVarByLinearSum(), and SCIPexprgraphSimplify().
releases node, i.e., decreases number of uses node is freed if no parents and no other uses children are recursively released if they have no other parents nodes that are removed are also freed if node correspond to a variable, then the variable is removed from the expression graph similar for constants
Definition at line 13446 of file expr.c. References SCIP_ExprGraph::blkmem, SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::depth, SCIP_ExprGraph::depth, exprgraphFindConstNodePos(), exprgraphNodeRemoveParent(), exprgraphRemoveVar(), SCIP_ExprGraph::nconsts, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, NULL, SCIP_ExprGraphNode::pos, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPdebugMessage, SCIPexprgraphFreeNode(), and SCIPexpropGetName(). Referenced by exprgraphNodeRemoveParent(), reformReplaceNode(), SCIP_DECL_CONSDEACTIVE(), and SCIPexprgraphNodeSplitOffLinear().
frees a node of an expression graph
Definition at line 13536 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, and NULL. Referenced by SCIPexprgraphReleaseNode().
enables a node and recursively all its children in an expression graph
Definition at line 13561 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::needvarboundprop, NULL, SCIP_ExprGraphNode::pos, SCIP_REAL_MAX, SCIPdebugMessage, SCIPexprgraphEnableNode(), SCIPintervalSetEntire(), and TRUE. Referenced by SCIP_DECL_CONSENABLE(), and SCIPexprgraphEnableNode().
disables a node and recursively all children which have no enabled parents in an expression graph
Definition at line 13588 of file expr.c. References SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, FALSE, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::nuses, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::pos, SCIPdebugMessage, SCIPexprgraphDisableNode(), and TRUE. Referenced by SCIP_DECL_CONSDISABLE(), and SCIPexprgraphDisableNode().
returns whether the node has siblings in the expression graph
Definition at line 13619 of file expr.c. References FALSE, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::parents, and TRUE. Referenced by reformulate(), and SCIP_DECL_EXPRGRAPHNODEREFORM().
returns whether all children of an expression graph node are variable nodes gives TRUE for nodes without children
Definition at line 13637 of file expr.c. References SCIP_ExprGraphNode::children, FALSE, SCIP_ExprGraphNode::nchildren, NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_VARIDX, and TRUE. Referenced by SCIP_DECL_NONLINCONSUPGD().
returns whether the node has an ancestor which has a nonlinear expression operand
Definition at line 13653 of file expr.c. References SCIP_ExprGraphNode::depth, FALSE, SCIP_ExprGraphNode::nparents, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_PARAM, SCIP_EXPR_PLUS, SCIP_EXPR_SUM, SCIP_EXPR_VARIDX, SCIPexprgraphHasNodeNonlinearAncestor(), and TRUE. Referenced by reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIPexprgraphHasNodeNonlinearAncestor().
prints an expression graph node
Definition at line 13690 of file expr.c. References exprgraphPrintNodeExpression(), FALSE, and NULL. Referenced by reformulate().
tightens the bounds in a node of the graph preparation for reverse propagation sets bound status to SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT if tightening is strong enough and not cutoff
Definition at line 13705 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, FALSE, SCIP_Interval::inf, isLbBetter(), isUbBetter(), NULL, SCIP_ExprGraphNode::pos, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTFORCE, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENTRECENT, SCIPdebugMessage, SCIPdebugPrintf, SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIP_Interval::sup, and TRUE. Referenced by exprgraphNodePropagateBounds(), propagateBoundsCons(), propagateConstraintSides(), and reformNode2Var().
ensures that bounds and curvature information in a node is uptodate assumes that bounds and curvature in children are uptodate
Definition at line 13765 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::curv, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, SCIP_Interval::inf, isLbBetter(), isUbBetter(), SCIP_ExprGraphNode::nchildren, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_PARAM, SCIP_EXPR_VARIDX, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_EXPRBOUNDSTATUS_TIGHTENEDBYPARENT, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_EXPRCURV_LINEAR, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, SCIPdebugMessage, SCIPexpropGetName(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), and SCIP_Interval::sup. Referenced by reformEnsureChildrenMinCurvature(), reformMonomial(), reformulate(), and SCIPexprgraphCheckCurvature().
get current maximal depth of expression graph
Definition at line 13915 of file expr.c. References SCIP_ExprGraph::depth, and NULL. Referenced by reformulate().
gets array with number of nodes at each depth of expression graph
Definition at line 13925 of file expr.c. References SCIP_ExprGraph::nnodes, and NULL. Referenced by reformulate().
gets nodes of expression graph, one array per depth
Definition at line 13935 of file expr.c. References SCIP_ExprGraph::nodes, and NULL. Referenced by reformulate().
gets number of variables in expression graph
Definition at line 13945 of file expr.c. References NULL, and SCIP_ExprGraph::nvars. Referenced by computeViolations(), presolveUpgrade(), propagateBounds(), propagateConstraintSides(), reformulate(), removeFixedNonlinearVariables(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSFREE(), SCIP_DECL_CONSGETNVARS(), and SCIP_DECL_CONSGETVARS().
gets array of variables in expression graph
Definition at line 13955 of file expr.c. References NULL, and SCIP_ExprGraph::vars. Referenced by computeViolations(), presolveUpgrade(), propagateBounds(), propagateConstraintSides(), reformulate(), removeFixedNonlinearVariables(), SCIP_DECL_CONSCHECK(), and SCIP_DECL_CONSGETVARS().
gets array of expression graph nodes corresponding to variables
Definition at line 13965 of file expr.c. References NULL, and SCIP_ExprGraph::varnodes. Referenced by propagateBounds(), and propagateConstraintSides().
sets value for a single variable given as expression graph node
Definition at line 13975 of file expr.c. References NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_VARIDX, and SCIP_ExprGraphNode::value. Referenced by reformMonomial(), reformNode2Var(), reformulate(), and SCIP_DECL_EXPRGRAPHNODEREFORM().
sets bounds for variables
Definition at line 13987 of file expr.c. References BMScopyMemoryArray, NULL, SCIP_ExprGraph::nvars, and SCIP_ExprGraph::varbounds.
sets bounds for a single variable
Definition at line 13999 of file expr.c. References NULL, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIP_ExprGraph::varbounds, SCIP_ExprGraph::varidxs, and SCIP_ExprGraph::vars.
sets bounds for a single variable given as expression graph node
Definition at line 14019 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraph::varbounds, and SCIP_ExprGraph::varnodes. Referenced by SCIP_DECL_EXPRGRAPHVARADDED().
sets lower bound for a single variable given as expression graph node
Definition at line 14039 of file expr.c. References SCIP_ExprGraphNode::data, SCIP_Interval::inf, NULL, SCIP_ExprGraph::varbounds, and SCIP_ExprGraph::varnodes. Referenced by SCIP_DECL_EVENTEXEC().
sets upper bound for a single variable given as expression graph node
Definition at line 14059 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_Interval::sup, SCIP_ExprGraph::varbounds, and SCIP_ExprGraph::varnodes. Referenced by SCIP_DECL_EVENTEXEC().
gets bounds that are stored for all variables
Definition at line 14079 of file expr.c. References SCIP_ExprGraph::varbounds.
creates an empty expression graph
Definition at line 14087 of file expr.c. References BMSallocBlockMemory, BMSclearMemory, ensureBlockMemoryArraySize3, exprgraphEnsureDepth(), MAX, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPcalcHashtableSize(), SCIPhashmapCreate(), and TRUE. Referenced by SCIPincludeConshdlrBivariate(), and SCIPincludeConshdlrNonlinear().
frees an expression graph
Definition at line 14126 of file expr.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, NULL, SCIP_OKAY, and SCIPhashmapFree(). Referenced by SCIP_DECL_CONSFREE().
adds an expression graph node to an expression graph expression graph assumes ownership of node children are notified about new parent depth will be chosen to be the maximum of mindepth and the depth of all children plus one
Definition at line 14174 of file expr.c. References SCIP_ExprGraph::blkmem, BMSduplicateBlockMemoryArray, SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraph::depth, ensureBlockMemoryArraySize, exprgraphEnsureDepth(), exprgraphNodeAddParent(), exprgraphNodeEval(), MAX, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::needvarboundprop, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraph::nodessize, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_EXPRBOUNDSTATUS_CHILDTIGHTENED, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_INVALID, SCIP_OKAY, SCIP_REAL_MAX, SCIPintervalSet(), SCIPintervalSetEntire(), TRUE, and SCIP_ExprGraphNode::value. Referenced by exprgraphAddExpr(), reformMonomial(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIPexprgraphAddConst(), SCIPexprgraphAddExprtreeSum(), SCIPexprgraphAddVars(), and SCIPexprgraphNodeSplitOffLinear().
adds variables to an expression graph, if not existing yet also already existing nodes are enabled
Definition at line 14257 of file expr.c. References SCIP_ExprGraph::blkmem, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraph::depth, SCIP_ExprGraphNode::enabled, ensureBlockMemoryArraySize, ensureBlockMemoryArraySize3, exprgraphCreateNode(), SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraph::nodessize, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::pos, SCIP_CALL, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_REAL_MAX, SCIPdebugMessage, SCIPexprgraphAddNode(), SCIPexprgraphFindVarNode(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPintervalSetEntire(), TRUE, SCIP_ExprGraph::userdata, SCIP_ExprGraph::varbounds, SCIP_ExprGraph::varidxs, SCIP_ExprGraph::varnodes, SCIP_ExprGraph::vars, and SCIP_ExprGraph::varssize. Referenced by exprgraphAddExpr(), reformMonomial(), reformNode2Var(), reformulate(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIPexprgraphReplaceVarByLinearSum().
adds a constant to an expression graph, if not existing yet also already existing nodes are enabled
Definition at line 14329 of file expr.c. References SCIP_ExprGraph::blkmem, SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssize, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::depth, ensureBlockMemoryArraySize, exprgraphCreateNode(), SCIP_ExprGraph::nconsts, SCIP_ExprGraph::nnodes, NULL, SCIP_CALL, SCIP_EXPR_CONST, SCIP_OKAY, SCIPdebugMessage, SCIPexprgraphAddNode(), SCIPexprgraphFindConstNode(), and TRUE. Referenced by exprgraphAddExpr().
adds sum of expression trees into expression graph node will also be captured
Definition at line 14373 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprGraphNode::depth, exprgraphAddExpr(), exprgraphCreateNode(), exprgraphFindParentByOperator(), FALSE, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_PLUS, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprgraphAddNode(), SCIPexprgraphCaptureNode(), and TRUE. Referenced by SCIP_DECL_CONSACTIVE().
replaces variable in expression graph by a linear sum of variables variables will be added if not in the graph yet
Definition at line 14512 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprGraphNode::children, SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssize, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::data, ensureBlockMemoryArraySize, ensureBlockMemoryArraySize3, exprgraphMoveNode(), exprgraphNodeAddParent(), exprgraphRemoveVar(), FALSE, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::nconsts, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::nuses, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_EXPR_SUM, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIPdebugMessage, SCIPexprgraphAddVars(), SCIPexprgraphFindConstNode(), SCIPexprgraphFindVarNode(), SCIPexprgraphMoveNodeParents(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPintervalSet(), SCIPintervalSetEntire(), SCIP_ExprGraphNode::simplified, SCIP_ExprGraph::userdata, SCIP_ExprGraphNode::value, SCIP_ExprGraph::varbounds, SCIP_ExprGraph::varidxs, SCIP_ExprGraph::varnodes, SCIP_ExprGraph::vars, and SCIP_ExprGraph::varssize. Referenced by removeFixedNonlinearVariables().
finds expression graph node corresponding to a variable
Definition at line 14684 of file expr.c. References FALSE, NULL, SCIP_EXPR_VARIDX, SCIPhashmapExists(), SCIPhashmapGetImage(), TRUE, SCIP_ExprGraph::varidxs, and SCIP_ExprGraph::varnodes. Referenced by SCIPexprgraphAddVars(), and SCIPexprgraphReplaceVarByLinearSum().
finds expression graph node corresponding to a constant
Definition at line 14713 of file expr.c. References SCIP_ExprGraph::constnodes, SCIP_ExprGraph::constssorted, SCIP_ExprGraphNode::data, exprgraphSortConstNodes(), FALSE, SCIP_ExprGraph::nconsts, NULL, SCIP_EXPR_CONST, and TRUE. Referenced by SCIPexprgraphAddConst(), SCIPexprgraphReplaceVarByLinearSum(), and SCIPexprgraphSimplify().
prints an expression graph in dot format
Definition at line 14761 of file expr.c. References SCIP_ExprGraph::depth, exprgraphPrintNodeDot(), SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraphNode::nparents, NULL, SCIP_OKAY, and SCIPmessageFPrintInfo(). Referenced by propagateBounds(), propagateConstraintSides(), SCIP_DECL_CONSINIT(), and SCIPexprgraphSimplify().
evaluates nodes of expression graph for given values of variables
Definition at line 14810 of file expr.c. References SCIP_ExprGraph::depth, exprgraphNodeEval(), SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, NULL, SCIP_ExprGraph::nvars, SCIP_CALL, and SCIP_OKAY. Referenced by computeViolations(), presolveUpgrade(), reformulate(), SCIP_DECL_CONSCHECK(), and SCIPexprgraphSimplify().
propagates bound changes in variables forward through the expression graph
Definition at line 14831 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::depth, SCIP_ExprGraph::depth, exprgraphNodeUpdateBounds(), exprgraphUpdateVarNodeBounds(), FALSE, SCIP_ExprGraph::needvarboundprop, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, NULL, SCIP_ExprGraphNode::pos, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPintervalIsEmpty(), and TRUE. Referenced by propagateBounds(), reformulate(), and SCIP_DECL_CONSPRESOL().
propagates bound changes in nodes backward through the graph new bounds are not stored in varbounds, but only in nodes corresponding to variables NOTE: it is assumed that SCIPexprgraphPropagateVarBounds was called before if variable bounds were relaxed
Definition at line 14884 of file expr.c. References SCIP_ExprGraph::depth, exprgraphNodePropagateBounds(), FALSE, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, and NULL. Referenced by propagateBounds(), and propagateConstraintSides().
updates curvature information in expression graph nodes w.r.t. currently stored variable bounds implies update of bounds in expression graph
Definition at line 14915 of file expr.c. References SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::curv, SCIP_ExprGraph::depth, exprgraphUpdateVarNodeBounds(), SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIPerrorMessage, SCIPexprgraphUpdateNodeBoundsCurvature(), and SCIPintervalIsEmpty().
aims at simplifying an expression graph a domain error can occur when variables were fixed to values for which a parent expression is not defined (e.g., 0^(-1) or log(-1))
Definition at line 14957 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemoryArray, SCIP_ExprGraphNode::children, SCIP_ExprGraphNode::data, SCIP_ExprGraph::depth, ensureBlockMemoryArraySize, EPSZ, exprgraphMoveNode(), exprgraphNodeEval(), exprgraphNodeReplaceChild(), exprgraphNodeSimplify(), exprUnconvertPolynomial(), FALSE, SCIP_ExprGraphNode::nchildren, SCIP_ExprGraph::nnodes, SCIP_ExprGraph::nodes, SCIP_ExprGraphNode::nparents, NULL, SCIP_ExprGraphNode::nuses, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::parents, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprgraphEval(), SCIPexprgraphFindConstNode(), SCIPexprgraphGetNodeVal(), SCIPexprgraphMoveNodeParents(), SCIPexprgraphPrintDot(), SCIPgetRandomReal(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPrelDiff(), SCIP_ExprGraphNode::simplified, TRUE, and SCIP_ExprGraphNode::value. Referenced by SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
creates an expression tree from a given node in an expression graph
Definition at line 15216 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprGraphNode::depth, exprgraphNodeCreateExpr(), NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPexprtreeCreate(), and SCIP_ExprGraph::vars. Referenced by createNlRow(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSPRINT(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), and SCIPwriteGms().
creates a sum of expression trees with pairwise disjoint variables from a given node in an expression graph Giving SCIPexprgraphGetNodeNChildren() for exprtreesize is always sufficient.
Definition at line 15268 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprData_Monomial::exponents, exprgraphNodeCheckSeparabilityComponent(), exprgraphNodeCreateExpr(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, MAX, MIN, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_QUADRATIC, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreateMonomial(), SCIPexprCreatePolynomial(), SCIPexprCreateQuadratic(), SCIPexprgraphGetTree(), SCIPexprtreeCreate(), TRUE, SCIP_ExprTree::vars, and SCIP_ExprGraph::vars.
returns how often expression graph variables are used in a subtree of the expression graph
Definition at line 15701 of file expr.c. References BMSclearMemoryArray, exprgraphNodeGetVarsUsage(), NULL, and SCIP_ExprGraph::nvars. Referenced by SCIP_DECL_CONSGETNVARS(), and SCIP_DECL_CONSGETVARS().
gives the number of summands which the expression of an expression graph node consists of
Definition at line 15717 of file expr.c. References SCIP_ExprGraphNode::data, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraphNode::op, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_QUADRATIC, and SCIP_EXPR_SUM. Referenced by SCIP_DECL_CONSEXITPRE().
creates a sum of expression trees, possibly sharing variables, from a given node in an expression graph
Definition at line 15753 of file expr.c. References SCIP_ExprGraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_QuadElement::coef, SCIP_ExprData_Quadratic::constant, SCIP_ExprData_Polynomial::constant, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, EPSISINT, SCIP_ExprData_Monomial::exponents, exprgraphNodeCreateExpr(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_ExprData_Quadratic::lincoefs, SCIP_ExprData_Polynomial::monomials, SCIP_ExprGraphNode::nchildren, SCIP_ExprData_Monomial::nfactors, SCIP_ExprData_Polynomial::nmonomials, SCIP_ExprData_Quadratic::nquadelems, NULL, SCIP_ExprGraph::nvars, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ExprData_Quadratic::quadelems, SCIP_ALLOC, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_CONST, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateMonomial(), SCIPexprCreatePolynomial(), SCIPexprgraphGetTree(), SCIPexprtreeAddExpr(), SCIPexprtreeCreate(), SCIP_ExprTree::vars, and SCIP_ExprGraph::vars. Referenced by SCIP_DECL_CONSEXITPRE(). Variable Documentation
Initial value:
=
{
"unknown",
"convex",
"concave",
"linear"
}
curvature names as strings Definition at line 173 of file expr.c. Referenced by SCIPexprcurvGetName(). |