(class from pyomo.gdp.util)
pyomo.gdp.util
Bases: object
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__()
__init__
add_edge(u, v)
add_edge
add_node(u)
add_node
children(u)
children
Returns the direct descendents of node u.
in_degree(u)
in_degree
is_leaf(u)
is_leaf
parent(u)
parent
Returns the parent node of u, or None if u is a root.
parent_disjunct(u)
parent_disjunct
Returns the parent Disjunct of u, or None if u is the closest-to-root Disjunct in the forest.
reverse_topological_sort()
reverse_topological_sort
root_disjunct(u)
root_disjunct
Returns the highest parent Disjunct in the hierarchy, or None if the component is not nested.
topological_sort()
topological_sort
Attributes
disjunct_nodes
leaves
vertices
Member Documentation
u : A node in the tree
u : A node in the forest