VehicleProfile for planTours (xTour 2)

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.

VehicleProfile for planTours (xTour 2)

Postby kraucal » Tue Apr 09, 2019 12:00 pm


I recently tested out the xTour 2 API and I have not been able to find a way to set the VehicleProfile successfully. It does not affect the result when I change the VehicleProfile in the RequestBase.RequestProfile of the PlanToursRequest. When I do the same thing with the xRoute 2 API it does take effect.
Also it might be required for us to set different VehicleProfiles for each set of Vehicles of the Fleet. With that I mean things like maximumSpeed etc... that are avaiable in VehicleProfile and not the Touring specific attributes to set in the Vehicle class (like maximumQuantityScenarios).

Another question is why the results of travelTime and distance of a xRoute 2 request are any different from the result of a very simple PlanToursRequest (xTour 2)(with same start and end points of course (even same times))(without startLocation of the Vehicle so that the start point is the first location) with 1 vehicle and 1 pickupanddelivery order. Shouldn't in this case the travelTime and distance be equal to the result of the xRoute 2 result. Am I missing something? Are the effecive Vehicle-calculation-properties used in xTour and xRoute not the same (and how to change them effectively in xTour 2 as above...)(Thats how I did come to my primary question above)?

Thanks in advance :) !
Posts: 2
Joined: Wed Apr 03, 2019 7:57 am

Re: VehicleProfile for planTours (xTour 2)

Postby Bernd Welter » Tue Apr 09, 2019 12:28 pm

Hello Alex,

the routing behaviour of xRoute and xTour uses different algorithms:

While xRoute performs a static A:B routing the tour optimization is based on distance matrices which are created via a sequence of 1:N routings (so-called "one to many" routings).

The temporary data structures created by these different approaches could be equal but they don't have to.
More or less this depends on the category scope which then limits the 100% search space to a more performant space.

The second question "how to activate routing in xTour 2 optimization?" is a different topic: for a proper answer I need the request you use. On a theoretical base I assume the following conditions to be considered:
- The request profile isn't relevant
- Before you can use a road based distance matrix in xTour (or xCluster...) to determine driving times and distances you need to create the distance matrix via xDima. This call will provide a distance matrix ID
- in the tour optimization call with xTour you refer to this dima ID
Process of
1. searchgraph calculaltion
2. dima creation
3. optimization
Requires 3 APIs in xServer2

If I am right then your optimization call is based on no distance matrix ID which means "airline" is used.

Best regards,

PS: provide the request via email to for a custom analysis (via a ticket)
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1457
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xTourServer