diff --git a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManager.java b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManager.java index 6eeee1ae..ab709082 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManager.java @@ -21,14 +21,46 @@ import java.util.Collection; public interface VehicleFleetManager { + /** + * Locks vehicle. + * + *

This indicates that this vehicle is being used. Thus it is not in list of available vehicles. + * @param vehicle + */ public abstract void lock(Vehicle vehicle); + /** + * Unlocks vehicle. + * + *

This indicates that this vehicle is not being used anymore. Thus it is in list of available vehicles. + * @param vehicle + */ public abstract void unlock(Vehicle vehicle); + /** + * Returns true if locked. + * + * @param vehicle + * @return + */ public abstract boolean isLocked(Vehicle vehicle); + /** + * Unlocks all locked vehicles. + * + */ public abstract void unlockAll(); + /** + * Returns a collection of available vehicles. + * + *

Note that this does not return ALL available vehicles that were added to the fleetmanager. Vehicles are clustered according + * to {@link VehicleTypeKey}. If there are two unlocked vehicle with the same VehicleTypeKey then only one of them will be returned. + * This is to avoid returning too many vehicles that are basically equal. + *

Look at {@link VehicleTypeKey} to figure out whether two vehicles are equal or not. + * + * @return + */ public abstract Collection getAvailableVehicles(); /**