1

I have 20 pairs of origin and destination. And, also I have 20 different line barriers for those pairs, as I want to determine the shortest path between them. If the name of the origin and destination is 100 then the name of the corresponding barrier is also 100. So, I build the model based upon the algorithm in previous study. The model have a iterator that will select the pair of O-D and corresponding barrier one at a time, to find the shortest path between Origin and Destination. The problem is although there is a route between them, final output doesn't have shortest path for some O-D pairs. When I try to do it one by one, it works (i.e. shortest path for all of them is obtained easily). But, when I try to do it using model builder, only 6 out of 20 shortest path is obtained. The error I get is " No route from location 1 to location 2". enter image description here

The main confusion is that the MODEL can solve the shortest path for 6 of them.(if there is problem it should have failed to solve any of them or if there was no any problem it should be able to solve all of them)

I know this might be confusing to those who havent faced this kind of problem before. Any ways if there is someone who can get through this problem, I would be grateful.

There is no any disconnectivity between the segments and no one way restrictions too.

enter image description here

EDITED NEW QUESTION: I added some of the road segments with all of its snapping options activated. But the route analysis fails to go through that node. Below is the snap of the Network Dataset. The highlighted segments are the newly added segments. enter image description here

  • No route from one point to another indicates there is a problem with network such that it isn't possible to get from A to B. This could be due to a connectivity policy issue or network geometry. See gis.stackexchange.com/questions/118944 If it's working one by one, I'm not sure what the issue in the model could be unless it relates to the barriers. If you are using the OD Cost Matrix solver, it has some issues I've seen mentioned in other questions (and it doesn't return an actual route, unlike Closest Facility). For example gis.stackexchange.com/questions/136892 – Chris W May 27 '15 at 1:33
  • Yes. When I do this one by one it works. Also, when I use modelbuilder for whole data at once, some yields good shortest path and some do not. And, I am using route analysis considering O-D as two stops. I have tried to change everything to see if it works, but no use. Anyways, thank you for the response. – Droko May 27 '15 at 1:50
1

Problem Solved:

Initially the input files (for O-D and barriers) were saved in GDB, and they did not have the FID for each entry. Then when the input files were saved as shape files (not in any GDB), it got FID values. Then it started to give me correct results for all of them.

But I don't know what difference that made on adding the points and barrier for the route analysis.

Moral: Input for the route analysis should not be saved in GDB (at least in my case it happened)

For the final part: I used Feature to line tool to convert the road network (preserving the attributes). I built the network and then the problem was solved. The Question Splitting Roads at intersection for ArcGIS Network Analyst? have explanation on these.

  • Feature classes in a file geodatabase should all have OID fields, which are sort of the same thing as an FID in a shapefile. Unless there's something in the model referencing FID (your join/link between o/d's and barriers?) then I guess it would depend on how those inputs were created/imported. You absolutely can use features in a file geodatabase for route analysis. In fact, they should all be contained in the same feature dataset as the network dataset to keep things clean and ensure they're all using the same coordinate system. – Chris W May 27 '15 at 20:27
  • @ChrisW I have a quick question. I added some segments of road to my road network with all the snapping activated. But while solving, the route doesn't go across the node I have created. Do you know what should i take care of while adding the segments ? – Droko May 28 '15 at 0:00
  • See the first link in my earlier comment. Snapping isn't enough, you need to have a vertex on both lines where old meets new and have the connectivity policy set to allow junctions at non-vertex intersetions if you didn't split what you connected to. And you need to rebuild the network after editing, if you aren't doing that. Screenshots with both the node and edge layers from the network dataset visible (with nodes distinguishable from any other points, like this question's last image) are helpful in diagnosing connectivity issues. – Chris W May 28 '15 at 0:07
  • I have uploaded the snap. I have added many segments to my road layer. You are true that I did not split what i had connected to. Do I have to set the connectivity to non-vertex while creating ND from same file ? Will this solve the problem ? – Droko May 28 '15 at 0:26
  • It's best to keep it to one question per question, rather than editing in a new or completely changing a question. The connectivity policy can be changed by editing the properties of the network dataset (via either catalog or the catalog window) - you do not have to create an entirely new network to change it. You do, however, have to rebuild the network after such a change. – Chris W May 28 '15 at 20:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.