amélioration de l'algo en lien avec le problème ouvert
This commit is contained in:
parent
8de2ae972b
commit
42cc651834
2 changed files with 5 additions and 5 deletions
|
|
@ -47,8 +47,8 @@ public class Marathon extends ShortestPathAlgorithm {
|
|||
Node dest = dataInput.getOrigin().getSuccessors().get(0).getDestination() ;
|
||||
|
||||
Label xl = tas.findMin();
|
||||
boolean possible = True ;
|
||||
boolean fini = False ;
|
||||
boolean possible = true ;
|
||||
boolean fini = false ;
|
||||
|
||||
// iterations
|
||||
while (!tas.isEmpty() && fini && possible) {
|
||||
|
|
@ -56,7 +56,7 @@ public class Marathon extends ShortestPathAlgorithm {
|
|||
Node x = xl.getSommetCourant();
|
||||
notifyNodeMarked(x);
|
||||
xl.marque = true;
|
||||
possible = False ;
|
||||
possible = false ;
|
||||
for (Arc a : x.getSuccessors()) {
|
||||
if (dataInput.isAllowed(a)) {
|
||||
Node n = a.getDestination();
|
||||
|
|
@ -64,8 +64,8 @@ public class Marathon extends ShortestPathAlgorithm {
|
|||
listLabel[n.getId()] = newLabelMarathon(n);
|
||||
}
|
||||
if (!listLabel[n.getId()].getMarque()) {
|
||||
possible = True ;
|
||||
listLabel[n.getId()].update(x,x.getCost());
|
||||
possible = true ;
|
||||
listLabel[n.getId()].update(a, listLabel[x.getId()].getCost() + dataInput.getCost(a));
|
||||
|
||||
if ((!n.equals(dest)) && (listLabel[n.getId()].getCost()) < 43){
|
||||
tas.insert(listLabel[n.getId()]) ;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue