(function from pyomo.core.expr.visitor)
pyomo.core.expr.visitor
Evaluate the value of the expression.
expr – The root node of an expression tree.
exception (bool) – A flag that indicates whether exceptions are raised. If this flag is False, then an exception that occurs while evaluating the expression is caught and the return value is None. Default is True.
False
None
True
constant (bool) – If True, constant expressions are evaluated and returned but nonconstant expressions raise either FixedExpressionError or NonconstantExpressionError (default=False).
A floating point value if the expression evaluates normally, or None if an exception occurs and is caught.