How to Define a Permanent City Access Permit in Route Planning
- Edmond Dantes
- Posts: 6
- Joined: Tue Apr 01, 2025 7:14 am
How to Define a Permanent City Access Permit in Route Planning
Hello everyone!
I’d like to ask for your help with the following topic:
“Specifying a Permanent Urban Transit Permit in PTV Route Planning.”
Our company has a permanent annual truck entry permit for a neighboring city to our site.
How can I inform the PTV route planner that it is allowed to plan routes passing through this city?
I have created a polygon that includes the city’s public roads, but the basic planner does not allow me to use it.
How can I generally specify that we have a permanent entry permit for a more distant city, and the route planner should take this into account if necessary?
Thank you in advance for your support and responses!
I’d like to ask for your help with the following topic:
“Specifying a Permanent Urban Transit Permit in PTV Route Planning.”
Our company has a permanent annual truck entry permit for a neighboring city to our site.
How can I inform the PTV route planner that it is allowed to plan routes passing through this city?
I have created a polygon that includes the city’s public roads, but the basic planner does not allow me to use it.
How can I generally specify that we have a permanent entry permit for a more distant city, and the route planner should take this into account if necessary?
Thank you in advance for your support and responses!
- Bernd Welter
- Site Admin
- Posts: 2806
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: How to Define a Permanent City Access Permit in Route Planning
Hello Edmond,
which specific restriction does the vehicle currently violate when it tries to enter the city? Did you already avaluate the various vehicle properties we offer in the Routing API? As you can see in the screenshot: some of the restrictions apply for named cities.
Is the city "top secret" or can we share this scenario and even the routing request in public? If not please create a helpdesk ticket and we will try to reproduce your story together with you.
Bernd
which specific restriction does the vehicle currently violate when it tries to enter the city? Did you already avaluate the various vehicle properties we offer in the Routing API? As you can see in the screenshot: some of the restrictions apply for named cities.
Is the city "top secret" or can we share this scenario and even the routing request in public? If not please create a helpdesk ticket and we will try to reproduce your story together with you.
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...

- Edmond Dantes
- Posts: 6
- Joined: Tue Apr 01, 2025 7:14 am
Re: How to Define a Permanent City Access Permit in Route Planning
Here is the polygon of DABAS:
Code: Select all
{
"$type": "SegmentsBySurroundingPolygonRequest",
"resultFields": {
"polyline": true,
"descriptors": true
},
"polygon": {
"plain": {
"$type": "Polygon",
"polygonRings": [
{
"polyline": [
{ "y": 47.2489881355028, "x": 19.23258887365805 },
{ "y": 47.2289418550714, "x": 19.20718299131623 },
{ "y": 47.2116866590905, "x": 19.22228919162758 },
{ "y": 47.1836933226815, "x": 19.19345008194227 },
{ "y": 47.1435437846652, "x": 19.20718299131623 },
{ "y": 47.1033639012747, "x": 19.36785803099153 },
{ "y": 47.1640891996857, "x": 19.39532384973944 },
{ "y": 47.2191490546151, "x": 19.35275183068017 },
{ "y": 47.2135523564237, "x": 19.32940588474445 },
{ "y": 47.2536489741963, "x": 19.28683386568518 },
{ "y": 47.2387328465416, "x": 19.25936804693727 },
{ "y": 47.2555131948249, "x": 19.28546057474778 }
]
}
]
}
}
}
- Bernd Welter
- Site Admin
- Posts: 2806
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: How to Define a Permanent City Access Permit in Route Planning
Looks more like an xServer2 topic then...
Is that helpful?
Bernd
From what I see in the first reponse the segments inside Dabas are partially restricted to "delivery" which cause violations.
I applied
- Vehicle: isDelivery=true
- Routing.Course.SPecialAreas.deliveryOnlyMalus=100 (just a low random penalty)
Is that helpful?
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...

