fix(dijkstra): filter invalid arcs during reconstruction

This commit is contained in:
Paul Alnet 2024-05-03 13:58:13 +02:00
parent 5363dd1a89
commit 224ab4a97d

View file

@ -110,7 +110,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
// current node and add it to the path
if (parent_label != null) {
for (Arc arc : parent_label.getNode().getSuccessors()) {
if (arc.getDestination().getId() == current_label.getNode().getId()) {
if (arc.getDestination().getId() == current_label.getNode().getId() && data.isAllowed(arc)) {
arcs_path.add(arc);
break;
}