Select to view content in your preferred language

Regarding giving restrictions (oneway) when building road network

295
1
Jump to solution
06-04-2024 10:43 AM
mohanalogakrishnan
New Contributor II

This post is similar to that of

Network Analyst Vehicle Routing Problem One Way Streets

 

I have a road layer with a field called Oneway ('B' - both ways, 'F' - as digitised (From-To), and  'N'- None). I am building road network layer and including restrictions in the travel directions. Therefore, I would like to use the existing script.

ORIGINAL SCRIPT

      Streets (From-To): Field -
          Prelogic:
            restricted = False
            Select Case UCase([Oneway])
              Case "N", "TF", "T": restricted = True
            End Select
          Expression: restricted
      Streets (To-From): Field -
          Prelogic:
            restricted = False
            Select Case UCase([Oneway])
              Case "N", "FT", "F": restricted = True
            End Select

 

Since, I have only one direction. Could you please confirm the following script is correct:

      Streets (From-To): Field -
          Prelogic:
            restricted = False
            Select Case UCase([Oneway])
              Case "N",  "F": restricted = False
            End Select
          Expression: restricted
      Streets (To-From): Field -
          Prelogic:
            restricted = False
            Select Case UCase([Oneway])
              Case "N", "F": restricted = True
            End Select

 

I appreciate your help on this matter. Thank you for your time.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JaySandhu
Esri Regular Contributor

The script looks ok. I would suggest that you go ahead and use it, build the network and then add it to Pro and use the Explore tool to check the network cost/restriction values and make sure they are what you need them to be. More details on Explore Network here:

Explore Network—ArcGIS Pro | Documentation

Jay

View solution in original post

1 Reply
JaySandhu
Esri Regular Contributor

The script looks ok. I would suggest that you go ahead and use it, build the network and then add it to Pro and use the Explore tool to check the network cost/restriction values and make sure they are what you need them to be. More details on Explore Network here:

Explore Network—ArcGIS Pro | Documentation

Jay