Skip to content

Commit

Permalink
update edge removal criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
napakalas committed May 23, 2024
1 parent f11c7bb commit 080615a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapmaker/routing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,8 @@ def set_direction(upstream_node):
route_graph.remove_edge(p[i], p[i+1])

# removing self loop due to generalisation
for edge in nx.Graph(route_graph):
if edge[0] == edge[1] and (edge[0], edge[1]) in route_graph:
for edge in nx.Graph(route_graph).edges:
if edge[0] == edge[1] and route_graph.has_edge(edge[0], edge[1]):
route_graph.remove_edge(edge[0], edge[1])

if debug:
Expand Down

0 comments on commit 080615a

Please sign in to comment.