High Performance Routing in createDistanceMatrix

deals with computation of distance matrices
Post Reply
s.warnat
Posts: 3
Joined: Tue Nov 19, 2019 4:30 pm

High Performance Routing in createDistanceMatrix

Post by s.warnat »

Hy,

We was able to migrate our implementation from xServer v1 to xServer v2 easily.
And I'm sure sure later we will be thankful about the push to do it right, at the beginning. ;)

Our last problem is one of the major one:
How can we enable High Performance Routing in xDima / createDistanceMatrix request?
I search documentation from top till down and found everything to use HPR in xRoute.
But xDima (And so xTour) denied to apply high performance routing of the truck40t profile.

Sample Request without enabled Feature Layer TruckAttributes:

Code: Select all

{
   "storedProfile": "truck40t",
   "startLocations":[
      {
         "$type":"OffRoadRouteLocation",
         "offRoadCoordinate":{
			  "x": 6.984220,
			  "y": 51.046738
         }
      },
      {
         "$type":"OffRoadRouteLocation",
         "offRoadCoordinate":{
			  "x": 6.947162,
			  "y": 51.018169
         }
      },
      {
         "$type":"OffRoadRouteLocation",
         "offRoadCoordinate":{
			  "x": 6.982905,
			  "y": 51.039582
         }
      },
      {
         "$type":"OffRoadRouteLocation",
         "offRoadCoordinate":{
			  "x": 6.951682,
			  "y": 51.000442
         }
      }
   ]
}
To add the Feature Layer is not the topic, because it works and generate correct values.
When I force the usage of High Performance Network by adding

Code: Select all

	"distanceMatrixOptions": {
		"routingType": "HIGH_PERFORMANCE_ROUTING"
	},   
I got this error, when working against xserver2-europe-eu-test.cloud.ptvgroup.com:

Code: Select all

No suitable high performance routing network found. The available networks can be retrieved by the listHighPerformanceRoutingNetworks operation of the xData module. See also the technical concept on high performance routing.
The High Performance Network I would like to use it this: (Removed last chars, because I'm not sure if it is private)

Code: Select all

    {
      "highPerformanceRoutingNetworkDescription": {
        "id": "4444c7bc-ced1-4201-XXXX-XXXXXX",
        "label": "ZZ-EUR_truck40t",
        "size": 4396783111
      }
    }
In my opinion xDima should automatically found the profile, because I define the storedProfile to "truck40t".

Thanks!

Stefan
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: High Performance Routing in createDistanceMatrix

Post by Joost »

Our xServer 2 cloud clusters are running a world map. Generating a HPR for the entire world is to much so we use geographic restrictions to limit it to Europe. You also need to pass these same restrictions.

Have a look at http://devblog.ptvgroup.com/2019/05/07/ ... version-2/ , paragraph How to use HPR for infromation and code snippets.
Joost Claessen
Senior Technical Consultant
PTV Benelux
s.warnat
Posts: 3
Joined: Tue Nov 19, 2019 4:30 pm

Re: High Performance Routing in createDistanceMatrix

Post by s.warnat »

Hy Joost,

Thanks for your response.
And it sounds logical and was the missing point.

Why not add this to documentation? :)
I used Google intensively to find the solution, but the headline of this post, don't pronounce a good developer source.

But now I see, that it will useful to also read mucuh older Devblog posts.

Thanks!

Stefan
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: High Performance Routing in createDistanceMatrix

Post by Joost »

It is explain in the technical concepts documentation: https://xserver2.cloud.ptvgroup.com/das ... outing.htm .

in the Integration samples there are samples that take this theory in practice:
https://xserver2.cloud.ptvgroup.com/das ... outing.htm

I don't think google has indexed our documentation for xServer 2 yet.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Post Reply