mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge branch 'departuretimes'
This commit is contained in:
commit
d4aa2d6cf1
2 changed files with 6 additions and 2 deletions
|
|
@ -303,7 +303,9 @@ final class ServiceInsertionOnRouteLevelCalculator implements JobInsertionCostsC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(best_insertion_index == InsertionData.NO_INDEX) return InsertionData.createEmptyInsertionData();
|
if(best_insertion_index == InsertionData.NO_INDEX) return InsertionData.createEmptyInsertionData();
|
||||||
return new InsertionData(best_insertion_costs, InsertionData.NO_INDEX, best_insertion_index, newVehicle, newDriver);
|
InsertionData insertionData = new InsertionData(best_insertion_costs, InsertionData.NO_INDEX, best_insertion_index, newVehicle, newDriver);
|
||||||
|
insertionData.setVehicleDepartureTime(start.getEndTime());
|
||||||
|
return insertionData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,9 @@ final class VehicleTypeDependentJobInsertionCalculator implements JobInsertionCo
|
||||||
relevantVehicles.addAll(fleetManager.getAvailableVehicles());
|
relevantVehicles.addAll(fleetManager.getAvailableVehicles());
|
||||||
}
|
}
|
||||||
for(Vehicle v : relevantVehicles){
|
for(Vehicle v : relevantVehicles){
|
||||||
double depTime = v.getEarliestDeparture();
|
double depTime;
|
||||||
|
if(v == selectedVehicle) depTime = currentRoute.getDepartureTime();
|
||||||
|
else depTime = v.getEarliestDeparture();
|
||||||
InsertionData iData = insertionCalculator.getInsertionData(currentRoute, jobToInsert, v, depTime, selectedDriver, bestKnownCost_);
|
InsertionData iData = insertionCalculator.getInsertionData(currentRoute, jobToInsert, v, depTime, selectedDriver, bestKnownCost_);
|
||||||
if(iData instanceof NoInsertionFound) {
|
if(iData instanceof NoInsertionFound) {
|
||||||
if(bestIData instanceof NoInsertionFound) bestIData = iData;
|
if(bestIData instanceof NoInsertionFound) bestIData = iData;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue