forked from lebotlan/BE-Graphes
Update Dijkstra - verifiy if infeasible
This commit is contained in:
parent
07029f751d
commit
3df94a9cec
1 changed files with 5 additions and 0 deletions
|
|
@ -73,6 +73,11 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Destination has no predecessor, the solution is infeasible...
|
||||
if (destinationNodeLabel.getPere() == null) {
|
||||
return new ShortestPathSolution(data, Status.INFEASIBLE);
|
||||
}
|
||||
|
||||
notifyDestinationReached(data.getDestination());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue