Machine learning duration

The accuracy of the route duration can be enhanced using region-specific machine learning models. This feature is currently available for routes

  • with baseDuration between 15 and 75 mins
  • inside the following urban regions:
    • Berlin (Germany)
    • Chicago (U.S.)
    • Jakarta (Indonesia)
    • Los Angeles (U.S)
    • Paris (France)
    • Sao Paulo (Brazil)

and must be requested with mlDuration=true and departureTime not set to any. The result is provided as mlDuration (beside duration and baseDuration). If the region-specific model could not be used for the requested route section, mlDuration is not provided for that section and the reason is provided in a notice.

Note

mlDuration is only provided for the entire route section. The durations of the route spans do not sum up to mlDuration.

Example

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=52.549002,13.417525&transportMode=car&destination=52.476500,13.283973&return=summary,mlDuration'
{
   "routes":[
      {
         "id":"379cb707-73ef-4786-ad12-3b28388f7886",
         "sections":[
            {
               "id":"ee931695-bf23-44bc-9796-3c27c07bb1f0",
               "type":"vehicle",
               "departure":{
                  "time":"2020-11-11T14:59:04+01:00",
                  "place":{
                     "type":"place",
                     "location":{
                        "lat":52.5492423,
                        "lng":13.4167392
                     },
                     "originalLocation":{
                        "lat":52.5490019,
                        "lng":13.417525
                     }
                  }
               },
               "arrival":{
                  "time":"2020-11-11T15:37:11+01:00",
                  "place":{
                     "type":"place",
                     "location":{
                        "lat":52.476343,
                        "lng":13.2839019
                     },
                     "originalLocation":{
                        "lat":52.4765,
                        "lng":13.283973
                     }
                  }
               },
               "summary":{
                  "duration":2287,
                  "length":17564,
                  "baseDuration":1666,
                  "mlDuration":2201
               },
               "transport":{
                  "mode":"car"
               }
            }
         ]
      }
   ]
}

Example with Notice

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=52.744140,12.551237&transportMode=car&destination=52.152469,13.097419&return=summary,mlDuration'
{
   "routes":[
      {
         "id":"7bdceeed-4365-4bf8-bbfd-2710c55413ff",
         "sections":[
            {
               "id":"fce10b96-6123-4901-ad31-646e92b3d016",
               "type":"vehicle",
               "departure":{
                  "time":"2020-11-11T15:04:35+01:00",
                  "place":{
                     "type":"place",
                     "location":{
                        "lat":52.7432,
                        "lng":12.55728
                     },
                     "originalLocation":{
                        "lat":52.7441399,
                        "lng":12.551237
                     }
                  }
               },
               "arrival":{
                  "time":"2020-11-11T16:43:02+01:00",
                  "place":{
                     "type":"place",
                     "location":{
                        "lat":52.1551738,
                        "lng":13.1049086
                     },
                     "originalLocation":{
                        "lat":52.152469,
                        "lng":13.097419
                     }
                  }
               },
               "summary":{
                  "duration":5907,
                  "length":106617,
                  "baseDuration":5457
               },
               "notices":[
                  {
                     "title":"Pre-conditions required for mlDuration calculation failed. Please refer to the documentation.",
                     "code":"mlDurationUnavailable"
                  }
               ],
               "transport":{
                  "mode":"car"
               }
            }
         ]
      }
   ]
}

results matching ""

    No results matching ""