Hello,
During implementation of xServer, we encountered an issue with recalculation of high-performance routing networks.
High-performance routing networks are created with PTV_SpeedPatterns and PTV_TrafficIncidents feature layers in the morning for several different TimeConsiderations throughout the day. We wish to update them during the day to account for possible traffic incidents.
When trying to recreate the high-performance routing network, it fails with the following error message: "A high-performance routing network with the requested profile parameter already exists and has been created by a user request already. Check the id field of this result limitations."
One possible solution is to delete the high-performance routing network in question before recreating it. However, ideally, we would like to avoid the downtime of not having a valid HPRN.
Another solution is to use different scopes. I would prefer to avoid using this as we would then need to store data about which scope to use when, what HPRNs are in which scope, and when the HPRNs with said scope were created.
Are there any other possible solutions?
Thank you and best regards,
Igor
Recalculating high performance routing network
- Bernd Welter
- Site Admin
- Posts: 2860
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Recalculating high performance routing network
Hi Igor,
from my perspective the following approach might cover your requirement... how about this?
It switches just when everything is ready to be used.
OK, maybe a bit "complicated" but at least thgis would cover what you need?
Or did I miss an aspect?
Bernd
from my perspective the following approach might cover your requirement... how about this?
- Imagine to have a variable "currentScope" that is set to an initial value, e.g. "Scope N".
- Now you know it is time to create new searchgraphs for a "scope N+1"
- Write a procedure that creates all relevant info for the new scope (without a "does already exist" conflict)
- at the end of the procedure you increase the variable currentScope to "scope n+1"
- then you delete all data from the old "scope n"
- and so on.
It switches just when everything is ready to be used.
OK, maybe a bit "complicated" but at least thgis would cover what you need?
Or did I miss an aspect?
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...
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...

Re: Recalculating high performance routing network
Hi,
yes that is a possible solution, but still requires data persistance of said variable N, in order to know when we left on.
But if we expand on the principle:
Thank you for quick response
Igor
yes that is a possible solution, but still requires data persistance of said variable N, in order to know when we left on.
But if we expand on the principle:
- we can have 2 scopes N and M
- when creating new searchGraph, we check which scope has searchGraph in question
- we create new searchGraph in opposite scope (N or M)
- delete previus searchGraph
Thank you for quick response

Igor
- Bernd Welter
- Site Admin
- Posts: 2860
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Recalculating high performance routing network
HI Igor,
I like the way you are thinking
Switching instead of counting sound s ok to me.
Does this mean, the task is resolved?
Bernd
I like the way you are thinking

Switching instead of counting sound s ok to me.
Does this mean, the task is resolved?
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...
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...

-
- Posts: 20
- Joined: Fri Dec 29, 2017 9:00 am
Re: Recalculating high performance routing network
PTV_TrafficIncidents layers are dynamic data that gets updated every few minutes. There are different modes to run the content update service:
To deal with that content snapshots were introduced. With them you can persist the state of the PTV_TrafficIncidents layers. Afterwards, you can use this content snapshot to create a HPR network and of course to calculate routes or distance matrices.
Then you could also stay within one scope as each HPR network would use its own content snapshot. I currently do not see a possibility without managing some sort of state in your application as the xServer doesn't offer replacements of HPR networks.
Best regards,
Max
- Continuously: New data replaces the existing data as soon as it is available.
- On demand: A content update is triggered through a request by the user.
To deal with that content snapshots were introduced. With them you can persist the state of the PTV_TrafficIncidents layers. Afterwards, you can use this content snapshot to create a HPR network and of course to calculate routes or distance matrices.
Then you could also stay within one scope as each HPR network would use its own content snapshot. I currently do not see a possibility without managing some sort of state in your application as the xServer doesn't offer replacements of HPR networks.
Best regards,
Max
Maximilian Vogel
Developer
PTV Logistics
Developer
PTV Logistics