identify_variables
(function from pyomo.core.expr.visitor
)
- pyomo.core.expr.visitor.identify_variables(expr, include_fixed=True, named_expression_cache=None)[source]
A generator that yields a sequence of variables in an expression tree.
- Parameters:
expr – The root node of an expression tree.
include_fixed (bool) – If
True
, then this generator will yield variables whose value is fixed. Defaults toTrue
.
- Yields:
Each variable that is found.