Skip to content

Commit

Permalink
Bugfix: NetworkTopology correctly compare links
Browse files Browse the repository at this point in the history
  • Loading branch information
andreArtelt committed Oct 28, 2024
1 parent c8aa6f8 commit ed5d3e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions epyt_flow/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ def __eq__(self, other) -> bool:

return super().__eq__(other) and \
self.get_all_nodes() == other.get_all_nodes() \
and all(link_a[0] == link_b[0] and all(link_a[1] == link_b[1])
and all(link_a[0] == link_b[0] and link_a[1] == link_b[1]
for link_a, link_b in zip(self.get_all_links(), other.get_all_links())) \
and self.__units == other.units \
and self.__pumps == other.pumps \
and self.__valves == other.valves
and self.get_all_pumps() == other.get_all_pumps() \
and self.get_all_valves() == other.get_all_valves()

def __str__(self) -> str:
return f"f_inp: {self.name} nodes: {self.__nodes} links: {self.__links} " +\
Expand Down

0 comments on commit ed5d3e3

Please sign in to comment.