Now, to output our departure times to our stations, we specified "ExactTimeConsiderationAtArrival" in the route calculation. Thereby we got the following error message:
"ExactTimeConsiderationAtArrival mode can not be used if TourRestrictions are requested.".
How can I solve this problem?
Determine the latest departure times of stations
-
- Posts: 1
- Joined: Fri Jul 15, 2022 10:28 am
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Determine the latest departure times of stations
Hello Kevin,
in fact this error occurs because we do not compute the break- and rest rules while we create the route from the "reverse angle". Technically this would be possible but in such a case we would start to insert the breaks in the wrong way:
Imagine a driver who is completely refreshed but who needs a break after 4:30 hours. With "ExactAtArrival" we would insert the "first" break 4:30 back from the ArrivalTime and so on.
The output route of such an approach would probably display the "early" breaks way too early. What you could do to solve this: Apply an iterative approach
Best regards,
Bernd
PS: This video shows how we flood the network in a unidirectional case (such as ExactAtStart and ExactAtArrival).
in fact this error occurs because we do not compute the break- and rest rules while we create the route from the "reverse angle". Technically this would be possible but in such a case we would start to insert the breaks in the wrong way:
Imagine a driver who is completely refreshed but who needs a break after 4:30 hours. With "ExactAtArrival" we would insert the "first" break 4:30 back from the ArrivalTime and so on.
The output route of such an approach would probably display the "early" breaks way too early. What you could do to solve this: Apply an iterative approach
- Perform a ExactAtStart-Routing with a reference time almost as the desired "arrival time".
- Use the output arrival time to determine a "shift" period
- Calculate the route again in "ExactAtStart"-Mode but translate the "start time"
Best regards,
Bernd
PS: This video shows how we flood the network in a unidirectional case (such as ExactAtStart and ExactAtArrival).
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...
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...
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Determine the latest departure times of stations
quick update... though the following request does not mention "TourOptions" it fails with an
Request:
Took me a few seconds to spot the various implicit causes:
Bernd
Code: Select all
<soap:Text xml:lang="en">ExactTimeConsiderationAtArrival mode can not
be used if TourRestrictions are requested.</soap:Text>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://xroute.xserver.ptvgroup.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body> <startCalculateRoute xmlns="http://xroute.xserver.ptvgroup.com">
<request storedProfile="car" xmlns="">
<requestProfile userLanguage="DE">
<featureLayerProfile>
<themes id="PTV_TruckAttributes" enabled="false" />
<themes id="PTV_TrafficIncidents" enabled="false" />
<themes id="PTV_TruckSpeedPatterns" enabled="false" />
</featureLayerProfile>
<routingProfile>
<course distanceTimeWeighting="80" />
</routingProfile>
</requestProfile>
<waypoints xmlns:q1="http://xroute.xserver.ptvgroup.com" xsi:type="q1:OffRoadWaypoint" name="1">
<location>
<offRoadCoordinate x="8.9" y="47.74" />
</location>
<tourStopOptions serviceTime="900" />
</waypoints>
<waypoints xmlns:q2="http://xroute.xserver.ptvgroup.com" xsi:type="q2:OffRoadWaypoint" name="2">
<location>
<offRoadCoordinate x="8.05" y="48.63" />
</location>
<tourStopOptions serviceTime="900" />
</waypoints>
<routeOptions currency="EUR">
<timeConsideration xmlns:q3="http://timeconsideration.xserver.ptvgroup.com" xsi:type="q3:ExactTimeConsiderationAtArrival" referenceTime="2022-12-22T00:00:00" />
</routeOptions>
<resultFields waypoints="true" nodes="true" polyline="true" tourReport="true" encodedPath="true" monetaryCostsReport="true">
<legs enabled="true" polyline="true" tollSummary="true" emissions="true" />
<segments enabled="true" emissions="true" polyline="true" descriptors="true" roadAttributes="true" id="true" />
<eventTypes>TOUR_EVENT</eventTypes>
<eventTypes>WAYPOINT_EVENT</eventTypes>
<eventTypes>ROUTE_VIOLATION_EVENT</eventTypes>
<eventTypes>TOLL_EVENT</eventTypes>
<toll enabled="true" sections="true" systems="true" />
</resultFields>
</request>
</startCalculateRoute>
</soap:Body>
</soap:Envelope>
- The waypoints contain tourStopOptions.
- The resultFields ask for tourReport="true"
- The resultFields ask for <eventTypes>TOUR_EVENT</eventTypes>
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...
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...