identify_components

(function from pyomo.core.expr.visitor)

pyomo.core.expr.visitor.identify_components(expr, component_types)[source]

A generator that yields a sequence of nodes in an expression tree that belong to a specified set.

Parameters:
  • expr – The root node of an expression tree.

  • component_types (set or list) – A set of class types that will be matched during the search.

Yields:

Each node that is found.