File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ def units(self):
171171 """
172172 return self ._live_entity_map ('unit' )
173173
174+ @property
175+ def subordinate_units (self ):
176+ """Return a map of unit-id:Unit for all subordinate units"""
177+ return {u_name : u for u_name , u in self .units .items () if u .is_subordinate }
178+
174179 @property
175180 def relations (self ):
176181 """Return a map of relation-id:Relation for all relations currently in
@@ -969,6 +974,14 @@ def units(self):
969974 """
970975 return self .state .units
971976
977+ @property
978+ def subordinate_units (self ):
979+ """Return a map of unit-id:Unit for all subordiante units currently in
980+ the model.
981+
982+ """
983+ return self .state .subordinate_units
984+
972985 @property
973986 def relations (self ):
974987 """Return a list of all Relations currently in the model.
You can’t perform that action at this time.
0 commit comments