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 188 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 197 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 223 of file expr.c. References SCIP_EXPRCURV_LINEAR, and SCIPexprcurvNegate(). Referenced by checkCurvature(), reformulate(), SCIP_DECL_EXPRCURV(), SCIPexprcurvMonomial(), and SCIPexprgraphGetNodePolynomialMonomialCurvature().
gives curvature for base^exponent for given bounds and curvature of base-function and constant exponent
Definition at line 236 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 gives curvature for a monomial with given curvatures and bounds for each factor See Maranas and Floudas, Finding All Solutions of Nonlinearly Constrained Systems of Equations, JOGO 7, 1995 for the categorization in the case that all factors are linear.
Definition at line 344 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(), and SCIPexprgraphGetNodePolynomialMonomialCurvature().
gives name as string for a curvature
Definition at line 457 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 3237 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 3247 of file expr.c. References SCIP_EXPR_LAST.
gives operator of expression
Definition at line 5573 of file expr.c. References NULL, and SCIP_Expr::op. Referenced by addUserEstimator(), analyzeTree(), atomic_userexpr< Type >::atomic_userexpr(), eval(), exprIsNonSmooth(), exprParse(), exprsimplifyFlattenPolynomials(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), exprsimplifySeparateLinearFromPolynomial(), generateCut(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), getCoeffsAndConstantFromLinearExpr(), getLinearAndQuadraticCoefs(), initSepaDataCreateVred(), printExpr(), printRowNl(), readConstraints(), readExpression(), readObjective(), SCIPexprAdd(), SCIPexprMulConstant(), and SCIPwritePip().
gives number of children of an expression
Definition at line 5583 of file expr.c. References SCIP_Expr::nchildren, and NULL. Referenced by addUserEstimator(), analyzeTree(), atomic_userexpr< Type >::atomic_userexpr(), eval(), evalUser(), exprIsNonSmooth(), exprsimplifyFlattenPolynomials(), exprsimplifySeparateLinearFromPolynomial(), getCoeffsAndConstantFromLinearExpr(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), SCIPexprAdd(), SCIPexprMulConstant(), and SCIPwritePip(). gives pointer to array with children of an expression
Definition at line 5593 of file expr.c. References SCIP_Expr::children, and NULL. Referenced by addUserEstimator(), analyzeTree(), eval(), exprIsNonSmooth(), getCoeffsAndConstantFromLinearExpr(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), readObjective(), SCIPexprAdd(), and SCIPwritePip().
gives index belonging to a SCIP_EXPR_VARIDX or SCIP_EXPR_PARAM operand
Definition at line 5603 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, SCIP_EXPR_PARAM, and SCIP_EXPR_VARIDX. Referenced by eval(), exprsimplifySeparateLinearFromPolynomial(), getCoeffsAndConstantFromLinearExpr(), getLinearAndQuadraticCoefs(), printExpr(), printRowNl(), and readObjective(). gives real belonging to a SCIP_EXPR_CONST operand
Definition at line 5614 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_CONST. Referenced by eval(), exprParse(), exprsimplifyFlattenPolynomials(), getCoeffsAndConstantFromLinearExpr(), printExpr(), printRowNl(), readExpression(), SCIPexprAdd(), and SCIPexprMulConstant().
gives void* belonging to a complex operand
Definition at line 5625 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 5636 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 5647 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 5658 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, and SCIP_EXPR_SIGNPOWER. Referenced by atomic_signpower< Type >::atomic_signpower(), evalSignPower(), and printExpr(). gives linear coefficients belonging to a SCIP_EXPR_LINEAR expression
Definition at line 5669 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by eval(), getCoeffsAndConstantFromLinearExpr(), printExpr(), printRowNl(), and SCIPexprAdd(). gives constant belonging to a SCIP_EXPR_LINEAR expression
Definition at line 5682 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_EXPR_LINEAR, and SCIP_Real. Referenced by eval(), getCoeffsAndConstantFromLinearExpr(), printExpr(), printRowNl(), and SCIPexprAdd().
gives quadratic elements belonging to a SCIP_EXPR_QUADRATIC expression
Definition at line 5695 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 5707 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 5720 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 5732 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 5744 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 5756 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 5768 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 5780 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 5790 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 5800 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 5810 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().
gets user data of a user expression Definition at line 5820 of file expr.c. References SCIP_Expr::data, and NULL. indicates whether a user expression has the estimator callback defined Definition at line 5831 of file expr.c. References SCIP_Expr::data, and NULL. Referenced by addUserEstimator().
gives the evaluation capability of a user expression Definition at line 5842 of file expr.c. References SCIP_Expr::data, and NULL. Referenced by analyzeTree().
creates a simple expression
Definition at line 5853 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_USER, SCIP_EXPR_VARIDX, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, 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 6019 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 6061 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 6099 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 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 6124 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 6282 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 6380 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 6417 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 6462 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 6498 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 6510 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 6545 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 6567 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 6580 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 6594 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 6617 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 takes a power of the polynomial Exponent need to be an integer. Polynomial needs to be a monomial, if exponent is negative.
Definition at line 6663 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 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 6683 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 6913 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 6970 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 6994 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 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 7014 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 6698 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 6740 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 6729 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 6769 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 replaces the monomial by a power of the monomial Allows only integers as exponent.
Definition at line 6804 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 merges factors that correspond to the same child by adding exponents Eliminates factors with exponent between -eps and eps.
Definition at line 6834 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 6901 of file expr.c. References SCIP_Expr::data, NULL, SCIP_Expr::op, polynomialdataSortMonomials(), and SCIP_EXPR_POLYNOMIAL. Referenced by SCIPexprAreEqual().
creates a user expression
Definition at line 7031 of file expr.c. References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, eval(), SCIP_ExprData_User::evalcapability, exprCreate(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_USER, SCIP_EXPRINTCAPABILITY_FUNCVALUE, SCIP_EXPRINTCAPABILITY_INTFUNCVALUE, SCIP_OKAY, and SCIP_ExprData_User::userdata. Referenced by exprgraphNodeCreateExpr(). indicates whether the expression contains a SCIP_EXPR_PARAM
Definition at line 7089 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 7108 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_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_USER, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIPABORT, and SCIPexprGetMaxDegree(). Referenced by SCIPexprGetMaxDegree(), and SCIPexprtreeGetMaxDegree().
counts usage of variables in expression
Definition at line 7433 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) 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 7456 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_USER, 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 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 7665 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. given values for children expressions
Definition at line 7717 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, and SCIP_OKAY.
evaluates an expression w.r.t. a point
Definition at line 7736 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 addUserEstimator(), exprsimplifyFlattenPolynomials(), SCIPexprEval(), and SCIPexprtreeEval().
evaluates an expression w.r.t. given interval values for children expressions
Definition at line 7777 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, and SCIP_OKAY.
evaluates an expression w.r.t. an interval
Definition at line 7797 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 addUserEstimator(), SCIPexprEvalInt(), and SCIPexprtreeEvalInt().
evaluates a user expression w.r.t. given values for children expressions
Definition at line 7839 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, SCIP_EXPR_USER, SCIP_OKAY, and SCIP_ExprData_User::userdata. Referenced by exprEvalUser().
evaluates a user expression w.r.t. an interval
Definition at line 7862 of file expr.c. References SCIP_Expr::data, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, SCIP_EXPR_USER, SCIP_OKAY, SCIPintervalSetEntire(), and SCIP_ExprData_User::userdata. Referenced by exprEvalUser().
tries to determine the curvature type of an expression w.r.t. given variable domains
Definition at line 7895 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().
under-/overestimates a user expression w.r.t. to given values and bounds for children expressions
Definition at line 7953 of file expr.c. References SCIP_Expr::data, FALSE, SCIP_Expr::nchildren, NULL, SCIP_Expr::op, SCIP_CALL, SCIP_EXPR_USER, SCIP_OKAY, and SCIP_ExprData_User::userdata. Referenced by addUserEstimator().
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 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 the latter is not NULL. If substexprs[i] == NULL, then the variable expression i is not touched.
Definition at line 7991 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 8029 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 8050 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 8071 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_USER, 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 8381 of file expr.c. References exprParse(), NULL, SCIP_CALL, SCIPhashtableCreate(), and SCIPhashtableFree(). Referenced by SCIP_DECL_CONSPARSE().
returns root expression of an expression tree
Definition at line 8442 of file expr.c. References NULL, and SCIP_ExprTree::root. Referenced by addUserEstimator(), generateCut(), 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 8452 of file expr.c. References NULL, and SCIP_ExprTree::nvars. Referenced by addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), addIntervalGradientEstimator(), addLinearization(), addUserEstimator(), 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(), 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 8462 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 8472 of file expr.c. References NULL, and SCIP_ExprTree::params. Referenced by addUserEstimator(), nlrowExprtreeParamChanged(), SCIPexprintEval(), and SCIPexprintEvalInt().
sets value of a single parameter in expression tree
Definition at line 8482 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 8497 of file expr.c. References SCIP_ExprTree::interpreterdata, and NULL. Referenced by addIntervalGradientEstimator(), addLinearization(), computeViolation(), generateLinearizationCut(), getGradientMaxElement(), initSepaData(), SCIP_DECL_CONSINITLP(), SCIPexprintCompile(), SCIPexprintEval(), SCIPexprintEvalInt(), SCIPexprintGetExprtreeCapability(), SCIPexprintGrad(), SCIPexprintGradInt(), SCIPexprintHessianDense(), SCIPexprintHessianSparsityDense(), SCIPexprintNewParametrization(), and solveDerivativeEquation().
sets data of expression tree interpreter
Definition at line 8507 of file expr.c. References SCIP_ExprTree::interpreterdata, and NULL. Referenced by SCIPexprintCompile().
frees data of expression tree interpreter, if any
Definition at line 8520 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 8534 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 8550 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 8563 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(), SCIPexprintEval(), SCIPexprtreeSimplify(), SCIPnlrowGetSolActivity(), SCIPnlrowRecalcNLPActivity(), and SCIPnlrowRecalcPseudoActivity().
evaluates an expression tree w.r.t. an interval
Definition at line 8579 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(), SCIPevalExprtreeLocalBounds(), and SCIPexprintEvalInt().
prints an expression tree
Definition at line 8596 of file expr.c. References NULL, SCIP_ExprTree::params, SCIP_ExprTree::root, and SCIPexprPrint(). Referenced by generateConvexConcaveUnderestimator(), isConvexLocal(), printFunction(), and SCIPexprtreePrintWithNames().
creates an expression tree
Definition at line 8611 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 8652 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 8692 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 8716 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 8747 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 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 8766 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 8817 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 8840 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 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 8866 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 9030 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 9055 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 9107 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 12711 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 12723 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 12733 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 12743 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 12753 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 12763 of file expr.c. References NULL, and SCIP_ExprGraphNode::parents. Referenced by reformMonomial().
gets depth of node in expression graph
Definition at line 12773 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 12783 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 12793 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 12803 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 12814 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 12825 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 12840 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 12851 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 12862 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 12873 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 12884 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 12896 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 12908 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 12920 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 12932 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 12944 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 12956 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 12968 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 curvature of a single monomial belonging to a SCIP_EXPR_POLYNOMIAL expression gives the curvature of a single monomial belonging to a SCIP_EXPR_POLYNOMIAL expression Assumes that curvature of children and bounds of children and node itself are valid.
Definition at line 12983 of file expr.c. References BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_ExprGraphNode::bounds, SCIP_ExprGraphNode::boundstatus, SCIP_ExprData_Monomial::childidxs, SCIP_ExprGraphNode::children, SCIP_ExprData_Monomial::coef, SCIP_ExprGraphNode::curv, SCIP_ExprGraphNode::data, SCIP_ExprGraphNode::depth, SCIP_ExprGraphNode::enabled, SCIP_ExprData_Monomial::exponents, SCIP_ExprData_Monomial::nfactors, NULL, SCIP_ExprGraphNode::op, SCIP_ExprGraphNode::pos, SCIP_ALLOC, SCIP_EXPR_POLYNOMIAL, SCIP_EXPRBOUNDSTATUS_CHILDRELAXED, SCIP_EXPRBOUNDSTATUS_VALID, SCIP_EXPRCURV_LINEAR, SCIP_EXPRESSION_MAXCHILDEST, SCIP_OKAY, SCIPexprcurvMonomial(), SCIPexprcurvMultiply(), and SCIPintervalIsEmpty(). Referenced by reformulate().
gives the user data belonging to a SCIP_EXPR_USER expression Definition at line 13061 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_USER.
indicates whether a user expression has the estimator callback defined Definition at line 13073 of file expr.c. References SCIP_ExprGraphNode::data, NULL, SCIP_ExprGraphNode::op, and SCIP_EXPR_USER.
gets bounds of a node in an expression graph
Definition at line 13085 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 13095 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 13105 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 13115 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_USER, 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 13198 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 13224 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 13250 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 13275 of file expr.c. References SCIP_ExprGraphNode::data, NULL, polynomialdataAddMonomials(), SCIP_CALL, SCIP_EXPR_POLYNOMIAL, SCIP_OKAY, and SCIPexprgraphGetNodeOperator().
creates an expression graph node for a user expression
Definition at line 13294 of file expr.c. References BMSallocBlockMemory, eval(), SCIP_ExprData_User::evalcapability, exprgraphCreateNode(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EXPR_USER, SCIP_EXPRINTCAPABILITY_FUNCVALUE, SCIP_EXPRINTCAPABILITY_INTFUNCVALUE, SCIP_OKAY, and SCIP_ExprData_User::userdata.
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 13346 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_USER, 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 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 assumed that targetnode represents the same expression as srcnode.
Definition at line 14158 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 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; similarly for constants.
Definition at line 14190 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 14280 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 14305 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 14332 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 14363 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 returns whether all children of an expression graph node are variable nodes Returns TRUE for nodes without children.
Definition at line 14382 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 14398 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 14435 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 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 14451 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 ensures that bounds and curvature information in a node is uptodate Assumes that bounds and curvature in children are uptodate.
Definition at line 14513 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 14663 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 14673 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 14683 of file expr.c. References SCIP_ExprGraph::nodes, and NULL. Referenced by reformulate().
gets number of variables in expression graph
Definition at line 14693 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 14703 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 14713 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 14723 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 14735 of file expr.c. References BMScopyMemoryArray, NULL, SCIP_ExprGraph::nvars, and SCIP_ExprGraph::varbounds.
sets bounds for a single variable
Definition at line 14747 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 14767 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 14787 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 14807 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 14827 of file expr.c. References SCIP_ExprGraph::varbounds.
creates an empty expression graph
Definition at line 14835 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 14874 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 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 14923 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 adds variables to an expression graph, if not existing yet Also already existing nodes are enabled.
Definition at line 15007 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 adds a constant to an expression graph, if not existing yet Also already existing nodes are enabled.
Definition at line 15080 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 adds sum of expression trees into expression graph node will also be captured.
Definition at line 15127 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 replaces variable in expression graph by a linear sum of variables Variables will be added if not in the graph yet.
Definition at line 15267 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 15439 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 15468 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 15516 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 15565 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 15586 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 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 15640 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 updates curvature information in expression graph nodes w.r.t. currently stored variable bounds Implies update of bounds in expression graph.
Definition at line 15672 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)) 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 15715 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(), SCIPisFinite, 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 15974 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 16027 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 16461 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 16477 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 16513 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(). |