Skip to content

Commit 7bb4b7c

Browse files
Adjust to yaramo 2
1 parent 6128929 commit 7bb4b7c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

railwayroutegenerator/routegenerator.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,16 @@ def traverse_edge(
5959
)
6060

6161
next_node = edge.node_b
62-
previous_node = edge.node_a
6362
if direction == SignalDirection.GEGEN:
6463
next_node = edge.node_a
65-
previous_node = edge.node_b
6664

67-
possible_followers = next_node.get_possible_followers(previous_node)
68-
for possible_follower in possible_followers:
69-
if possible_follower is None:
65+
possible_following_edges = next_node.get_possible_followers(edge)
66+
for possible_following_edge in possible_following_edges:
67+
if possible_following_edge is None:
7068
continue
71-
next_edge = self.topology.get_edge_by_nodes(next_node, possible_follower)
72-
next_direction = next_edge.get_direction_based_on_nodes(
73-
next_node, possible_follower
74-
)
69+
next_direction = possible_following_edge.get_direction_based_on_start_node(next_node)
7570
routes = routes + self.traverse_edge(
76-
next_edge, next_direction, current_route.duplicate(), active_signal
71+
possible_following_edge, next_direction, current_route.duplicate(), active_signal
7772
)
7873

7974
return routes

0 commit comments

Comments
 (0)