How to apply PTV_TruckAttributes (xRoute1)

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
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

How to apply PTV_TruckAttributes (xRoute1)

Post by Bernd Welter »

Hi there,

recently I've been asked whether requesting a regular profile such as smt-truck-40t-slow is sufficient to ensure the consideration of the vehicles dimensions, weights, freight categories and so on in the call to xRoute 1. In fact this is not enough: you also have to tell the routing engine to match these properties with additional PTV_TruckAttributes content. To achieve this you need to add the following keys to the profile:
1. AdditionalDataRules=true : this will tell the engine that additional data content will be considered.
2. FeatureLayer themes : this will tell the enging WHICH content has to be considered

Code: Select all

<Profile>
  <FeatureLayer majorVersion="1" minorVersion="0">
    <GlobalSettings enableTimeDependency="true" enableVehicleDependency="true" />
    <Themes>
      <Theme id="PTV_TruckAttributes" enabled="true" priorityLevel="0" />
    </Themes>
  </FeatureLayer>
  <Routing majorVersion="2" minorVersion="0">
    <Course>
      <AdditionalDataRules enabled="true" />
    </Course>
  </Routing>
</Profile>
left: no attributes activates. The route follows a path under a bridge with a 2.60m height restriction.<br />right: the vehicle's height is set to more than 2.6m and the additional content is content is activated. This leads to the necessary detour.
left: no attributes activates. The route follows a path under a bridge with a 2.60m height restriction.
right: the vehicle's height is set to more than 2.6m and the additional content is content is activated. This leads to the necessary detour.
You can add those XML fragments either in the server side XML profile or override them through the well known snippet mechanism (in the CallerContex).

This also works fine with other FeatureLayers such as PTV_TruckSpeedPatterns, PTV_SpeedPatterns or PTV_RestrictionZones.

Best regards,
Bernd

PS: in xServer2 you can define these properties through the regular API (request profile)
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