mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
added vehicle dependent time-window updater
This commit is contained in:
parent
453a69a76a
commit
a3afd00614
2 changed files with 4 additions and 7 deletions
|
|
@ -122,6 +122,8 @@ public class StateManager implements RouteAndActivityStateGetter, IterationStart
|
|||
|
||||
private VehicleRoutingProblem vrp;
|
||||
|
||||
int getMaxIndexOfVehicleTypeIdentifiers(){ return nuVehicleTypeKeys; }
|
||||
|
||||
public StateId createStateId(String name){
|
||||
if(createdStateIds.containsKey(name)) return createdStateIds.get(name);
|
||||
if(stateIndexCounter>=activity_states[0].length){
|
||||
|
|
|
|||
|
|
@ -36,13 +36,8 @@ public class UpdateVehicleDependentPracticalTimeWindows implements ReverseActivi
|
|||
this.transportCosts = tpCosts;
|
||||
this.fleetManager = fleetManager;
|
||||
this.vehicleSwitchAllowed=isVehicleSwitchAllowed;
|
||||
int maxVehicleTypeIndex = getMaxTypeIndex(fleetManager);
|
||||
latest_arrTimes_at_prevAct = new double[maxVehicleTypeIndex];
|
||||
location_of_prevAct = new String[maxVehicleTypeIndex];
|
||||
}
|
||||
|
||||
private int getMaxTypeIndex(VehicleFleetManager fleetManager) {
|
||||
return 0;
|
||||
latest_arrTimes_at_prevAct = new double[stateManager.getMaxIndexOfVehicleTypeIdentifiers() + 1];
|
||||
location_of_prevAct = new String[stateManager.getMaxIndexOfVehicleTypeIdentifiers() + 1];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue