IVR Vehicle Cost ClassVehicle Cost Class
Overview
Vehicle Cost Classes are used to model how vehicles should be priced by the scheduler. This includes two primary components: a fixed cost for using a vehicle belonging to a specified class and a marginal cost related to the cumulative dimension quantities for a vehicle.
The fixed cost of a vehicle is incurred if the vehicle performs any task other than the shift tasks on the vehicle. The cost per unit of dimension assigned to a vehicle is determined by the attributes assigned to a cost class.
Applicable models
- IVR7
ivr7-kt461v8eoaif
- IVR8
ivr8-yni1c9k2swof
Vehicle Cost Class
The high level vehicle cost class definition provides a mechanism to differentiate how different vehicles are priced in a model. It would be typical that larger, more expensive vehicles would be more expensive to operate on a cost per km or cost per hour basis. This portion of the model provides an interface to describe a cost equation which should be minimised by the solver.
Schema definition
message VehicleCostClass {
required string id = 1;
required float fixedCost = 2;
repeated Attribute attributes = 3;
}
Fields
- id
- The unique identifier for a vehicle cost class. If vehicle cost class id’s are duplicated in the model, the payload is rejected.
- fixedCost
- The cost that should be incurred for the use of the vehicle. The use of the vehicle is considered true if there is at least one task being performed from the set of jobs specified in the model.
- attributes
- The set of attributes that determine the marginal cost of a vehicle with respect to the defined dimensions in a particular model.
Examples
This example demonstrates a typical cost equation which attempts to trade off the cost of time against the travel distance. A fixed cost of 1000 monetary units is incurred if the vehicle is used to perform any task. The time dimension is measured in minutes and costed at 0.01 units per minute of location quantity, task quantity and transit quantity. The slackCostCoef
is higher at 1.0 monetary unit per minute, which indicates that earliness is expensive in the model, which will encourage routes which attempt to keep the vehicle busy with other activities to avoid being early for a visit. The distance dimension is specified in km’s and the travel distance between locations is costed at 3 monetary units per km. This creates a large incentive to minimise the distance travelled by the vehicle.
id: "vcc1"
fixedCost: 1000
attributes {
dimensionId: "time"
transitCostCoef: 0.01
taskCostCoef: 0.01
locationCostCoef: 0.01
slackCostCoef: 1
}
attributes {
dimensionId: "distance"
transitCostCoef: 3
}
Vehicle Cost Class Attribute
Schema definition
message Attribute {
required string dimensionId = 1;
optional float transitCostCoef = 2;
optional float taskCostCoef = 3;
optional float locationCostCoef = 4;
optional float slackCostCoef = 5;
optional float tardyCostCoef = 6;
}
Fields
- dimensionId
- The dimension to which this cost class attribute should be applied.
- transitCostCoef
- The cost coefficient (or multiplier) which prices a unit of the dimension for transit transactions. Transit’s refer to the movement between locations. In the context of time this would be the travel duration between locations. In the context of distance, this would be the travel distance between locations. A coefficient of zero results in no cost per unit incurred (and is the default if not specified). Coefficients may be fractional but please observe the units of precision provided.
- taskCostCoef
- The cost coefficient (or multiplier) which prices a unit of quantity performed by a vehicle belonging to this cost class related to task attributes.
- locationCostCoef
- The cost coefficient (or multiplier) which prices a unit of quantity performed by a vehicle belonging to this cost class related to location attributes.
- slackCostCoef
- The cost coefficient (or multiplier) which prices a unit of slack performed by a vehicle belonging to this cost class required to feasibly meet a window start. Slack (if permissible) is typically costed at a higher rate than transit, task and location cost coefficients.
- tardyCostCoef
- The cost coefficient (or multiplier) which prices a unit of tardiness performed by a vehicle belonging to this cost class required to feasibly adjust a window end. Tardiness (if permissible) is typically costed at a higher rate than transit, task and location cost coefficients.
Examples
This example illustrates a configuration where the time and distance dimensions are both costed for each vehicle movement. Since no distance is incurred (in this hypothetical model configuration) it is not required to provide values for the taskCostCoef
and locationCostCoef
as all values on the distance
dimension are zero (the distance does not change while we move within the same location). In addition, no slack or tardiness is typically permitted on a distance
dimension so it is also not required to provide values for the slackCostCoef
and tardyCostCoef
. The distance
dimension is thus simply costed at 0.5 units per km.
In the case of the time
dimension (measured in minutes in this example), however, we do have earliness which we wish to cost slightly higher than time incurred moving between locations. Travel time is costed at 0.025 units per minute and the slack (early arrival at a time window) is priced at 0.04 units per minute. Tardiness is permitted in this particular model and is priced significantly higher than normal travel time or earliness. This indicates that if lateness is required in order for a model to be feasible (i.e. perform all tasks within their constraints) then lateness will be incurred. However, the incurred lateness will add a cost to the overall solution. In the instances where the lateness can be avoided while keeping the schedule feasible, this will be done by the solver.
attributes {
dimensionId: "time"
transitCostCoef: 0.025
slackCostCoef: 0.04
tardyCostCoef: 0.85
}
attributes {
dimensionId: "distance"
transitCostCoef: 0.5
}