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:
parent
af2e9b0a32
commit
d241647f34
1 changed files with 2 additions and 4 deletions
|
|
@ -638,15 +638,13 @@ public class Jsprit {
|
||||||
if (!hasBreak) {
|
if (!hasBreak) {
|
||||||
//break defined and required but not assigned penalty
|
//break defined and required but not assigned penalty
|
||||||
if (route.getEnd().getArrTime() > route.getVehicle().getBreak().getTimeWindow().getEnd()) {
|
if (route.getEnd().getArrTime() > route.getVehicle().getBreak().getTimeWindow().getEnd()) {
|
||||||
costs += maxCosts * 1 + route.getVehicle().getBreak().getServiceDuration() * route.getVehicle().getType().getVehicleCostParams().perServiceTimeUnit;
|
costs += 4 * (maxCosts * 2 + route.getVehicle().getBreak().getServiceDuration() * route.getVehicle().getType().getVehicleCostParams().perServiceTimeUnit);
|
||||||
} else {
|
|
||||||
// costs -= maxCosts * 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(Job j : solution.getUnassignedJobs()){
|
for(Job j : solution.getUnassignedJobs()){
|
||||||
costs += maxCosts * (4 - j.getPriority());
|
costs += maxCosts * 2 * (4 - j.getPriority());
|
||||||
}
|
}
|
||||||
return costs;
|
return costs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue