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:
parent
b2bbec1103
commit
b9c15a20fc
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ class RouteLevelActivityInsertionCostsEstimator implements ActivityInsertionCost
|
|||
int actIndex;
|
||||
if(prevAct instanceof Start) actIndex = 0;
|
||||
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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue