conflict fix
This commit is contained in:
parent
2ec3d4200f
commit
add3470b71
1 changed files with 2 additions and 1 deletions
|
@ -73,6 +73,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
// This loop serves to get the length of the arc as
|
||||
// we know its origin and destination
|
||||
for (Arc arc : x.getNode().getSuccessors()) {
|
||||
|
||||
if (successor.getNode().equals(arc.getDestination())) {
|
||||
// data.getcost(arc) returns a cost considering the mode chosen:
|
||||
// TIME or LENGTH
|
||||
|
@ -82,7 +83,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
}
|
||||
|
||||
final float possible_path_cost = x.getCost() + arc_cost;
|
||||
if (successor.getCost() >= possible_path_cost) {
|
||||
if (successor.getCost() > possible_path_cost) {
|
||||
// Mise à jour du label
|
||||
successor.setPathCost(possible_path_cost);
|
||||
successor.setParentNode(x.getNode());
|
||||
|
|
Loading…
Reference in a new issue