- Edmond Dantes
- Posts: 6
- Joined: Tue Apr 01, 2025 7:14 am
Re: How to Define a Permanent City Access Permit in Route Planning
I attached an JSON (in txt file) for the Raw Request Runner.
I do not know yet how to apply your answer in that.
I do not know yet how to apply your answer in that.
- Attachments
-
- Bugyi-Cegled.txt
- (3.06 KiB) Downloaded 54 times
- Bernd Welter
- Site Admin
- Posts: 2806
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: How to Define a Permanent City Access Permit in Route Planning
Well, this is what immediately caught my eyes:
Bernd
is created by
- "distanceTimeWeighting": 100 - causes the engine to look for a very FAST route, even if a detour applies. Probably you should use values between 20 and 80.
- - means you are not allowed to use "deliveryOnly" segments. Set this value to true and...
Code: Select all
"isDelivery": false
- choose your penalties... also you did NOT specify a deliveryOnlyPenalty (default is 2500, so almost forbidden)
Code: Select all
"specialAreas": { "residentsOnlyPenalty": 2500, "urbanPenalty": 500, "forbiddenLowEmissionZonePenalty": 2500, "minimumUrbanNetworkClass": 1 },
- - the "2" means that outside an area of 2km around any involved waypoint we do not "see" those network classes 5,6,7 but some roads in Dabas are NC 5.
Code: Select all
"minimumDistancesFromWaypoint": [ "UNBOUNDED", "UNBOUNDED", "UNBOUNDED", "UNBOUNDED", "UNBOUNDED", "2", "2", "2" ]
Bernd
is created by
Code: Select all
{
"waypoints": [
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 19.14553,
"y": 47.21471
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 19.75410050424403,
"y": 47.18360076219978
}
}
}
],
"resultFields": {
"polyline": true,
"emissions": true,
"guidedNavigationRoute": true,
"eventTypes": [
"MANEUVER_EVENT"
],
"monetaryCostsReport": true,
"toll": {
"enabled": true,
"sections": true
}
},
"storedProfile": "truck40t",
"requestProfile": {
"vehicleProfile": {
"weight": {
"emptyWeight": 8000,
"totalPermittedWeight": 40000,
"loadWeight": 32000
},
"legalCondition": {
"isEmergency": false,
"isDelivery": true
},
"preferredRouteTypes": "DE_LONG_TRUCK,LOCAL_TRANSPORTATION",
"electronicTollCollectionSubscriptions": "AT_GOBOX"
},
"routingProfile": {
"course": {
"combinedTransport": {
"boatPenalty": 2500,
"railPenalty": 2500
},
"distanceTimeWeighting": 20,
"violations": {
"enabled": true
},
"toll": {
"tollPenalty": 0
},
"network": {
"rampPenalty": 0,
"penaltiesByNetworkClass": {
"penalties": [
0,
0,
0,
0,
0,
50,
50,
51
]
}
},
"specialAreas": {
"residentsOnlyPenalty": 100,
"urbanPenalty": 100,
"deliveryOnlyPenalty" : 100,
"forbiddenLowEmissionZonePenalty": 100,
"minimumUrbanNetworkClass": 1
},
"maneuver": {
"uTurnCost": 0
}
},
"linking": {
"minimumNetworkClass": 0,
"maximumNetworkClass": 7
},
"searchSpace": {
"heuristicAggressiveness": 100,
"excludeByNetworkClass": {
"minimumDistancesFromWaypoint": [
"UNBOUNDED",
"UNBOUNDED",
"UNBOUNDED",
"UNBOUNDED",
"UNBOUNDED",
"211",
"211",
"211"
]
}
}
},
"featureLayerProfile": {
"parameters": [
{
"key": "preferredRoutePenalty",
"value": "-75"
}
],
"themes": [
{
"id": "PTV_PreferredRoutes",
"enabled": true
},
{
"id": "PTV_TruckSpeedPatterns",
"enabled": true
},
{
"id": "PTV_TrafficIncidents",
"enabled": true
},
{
"id": "PTV_TruckAttributes",
"enabled": true
}
]
}
},
"routeOptions": {
"timeConsideration": {
"$type": "ExactTimeConsiderationAtStart",
"referenceTime": "2025-03-08T10:35:45+01:00"
},
"calculationCriteria": "ABSTRACT_COSTS",
"currency": "EUR",
"emissionOptions": {
"valueScenarios": [
{
"$type": "EmissionValueScenario_HBEFA_3_2",
"scenarios": [
"CURRENT_ROUTE"
]
}
]
},
"monetaryCostOptions": {
"costPerKilometer": 1.38,
"workingCostPerHour": 0.1,
"costPerFuelUnit": 0.0
}
},
"geometryOptions": {
"responseGeometryTypes": [
"PLAIN"
]
},
"coordinateFormat": "EPSG:4326"
}
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...

