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

align default cost func

This commit is contained in:
oblonski 2016-05-25 10:05:14 +02:00
parent af2e9b0a32
commit d241647f34

View file

@ -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;
}