All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pub_expr.h File Reference Detailed Descriptionpublic methods for expressions, expression trees, expression graphs, and related stuff Definition in file pub_expr.h. #include "scip/def.h" #include "scip/pub_message.h" #include "scip/intervalarith.h" #include "blockmemshell/memory.h" #include "nlpi/type_expr.h" #include "nlpi/type_exprinterpret.h" Go to the source code of this file. Function Documentation
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().
gives the name of an operand 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
gives the number of children of a simple operand
Definition at line 3139 of file expr.c. References SCIP_EXPR_LAST.
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 of SCIP_EXPR_LINEAR over SCIP_EXPR_MUP or SCIP_EXPR_PROD 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 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().
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().
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().
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().
changes coefficient of monomial
Definition at line 6471 of file expr.c. References SCIP_ExprData_Monomial::coef, and NULL. Referenced by polynomialdataMultiplyByConstant(), and polynomialdataMultiplyByPolynomial().
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(). 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 as children 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().
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().
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(). |