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.
But what I don't get: Why is the last service event's "startsAt" given with a value BEFORE the arrival? Or is the definition of the last waypoint's event more like a "the last thing that happens on a route is the last waypoint" and therefore the "Arrival time" is supposed to be derived via "LastWaypoint.StartsAt - LastService.Duration"?
Sidenode: the node index of the last waypoint event and it's service event are different. Shouldn't they be equal?
Attachments
Screenshot 2024-09-05 183730.png (10.62 KiB) Viewed 869 times
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...
But what I don't get: Why is the last service event's "startsAt" given with a value BEFORE the arrival? Or is the definition of the last waypoint's event more like a "the last thing that happens on a route is the last waypoint" and therefore the "Arrival time" is supposed to be derived via "LastWaypoint.StartsAt - LastService.Duration"?
=> Yes, exactly ; the last WAYPOINT event is always the last event of the tour. If you want to know the arrival time, then you'll need to substract the service time.
Sidenode: the node index of the last waypoint event and it's service event are different. Shouldn't they be equal?
In your case, you may have specified an offRoadWaypoint. As the service is located before, it could happen that the index is the node on the road.
Check also the technical concept on result lists. Although not explicitly written, you can see in the graphic that the last waypoint is the end of the route.
A service time produces a segment of type NOT_DRIVING. Therefore it is normal that the node index of the last service event and the node index of the last waypoint event do not match.
Keep in mind that there could also be tour events of type break, rest or waiting before the last service. So the arrival would then be before all tour events at the same location as the last waypoint. (Of course that depends on your interpretation of arrival.)
In PTV Developers Routing API the events are modeled differently. Waypoint and Schedule events will be present in the same event, but the schedule event is not necessarily of type SERVICE as there can be breaks, rests or waiting events upon arrival. Those will be contained in additional events. Likewise, the ETA given in the ETA response marks the time of arrival at the waypoint before any schedule events.
Cool - I didn't know that the segments list shows NOT_DRIVING segments !
Thanks for your feedback, buddies
I wish you a nice weeken - I'll have a weekend in Nice
Attachments
XRouteToll2 test
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...