Skip to main content

MCI

MciJob

  • id : job Id
  • type : MCDI
  • error : jobError
  • percent : job percentage
  • status : "ITINERARY SOLUTION AVAILABLE" when no error
  • problem : ProblemMCI
  • solution : SolutionMCI
Example of a Mcijob
{
"id": "ac277962-e401-4acb-b9c4-2ba2b1efed1f",
"type": "MCDI",
"error": {
"message": ""
},
"percent": 0,
"status": "ITINERARY SOLUTION AVAILABLE",
"problem": {
"id": "ac277962-e401-4acb-b9c4-2ba2b1efed1f",
"sitePoints": [
{
"id": "A8B7FF7C-122E-4195-8086-5BED34556961",
"longitude": -0.561672,
"latitude": 47.462513
},
{
"id": "37F1C2EE-55E6-4FD8-B0DE-FC7EBC6DF2B0",
"longitude": -0.563023,
"latitude": 47.463801
}
],
"itineraryStartDates": [
"2024-01-08T10:11:08.515+01:00"
]
},
"solution": {
"id": "ac277962-e401-4acb-b9c4-2ba2b1efed1f",
"totalDistance": 435,
"totalNominalDuration": 48,
"totalSpeedProfilePenalty": 0,
"elements": [
{
"origin": "A8B7FF7C-122E-4195-8086-5BED34556961",
"destination": "37F1C2EE-55E6-4FD8-B0DE-FC7EBC6DF2B0",
"distance": 435,
"nominalDuration": 48,
"geojson": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.561686992645264,
47.4625587463379
],
...
[
-0.56303197145462,
47.4638404846191
]
]
},
"properties": {}
}
]
}
}
],
"createdAt": "2024-01-08T16:17:20.121Z"
}
}

ProblemMCI

Itinerary problem (see POST /mci/problems in MCDI OpenAPI Documentation).

The main elements are :

Example
{
"sitePoints": [
{
"id": "2C107822-928C-4C81-8FB8-6E426EFD037C",
"longitude": -0.561688,
"latitude": 47.462483
},
{
"id": "5AB62C2B-3298-44F8-BDC1-47DFBAABED3A",
"longitude": -0.562665,
"latitude": 47.463878
}
],
"itineraryStartDates": [
"2024-01-09T08:00:07.575+01:00"
]
}

SolutionMCI

Itinerary solution (see GET /mci/solutions in MCDI OpenAPI Documentation).

Example of SolutionMCI
{
"id": "e41080b1-2fc4-4c01-a59f-6c51eacc7150",
"totalDistance": 520,
"totalNominalDuration": 58,
"totalSpeedProfilePenalty": 10,
"elements": [<see [SolutionElementMCI]>],
"createdAt": "2024-01-10T09:50:10.970Z"
}
Info

elements property is a list of SolutionElementMCI
createdAt timestamp property must comply with ISO 8601 standard.

SolutionElementMCI

This object describes the steps of an itinerary problem.
See SolutionElementMCI definition under SolutionMCI/elements in MCDI OpenAPI Documentation.

Example
{
"origin": "05138BC0-AB11-42B3-83EB-23E706C74B26",
"destination": "98B417E4-4866-4067-8695-5EE2B5171579",
"distance": 520,
"nominalDuration": 58,
"speedProfilePenalty": 10,
"geojson": {see FeatureCollection}
}
Info

origin and destination properties are SitePoint
geojson property must be a Feature Collection.

FeatureCollection

Normalized GeoJSON FeatureCollection object representing the solution element for display.

When useVariableSpeed is false, one feature of type LineString is present.

When useVariableSpeed is true a new feature of type LineString is generated with a properties element precising the speedPonderation value each time its value changes.
This is useful to draw the traffic congestion in a certain color.

The feature properties field contains speedPonderation which can vary from 1 (be patient, huge traffic jam) to 100 (normal driving conditions)

The feature geometry.coordinates field contains a list of ARCoordinates

Example with varying speedPonderation
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.561673998832703,
47.4624977111816
],
[
-0.561686992645264,
47.4625587463379
],
[
-0.560986995697022,
47.4627685546875
]
]
},
"properties": {
"speedPonderation": 61
}
},
...
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.563710987567902,
47.4633750915527
],
[
-0.562794983386993,
47.463809967041
]
]
},
"properties": {
"speedPonderation": 100
}
}
]
}