0

I'm making a HereMap Calculate Route API request. Waypoint 0 has no stopOver time, but waypoints 1 and 2 do. Example request:

https://route.ls.hereapi.com/routing/7.2/calculateroute.json?xnlp=CL_JSMv3.1.18.1&apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&mode=fastest;truck;traffic:enabled&truckType=truck&representation=display&routeattributes=summary,shape,legs&legAttributes=travelTime,trafficTime&height=14&limitedWeight=7.25&trailersCount=0&alternatives=0&waypoint0=geo!41.978130,-88.232100&departure=2020-08-17T06%3A00%3A00%2B5&waypoint1=geo!stopOver,2880!41.91621,-87.99025;;03558029&waypoint2=geo!stopOver,3120!41.91621,-87.99025;;03559825&waypoint3=geo!stopOver,840!41.721474,-87.679846;;03561582&waypoint4=geo!stopOver,780!41.719577,-87.793070;;03561720&waypoint5=geo!stopOver,1800!41.690945,-87.741590;;03561712&waypoint6=geo!stopOver,1320!41.691,-87.74274;;03561312&waypoint7=geo!stopOver,780!41.839228,-88.000000;;03561705&waypoint8=geo!stopOver,2400!41.7542,-87.74161;;03561534&waypoint9=geo!stopOver,1920!41.726269,-87.799493;;03561541&waypoint10=geo!stopOver,1680!41.727112,-87.801140;;03561542&waypoint11=geo!stopOver,1440!41.719642,-87.768530;;03561707&waypoint12=geo!41.978130,-88.232100

So waypoint1 has a stopOver of 48 minutes. When I get the response from the Calculate Route call, leg0 of the route is including the travel time, plus the stop over time for waypoint1.

{travelTime: 6184, maneuver: Array(13), trafficTime: 6184}

6184 seconds is 55 minutes of travel time plus the 48 minutes of stop over time. I would not expect to have stop over time included in the first leg. The truck is not stopping until waypoint1. So I would expect travel time between waypoint0 and waypoint1 to not include any stop over time. The API documents don't say much about stopOver. How does stopOver work? In my example, why is stopOver time included in the first leg?

Sean N.
  • 963
  • 2
  • 10
  • 23
  • Please post the entire request. – Antoine Eskaros Aug 25 '20 at 22:51
  • @AntoineRaoulIscaros OK I posted the full request – Sean N. Aug 26 '20 at 02:10
  • Hi, Let me confirm your request params. I could see that the waypoint1 and waypoint 2 are same location, but different StopOverDuration and TransitRadius is empty. waypoint1=geo!stopOver,2880!41.91621,-87.99025;;03558029 and waypoint2 =geo!stopOver,3120!41.91621,-87.99025;;03559825. Would you please confirm the waypoint1 and waypoint2 params are set correctly? –  Aug 31 '20 at 02:27
  • @HEREDeveloperSupport That is correct, waypoint 1 and waypoint 2 are the same location. Basically the truck needs to unload two different orders at the same location and because the orders are different sizes, the the stopOver is different for each. Is TransitRadius needed? Let me know if I should do something differently. – Sean N. Aug 31 '20 at 15:09

1 Answers1

0

Stopover time will be included in the travel time. All leg travel time has driving and stopover time. It means that getting rid of the stopover time from travel time driving time can be calculated.

Additionally when checked the legs in the response, the travel time was below.

  • w0-w1 : leg[0] 6182 (stopover: 2880)
  • w1-w2 : leg[1] 3120 (stopover: 3120)
  • w2-w3 : leg[2] 6373 (stopover: 840)

Would you please check your result response again?

  • Yes, what you posted matches what I'm seeing. w1 has a 2880 stopover. w2 has a 3120 stopover. The HereMap response for the leg from w1-w2 only includes the w2 stopover amount in travel time (3120). I was expecting it to only include the w1 stopover amount (2880). So given two waypoints where both have a stopover, the travel time for the leg between them will only include the stopover time for the second waypoint? That seems to be the rule. Can you explain why it works this way? Thanks. – Sean N. Sep 02 '20 at 16:13
  • Would you please write down each travel time you expecting? Because we don't see any error in the response travel time. –  Sep 03 '20 at 05:23
  • I'm not saying anything is wrong. I'm trying to understand why stopover is only included for one waypoint in the leg travel time. For example w2 has stopover 3120 and w3 has stopover 840. When traveling between w2 and w3, why does travel time only include the w3 stopover time of 840? Why doesn't travel time include the w2 stopover time of 3120 plus the w3 stop over time 840? Or just the w2 stopover time of 3120 and not the w3 stopover time of 840? I understand what the HereMap API is doing, and I'm not saying it is wrong. I want to understand why it works that way. – Sean N. Sep 03 '20 at 14:21
  • Hi , do you mean each leg travel time includes both stopover ? For example w1-w2 : 3120(3120) + w1_stopover(2880) and w2-w3 : 6373(840) + w2_stopover(3120). –  Sep 04 '20 at 07:09
  • It's a specification when HERE designing the travel time. You can also add start waypoint stopover to travel time in your use case. –  Sep 04 '20 at 07:20