mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
replace (incorrect) iFacts.getNewRouteDepTime() with prevActDepTime
This commit is contained in:
parent
3579dca52d
commit
3c1e8bc9d1
1 changed files with 2 additions and 2 deletions
|
|
@ -78,8 +78,8 @@ public class MaxDistanceConstraint implements HardActivityConstraint {
|
|||
double maxDistance = getMaxDistance(iFacts.getNewVehicle());
|
||||
if (currentDistance > maxDistance) return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
||||
|
||||
double distancePrevAct2NewAct = distanceCalculator.getDistance(prevAct.getLocation(), newAct.getLocation(), iFacts.getNewDepTime(), iFacts.getNewVehicle());
|
||||
double distanceNewAct2nextAct = distanceCalculator.getDistance(newAct.getLocation(), nextAct.getLocation(), iFacts.getNewDepTime(), iFacts.getNewVehicle());
|
||||
double distancePrevAct2NewAct = distanceCalculator.getDistance(prevAct.getLocation(), newAct.getLocation(), prevActDepTime, iFacts.getNewVehicle());
|
||||
double distanceNewAct2nextAct = distanceCalculator.getDistance(newAct.getLocation(), nextAct.getLocation(), prevActDepTime, iFacts.getNewVehicle());
|
||||
double distancePrevAct2NextAct = distanceCalculator.getDistance(prevAct.getLocation(), nextAct.getLocation(), prevActDepTime, iFacts.getNewVehicle());
|
||||
if (prevAct instanceof Start && nextAct instanceof End) distancePrevAct2NextAct = 0;
|
||||
if (nextAct instanceof End && !iFacts.getNewVehicle().isReturnToDepot()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue