mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
modify InfiniteVehicles according to changes in VehicleFleetManager
This commit is contained in:
parent
4761b30b16
commit
1d34374510
1 changed files with 10 additions and 6 deletions
|
|
@ -93,15 +93,19 @@ class InfiniteVehicles implements VehicleFleetManager{
|
|||
|
||||
@Override
|
||||
public Collection<Vehicle> getAvailableVehicles() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return types.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Vehicle> getAvailableVehicles(
|
||||
String withoutThisType, String locationId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
public Collection<Vehicle> getAvailableVehicles(String withoutThisType, String locationId) {
|
||||
Collection<Vehicle> vehicles = new ArrayList<Vehicle>();
|
||||
TypeKey thisKey = new TypeKey(withoutThisType,locationId);
|
||||
for(TypeKey key : types.keySet()){
|
||||
if(!key.equals(thisKey)){
|
||||
vehicles.add(types.get(key));
|
||||
}
|
||||
}
|
||||
return vehicles;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue