Blocked segments

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
sorin.slotea
Posts: 3
Joined: Mon May 15, 2017 10:03 am

Blocked segments

Post by sorin.slotea »

How to identify street segments that are blocked but used due to missing alternatives?
Thank you!
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Blocked segments

Post by Bernd Welter »

Hello Sorin,

I assume you need to gather the segments that are returned similar to this message taken from MAP&GUIDE Internet:
Message taken from MAP&GUIDE Internet
Message taken from MAP&GUIDE Internet
The term you are looking for is probably the violation. Violations occur if a route uses segments with constraints (e.g. TruckAttributes) and the routing parameters allow such conflicts.

You can use the following parameters to request so-called "violation" information as part of the routing output:
  • RoutingOption
    Explicit routing options
    Explicit routing options
  • Via snippet / profile:

    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>
    			<Violations>
    				<SegmentBlockingViolations cost="50000" enabled="false"/>
    			</Violations>
    		</Course>
    	</Routing>
    </Profile>
Depending on the additional COST value the server will ignore some constraints if it is cheaper (virtually spoken) to drive through the conflict instead of performing a detour.
Sample route based on TruckAttributes violations. COST is set to 0. Routing takes regular track as without TruckAttributes but reports the conflicts.
Sample route based on TruckAttributes violations. COST is set to 0. Routing takes regular track as without TruckAttributes but reports the conflicts.
The violations are reported in the RouteListSegment list (right). The column AdditionalRE just mentions that there are soem additional constraints - whether they are violated or not.
The violations are reported in the RouteListSegment list (right). The column AdditionalRE just mentions that there are soem additional constraints - whether they are violated or not.
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:
sorin.slotea
Posts: 3
Joined: Mon May 15, 2017 10:03 am

Re: Blocked segments

Post by sorin.slotea »

Thank you! It works!
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Blocked segments

Post by Bernd Welter »

By the way: the cost value used in MAP&GUIDE Internet is 50000.

Cheers,
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:
sorin.slotea
Posts: 3
Joined: Mon May 15, 2017 10:03 am

Re: Blocked segments

Post by sorin.slotea »

Thank you!
Post Reply