- Edmond Dantes
- Posts: 6
- Joined: Tue Apr 01, 2025 7:14 am
Re: How to Define a Permanent City Access Permit in Route Planning
"there's not just a single parameter that has a relevant impact in this story - you need to discuss a proper combination!"
Yes, it is true. I have changed the parameters a lot. But I could not find any perfect solution.
My clear first question is actually yet. How can I allow my trucks to drive throught an city we have an permanent permission in? For example throught Dabas.
Yes, it is true. I have changed the parameters a lot. But I could not find any perfect solution.
My clear first question is actually yet. How can I allow my trucks to drive throught an city we have an permanent permission in? For example throught Dabas.
- Bernd Welter
- Site Admin
- Posts: 2806
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: How to Define a Permanent City Access Permit in Route Planning
Looks like the core request we are dealing with has been designed to use many different optional parameters.
Wo defined the specific values for them?
The reason why I am asking is:
So for example one reason why we encountered a detour:
I can’t just give you a simple “set blabla from xx to yy”: In the end the user must digest and understand each one of the parameters and then decide consciously what to do. Also being in charge of “this will lead to consequences somewhere else.
So for example if your given requests sets the urban penalty to 500: might be relevant. But who decided to use 500 for this in the past?
Shall we set up a routing session with you and your colleagues who defined the initial values?
Bernd
PS: Let me ask the other way round: there's a parameter "urbanPenalty" which is set to 500. This means that each segment which is assigned the category "urban" will temporarily produce additional costs which pushes detours around inner cities. But:
Wo defined the specific values for them?
The reason why I am asking is:
- If we just change 2-3 parameters to solve the transit through Dabas we might create new issues somewhere else. This has to be taken into consideration.
So for example one reason why we encountered a detour:
- - The parameter set pushed a short driving time – but the desired route would take some extra time
- Ah, the road network is filtered by some relevant roads “minimumDistancesFromWaypoint”, this can’t work, too… next iteration step

So for example if your given requests sets the urban penalty to 500: might be relevant. But who decided to use 500 for this in the past?

Bernd
PS: Let me ask the other way round: there's a parameter "urbanPenalty" which is set to 500. This means that each segment which is assigned the category "urban" will temporarily produce additional costs which pushes detours around inner cities. But:
- decreasing the value (e.g. to 0) doesn't mean we will look for inner cities
- increasing it (e.g. to 1000) doesn'T mean that we won't drive through inner cities
- There is a clear dependency to all the other >100 properties!
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...

- Edmond Dantes
- Posts: 6
- Joined: Tue Apr 01, 2025 7:14 am
Re: How to Define a Permanent City Access Permit in Route Planning
Thank you for the answers.
Yes, you’re right about what you described. We’re experimenting with many different parameters. I can also see that changing a single parameter on its own might cause problems elsewhere. We increase, decrease, or modify certain values in pairs, etc.
Our company has a year-round permit for entering and passing through the town of Dabas. I was thinking that using coordinates, it might be possible to define an area—like a polygon—within which entry and transit are allowed.
On its own, I can easily solve the issue of driving through Dabas in just a moment:
{
"id": "PTV_TruckAttributes",
"enabled": false
}
This way, the planner immediately routes through Dabas. Of course, from that point on, it causes serious and unacceptable planning errors along the rest of the route as you described. We’re experimenting too. But this still seems to be a rather difficult problem to solve.
Thank You
Yes, you’re right about what you described. We’re experimenting with many different parameters. I can also see that changing a single parameter on its own might cause problems elsewhere. We increase, decrease, or modify certain values in pairs, etc.
Our company has a year-round permit for entering and passing through the town of Dabas. I was thinking that using coordinates, it might be possible to define an area—like a polygon—within which entry and transit are allowed.
On its own, I can easily solve the issue of driving through Dabas in just a moment:
{
"id": "PTV_TruckAttributes",
"enabled": false
}
This way, the planner immediately routes through Dabas. Of course, from that point on, it causes serious and unacceptable planning errors along the rest of the route as you described. We’re experimenting too. But this still seems to be a rather difficult problem to solve.
Thank You