Product incompatibilities
Product incompatibilities can be used to define transportation constraints between products. These constraints prevent specific products from being transported together under certain conditions.
This section describes the different incompatibility levels, scopes, and configuration options available to model real-world transportation restrictions.
Defining Product Incompatibilities​
A product incompatibility defines which products cannot coexist within a given transportation context.
Use Cases and Examples​
For clarity, each example is presented independently. In practice, all incompatibility rules can be combined.
Use Case 1: Basic Incompatibility​
In this basic scenario, products P1 and P2 cannot be transported on the same route. They remain compatible as long as they are assigned to different routes.
The following properties are required:
id: Unique identifier of the incompatibility rule. This identifier is particularly useful when the rule is associated with specific vehicles.productSetA: Set of product IDs. Each product in this set is incompatible with every product inproductSetBproductSetB: Set of product IDs. Each product in this set is incompatible with every product inproductSetAapplyOnAllTrucks: Indicates whether the rule applies to all vehicles. Default value: true.
The incompatibility is defined as follows:
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"level": "FULL_VEHICLE",
"applyOnAllTrucks": true
}
]
As a result, the solver generates two separate routes, one for each incompatible product.
Use Case 2: Compartment-Level Incompatibility​
In this scenario, products P1 and P2 are incompatible only when transported in the same compartment of a vehicle. They remain compatible if they are loaded into different compartments.
To ensure this limitation, the following property needs to be set up with the non-default value:
level: Defines the level at which the incompatibility rule is evaluated.FULL_VEHICLE(Default value): Products cannot coexist anywhere within the vehicle.EACH_COMPARTMENT: Products cannot coexist within the same compartment but may be transported in different compartments of the same vehicle.
- Incompatibilities within compartments (i.e.,
level = EACH_COMPARTMENT) are only applicable to a single compartmentalization configuration (see the definition of the vehicle type associated with the truck). - A compartmentalized vehicle does not consider incompatibilities at the
FULL_VEHICLElevel.
We define this incompatibility as follows:
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"level": "EACH_COMPARTMENT"
}
]
Use Case 3: Sequence-Based Incompatibility​
In some cases, the loading or delivery sequence matters.
For example:
- P1 -> P2 is forbidden.
- P2 -> P1 is allowed.
The following property is used:
order: Defines whether the incompatibility depends on the sequence of operations.A_AND_B(Default value): Products from sets A and B cannot coexist, regardless of their order.A_BEFORE_B: Operations involving products from set A cannot occur before operations involving products from set B (A before B is forbidden).
The value A_BEFORE_B is only taken into account at the vehicle level, i.e., level = FULL_VEHICLE.
We define this incompatibility as follows:
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"order": "A_BEFORE_B"
}
]
In this case, a single route can be generated. Without the sequence-aware rule, the problem would require two separate routes.
Use Case 4: Scope-Based Incompatibility​
So far, incompatibility rules have been evaluated at the route level. However, they can also be applied over a broader operational scope.
The following property is used:
scope: Defines where the incompatibility constraint applies.ROUTE(default value),AVAILABILITY_PERIODVEHICLE
Consider the previous example with the following incompatibility definition:
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"scope": "AVAILABILITY_PERIOD"
}
]
Since the vehicle has only one availability period, it is no longer possible to split the products across multiple routes. As a result, some operations remain unscheduled.
The outcome would be identical with the VEHICLE scope because the example contains only one vehicle.
Use Case 5: Consecutive Route Constraints​
The numberOfConsecutiveRoutes property extends incompatibility rules across multiple consecutive routes.
This property is relevant only when the scope is broader than ROUTE.
Example configuration:
"productsIncompatibilities": [
{
"id": "A_B",
"productSetA": [
"A"
],
"productSetB": [
"B"
],
"order": "A_AND_B",
"scope": "AVAILABILITY_PERIOD",
"level": "FULL_VEHICLE",
"applyOnAllTrucks": true,
"numberOfConsecutiveRoutes": 2
}
]
In this example, which evaluates two pre-existing routes, the solution contains constraint violations:
"violationConstraints": [
{
"code": "DEP0076",
"messageViolation": "Incompatibility between operations [{0}] and [{1}] on different routes.",
"components": [
{
"type": "OPERATION",
"id": "OPERATION_01",
"idxSplit": 0
},
{
"type": "OPERATION",
"id": "OPERATION_02",
"idxSplit": 0
}
]
}
]
To take into account the products transported during the previous routes of the truck, not transmitted in the problem, see ongoing products.
Vehicle-Specific Product Incompatibilities​
Some incompatibility rules may apply only to specific vehicles.
To support this use case, each truck definition can include an extraProductsIncompatibilities property.
Use Case 6: Additional Vehicle-Specific Incompatibilities​
Truck definition:
"trucks": [
{
"id": "VEHICLE_01",
"availablePeriods": [
{
"id": "PERIOD_01",
"timeWindow": {
"start": "2022-11-01T06:00:00.000+01:00",
"end": "2022-11-01T23:00:00.000+01:00"
},
"departureSite": "SINARI",
"arrivalSite": "SINARI"
}
],
"extraProductsIncompatibilities": [
"A_B"
]
}
]
Associated incompatibility definitions:
"productsIncompatibilities": [
{
"id": "A_B",
"productSetA": [
"A"
],
"productSetB": [
"B"
],
"order": "A_AND_B",
"scope": "AVAILABILITY_PERIOD",
"level": "FULL_VEHICLE",
"numberOfConsecutiveRoutes": 2
}
]
If an incompatibility rule ICP1 applies to all vehicles and a vehicle also references an additional incompatibility rule ICP2, then both rules are applied. The effective set of constraints is the union of ICP1 and ICP2.
Complete Problems and Associated Solutions​
Use Case 1 - Basic Incompatibility
Problem
{
"sites": [
{
"id": "ANGERS",
"coordinates": {
"longitude": -0.557099,
"latitude": 47.460074
}
},
{
"id": "PARIS",
"coordinates": {
"longitude": 2.339808,
"latitude": 48.858750
}
},
{
"id": "LE_MANS",
"coordinates": {
"longitude": 0.202893,
"latitude": 48.001559
}
},
{
"id": "NANTES",
"coordinates": {
"longitude": -1.546178,
"latitude": 47.215557
},
"isDepot": true
}
],
"trucks": [
{
"id": "VEH_V1",
"availablePeriods": [
{
"id": "PERIOD_TW1",
"timeWindow": {
"start": "2024-05-01T06:30:00.000+02:00",
"end": "2024-05-04T22:01:00.000+02:00"
}
}
]
}
],
"operations": [
{
"id": "OPERATION_1",
"type": "DELIVERY",
"idSiteDestination": "PARIS",
"idProduct": "PROD_P1",
"volume": 5500
},
{
"id": "OPERATION_2",
"type": "DELIVERY",
"idSiteDestination": "LE_MANS",
"idProduct": "PROD_P2",
"volume": 3000
},
{
"id": "OPERATION_3",
"type": "DELIVERY",
"idSiteDestination": "ANGERS",
"idProduct": "PROD_P3",
"volume": 2000
}
],
"routeProfile": {
"calculationParameters": [
{
"code": "pg1241",
"value": 2
}
]
},
"products": [
{
"id": "PROD_P1"
},
{
"id": "PROD_P2"
},
{
"id": "PROD_P3"
}
],
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"level": "FULL_VEHICLE",
"applyOnAllTrucks": true
}
]
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEH_V1",
"period": "PERIOD_TW1",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES",
"fixedTimeSite": 0,
"volume": 5000.0,
"operations": [
{
"id": "OPERATION_2"
},
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T05:28:37Z"
},
"departureSite": "NANTES",
"arrivalSite": "ANGERS",
"distance": 88701,
"nominalDuration": 3517
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T05:28:37Z"
},
"site": "ANGERS",
"fixedTimeSite": 0,
"volume": 2000.0,
"operations": [
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T06:30:26Z"
},
"departureSite": "ANGERS",
"arrivalSite": "LE_MANS",
"distance": 98146,
"nominalDuration": 3709
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T06:30:26Z"
},
"site": "LE_MANS",
"fixedTimeSite": 0,
"volume": 3000.0,
"operations": [
{
"id": "OPERATION_2"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T08:21:59Z"
},
"departureSite": "LE_MANS",
"arrivalSite": "NANTES",
"distance": 184660,
"nominalDuration": 6693
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2024-05-01T08:21:59Z",
"end": "2024-05-01T08:21:59Z"
},
"site": "NANTES"
}
]
},
{
"id": "NewRoute_1_2",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2024-05-01T08:22:59Z",
"end": "2024-05-01T08:22:59Z"
},
"site": "NANTES"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2024-05-01T08:22:59Z",
"end": "2024-05-01T08:22:59Z"
},
"site": "NANTES",
"fixedTimeSite": 0,
"volume": 5500.0,
"operations": [
{
"id": "OPERATION_1"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T08:22:59Z",
"end": "2024-05-01T11:56:26Z"
},
"departureSite": "NANTES",
"arrivalSite": "PARIS",
"distance": 381180,
"nominalDuration": 12807
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T11:56:26Z",
"end": "2024-05-01T11:56:26Z"
},
"site": "PARIS",
"fixedTimeSite": 0,
"volume": 5500.0,
"operations": [
{
"id": "OPERATION_1"
}
]
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2024-05-01T11:56:26Z",
"end": "2024-05-01T11:56:26Z"
},
"site": "PARIS"
}
]
}
]
}
],
"rejectOperations": [],
"modifiedData": []
}
Use Case 2 - Compartment-Level Incompatibility
Problem
{
"sites": [
{
"id": "ANGERS",
"coordinates": {
"longitude": -0.557099,
"latitude": 47.460074
}
},
{
"id": "PARIS",
"coordinates": {
"longitude": 2.339808,
"latitude": 48.858750
}
},
{
"id": "LE_MANS",
"coordinates": {
"longitude": 0.202893,
"latitude": 48.001559
}
},
{
"id": "NANTES",
"coordinates": {
"longitude": -1.546178,
"latitude": 47.215557
},
"isDepot": true
}
],
"trucks": [
{
"id": "VEH_V1",
"availablePeriods": [
{
"id": "PERIOD_TW1",
"timeWindow": {
"start": "2024-05-01T06:30:00.000+02:00",
"end": "2024-05-04T22:01:00.000+02:00"
}
}
],
"idVehicleType": "VEH_TYPE"
}
],
"vehicleTypes": [
{
"id": "VEH_TYPE",
"compartConfiguration": {
"accessMode": "FROM_THE_REAR_OF_THE_VEHICLE",
"compartments": [
{
"maximalSize": 10000
},
{
"maximalSize": 5000
}
]
}
}
],
"operations": [
{
"id": "OPERATION_1",
"type": "DELIVERY",
"idSiteDestination": "PARIS",
"idProduct": "PROD_P1",
"volume": 5500
},
{
"id": "OPERATION_2",
"type": "DELIVERY",
"idSiteDestination": "LE_MANS",
"idProduct": "PROD_P2",
"volume": 3000
},
{
"id": "OPERATION_3",
"type": "DELIVERY",
"idSiteDestination": "ANGERS",
"idProduct": "PROD_P3",
"volume": 2000
}
],
"routeProfile": {
"calculationParameters": [
{
"code": "pg1241",
"value": 2
}
]
},
"products": [
{
"id": "PROD_P1"
},
{
"id": "PROD_P2"
},
{
"id": "PROD_P3"
}
],
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"level": "EACH_COMPARTMENT"
}
]
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEH_V1",
"period": "PERIOD_TW1",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES",
"fixedTimeSite": 0,
"volume": 10500.0,
"operations": [
{
"id": "OPERATION_1"
},
{
"id": "OPERATION_2"
},
{
"id": "OPERATION_3"
}
],
"idCompartementsState": "state_0"
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T05:28:37Z"
},
"departureSite": "NANTES",
"arrivalSite": "ANGERS",
"distance": 88701,
"nominalDuration": 3517
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T05:28:37Z"
},
"site": "ANGERS",
"fixedTimeSite": 0,
"volume": 2000.0,
"operations": [
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T06:30:26Z"
},
"departureSite": "ANGERS",
"arrivalSite": "LE_MANS",
"distance": 98146,
"nominalDuration": 3709
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T06:30:26Z"
},
"site": "LE_MANS",
"fixedTimeSite": 0,
"volume": 3000.0,
"operations": [
{
"id": "OPERATION_2"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T08:32:59Z"
},
"departureSite": "LE_MANS",
"arrivalSite": "PARIS",
"distance": 207815,
"nominalDuration": 7353
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T08:32:59Z",
"end": "2024-05-01T08:32:59Z"
},
"site": "PARIS",
"fixedTimeSite": 0,
"volume": 5500.0,
"operations": [
{
"id": "OPERATION_1"
}
]
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2024-05-01T08:32:59Z",
"end": "2024-05-01T08:32:59Z"
},
"site": "PARIS"
}
],
"truckCompartmentsStates": [
{
"id": "state_0",
"operationAssignments": [
{
"operation": {
"id": "OPERATION_1",
"idxSplit": 0
},
"compartAssignments": [
{
"indexCompartment": 0,
"assignedQuantity": 5500.0
}
]
},
{
"operation": {
"id": "OPERATION_2",
"idxSplit": 0
},
"compartAssignments": [
{
"indexCompartment": 1,
"assignedQuantity": 3000.0
}
]
},
{
"operation": {
"id": "OPERATION_3",
"idxSplit": 0
},
"compartAssignments": [
{
"indexCompartment": 1,
"assignedQuantity": 2000.0
}
]
}
],
"compartmentsCapacities": [
10000.0,
5000.0
]
}
]
}
]
}
],
"rejectOperations": [],
"modifiedData": []
}
Use Case 3 - Sequence-Based Incompatibility
Problem
{
"sites": [
{
"id": "ANGERS",
"coordinates": {
"longitude": -0.557099,
"latitude": 47.460074
}
},
{
"id": "PARIS",
"coordinates": {
"longitude": 2.339808,
"latitude": 48.858750
}
},
{
"id": "LE_MANS",
"coordinates": {
"longitude": 0.202893,
"latitude": 48.001559
}
},
{
"id": "NANTES",
"coordinates": {
"longitude": -1.546178,
"latitude": 47.215557
},
"isDepot": true
}
],
"trucks": [
{
"id": "VEH_V1",
"availablePeriods": [
{
"id": "PERIOD_TW1",
"timeWindow": {
"start": "2024-05-01T06:30:00.000+02:00",
"end": "2024-05-04T22:01:00.000+02:00"
}
}
]
}
],
"operations": [
{
"id": "OPERATION_1",
"type": "DELIVERY",
"idSiteDestination": "PARIS",
"idProduct": "PROD_P1",
"volume": 5500
},
{
"id": "OPERATION_2",
"type": "DELIVERY",
"idSiteDestination": "LE_MANS",
"idProduct": "PROD_P2",
"volume": 3000
},
{
"id": "OPERATION_3",
"type": "DELIVERY",
"idSiteDestination": "ANGERS",
"idProduct": "PROD_P3",
"volume": 2000
}
],
"routeProfile": {
"calculationParameters": [
{
"code": "pg1241",
"value": 2
}
]
},
"products": [
{
"id": "PROD_P1"
},
{
"id": "PROD_P2"
},
{
"id": "PROD_P3"
}
],
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"order": "A_BEFORE_B"
}
]
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEH_V1",
"period": "PERIOD_TW1",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES",
"fixedTimeSite": 0,
"volume": 10500.0,
"operations": [
{
"id": "OPERATION_1"
},
{
"id": "OPERATION_2"
},
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T05:28:37Z"
},
"departureSite": "NANTES",
"arrivalSite": "ANGERS",
"distance": 88701,
"nominalDuration": 3517
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T05:28:37Z"
},
"site": "ANGERS",
"fixedTimeSite": 0,
"volume": 2000.0,
"operations": [
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T06:30:26Z"
},
"departureSite": "ANGERS",
"arrivalSite": "LE_MANS",
"distance": 98146,
"nominalDuration": 3709
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T06:30:26Z"
},
"site": "LE_MANS",
"fixedTimeSite": 0,
"volume": 3000.0,
"operations": [
{
"id": "OPERATION_2"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T08:32:59Z"
},
"departureSite": "LE_MANS",
"arrivalSite": "PARIS",
"distance": 207815,
"nominalDuration": 7353
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T08:32:59Z",
"end": "2024-05-01T08:32:59Z"
},
"site": "PARIS",
"fixedTimeSite": 0,
"volume": 5500.0,
"operations": [
{
"id": "OPERATION_1"
}
]
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2024-05-01T08:32:59Z",
"end": "2024-05-01T08:32:59Z"
},
"site": "PARIS"
}
]
}
]
}
],
"rejectOperations": [],
"modifiedData": []
}
Use Case 4 - Scope-Based Incompatibility
Problem
{
"sites": [
{
"id": "ANGERS",
"coordinates": {
"longitude": -0.557099,
"latitude": 47.460074
}
},
{
"id": "PARIS",
"coordinates": {
"longitude": 2.339808,
"latitude": 48.858750
}
},
{
"id": "LE_MANS",
"coordinates": {
"longitude": 0.202893,
"latitude": 48.001559
}
},
{
"id": "NANTES",
"coordinates": {
"longitude": -1.546178,
"latitude": 47.215557
},
"isDepot": true
}
],
"trucks": [
{
"id": "VEH_V1",
"availablePeriods": [
{
"id": "PERIOD_TW1",
"timeWindow": {
"start": "2024-05-01T06:30:00.000+02:00",
"end": "2024-05-04T22:01:00.000+02:00"
}
}
]
}
],
"operations": [
{
"id": "OPERATION_1",
"type": "DELIVERY",
"idSiteDestination": "PARIS",
"idProduct": "PROD_P1",
"volume": 5500
},
{
"id": "OPERATION_2",
"type": "DELIVERY",
"idSiteDestination": "LE_MANS",
"idProduct": "PROD_P2",
"volume": 3000
},
{
"id": "OPERATION_3",
"type": "DELIVERY",
"idSiteDestination": "ANGERS",
"idProduct": "PROD_P3",
"volume": 2000
}
],
"routeProfile": {
"calculationParameters": [
{
"code": "pg1241",
"value": 2
}
]
},
"products": [
{
"id": "PROD_P1"
},
{
"id": "PROD_P2"
},
{
"id": "PROD_P3"
}
],
"productsIncompatibilities": [
{
"id": "PI_01",
"productSetA": [
"PROD_P1"
],
"productSetB": [
"PROD_P2",
"PROD_P3"
],
"applyOnAllTrucks": true,
"scope": "AVAILABILITY_PERIOD"
}
]
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEH_V1",
"period": "PERIOD_TW1",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T04:30:00Z"
},
"site": "NANTES",
"fixedTimeSite": 0,
"volume": 5000.0,
"operations": [
{
"id": "OPERATION_2"
},
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T04:30:00Z",
"end": "2024-05-01T05:28:37Z"
},
"departureSite": "NANTES",
"arrivalSite": "ANGERS",
"distance": 88701,
"nominalDuration": 3517
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T05:28:37Z"
},
"site": "ANGERS",
"fixedTimeSite": 0,
"volume": 2000.0,
"operations": [
{
"id": "OPERATION_3"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2024-05-01T05:28:37Z",
"end": "2024-05-01T06:30:26Z"
},
"departureSite": "ANGERS",
"arrivalSite": "LE_MANS",
"distance": 98146,
"nominalDuration": 3709
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T06:30:26Z"
},
"site": "LE_MANS",
"fixedTimeSite": 0,
"volume": 3000.0,
"operations": [
{
"id": "OPERATION_2"
}
]
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2024-05-01T06:30:26Z",
"end": "2024-05-01T06:30:26Z"
},
"site": "LE_MANS"
}
]
}
]
}
],
"rejectOperations": [
{
"id": "OPERATION_1"
}
],
"modifiedData": []
}
Use Case 5 - Consecutive Route Constraints
Problem
{
"action": {
"type": "EVALUATE_EXISTING_ROUTES",
"routes": [
"NewRoute_1_1",
"NewRoute_1_2"
]
},
"sites": [
{
"id": "AXIOROUTE",
"coordinates": {
"longitude": -0.561642,
"latitude": 47.462544
}
},
{
"id": "AXIOROUTE_2",
"coordinates": {
"longitude": -0.521642,
"latitude": 47.462544
}
},
{
"id": "SINARI",
"coordinates": {
"longitude": -1.604869,
"latitude": 48.113197
},
"isDepot": true
}
],
"routeProfile": {
"language": "EN"
},
"trucks": [
{
"id": "VEHICLE_01",
"availablePeriods": [
{
"id": "PERIOD_01",
"timeWindow": {
"start": "2022-11-01T06:00:00.000+01:00",
"end": "2022-11-01T23:00:00.000+01:00"
},
"departureSite": "SINARI",
"arrivalSite": "SINARI"
}
]
}
],
"products": [
{
"id": "A"
},
{
"id": "B"
}
],
"productsIncompatibilities": [
{
"id": "A_B",
"productSetA": [
"A"
],
"productSetB": [
"B"
],
"order": "A_AND_B",
"scope": "AVAILABILITY_PERIOD",
"level": "FULL_VEHICLE",
"applyOnAllTrucks": true,
"numberOfConsecutiveRoutes": 2
}
],
"operations": [
{
"id": "OPERATION_01",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE",
"idProduct": "A"
},
{
"id": "OPERATION_02",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE_2",
"idProduct": "B"
}
],
"referencePlanning": {
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "NewRoute_1_1",
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"id": "NewRoute_1_2",
"operations": [
{
"id": "OPERATION_02"
}
]
}
]
}
]
}
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T05:00:00Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T05:00:00Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T06:27:57Z"
},
"departureSite": "SINARI",
"arrivalSite": "AXIOROUTE",
"distance": 127749,
"nominalDuration": 5277
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T06:27:57Z",
"end": "2022-11-01T06:27:57Z"
},
"site": "AXIOROUTE",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T06:27:57Z",
"end": "2022-11-01T07:56:20Z"
},
"departureSite": "AXIOROUTE",
"arrivalSite": "SINARI",
"distance": 126761,
"nominalDuration": 5303
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T07:56:20Z",
"end": "2022-11-01T07:56:20Z"
},
"site": "SINARI"
}
]
},
{
"id": "NewRoute_1_2",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T07:57:20Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T07:57:20Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T09:28:36Z"
},
"departureSite": "SINARI",
"arrivalSite": "AXIOROUTE_2",
"distance": 129640,
"nominalDuration": 5476
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T09:28:36Z",
"end": "2022-11-01T09:28:36Z"
},
"site": "AXIOROUTE_2",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T09:28:36Z",
"end": "2022-11-01T11:01:21Z"
},
"departureSite": "AXIOROUTE_2",
"arrivalSite": "SINARI",
"distance": 129306,
"nominalDuration": 5565
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T11:01:21Z",
"end": "2022-11-01T11:01:21Z"
},
"site": "SINARI"
}
]
}
],
"violationConstraints": [
{
"code": "DEP0076",
"messageViolation": "Incompatibility between operations [{0}] and [{1}] on different routes.",
"components": [
{
"type": "OPERATION",
"id": "OPERATION_01",
"idxSplit": 0
},
{
"type": "OPERATION",
"id": "OPERATION_02",
"idxSplit": 0
}
]
}
]
}
],
"modifiedData": []
}
Use Case 6 - Additional Vehicle-Specific Incompatibilities
Problem
{
"action": {
"type": "EVALUATE_EXISTING_ROUTES",
"routes": [
"NewRoute_1_1",
"NewRoute_1_2"
]
},
"sites": [
{
"id": "AXIOROUTE",
"coordinates": {
"longitude": -0.561642,
"latitude": 47.462544
}
},
{
"id": "AXIOROUTE_2",
"coordinates": {
"longitude": -0.521642,
"latitude": 47.462544
}
},
{
"id": "SINARI",
"coordinates": {
"longitude": -1.604869,
"latitude": 48.113197
},
"isDepot": true
}
],
"routeProfile": {
"language": "EN"
},
"trucks": [
{
"id": "VEHICLE_01",
"availablePeriods": [
{
"id": "PERIOD_01",
"timeWindow": {
"start": "2022-11-01T06:00:00.000+01:00",
"end": "2022-11-01T23:00:00.000+01:00"
},
"departureSite": "SINARI",
"arrivalSite": "SINARI"
}
],
"extraProductsIncompatibilities": [
"A_B"
]
}
],
"products": [
{
"id": "A"
},
{
"id": "B"
}
],
"productsIncompatibilities": [
{
"id": "A_B",
"productSetA": [
"A"
],
"productSetB": [
"B"
],
"order": "A_AND_B",
"scope": "AVAILABILITY_PERIOD",
"level": "FULL_VEHICLE",
"numberOfConsecutiveRoutes": 2
}
],
"operations": [
{
"id": "OPERATION_01",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE",
"idProduct": "A"
},
{
"id": "OPERATION_02",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE_2",
"idProduct": "B"
}
],
"referencePlanning": {
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "NewRoute_1_1",
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"id": "NewRoute_1_2",
"operations": [
{
"id": "OPERATION_02"
}
]
}
]
}
]
}
}
Solution
{
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "NewRoute_1_1",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T05:00:00Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T05:00:00Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T05:00:00Z",
"end": "2022-11-01T06:27:57Z"
},
"departureSite": "SINARI",
"arrivalSite": "AXIOROUTE",
"distance": 127749,
"nominalDuration": 5277
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T06:27:57Z",
"end": "2022-11-01T06:27:57Z"
},
"site": "AXIOROUTE",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T06:27:57Z",
"end": "2022-11-01T07:56:20Z"
},
"departureSite": "AXIOROUTE",
"arrivalSite": "SINARI",
"distance": 126761,
"nominalDuration": 5303
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T07:56:20Z",
"end": "2022-11-01T07:56:20Z"
},
"site": "SINARI"
}
]
},
{
"id": "NewRoute_1_2",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T07:57:20Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T07:57:20Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T07:57:20Z",
"end": "2022-11-01T09:28:36Z"
},
"departureSite": "SINARI",
"arrivalSite": "AXIOROUTE_2",
"distance": 129640,
"nominalDuration": 5476
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T09:28:36Z",
"end": "2022-11-01T09:28:36Z"
},
"site": "AXIOROUTE_2",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T09:28:36Z",
"end": "2022-11-01T11:01:21Z"
},
"departureSite": "AXIOROUTE_2",
"arrivalSite": "SINARI",
"distance": 129306,
"nominalDuration": 5565
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T11:01:21Z",
"end": "2022-11-01T11:01:21Z"
},
"site": "SINARI"
}
]
}
],
"violationConstraints": [
{
"code": "DEP0076",
"messageViolation": "Incompatibility between operations [{0}] and [{1}] on different routes.",
"components": [
{
"type": "OPERATION",
"id": "OPERATION_01",
"idxSplit": 0
},
{
"type": "OPERATION",
"id": "OPERATION_02",
"idxSplit": 0
}
]
}
]
}
],
"modifiedData": []
}