Is there a way to take into account of vehicle direction when calculating route?

3697
4
Jump to solution
02-10-2015 03:19 PM
HuyHo
by
Occasional Contributor

We are playing around with routing in our application.  Our requirement is to calculate route from the vehicle current location to a destination.  The problem we are facing is if our vehicle is travelling in a specific direction on the road, we'd prefer to have a direction that would not force the vehicle to make a U-turn.  Is there a way to do this?  We've review the RouteParameters class and there doesn't appear to be anything to help with this issue.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
AndySmith
Esri Contributor

I don't believe the software has a concept of a "moving" vehicle or direction of travel. The direction of travel is based solely upon the network attributes.

i.e. if you place the start point on a section of network that allows travel in both directions, then it will travel the quickest way to the destination from that point, albeit, you vehicle may be pointing /travelling the other way. If your start point is on a section of network that is one-way, then it will force the route along the network in that direction until it arrives at a junction so that it can turn.

I therefore think that you will need to configure you network to have separate network sections limiting travel in one direction only, i.e. each road will have two sections, e.g. north and south bound travel, so that you can start on the correct section.

View solution in original post

0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor

RestrictUTurns property looks like what you are looking for.

You can set it to NoBacktrack.

0 Kudos
HuyHo
by
Occasional Contributor

The documentation says that RestrictUTurns applies to routing decision at junctions only..  Perhaps my original question was not clear.  Suppose I am heading east and my destination is somewhere on the west side.  The routing calculation will take my current position and tell me to head west.  A more natural approach, and what I would do if I am driving is to continue on the current street (heading east), at the next intersection I would make a left/right turn to another street, then proceed to make my way west on the next turn.

I want to be able to tell it to find me the route, but start by heading in the direction I am traveling on.

We were thinking of a work around by adding an intermediate stop just slightly ahead of the current location to force it to head in that direction, but the routing directions ends up including directions for the intermediate stop, which makes it confusing to follow for the user.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

You can restrict U-turns at several levels, here is the U-turn documentation link in case you didn't find it.

0 Kudos
AndySmith
Esri Contributor

I don't believe the software has a concept of a "moving" vehicle or direction of travel. The direction of travel is based solely upon the network attributes.

i.e. if you place the start point on a section of network that allows travel in both directions, then it will travel the quickest way to the destination from that point, albeit, you vehicle may be pointing /travelling the other way. If your start point is on a section of network that is one-way, then it will force the route along the network in that direction until it arrives at a junction so that it can turn.

I therefore think that you will need to configure you network to have separate network sections limiting travel in one direction only, i.e. each road will have two sections, e.g. north and south bound travel, so that you can start on the correct section.

0 Kudos