(function from pyomo.core.expr.compare)
pyomo.core.expr.compare
Returns True if 2 expression trees are identical, False otherwise.
expr1 (NumericValue) – A Pyomo Var, Param, or expression
expr2 (NumericValue) – A Pyomo Var, Param, or expression
include_named_exprs (bool) – If False, then named expressions will be ignored. In other words, this function will return True if one expression has a named expression and the other does not as long as the rest of the expression trees are identical.
res – A bool indicating whether or not the expressions are identical.
bool