Select to view content in your preferred language

Assigning Sequential Number to Map Features

131
5
Tuesday
MappingMoose
Occasional Contributor

Hi Everyone,

We have a lot of map features (assets) that field staff will inspect on a regular basis. To ensure efficiency and to prevent any assets from being missed, the field staff would like each asset to be assigned a number to represent the order in which the assets should be inspected during a given inspection period.

I thought I could use the Plan Routes tool in Map Viewer to generate a route and assign all the assets a stop number, but it looks like it only allows for 200 stops and we have more assets than that. I'd prefer using one tool or process if possible.

The priority is finding the most efficient order for the assets to be inspected in, and other analysis like drive time is less important.

Does anyone know of a better tool I could use for this?

Any suggestions much appreciated.

Tags (2)
0 Kudos
5 Replies
DavidSolari
MVP Regular Contributor

Welcome to the exciting world of the Travelling Salesman Problem! Trying to solve this the "exact" way has what's called factorial scaling, that means if it takes 1ms to solve for 2 locations, it takes a full hour to solve for 10, and you have over 200 so that won't work if you want this done before the universe burns out. Fortunately there's many heuristic algorithms that run a bit faster at the expense of 100% accuracy, which is better than nothing.

Looking around I found the python_tsp package, which claims to not only have a bunch of TSP solvers but can also build an input matrix for you given some lat/longs. You can use the ArcGIS for Python API to extract the features you need, then build a 2D numpy array with the coordinates, then solve with the tsp package. You'll have to do a bit more work to correlate that output with the ID of your features and then write the info back in, but this too can be done with the ArcGIS API to create a one-click solution.

MappingMoose
Occasional Contributor

Hi DavidSolari,

Having this done before the universe burns out would definitely be preferable. 

Thanks for your suggestions and the links, I'll see if I'm able to get Python to work for this.

0 Kudos
Debert
by
Frequent Contributor

@MappingMoose 
I'm not sure if you have ArcGIS Pro- but this might be an option... Under analysis > network analysis > run last mile delivery. Each asset will get a sequence number that you can write back to your asset layer and treat as your inspection order field.

I am the GIS Coordinator for Iowa Regional Utilities Association.
Find me on Linkedin.
MappingMoose
Occasional Contributor

Hi Debert,

Thanks for your suggestion. I have ArcGIS Pro and I have had a look at some of the network analysis tools in there, but I'm thinking they use the same process as the Plan Routes tool as the feature input is limited for these also.

The 'Make Last Mile Delivery Analysis Layer' tool looks good for a few locations, since I have over 200 I think I would run into the issue DavidSolari mentioned where it wouldn't solve in time.

0 Kudos
Debert
by
Frequent Contributor

@MappingMoose I believe it states up to 10,000 stops (orders) in a single solve. I haven't ran that many or personally tested- but I think it should work as expected. It shouldn't take long to test the outcome.

I am the GIS Coordinator for Iowa Regional Utilities Association.
Find me on Linkedin.
0 Kudos