1
0
Fork 0
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:
oblonski 2013-06-21 11:23:48 +02:00
parent 4761b30b16
commit 1d34374510

View file

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