Interface VehicleRoutingActivityCosts
- All Known Implementing Classes:
WaitingTimeCosts
public interface VehicleRoutingActivityCosts
Interface for overall routing and operation costs.
This calculates activity and leg-based costs. If you want to consider for example costs incurred by missed time-windows, you can do it here.
- Author:
- schroeder
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic class -
Method Summary
Modifier and TypeMethodDescriptiondoublegetActivityCost(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) Calculates and returns the activity cost at tourAct.doublegetActivityDuration(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) default doublegetActivityDuration(TourActivity prevAct, TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) Calculates and returns the activity duration considering the previous activity.
-
Method Details
-
getActivityCost
Calculates and returns the activity cost at tourAct.Here waiting-times, service-times and missed time-windows can be considered.
- Parameters:
tourAct-arrivalTime- is actually the arrival time at this tourActivity, which must not nessecarrily be the operation start time. If the theoretical earliest operation start time at this activity is later than actualStartTime, the driver must wait at this activity.driver-vehicle- if earliestStartTime > latestStartTime activity operations cannot be conducted within the given time-window.- Returns:
-
getActivityDuration
double getActivityDuration(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) -
getActivityDuration
default double getActivityDuration(TourActivity prevAct, TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) Calculates and returns the activity duration considering the previous activity.This method allows for context-dependent duration calculation, such as setup time that only applies when the location changes from the previous activity.
- Parameters:
prevAct- the previous activity in the route (null if this is the first activity after start)tourAct- the activity for which to calculate durationarrivalTime- the arrival time at this activitydriver- the drivervehicle- the vehicle- Returns:
- the duration of this activity in time units
-