(function from pyomo.core.expr.template_expr)
pyomo.core.expr.template_expr
Substitute IndexTemplates in an expression tree.
This is a general utility function for walking the expression tree and substituting all occurrences of IndexTemplate and GetItemExpression nodes.
expr (NumericExpression) – the source template expression
substituter (Callable) – method taking (expression, *args) and returning the new object
(expression, *args)
*args – positional arguments passed directly to the substituter
a new expression tree with all substitutions done
NumericExpression