diff --git a/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/box/Jsprit.java b/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/box/Jsprit.java index 2fc20cf0..fce66c3d 100644 --- a/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/box/Jsprit.java +++ b/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/box/Jsprit.java @@ -638,15 +638,13 @@ public class Jsprit { if (!hasBreak) { //break defined and required but not assigned penalty if (route.getEnd().getArrTime() > route.getVehicle().getBreak().getTimeWindow().getEnd()) { - costs += maxCosts * 1 + route.getVehicle().getBreak().getServiceDuration() * route.getVehicle().getType().getVehicleCostParams().perServiceTimeUnit; - } else { -// costs -= maxCosts * 2; + costs += 4 * (maxCosts * 2 + route.getVehicle().getBreak().getServiceDuration() * route.getVehicle().getType().getVehicleCostParams().perServiceTimeUnit); } } } } for(Job j : solution.getUnassignedJobs()){ - costs += maxCosts * (4 - j.getPriority()); + costs += maxCosts * 2 * (4 - j.getPriority()); } return costs; }