1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

fix adding end twice

This commit is contained in:
Stefan Schroeder 2014-11-06 10:28:57 +01:00
parent b2bbec1103
commit b9c15a20fc

View file

@ -56,7 +56,7 @@ class RouteLevelActivityInsertionCostsEstimator implements ActivityInsertionCost
int actIndex; int actIndex;
if(prevAct instanceof Start) actIndex = 0; if(prevAct instanceof Start) actIndex = 0;
else actIndex = iFacts.getRoute().getTourActivities().getActivities().indexOf(nextAct); else actIndex = iFacts.getRoute().getTourActivities().getActivities().indexOf(nextAct);
if(nuOfActivities2LookForward > 0){ path.addAll(getForwardLookingPath(iFacts.getRoute(),actIndex)); } if(nuOfActivities2LookForward > 0 && !(nextAct instanceof End)){ path.addAll(getForwardLookingPath(iFacts.getRoute(),actIndex)); }
/* /*
* calculates the path costs with new vehicle, c(forwardPath,newVehicle). * calculates the path costs with new vehicle, c(forwardPath,newVehicle).