Skip to content

Commit

Permalink
topological_sort before solve for flowsheet.
Browse files Browse the repository at this point in the history
  • Loading branch information
elphick committed Nov 30, 2024
1 parent ec4cb17 commit 268171c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elphick/geomet/flowsheet/flowsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def solve(self):

while 0 < missing_count < prev_missing_count:
prev_missing_count = missing_count
for node in self.graph.nodes:
for node in nx.topological_sort(self.graph):
if self.graph.nodes[node]['mc'].node_type == NodeType.BALANCE:
if self.graph.nodes[node]['mc'].has_empty_input:
mc: MC = self.graph.nodes[node]['mc'].solve()
Expand Down

0 comments on commit 268171c

Please sign in to comment.