I want to calculate a route with ArcGIS Network Analyst that only passes once from every road instead of the proposed routes that network analyst produces now which return to the same road more than once.

calculated route

Does anyone know the evaluators and needed expressions to calculate this?

I am thinking to add a new attribute in the network dataset properties, i.e called Uturns that will have cost as usage and will make it more costly for the calculated route to make a uturn instead of using the hole road till the next junction.

I came with an idea that if I use a script that won't allow the next road to be the same with the previous I might have the desired result. The script is below.

restricted = False

A= OBJECTID //current road object id

B= OBJECTID+1 //next road object id

C=OBJECTID-1//previous road object id

Select Case NoUturn([OBJECTID])

Case B=C : restricted = True

End Select  

The question is how to assign values to the variables A.B.C, because I dont think that OBJECTID+1 is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.