Language definition
Description​
The language field of the routeProfile object allows you to define in which language the API will return messages. These messages can be of several types:
- the description of unfulfilled constraints,
- the list of available calculation parameters: description, type, unit, default value, allowed values
- the list of available valorization criteria
- ...
Possible values for this attribute are:
- EN: all the API messages will be in English
- FR: all the API messages will be in French
warning
There is no explicit default value: when language is not set, the language of the messages depends on the server configuration. Always set language to get the messages in the expected language.
Example of unfulfilled constraint​
Let's assume that we want messages in French. Then:
"routeProfile": {
"language":"FR"
}
and the resulting solution:
"violationConstraints": [
{
"code": "DEP0042",
"messageViolation": "Dépassement de fin de plage."
}
]
Full problem​
Full Problem (french messages)
{
"action": {
"type": "SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES",
"operations": [
{
"id": "OPERATION_07",
"type": "DELIVERY"
}
],
"to": {
"idRoute": "000ZYX1DH01"
}
},
"sites": [
{
"id": "_MOULINS",
"coordinates": {
"longitude": 3.327869,
"latitude": 46.559176
},
"isDepot": false
},
{
"id": "AXIOROUTE",
"coordinates": {
"longitude": -0.561642,
"latitude": 47.462544
},
"isDepot": false
},
{
"id": "CJM",
"coordinates": {
"longitude": -0.345602,
"latitude": 48.597481
},
"isDepot": false
},
{
"id": "COFISOFT",
"coordinates": {
"longitude": 1.697037,
"latitude": 46.816713
},
"isDepot": false
},
{
"id": "GPI",
"coordinates": {
"longitude": 4.740329,
"latitude": 45.752201
},
"isDepot": false
},
{
"id": "SINARI",
"coordinates": {
"longitude": -1.604869,
"latitude": 48.113197
},
"isDepot": true
},
{
"id": "XYRIC",
"coordinates": {
"longitude": 5.09304,
"latitude": 47.310967
},
"isDepot": false
}
],
"trucks": [
{
"id": "VEHICLE_01",
"availablePeriods": [
{
"id": "PERIOD_01",
"timeWindow": {
"start": "2022-11-01T04:30:00.000+01:00",
"end": "2022-11-01T19:00:00.000+01:00"
},
"departureSite": "SINARI",
"arrivalSite": "SINARI"
}
]
}
],
"operations": [
{
"id": "OPERATION_07",
"type": "DELIVERY",
"idSiteDestination": "_MOULINS"
},
{
"id": "OPERATION_01",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE"
},
{
"id": "OPERATION_02",
"type": "DELIVERY",
"idSiteDestination": "COFISOFT"
},
{
"id": "OPERATION_03",
"type": "DELIVERY",
"idSiteDestination": "CJM"
},
{
"id": "OPERATION_04",
"type": "DELIVERY",
"idSiteDestination": "GPI"
},
{
"id": "OPERATION_05",
"type": "DELIVERY",
"idSiteDestination": "XYRIC"
}
],
"routeProfile": {
"language":"FR"
},
"referencePlanning": {
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "000ZYX1DH01",
"operations": [
{
"id": "OPERATION_03"
},
{
"id": "OPERATION_05"
},
{
"id": "OPERATION_04"
},
{
"id": "OPERATION_02"
},
{
"id": "OPERATION_01"
}
]
}
]
}
]
}
}
Full Solution (french messages)
{
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "000ZYX1DH01",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T03:30:00Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T03:30:00Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_07"
},
{
"id": "OPERATION_01"
},
{
"id": "OPERATION_02"
},
{
"id": "OPERATION_04"
},
{
"id": "OPERATION_05"
},
{
"id": "OPERATION_03"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T05:03:06Z"
},
"departureSite": "SINARI",
"arrivalSite": "CJM",
"distance": 134994,
"nominalDuration": 5586
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T05:03:06Z",
"end": "2022-11-01T05:03:06Z"
},
"site": "CJM",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_03"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T05:03:06Z",
"end": "2022-11-01T10:04:19Z"
},
"departureSite": "CJM",
"arrivalSite": "XYRIC",
"distance": 572917,
"nominalDuration": 18073
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T10:04:19Z",
"end": "2022-11-01T10:04:19Z"
},
"site": "XYRIC",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_05"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T10:04:19Z",
"end": "2022-11-01T11:51:40Z"
},
"departureSite": "XYRIC",
"arrivalSite": "GPI",
"distance": 192769,
"nominalDuration": 6441
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T11:51:40Z",
"end": "2022-11-01T11:51:40Z"
},
"site": "GPI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_04"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T11:51:40Z",
"end": "2022-11-01T13:52:56Z"
},
"departureSite": "GPI",
"arrivalSite": "_MOULINS",
"distance": 204022,
"nominalDuration": 7276
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T13:52:56Z",
"end": "2022-11-01T13:52:56Z"
},
"site": "_MOULINS",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_07"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T13:52:56Z",
"end": "2022-11-01T15:47:03Z"
},
"departureSite": "_MOULINS",
"arrivalSite": "COFISOFT",
"distance": 173621,
"nominalDuration": 6847
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T15:47:03Z",
"end": "2022-11-01T15:47:03Z"
},
"site": "COFISOFT",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T15:47:03Z",
"end": "2022-11-01T18:18:44Z"
},
"departureSite": "COFISOFT",
"arrivalSite": "AXIOROUTE",
"distance": 296527,
"nominalDuration": 9101
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T18:18:44Z",
"end": "2022-11-01T18:18:44Z"
},
"site": "AXIOROUTE",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T18:18:44Z",
"end": "2022-11-01T19:47:07Z"
},
"departureSite": "AXIOROUTE",
"arrivalSite": "SINARI",
"distance": 126761,
"nominalDuration": 5303
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T19:47:07Z",
"end": "2022-11-01T19:47:07Z"
},
"site": "SINARI"
}
],
"violationConstraints": [
{
"code": "DEP0042",
"messageViolation": "Dépassement de fin de plage."
}
]
}
]
}
],
"modifiedData": []
}
Full Problem (english messages)
{
"action": {
"type": "SCHEDULE_OPERATIONS_ON_EXISTING_ROUTES",
"operations": [
{
"id": "OPERATION_07",
"type": "DELIVERY"
}
],
"to": {
"idRoute": "000ZYX1DH01"
}
},
"sites": [
{
"id": "_MOULINS",
"coordinates": {
"longitude": 3.327869,
"latitude": 46.559176
},
"isDepot": false
},
{
"id": "AXIOROUTE",
"coordinates": {
"longitude": -0.561642,
"latitude": 47.462544
},
"isDepot": false
},
{
"id": "CJM",
"coordinates": {
"longitude": -0.345602,
"latitude": 48.597481
},
"isDepot": false
},
{
"id": "COFISOFT",
"coordinates": {
"longitude": 1.697037,
"latitude": 46.816713
},
"isDepot": false
},
{
"id": "GPI",
"coordinates": {
"longitude": 4.740329,
"latitude": 45.752201
},
"isDepot": false
},
{
"id": "SINARI",
"coordinates": {
"longitude": -1.604869,
"latitude": 48.113197
},
"isDepot": true
},
{
"id": "XYRIC",
"coordinates": {
"longitude": 5.09304,
"latitude": 47.310967
},
"isDepot": false
}
],
"trucks": [
{
"id": "VEHICLE_01",
"availablePeriods": [
{
"id": "PERIOD_01",
"timeWindow": {
"start": "2022-11-01T04:30:00.000+01:00",
"end": "2022-11-01T19:00:00.000+01:00"
},
"departureSite": "SINARI",
"arrivalSite": "SINARI"
}
]
}
],
"operations": [
{
"id": "OPERATION_07",
"type": "DELIVERY",
"idSiteDestination": "_MOULINS"
},
{
"id": "OPERATION_01",
"type": "DELIVERY",
"idSiteDestination": "AXIOROUTE"
},
{
"id": "OPERATION_02",
"type": "DELIVERY",
"idSiteDestination": "COFISOFT"
},
{
"id": "OPERATION_03",
"type": "DELIVERY",
"idSiteDestination": "CJM"
},
{
"id": "OPERATION_04",
"type": "DELIVERY",
"idSiteDestination": "GPI"
},
{
"id": "OPERATION_05",
"type": "DELIVERY",
"idSiteDestination": "XYRIC"
}
],
"routeProfile": {
"language":"EN"
},
"referencePlanning": {
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "000ZYX1DH01",
"operations": [
{
"id": "OPERATION_03"
},
{
"id": "OPERATION_05"
},
{
"id": "OPERATION_04"
},
{
"id": "OPERATION_02"
},
{
"id": "OPERATION_01"
}
]
}
]
}
]
}
}
Full Solution (english messages)
{
"vehicleRoutes": [
{
"truck": "VEHICLE_01",
"period": "PERIOD_01",
"routes": [
{
"id": "000ZYX1DH01",
"activities": [
{
"activity": "ROUTE_START",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T03:30:00Z"
},
"site": "SINARI"
},
{
"activity": "LOADING",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T03:30:00Z"
},
"site": "SINARI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_07"
},
{
"id": "OPERATION_01"
},
{
"id": "OPERATION_02"
},
{
"id": "OPERATION_04"
},
{
"id": "OPERATION_05"
},
{
"id": "OPERATION_03"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T03:30:00Z",
"end": "2022-11-01T05:03:06Z"
},
"departureSite": "SINARI",
"arrivalSite": "CJM",
"distance": 134994,
"nominalDuration": 5586
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T05:03:06Z",
"end": "2022-11-01T05:03:06Z"
},
"site": "CJM",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_03"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T05:03:06Z",
"end": "2022-11-01T10:04:19Z"
},
"departureSite": "CJM",
"arrivalSite": "XYRIC",
"distance": 572917,
"nominalDuration": 18073
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T10:04:19Z",
"end": "2022-11-01T10:04:19Z"
},
"site": "XYRIC",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_05"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T10:04:19Z",
"end": "2022-11-01T11:51:40Z"
},
"departureSite": "XYRIC",
"arrivalSite": "GPI",
"distance": 192769,
"nominalDuration": 6441
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T11:51:40Z",
"end": "2022-11-01T11:51:40Z"
},
"site": "GPI",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_04"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T11:51:40Z",
"end": "2022-11-01T13:52:56Z"
},
"departureSite": "GPI",
"arrivalSite": "_MOULINS",
"distance": 204022,
"nominalDuration": 7276
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T13:52:56Z",
"end": "2022-11-01T13:52:56Z"
},
"site": "_MOULINS",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_07"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T13:52:56Z",
"end": "2022-11-01T15:47:03Z"
},
"departureSite": "_MOULINS",
"arrivalSite": "COFISOFT",
"distance": 173621,
"nominalDuration": 6847
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T15:47:03Z",
"end": "2022-11-01T15:47:03Z"
},
"site": "COFISOFT",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_02"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T15:47:03Z",
"end": "2022-11-01T18:18:44Z"
},
"departureSite": "COFISOFT",
"arrivalSite": "AXIOROUTE",
"distance": 296527,
"nominalDuration": 9101
},
{
"activity": "DELIVERY",
"timeWindow": {
"start": "2022-11-01T18:18:44Z",
"end": "2022-11-01T18:18:44Z"
},
"site": "AXIOROUTE",
"fixedTimeSite": 0,
"operations": [
{
"id": "OPERATION_01"
}
]
},
{
"activity": "DRIVING",
"timeWindow": {
"start": "2022-11-01T18:18:44Z",
"end": "2022-11-01T19:47:07Z"
},
"departureSite": "AXIOROUTE",
"arrivalSite": "SINARI",
"distance": 126761,
"nominalDuration": 5303
},
{
"activity": "ROUTE_END",
"timeWindow": {
"start": "2022-11-01T19:47:07Z",
"end": "2022-11-01T19:47:07Z"
},
"site": "SINARI"
}
],
"violationConstraints": [
{
"code": "DEP0042",
"messageViolation": "Overtaking the end of the time window."
}
]
}
]
}
],
"modifiedData": []
}