Problems with routing with enabled violations

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
kgrudzinski
Posts: 12
Joined: Fri Feb 19, 2016 10:56 am

Problems with routing with enabled violations

Post by kgrudzinski »

Hello,

I have following problem. I am trying to calculate route with certain types of roads blocked. Although I have set parameter ALLOW_SEGMENT_VIOLATIONS to true (as suggested here) I am getting error that route cannot be found.

Code: Select all

{
	"errorMessage": "cannot calculate route (concerning leg 1)",
	"errorKey": "2500",
	"exceptionType": "com.ptvag.xserver.xroute.XRouteException"
}
Roads are blocked in profileXMLSnippet as shown below

Code: Select all

<BasicDataRules>
	<Network rampMalus="10">
		<MalusByNetworkClass malus="0"/>
		<MalusByNetworkClass malus="0"/>
		<MalusByNetworkClass malus="0"/>
		<MalusByNetworkClass malus="0"/>
		<MalusByNetworkClass malus="0"/>
		<MalusByNetworkClass malus="2501"/>
		<MalusByNetworkClass malus="2501"/>
		<MalusByNetworkClass malus="2501"/>
	</Network>
</BasicDataRules>
I have tried enabling violations both with routing parameters and xml profiles. I am using PTV xServer INTERNET with Javascript so maybe the problem is not with routing but with Javascript API?

Full request options are in the attached file.

Thank You in advance.

Krzysztof
Attachments
route_request.zip
route request options
(1.45 KiB) Downloaded 268 times
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Problems with routing with enabled violations

Post by Joost »

Your options look in contradiction to me. You first block of a lot of roads types, and then try to open them up again with segment violations. Why not use malus values of 2500 (very very strong avoidance) instead of 2501 or BAN (blocks the segment) ?
Joost Claessen
Senior Technical Consultant
PTV Benelux
kgrudzinski
Posts: 12
Joined: Fri Feb 19, 2016 10:56 am

Re: Problems with routing with enabled violations

Post by kgrudzinski »

I would like to block certain types of roads for trucks, but if route cannot be found (because of those restrictions) I would like to show what parts of route are restricted. That is why I enable violations - I have the route and by checking which segments have violations I can display this information for the user (e.g. by drawing allowed and blocked route segments with different colours). If I set malus value to 2500, then road is allowed, so I do not get information about violations.

In other words: if route cannot be found because of restrictions, calculate route anyway but return information about violations.
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Problems with routing with enabled violations

Post by Joost »

I did some quick checking internally and it looks like segment violations does not work if you ban complete network classes. This goes a better deeper then I can answer on a forum. I recommend you raise a support ticket through the normal channels.
Joost Claessen
Senior Technical Consultant
PTV Benelux
kgrudzinski
Posts: 12
Joined: Fri Feb 19, 2016 10:56 am

Re: Problems with routing with enabled violations

Post by kgrudzinski »

I am not sure if this problem is related only to road networks, because I have got same error while routing parameter AVOID_URBAN_AREAS was set to BAN and no road was banned. Anyway I will contact support as You suggest.
kgrudzinski
Posts: 12
Joined: Fri Feb 19, 2016 10:56 am

Re: Problems with routing with enabled violations

Post by kgrudzinski »

I have got an answer from support: ALLOW_SEGMENT_VIOLATIONS only applies to truck attributes. For all other restrictions this parameter is ignored.
Post Reply