GDPTree
(class from pyomo.gdp.util
)
- class pyomo.gdp.util.GDPTree[source]
Bases:
object
Stores a forest representing the hierarchy between GDP components on a model: for single-level GDPs, each tree is rooted at a Disjunction and each of the Disjuncts in the Disjunction is a leaf. For nested GDPs, the Disjuncts may not be leaves, and could have child Disjunctions of their own.
Methods
__init__
()add_edge
(u, v)add_node
(u)children
(u)Returns the direct descendents of node u.
in_degree
(u)is_leaf
(u)parent
(u)Returns the parent node of u, or None if u is a root.
Returns the parent Disjunct of u, or None if u is the closest-to-root Disjunct in the forest.
reverse_topological_sort
()Returns the highest parent Disjunct in the hierarchy, or None if the component is not nested.
topological_sort
()Attributes
disjunct_nodes
leaves
vertices
Member Documentation