Network Analyst Closest Facility Tool issues

6334
6
03-04-2015 11:01 AM
nataliemartinkus1
Occasional Contributor

I have a very large road dataset (western oregon and washington), 100 sawmills to act as "facilities" and 2500 forest landings to act as "incidents".  I want to find the quickest route from each forest landing to each sawmill, so I have been using the Closest Facility tool. To make sure the program runs correctly, I have been doing initial test runs with 3 facilities and 6 incidents, so I should end up with 18 routes.  Initially I was not using a road hierarchy, but that resulted in some routes obviously not being the shortest path to a facility.  Last night I set up a road hierarchy, and now the shortest paths are shown, but the program is not routing anything to one of my facilities (I made sure it is snapped to the road network) and it only resulted in 5 routes (4 of the 6 incidents going to 1 facility and 1 incident going to another facility).  In the Closest Facility Analysis Settings, I tried running it from Incident to Facility with Facilities to Find = 3, and from Facility to Incident with Facilities to Find = 6.  Please help! I've been fighting with this road network and program for the past month and need to finish this part of my project!!

6 Replies
MelindaMorang
Esri Regular Contributor

Hi Natalie.  Let me try to address each of your problems individually below.

Hierarchy

Hierarchy is a way of speeding up lengthy, long-distance route calculations by ignoring small local roads and preferring highways.  It is not fully guaranteed to give the true shortest path, but it does a good job most of the time.  If you solve without hierarchy, all the roads will be searched until the true shortest path is found.  Consequently, your observation that some of the routes created were obviously not the shortest path when you were not using hierarchy makes me think that your network has some connectivity problems.  If you're not using hierarchy, the Closest Facility solver will always return the shortest path through the network.  If the shortest path looks wrong, it's probably because the network has some problems.

Network dataset problems

Here are a few common network dataset problems that cause incorrect results:

- Your impedance attribute isn't set up correctly, so all roads have 0 impedance (then it doesn't even matter what roads are used in the route because it costs nothing to travel across any of them).

- Your road features don't actually touch at intersection points.  Maybe when they were digitized, you didn't have snapping turned on, and the road endpoints just don't coincide, so it's not possible to travel across intersections.

- Your road features touch, but the points of intersection don't have a vertex (if you have an Any Vertex connectivity policy) or an endpoint (if you have an End Point connectivity policy).  In this case, the roads appear connected but aren't actually logically connected in the network.

This documentation page provides further information: ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Solve not creating a path to all facilities

You definitely need to set "Facilities to Find" equal to the number of facilities you have if you want a route to be generated to all of them for each Incident.  If some routes still aren't being generated, it's possible that no route was found in the network (which should generate a warning message).  That would be another symptom of a network dataset problem.

Other things to think about

- If you're having trouble with your network dataset, and if you don't need to use your own street data (for instance, you have your own forest roads that you've added), you could use our online Closest Facility service.  You would be charged credits from your ArcGIS Online account, but it would save you the trouble of creating and managing your own network dataset.  You can connect to the online services through ArcMap as described here: ArcGIS Help (10.2, 10.2.1, and 10.2.2)

- If you just need the travel time or distance between your points and not the actual routes taken, you should use the OD Cost Matrix tool instead of Closest Facility.  It will run much faster, and it defaults to finding all OD pairs.

nataliemartinkus1
Occasional Contributor

Hi Melinda,

Thanks so much for your extensive reply.  I downloaded the road network from ESRI in 2012 when it was still freely available (it uses TomTom data, I think). It should be fully connected, but I will run topology on it again to make sure it didnt get corrupted somehow.  That seems to be the only explanation why it won't route to certain nodes.  I have checked the connectivity all around the infamous nodes and it all seems to be connected correctly.  I always put in the correct number of "facilities to find" when running the tool, so it should be routing to those facilities every time.

I may look into using ESRI's online network, but I have to project the forest landings onto the road network and split the line at each projected point so the model will recognize and route to them.  Im guessing I can't manipulate the online network by splitting lines at a point projected onto it.

natalie

0 Kudos
ChrisDonohue__GISP
MVP Alum

Melinda has good points here.  As a Network Analyst user for several years, I'd throw out there that the connectivity issue is almost always what seemed to sink Network Analysis.  So many datasets seem sufficiently connected, but from a Network Analyst perspective they are not.  Visually they will look perfect, even when zoomed way in, but oftentimes there are errors.  It seems like 90%+ of Network Analysis project time consisted of cleaning up data to make it workable - including numerous datasets that were claimed to be "ready to go" for network analysis.

I'd definitely run topology to see what potential issues there may be.  It's better than pulling your hair out (like I did at first) wondering why things are going so awry.... 

Chris Donohue, GISP

0 Kudos
nataliemartinkus1
Occasional Contributor

I ran the topology, and as I assumed would happen, it is clean.  Do you think this may be a bug when I upgraded to 10.2.2 a few weeks ago?  I've been using the Closest Facility tool for the past year, and it worked just fine up until a few weeks ago. Im using different point than I was back in January when it was running smoothly, but it seems my problems started after upgrading from 10.2 to 10.2.2.

0 Kudos
MelindaMorang
Esri Regular Contributor

Topology of the input features is only one possible cause of a poorly-connected network.  Please see the link in my post above about network connectivity.  It could be the way your connectivity groups are set up or your connectivity policy.  Maybe you're using End Point connectivity when you should be using Any Vertex, or maybe you have override vertices but their connectivity policy isn't set to Override.

0 Kudos
nataliemartinkus1
Occasional Contributor

UPDATE:  I spent the last few weeks working with Kory from the ESRI Network Analyst team.  He was incredibly helpful and wouldnt give up until we found a solution.  I was under the impression I had to project my "incident" and "facility" points onto the road network and split the road network at each point in order for NA to recognize the locations.  This process corrupted the 2012 North America Detailed Streets (ESRI) road network I was using.  Network Analyst automatically projects points onto the road network within the defined search radius.  I also had some points that were located deep within Wilderness areas that were unidentifiable by NA because the nearest road was farther than the search radius. I made a new network dataset for Oregon and Washington from the 2012 North America Detailed Streets road network, ran it for 108 facilities and 23 incidents and got the correct number of routes.  Hooray!!

0 Kudos