Speedpatterns in calculate(Advanced)Tour

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
Lauterfeld
Posts: 26
Joined: Tue Apr 14, 2015 1:19 pm

Speedpatterns in calculate(Advanced)Tour

Post by Lauterfeld »

Hi all,

I got the following error when using Speedpatterns in calculateAdvancedTour:
{
"errorMessage": "calculate(Advanced)Tour does not support time dependency in feature layer configuration",
"errorKey": "2311",
"exceptionType": "com.ptvag.xserver.xroute.XRouteException"
}

Please can you exactly explain, what feature layer will work with calcAdvTour? I need calcAdvTour cause of time windows at the stations and start time optimization of the tour. I hoped it would work fine with time dependend feature layer? Most feature layer are time dependend.

Regards,
Volker
Volker Lauterfeld
Software-Entwicklung und Projekte
COS GmbH
Gesellschaft für Computersysteme,
Organisation und Softwareentwicklung mbH
Raiffeisenstraße 21
D-77704 Oberkirch
http://www.cosonline.de/
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Speedpatterns in calculate(Advanced)Tour

Post by Bernd Welter »

Hello Volker,

not sure whether you can blame it on the feature layer itself. I made a quick test with the following snippet:

Code: Select all

<FeatureLayer majorVersion="1" minorVersion="0">
		<GlobalSettings enableTimeDependency="false"/>
		<Themes>
			<Theme id="PTV_SpeedPatterns" enabled="true"/>
		</Themes>
</FeatureLayer>
If the global timedependency is disabled it works, otherwise it fails.
The reason for this is probably the treatment of the attributes which do not depend on time. So such static attributes (e.g. some TruckAttributes) can be considered because they to not have an impact o the time dependent track.
But those who depend on time are critical, such as all SPEED PATTERNS.

Does this answer your question?

Best regards,
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:
Lauterfeld
Posts: 26
Joined: Tue Apr 14, 2015 1:19 pm

Re: Speedpatterns in calculate(Advanced)Tour

Post by Lauterfeld »

Hi Bernd,

thanks for your comment!

I think disabling the global time dependency does not throw an error but it seems that xroute doesn't respect the speed patterns at all. My example tour through Vienna is always the same in distance and time, it doesn't matter if the START_TIME is at night or in the rush hour :-(. The documentation of xRoute confirms it, too. Unfortunately we did'nt know that. 95% of our xRoute implementation (also the routing polygon view on the leaflet map) refers to calcAdvTour. I got a heart attack seeing that :-)

Best regards,
Volker
Volker Lauterfeld
Software-Entwicklung und Projekte
COS GmbH
Gesellschaft für Computersysteme,
Organisation und Softwareentwicklung mbH
Raiffeisenstraße 21
D-77704 Oberkirch
http://www.cosonline.de/
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Speedpatterns in calculate(Advanced)Tour

Post by Bernd Welter »

Hello Volker,

There's a logical reason why the combination of
  • the tour approaches (incl. timeslots and service periods at stops)
  • and dynamic routing = consideration of time dependent segment states (which is the core idea behind SpeedPatterns and required at least for some TruckAttibutes)
doesn't work. Check the following principles.

The tour approaches are based on a two step process:
  • calculate the way-time-scheme of a track (done by the router)
  • insert the breaks/rests and service periods to match the additional constraints (done by the timecalc)
On the other hand the dynamic routing is a "one way"-perspective algorithm (either from a fixed start time or a fixed arrival time) which prevents us from shifting the time scheme in a post processing.

Not that complicated to understand - but not obvious to see. Maybe we should improve our documentation.

At least this info explains why there's a conflict between the approaches.

Cheers,
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: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Speedpatterns in calculate(Advanced)Tour

Post by Bernd Welter »

Hello Volker,

the attached image shows the difference in the approaches of xRoute 1 and 2 when it comes to time calculation.
Comparison xRoute1 and xRoute2
Comparison xRoute1 and xRoute2
Best regards,
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: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Speedpatterns in calculate(Advanced)Tour

Post by Bernd Welter »

XServer2 offers the possibility to compute daytime dependant matrices:
https://xserver2-europe-eu-test.cloud.p ... %7C_____13

IN one of the next versions of xServer 2 we will access such a matrix within the tour optimization...

Best regards,
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