Multi-configurations
On some vehicles, several compartment arrangements are possible.
- this is the case, for example, in the transport of live animals: some vehicles have lift floors that allow them to be organized on 2 or 3 floors, and therefore a variable number of compartments
- this is also the case in retail: with dual-temperature vehicles, there may or may not be a compartment for frozen products at the front of the vehicle.
To model this multi-configuration compartmentalization, it is necessary to:
Define vehicle types, the associated compartmentalization configuration and some additional configurations​
In this example, the vehicle can:
- have only one compartment of size 20, accepting only packaging
PACKAGING_1 - or have two compartments: one of size 5 accepting only
PACKAGING_2, the other of size 15 accepting onlyPACKAGING_1
"vehicleTypes": [
{
"id": "VEHTYPE_1",
"compartConfiguration": {
"accessMode": "FROM_THE_REAR_OF_THE_VEHICLE",
"compartments": [
{
"maximalSize": 20,
"restrictionAllowedPackagings": [
"PACKAGING_1"
]
}
]
},
"othersCompartConfigurations": [
{
"accessMode": "FROM_THE_REAR_OF_THE_VEHICLE",
"compartments": [
{
"maximalSize": 5,
"restrictionAllowedPackagings": [
"PACKAGING_2"
]
},
{
"maximalSize": 15,
"restrictionAllowedPackagings": [
"PACKAGING_1"
]
}
]
}
]
}
]
Associate vehicles with their type​
{
"id": "TRUCK_1",
"idVehicleType": "VEHTYPE_1",
"availablePeriods": [
{
"id": "PERIOD_1",
"timeWindow": {
"start": "2020-12-11T16:31:27.973+01:00",
"end": "2020-12-12T16:31:27.973+01:00"
}
}
]
}
The Solution​
On each route, the state of the compartmentalization at the different steps of sequencing is given by idCompartementsState.
The details of this state are described by truckCompartmentsStates.
The truckCompartmentsStates solution to this problem shows the use of the 2 compartments configuration.
Full Problem
{
"sites": [
{
"id": "SITE_1",
"coordinates": {
"latitude": 47.46257,
"longitude": -0.56151
}
},
{
"id": "DEPOT_1",
"coordinates": {
"latitude": 47.20586,
"longitude": -1.56435
},
"isDepot": true
}
],
"trucks": [
{
"id": "TRUCK_1",
"idVehicleType": "VEHTYPE_1",
"availablePeriods": [
{
"id": "PERIOD_1",
"timeWindow": {
"start": "2020-12-11T16:31:27.973+01:00",
"end": "2020-12-12T16:31:27.973+01:00"
}
}
]
}
],
"vehicleTypes": [
{
"id": "VEHTYPE_1",
"compartConfiguration": {
"accessMode": "FROM_THE_REAR_OF_THE_VEHICLE",
"compartments": [
{
"maximalSize": 20,
"restrictionAllowedPackagings": [
"PACKAGING_1"
]
}
]
},
"othersCompartConfigurations": [
{
"accessMode": "FROM_THE_REAR_OF_THE_VEHICLE",
"compartments": [
{
"maximalSize": 5,
"restrictionAllowedPackagings": [
"PACKAGING_2"
]
},
{
"maximalSize": 15,
"restrictionAllowedPackagings": [
"PACKAGING_1"
]
}
]
}
]
}
]
,
"products": [
{
"id": "PRODUCT_1",
"idPackagings": [
"PACKAGING_1"
]
}
,
{
"id": "PRODUCT_2",
"idPackagings": [
"PACKAGING_2"
]
}
],
"operations": [
{
"id": "OPERATION_1",
"type": "COLLECTION",
"idSiteOrigin": "SITE_1",
"volume": 1,
"idProduct": "PRODUCT_1"
}
,
{
"id": "OPERATION_2",
"type": "COLLECTION",
"idSiteOrigin": "SITE_1",
"volume": 1,
"idProduct": "PRODUCT_2"
}
]
}
Full Solution
{
"vehicleRoutes": [
{
"truck": "TRUCK_1",
"period": "PERIOD_1",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2020-12-11T15:31:27Z",
"end": "2020-12-11T15:31:27Z"
},
"site": "SITE_1"
},
{
"activity": "COLLECTION",
"timeWindow": {
"start": "2020-12-11T15:31:27Z",
"end": "2020-12-11T15:31:27Z"
},
"site": "SITE_1",
"fixedTimeSite": 0,
"volume": 2.0,
"operations": [
{
"id": "OPERATION_2"
},
{
"id": "OPERATION_1"
}
],
"idCompartementsState": "state_0"
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2020-12-11T15:31:27Z",
"end": "2020-12-11T16:32:45Z"
},
"departureSite": "SITE_1",
"arrivalSite": "DEPOT_1",
"distance": 89964,
"nominalDuration": 3678
},
{
"activity": "UNLOADING",
"timeWindow": {
"start": "2020-12-11T16:32:45Z",
"end": "2020-12-11T16:32:45Z"
},
"site": "DEPOT_1",
"fixedTimeSite": 0,
"volume": 2.0,
"operations": [
{
"id": "OPERATION_1"
},
{
"id": "OPERATION_2"
}
]
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2020-12-11T16:32:45Z",
"end": "2020-12-11T16:32:45Z"
},
"site": "DEPOT_1"
}
],
"truckCompartmentsStates": [
{
"id": "state_0",
"operationAssignments": [
{
"operation": {
"id": "OPERATION_2",
"idxSplit": 0
},
"compartAssignments": [
{
"indexCompartment": 0,
"assignedQuantity": 1.0
}
]
},
{
"operation": {
"id": "OPERATION_1",
"idxSplit": 0
},
"compartAssignments": [
{
"indexCompartment": 1,
"assignedQuantity": 1.0
}
]
}
],
"compartmentsCapacities": [
5.0,
15.0
]
}
]
}
]
}
],
"rejectOperations": [],
"modifiedData": []
}