Page 1 of 1
calculateAdvancedTour: Travel time exceeds maximum period
Posted: Thu Jan 26, 2023 3:52 pm
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
Re: calculateAdvancedTour: Travel time exceeds maximum perio
Posted: Fri Jan 27, 2023 9:10 am
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
Re: calculateAdvancedTour: Travel time exceeds maximum perio
Posted: Thu Feb 02, 2023 12:30 pm
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