Same coord points will always intersect #6

Closed
opened 2021-03-17 07:36:14 +01:00 by markus · 2 comments

We do need a layer property on nodes after all. If we create trainline A on layer A, and trainline B an layer B, but they have a common point, both lines will intersect and allow an interchange here.

Alternatively, I could probably implement some logic preventing us to move from TL A to TL B in the dijkstra... but that seems dirty.

We do need a layer property on nodes after all. If we create trainline A on layer A, and trainline B an layer B, but they have a common point, both lines will intersect and allow an interchange here. Alternatively, I could probably implement some logic preventing us to move from TL A to TL B in the dijkstra... but that seems dirty.
Poster
Owner

Another quick (and not quite as dirty hack) would be to add a no_exist_check argument to dijkstra_node_new via dijkstra_path_new_to_list and dijkstra_node_new_to_list that is se for train layers, which will then always append the new entry. This would allow for two distinct points on the same coord. Might cause headaches down the road though...

Another quick (and not quite as dirty hack) would be to add a `no_exist_check` argument to `dijkstra_node_new` via `dijkstra_path_new_to_list` and `dijkstra_node_new_to_list` that is se for train layers, which will then always append the new entry. This would allow for two distinct points on the same coord. Might cause headaches down the road though...
Poster
Owner

Or, even cheaper, never merge if new AND old are of time train. That's even better I think. And faster.

EDIT: Actually, no. We don't have this info where we need it (as we don't have point layers, only path layers.)

Or, even cheaper, never merge if new AND old are of time train. That's even better I think. And faster. EDIT: Actually, no. We don't have this info where we need it (as we don't have point layers, only path layers.)
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: markus/lifo-dijkstraserv#6
There is no content yet.