Hi,
I'm trying to calculate an OD cost matrix using Network Analyst. I'm currently running the Business Analyst license on ArcMap 10.4.1 and using the given network data that comes with the license. I have 8,024 origins and 11,038 destination points. I would like to output the travel time (in minutes) and travel distance (in miles) for each pair of points that are less than 100 miles apart.
A few questions:
1) Is it possible to set the cutoff value to 100 miles even if TravelTime(Minutes) is selected as the impedance? I am not sure if I'm suppose to approximate how many minutes are in 100 miles first and then input this estimate into the "Default Cutoff Value" cell.
2) Is there an option to upload pairs of points (rather than origin and destination separately) and run the OD cost matrix? For example, I might subset the pair of points that are less than 100 miles (using Great Circle distance) outside of Arc and then bring the pairs into Arc. This will give me 24,635,869 pairs to calculate rather than the 88,568,912 (8,024 x 11,038)
3) I'm currently using the OD Cost Matrix interface on ArcMap and loading the origins/destinations from a drop down menu. I am not familiar with writing a Python script nor building a model. Is there an alternative method that will help generate the output faster? All I need in the output dataset is the origin tract id, destination tract id, travel minutes, and travel distance in miles (no line shapefile).
Any help is greatly appreciated. Thank you!
Solved! Go to Solution.
If you are solving on travel time then the cutoff has to be specified in travel time. So you could give a slightly larger cutoff, say 120 minutes and then filter the output by discarding any rows that are larger than 100 miles.
There is not a way to load "pairs" in OD. You can create individual 1 by N OD matrices where you load N destinations that are within 100 miles and solve that one OD and export the results to a table. Then repeat for the next origin from your 8024 origins (reuse the same OD layer, delete the origin and load the next one). But this only makes sense if you are able to write a script to automate this workflow.
I think you should be able to load all the origins and destinations in one OD, set a cutoff and solve. the output will only be the pairs that are within the cutoff. It will not generate the full OD matrix, only a partial one. Another thing to do with the OD layer is to set the output lines to None. So even the straight lines are not generated. But that said, the output is still very large (24 million rows) and if you are using ArcMap which is 32 bit app and limited to 2 GB RAM, it may not work. You could try making a model of this (make OD layer, load locations, set the properties/cutoffs, solve, export results to a output table) and then solving this model with Background 64 bit GP. This will give it more RAM to run in and may work. Otherwise you may have to split this into 4 OD layers with one-fourth the origins in each layer and solve, and concatenate the results.
OR, you should get ArcGIS Pro 2.0 which is a 64 bit app and will use all the RAM and will solve much larger ODs.
Jay Sandhu
Could you move the question to Network Analyst?
I think if you search there you will find many questions similar to your question. good luck.
If you are solving on travel time then the cutoff has to be specified in travel time. So you could give a slightly larger cutoff, say 120 minutes and then filter the output by discarding any rows that are larger than 100 miles.
There is not a way to load "pairs" in OD. You can create individual 1 by N OD matrices where you load N destinations that are within 100 miles and solve that one OD and export the results to a table. Then repeat for the next origin from your 8024 origins (reuse the same OD layer, delete the origin and load the next one). But this only makes sense if you are able to write a script to automate this workflow.
I think you should be able to load all the origins and destinations in one OD, set a cutoff and solve. the output will only be the pairs that are within the cutoff. It will not generate the full OD matrix, only a partial one. Another thing to do with the OD layer is to set the output lines to None. So even the straight lines are not generated. But that said, the output is still very large (24 million rows) and if you are using ArcMap which is 32 bit app and limited to 2 GB RAM, it may not work. You could try making a model of this (make OD layer, load locations, set the properties/cutoffs, solve, export results to a output table) and then solving this model with Background 64 bit GP. This will give it more RAM to run in and may work. Otherwise you may have to split this into 4 OD layers with one-fourth the origins in each layer and solve, and concatenate the results.
OR, you should get ArcGIS Pro 2.0 which is a 64 bit app and will use all the RAM and will solve much larger ODs.
Jay Sandhu
Jay,
Thank you so much! This is extremely helpful! I will try the first option of setting the cutoff time to be slightly higher and then excluding pairs that are more than 100 miles part. I will also look into how I can build a model. The model will definitely help in future work. Again, thank you!
Hi,
Sorry, one more question that you maybe able to answer for me. Is it possible to output both the travel time and corresponding travel distance all in one dataset? Or would I have to calculate each separately and then merge the two into one dataset in the end? Thank you!
Yes. When you make the OD layer, you can set it's properties to accumulate any other attributes besides the one you solve on. See the screen shot where I am accumulating the Miles attribute on the OD layer properties page. Do note that when you solve on travel time, and accumulate the length attribute, it will the length of the path that was chosen while minimizing travel time. It is not doing two solves to get the minimum travel time and minimum length.
Jay Sandhu