ETA for routes > 12 hrs

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2887
Joined: Mon Apr 14, 2014 10:28 am
Contact:

ETA for routes > 12 hrs

Post by Bernd Welter »

I have a question about the Developer.ROuting Method getEstimatedTimeOfArrival:

Here's what the documentation says about the validity period of a routeId:
A route can be represented by a route ID which can be used in subsequent requests to refer to that route and is valid for 12 hours.
Imagine I compute a long route at 06:00 in the morning. The traveltime for the route itself is said to be 48 hours as it covers an international transport from Barcelona to Warszawa (roughly 2500km, 36hrs bare driving time plus rests)...

Now the driver starts the trip right after the RouteID has been determined.

Will we be able to create the ETA >12 hours after the trip was started?
Or is the ROuteID vanishing and the ETA returns a "routeID unknown"?

Code: Select all

{
  "Message": "Error calling CalculateRoute: {
  "description": "The validation of the request failed. Details can be found in 'causes'.",
  "errorCode": "GENERAL_VALIDATION_ERROR",
  "traceId": "....",
  "causes":[{
    "description": "The 'routeId' cannot be found.",
    "errorCode": "ROUTING_ROUTE_ID_NOT_FOUND",
    "parameter":"routeId","details":{"value":"...."}
}
Attachments
12 hours after the driver left Barcelona he reaches Lyon.
12 hours after the driver left Barcelona he reaches Lyon.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Maximilian Vogel
Posts: 21
Joined: Fri Dec 29, 2017 9:00 am

Re: ETA for routes > 12 hrs

Post by Maximilian Vogel »

Or is the ROuteID vanishing and the ETA returns a "routeID unknown"?
As far as I know there is no mechanism that updates the time to live (TTL) for a route id. The TTL of 12 hours was introduced when the route ids were introduced and not changed when the ETA endpoint was introduced later. I agree that in the context of ETA calculations with long routes, a higher TTL is desirable - or a mechanism that updates it on each usage.
Will we be able to create the ETA >12 hours after the trip was started?
No. But keep in mind that the ETA calculation may calculate a new route for various reasons and return a new route id. Subsequent ETA calculations should use the new route id. Once the route id expired, you need to calculate a new route first to make further ETA calculations.
Maximilian Vogel
Developer
PTV Logistics
User avatar
Bernd Welter
Site Admin
Posts: 2887
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: ETA for routes > 12 hrs

Post by Bernd Welter »

Thanks for the feedback, Max.

While
  • increasing the TTL
  • touch means update TTL
would be based on PTV Logistics to change the underlying services the
  • recalculate the reference route and it's ID
is attached to the client's responsibility.

The three approaches sound reasonable to me.
I'll forward 1st internally and keep 2nd in mind ;-)

Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply