Hi @sirneeraj
Are you able to share your workspace and some sample data which illustrates the u-turn behaviour you're seeing?
If you're unable to share your data publicly, please create a support case at https://community.safe.com/s/submit-case/
How complex are your from to lines, do you have multiple 'stops'?
I'm presuming you want an option where a u turn is avoided if a path can be found even if it results in a longer path, but allow a u turn when there is no other option. So avoid the uturn at point 2 on the left but allow it at point 2 on the right?
I'm not sure there is a simple way to allow this presently
How complex are your from to lines, do you have multiple 'stops'?
I'm presuming you want an option where a u turn is avoided if a path can be found even if it results in a longer path, but allow a u turn when there is no other option. So avoid the uturn at point 2 on the left but allow it at point 2 on the right?
I'm not sure there is a simple way to allow this presently
Yes, exactly. My from-to lines are pretty complex, and they each have at least 100 intermediate stops. Your graphic illustrates the situation precisely. I would like to avoid a U-turn at point #2 in the graphic on the left and allow it at point #1, #2, and #3 on the right since those are all dead-ends and there is no other option. I was hoping there was a way to do this using FME, even if its a workaround solution.
Hi @sirneeraj
Are you able to share your workspace and some sample data which illustrates the u-turn behaviour you're seeing?
If you're unable to share your data publicly, please create a support case at https://community.safe.com/s/submit-case/
@debbiatsafe : the graphic from @ebygomm illustrates the situation precisely. Currently, from what I see FME only has the ability to either allow or disallow U-turns across the entire network, and there is no capability to allow U-turns ONLY at dead-ends. Are there any workaround solutions to this problem?
Yes, exactly. My from-to lines are pretty complex, and they each have at least 100 intermediate stops. Your graphic illustrates the situation precisely. I would like to avoid a U-turn at point #2 in the graphic on the left and allow it at point #1, #2, and #3 on the right since those are all dead-ends and there is no other option. I was hoping there was a way to do this using FME, even if its a workaround solution.
What Cost Type are you using in your network?
Yes, exactly. My from-to lines are pretty complex, and they each have at least 100 intermediate stops. Your graphic illustrates the situation precisely. I would like to avoid a U-turn at point #2 in the graphic on the left and allow it at point #1, #2, and #3 on the right since those are all dead-ends and there is no other option. I was hoping there was a way to do this using FME, even if its a workaround solution.
The Cost Type parameter in the ShortestPathFinder is set to "By Length"
Yes, exactly. My from-to lines are pretty complex, and they each have at least 100 intermediate stops. Your graphic illustrates the situation precisely. I would like to avoid a U-turn at point #2 in the graphic on the left and allow it at point #1, #2, and #3 on the right since those are all dead-ends and there is no other option. I was hoping there was a way to do this using FME, even if its a workaround solution.
A slightly hacky way is to identify the route segments where u-turns would be allowed and duplicate these segments.
@debbiatsafe : the graphic from @ebygomm illustrates the situation precisely. Currently, from what I see FME only has the ability to either allow or disallow U-turns across the entire network, and there is no capability to allow U-turns ONLY at dead-ends. Are there any workaround solutions to this problem?
Unfortunately, the behaviour you're looking for isn't natively possible in the ShortestPathFinder transformer at this time.
My colleague suggested weighting the segments of the network. Some questions to consider with this method: how close would the vertex of the From-To have to be to a dangle on the network to be acceptable? How much longer is acceptable to avoid a U-turn?
Alternatively, you can also try the suggestion from ebygomm about identifying dangles in your network (where U-turns would be acceptable), duplicating those dangles, and run the ShortestPathFinder but disallow U-turns within the parameters.