NDD VehicleVehicle
Overview
Vehicles represent the active resources in an NDD model. Unlike the standard IVR7 model where a vehicle has a single shift, the NDD model requires a vector of shifts defining the vehicle’s working hours for each day in the planning period. This allows the model to account for different start times, end times, or depot locations on different days.
Applicable models
- NDD
ndd-cmibu6krtqja
Vehicle
Schema definition
message Vehicle {
required string id = 1;
required string classId = 2;
required string costClassId = 3;
repeated Shift shift = 4;
repeated Capacity capacities = 5;
repeated string transitRuleIds = 6;
}Fields
- id
- A unique identifier for this vehicle.
- classId
- The identifier of the vehicle class to which this vehicle belongs.
- costClassId
- The identifier of the vehicle cost class which defines the cost structure for this vehicle.
- shift
- A vector of shifts defining the vehicle’s working hours for each day in the planning period. This is the key difference from the standard IVR7 model. The number of shifts should typically correspond to the
periodLengthin the dimension configuration. - capacities
- A list of capacity constraints for this vehicle on each capacitated dimension.
- transitRuleIds
- A list of transit rule identifiers that apply to this vehicle, in addition to any transit rules specified on the vehicle class.
Examples
A vehicle with a 5-day shift pattern, each day starting and ending at the same depot:
id: "truck-01"
classId: "standard-class"
costClassId: "standard-cost"
shift {
shiftStart {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 480 } }
}
shiftEnd {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 1020 } }
}
}
shift {
shiftStart {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 480 } }
}
shiftEnd {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 1020 } }
}
}
shift {
shiftStart {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 480 } }
}
shiftEnd {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 1020 } }
}
}
shift {
shiftStart {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 480 } }
}
shiftEnd {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 1020 } }
}
}
shift {
shiftStart {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 480 } }
}
shiftEnd {
locationId: "depot"
attributes { dimensionId: "time" windows { start: 480 end: 1020 } }
}
}
capacities { dimensionId: "weight" capacity: 1000 }Notes
- Each shift defines the working hours for one day. A vehicle with fewer shifts than the
periodLengthwill not be available on days without a defined shift. - Different shifts may have different start/end locations, allowing for scenarios where a vehicle operates from different depots on different days.
Vehicle Shift
A shift defines the start and optional end conditions for a vehicle on a single day.
Schema definition
message Shift {
required Task shiftStart = 1;
optional Task shiftEnd = 2;
}Fields
- shiftStart
- A vehicle task defining the start location and dimensional attributes (e.g. time windows) for this shift.
- shiftEnd
- An optional vehicle task defining the end location and dimensional attributes for this shift. If omitted, the vehicle is not required to return to a depot.
Vehicle Task
A vehicle task defines the location and dimensional properties for a vehicle shift start or end.
Schema definition
message Task {
required string locationId = 1;
repeated Attribute attributes = 2;
}Fields
- locationId
- The location at which the shift starts or ends.
- attributes
- A list of vehicle task attributes defining dimensional properties for this shift boundary.
Vehicle Task Attribute
Schema definition
message Attribute {
required string dimensionId = 1;
optional float quantity = 2;
repeated Window windows = 3;
}Fields
- dimensionId
- The dimension to which this attribute applies.
- quantity
- A quantity on the specified dimension incurred at this shift boundary.
- windows
- A list of windows defining feasible intervals on the specified dimension. For a shift start, this typically constrains the earliest and latest departure time. For a shift end, this constrains the latest return time.
Vehicle Capacity
A vehicle capacity defines the maximum allowable quantity on a capacitated dimension.
Schema definition
message Capacity {
required string dimensionId = 1;
required float capacity = 2;
}Fields
- dimensionId
- The capacitated dimension to which this capacity applies.
- capacity
- The maximum allowable cumulative quantity on this dimension. For example, a vehicle with a weight capacity of 1000 kg.
Examples
dimensionId: "weight"
capacity: 1000