From 4dc51c7a4230d85caf0c49f4d293c608cf9bb0cb Mon Sep 17 00:00:00 2001 From: oblonski <4sschroeder@gmail.com> Date: Mon, 21 Oct 2013 08:11:27 +0200 Subject: [PATCH] bugfix: old activityCosts are evaluated with newVehicle -> set it to oldVehicle instead --- .../java/algorithms/LocalActivityInsertionCostsCalculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsprit-core/src/main/java/algorithms/LocalActivityInsertionCostsCalculator.java b/jsprit-core/src/main/java/algorithms/LocalActivityInsertionCostsCalculator.java index f845fd33..d96455d1 100644 --- a/jsprit-core/src/main/java/algorithms/LocalActivityInsertionCostsCalculator.java +++ b/jsprit-core/src/main/java/algorithms/LocalActivityInsertionCostsCalculator.java @@ -71,7 +71,7 @@ class LocalActivityInsertionCostsCalculator implements ActivityInsertionCostsCal } else{ double tp_costs_prevAct_nextAct = routingCosts.getTransportCost(prevAct.getLocationId(), nextAct.getLocationId(), prevAct.getEndTime(), iFacts.getRoute().getDriver(), iFacts.getRoute().getVehicle()); - double arrTime_nextAct = routingCosts.getTransportTime(prevAct.getLocationId(), nextAct.getLocationId(), prevAct.getEndTime(), iFacts.getNewDriver(), iFacts.getNewVehicle()); + double arrTime_nextAct = routingCosts.getTransportTime(prevAct.getLocationId(), nextAct.getLocationId(), prevAct.getEndTime(), iFacts.getRoute().getDriver(), iFacts.getRoute().getVehicle()); double actCost_nextAct = activityCosts.getActivityCost(nextAct, arrTime_nextAct, iFacts.getRoute().getDriver(), iFacts.getRoute().getVehicle()); oldCosts = tp_costs_prevAct_nextAct + actCost_nextAct;