Preferred types of roads in vehicle profile

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
VPlachy
Posts: 21
Joined: Fri Nov 27, 2015 10:44 am
Location: Czech Republic
Contact:

Preferred types of roads in vehicle profile

Post by VPlachy »

Hello,
can you please advise on where to set preferred types of roads in vehicles profile for calculating a route ( xRoute.calculateExtendedRoute).

Image
Thank you,
Vladimír
Vladimír Plachý, DiS.
Developer windows applications
D&Comm s.r.o. - Czech Republic
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Preferred types of roads in vehicle profile

Post by Bernd Welter »

Hello Vladimir,

please check this section describing the profiles:
http://xserver.ptvgroup.com/fileadmin/f ... g%7C_____0


Here is a minimalistic snippet ;-)
It's not using highways (NC_0 and NC_1 are set to 2501) and doesn't matter to use NC_2..NC_7)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Profile>
	<Common coordinateFormat="OG_GEODECIMAL" language="en" majorVersion="1" minorVersion="0"/>
	<Routing majorVersion="2" minorVersion="0">
		<Course>
			<BasicDataRules>
				<Network rampMalus="10">
					<MalusByNetworkClass malus="2501"/>
					<MalusByNetworkClass malus="2501"/>
					<MalusByNetworkClass malus="0"/>
					<MalusByNetworkClass malus="0"/>
					<MalusByNetworkClass malus="0"/>
					<MalusByNetworkClass malus="0"/>
					<MalusByNetworkClass malus="0"/>
					<MalusByNetworkClass malus="0"/>
				</Network>
			</BasicDataRules>
		</Course>
	</Routing>
</Profile>
Attention:
Blocking "toll roads" isn't based on Network Class - check this:
http://xserver.ptvgroup.com/fileadmin/f ... Rules_Toll

Furthermore Ferries, Piggyback and MountainPasses have their own settings..
Best regards 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... :twisted:
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Preferred types of roads in vehicle profile

Post by Joost »

Side note: in the next version of map and guide internet you can directly export your vehicle to a usable XML profile for xRoute.
Joost Claessen
Senior Technical Consultant
PTV Benelux
VPlachy
Posts: 21
Joined: Fri Nov 27, 2015 10:44 am
Location: Czech Republic
Contact:

Re: Preferred types of roads in vehicle profile

Post by VPlachy »

Motorways is NC_0 and Fast Route is NC_1? And what about those other values NC_x?
Vladimír Plachý, DiS.
Developer windows applications
D&Comm s.r.o. - Czech Republic
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Preferred types of roads in vehicle profile

Post by Bernd Welter »

Hello Vlad,
I have limited access at the moment.
Check the data type NetworkClass in the standard API doc. The enum starts with highways and ends up somewhere at "pedestrians and cycle lanes".
Best regards
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... :twisted:
Post Reply