calculateAdvancedTour: Travel time exceeds maximum period

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
Sven G.
Posts: 1
Joined: Thu Apr 21, 2022 3:01 pm

calculateAdvancedTour: Travel time exceeds maximum period

Post by Sven G. »

I noticed a recurring error-message in our logs when calling calculateAdvancedTour that reads "An error occurred during the calculation of the advanced tour. Message: Travel time exceeds maximum tour period. Please check your start time and opening intervals"

I checked some failed request with successful ones but found no differences besides start-time and waypoints.
Additionaly, we are calling calculateExtendedRoute before calling calculateAdvancedTour which is successful.

Since we are using the SOAP-API, we do not log the full request, but we do log the parameters as JSON in the order in which we pass them to the corresponding methods of the client, which are attached.

Regards,
Sven Gadow
Attachments
response_calculateExtendedRoute.txt
(143.99 KiB) Downloaded 32 times
request_calculateExtendedRoute.txt
(5.81 KiB) Downloaded 42 times
request_calculateAdvancedTour.txt
(6.23 KiB) Downloaded 38 times
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: calculateAdvancedTour: Travel time exceeds maximum perio

Post by Bernd Welter »

Hi Sven,

from what I can see in your calculateADvancedTour request you are requesting the truck profile (does this exist?) with overwriting the following snippet:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Profile>
<Common language="en" majorVersion="1" minorVersion="0"/>
<Routing majorVersion="2" minorVersion="0">
<Course>
<AdditionalDataRules enabled="true" layerName="TruckAttributes"/>
</Course>
<Vehicle>
<Legal>
<LegalCondition isAuthorized="true" isDelivery="true" />
</Legal>
</Vehicle>
</Routing>
<FeatureLayer majorVersion="1" minorVersion="0">
<GlobalSettings enableTimeDependency="true"/>
<Themes>
<Theme id="PTV_SpeedPatterns" enabled="false">
</Theme>
<Theme id="PTV_TruckAttributes" enabled="true">
</Theme>
<Theme id="PTV_TrafficIncidents" enabled="true">
</Theme>
</Themes>
</FeatureLayer>
</Profile>
I just traced the effective profile for a simple truck profile based request and this returns the following part in the Break-and Restrules:

Code: Select all

<BreakAndRestRules majorVersion="1" minorVersion="0">
	<BreakRules enabled="true" maximumDrivingTimeBeforeBreak="16200" 
minimumDurationOfAdditionalBreaks="1800" minimumDurationOfFirstBreak="900" 
 totalBreakPeriod="2700"/>
	<RestRules durationOfShift="39600" enabled="true"
 maximumWorkingHoursDuringShift="32400" minimumStayAtStopForRest="10800" 
restPeriod="39600"/>
</BreakAndRestRules>
So even if you do not set these thresholds via API they exist. I guess some of your advanced route KPIs exceed one of the thresholds and therefore you are running into this behaviour.
On the other hand your JSON dump shows this:

Code: Select all

{
    "driverSettings": {
      "breakRuleAUSDisabled": true,
      "breakRuleDisabled": true,
      "dailyRestRuleAUSDisabled": true,
      "dailyRestRuleDisabled": true,
      "weeklyRestRuleAUSDisabled": true,
      "weeklyRestRuleDisabled": true,
      "workingRuleDisabled": true
    },
    "restrictToSingleOperatingInterval": false
  }
This seems to disable all restrictions. I will ask DEV for further infos.

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:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: calculateAdvancedTour: Travel time exceeds maximum perio

Post by Bernd Welter »

call me stupid - I haven't seen this at first... as described in this article "Route Calculation with speed Pattern and Maut Malus" you can't combine advancedTour and daytime dependent data (some of your feature layers such as TrafficIncidents)...

Well known behaviour - never worked - won't ever work in xServer 1.

But think positive: the combination of
  • Daytime dependency
  • Break- and Restrules
works out of the box in xServer2!

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