Page 1 of 1

calculateRoute with openingIntervals?

Posted: Fri Nov 04, 2022 2:26 pm
by Howard
Hey,

we are trying to get realistic travel time data after planning our Tour. Some of our visits have time limitations, so we tried to use the openingIntervals of the waypoints for those.

Interestingly, I get the following response:

Code: Select all

{
"faultInfo":
{
  "$type":"InvalidRequestFault",
  "hint":"Use the appropriate time consideration or remove the openingIntervals on the Waypoints."
},
"message":"No time consideration or OptimisticTimeConsideration has been set, but some Waypoints contain openingIntervals."
}
Which is puzzling, because I did send the timeConsideration "OptimisticTimeConsideration" in the routeOptions. I also tried out other timeConsiderations, but the error stays the same. (See the attached request, I just changed the coordinates.)

Any idea what is going on here?

Re: calculateRoute with openingIntervals?

Posted: Fri Nov 04, 2022 4:11 pm
by Bernd Welter
Hi "Howard",

In the Technical Concepts of Routing/Tour Calculation, you can read:
SnapshotTimeConsideration, TimeSpanConsideration or ExactTimeConsiderationAtStart are mandatory to handle opening intervals on waypoints. If not set, an exception is thrown.
The reason is: to handle opening interval, we need a starting date/time. There is an arbitrary date/time used when setting Optimistic. But that's only to handle the regulations on several days/weeks.

For opening hours (i.e. time windows), a reference time is absolutely needed.

That's why it is only available with Snaphot, TimeSpan or Exact mode.

Bernd

(thanks to Yann for the hint!)