Select to view content in your preferred language

Avoid/Prefer Syntax

646
2
Jump to solution
04-17-2013 02:28 PM
JustinHunter
Regular Contributor
Hey all,

I'm a little confused with some of the output that's coming from my solves and I'd like to get clarification...

When I'm using prefer/avoid restrictions I'm not sure if I should be returning a true or a false. The way I have it set up now is... for the prefers, I return a false if the node meets my preference condition. For an avoid, I return a true if the node meets my avoidance condition.

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertGarrity
Esri Contributor
Hey Justin,

Are you setting up prefer/avoid restrictions on your network dataset? If so, the restriction should evaluate to True regardless of whether you want to avoid or prefer the network element. The Restriction Usage parameter that is created by default with any restriction attribute determines whether the restricted elements should be completely prohibited, avoided, or preferred.

I realize it sounds odd to prefer a restricted element, but in order to prefer/avoid elements, they need to be 'restricted' first. Going through the following tutorial may help clarify this:
http://resources.arcgis.com/en/help/main/10.1/#/Exercise_12_Performing_network_analysis_using_restri...

Robert

View solution in original post

0 Kudos
2 Replies
RobertGarrity
Esri Contributor
Hey Justin,

Are you setting up prefer/avoid restrictions on your network dataset? If so, the restriction should evaluate to True regardless of whether you want to avoid or prefer the network element. The Restriction Usage parameter that is created by default with any restriction attribute determines whether the restricted elements should be completely prohibited, avoided, or preferred.

I realize it sounds odd to prefer a restricted element, but in order to prefer/avoid elements, they need to be 'restricted' first. Going through the following tutorial may help clarify this:
http://resources.arcgis.com/en/help/main/10.1/#/Exercise_12_Performing_network_analysis_using_restri...

Robert
0 Kudos
JustinHunter
Regular Contributor
Oh, ok. I had it wrong, thanks for your clarification. I just modified one of my "Prefer: High" from false to true and it had the desired result.

Thanks so much. 🙂
0 Kudos