Pima County’s Building Inspector Routing Apps
What is the vehicle routing problem (VRP)? Organizations service orders with a fleet of vehicles. Need to determine which orders should be serviced by each vehicle or inspector. Default behavior is a least-cost solution.
Orders
Inspectors
Routes Default solution is least cost
Routes We want a more equal solution
Our Model Inspections Table Point Layer Analyze Output Error check and output Directions Geocode Addresses Solve VRP Solve VRP Again
Parameters that force equal distribution OvertimeStartTime CostPerUnitOvertime MaxOrderCount MaxTotalTime
Automating the Process Python script run on a daily basis Creates directory based on current date
Automating the Process Create individual direction files
Directions File
Automating the Process Create JPEG of all routes
JPEG of Routes
Create Excel report of all the routes Automating the Process
Useful Python Module xlwt Output data to an excel spreadsheet
Another Useful Python Module Arcpy.mapping.ExportToJPEG() Save mxd to a JPEG file
Routes and Inspections on MapGuide
What Does This Mean? DSD inspectors travel 34% fewer miles DSD is saving $197,000 per year on mileage and inspectors’ time Our Street Network is improved by continuous feedback from non-geocoded inspections and addition of turn restrictions This model can be used by other departments
Using Esri Navigator Navigator 1.2 for iPad is available now Navigator for Android mid to late April 2016
Mobile Map Package Create Mobile Map Package (MMP) in Arcgis Pro 1.2 Symbology important if using your own data Create Separate Locator saved with the MMP Share the MMP with Navigator Users Ability to define Travel Modes (e.g. Walking Time, Trucking Time) Need separate ND without Global Turn delays
Create The Package
Share The Package
On the iPad
On iPad Select the Map Package
Download the Package
The Map is now on the iPad
Inspector Routing Webpage
App Links Launch Navigator using App Link <a href="arcgis-navigator://?stops=16755 N SAN PEDRO RIVER RD, , , 1605 E RIVER RD, , , N AJO AV, , , E ORGANIZATION RIDGE RD, , , E CALLE DEL VALLE, , , 2988 N SPIRIT DANCER TR, , , Stacey, , &travelMode=Driving Time&start=Stacey, , &navigate=false">Routes for Stacey for Date: Built using Lat/Lon values from VRP Webpage created daily for Inspectors
Individual Route in Navigator
GIS has the Power We come up with our own street names based on our employee’s names: JimenezVernonAlWoods +
Demo
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges Flag to a file, GIS Techs correct for future How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? Flag them in Excel as Unassigned How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? Depends, at least twice, maybe 10 more times Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Not Yet, possibly in the future with lots of work! Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? Updating the underlying Network Dataset daily/weekly/monthly via a python script
Challenges How to handle addresses that don’t geocode? How to handle addresses that geocode but don’t get assigned an inspector? How many times to run the VRP to get an optimized solution? Can the customer run the VRP manually with different inputs? Web service via web app? The Network Dataset (ND) is updated weekly
Future Use Soft Zones - Done Implement DayOfWeek polygon for scheduling - Done Get Inspector results back into Accela – Working On It Use Inspectors Vacation schedule – Working On It Enhance Symbology of Pima County Map – Working Creation of webpage for Customers to see the status of their inspection – Future Analyze routes periodically using Fleetistics to compare actual vs VRP-generated - Future Train Inspectors on Navigator, including daily Map Updates - Future
Acknowledgements Felipe Morales who began the work Steve Whitney overall support Cody Cohn concept/scripting Jack Lloyd (web page) Esri analysts (Scott Sandusky, Weeliang Heng, Mark Bockenhauer) DSD – Yves Khawam, Rich Franz-Under, Robert Chandler, Dan Ice ITD – Doyle Johnson, Jon Schmidt, Kristina Brooks
Building the Network Dataset Builds a speed table first using: subdiv (20mph), stnetall, mt_lemmon poly (30mph), ajo table, stspeed table Build ND next, inputs are: Connectors (5mph), Cochise (5mph), Pinal (5mph), stnetall, stmisc (5mph), stfclass, Arizona Streets, speed table, urban polygon (35mph), pinal polygon (45mph), stnoturn