Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the...

45
Pima County’s Building Inspector Routing Apps

Transcript of Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the...

Page 1: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Pima County’s Building Inspector

Routing Apps

Page 2: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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.

Page 3: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Orders

Page 4: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Inspectors

Page 5: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Routes Default solution is

least cost

Page 6: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Routes We want a more equal solution

Page 7: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Our Model

Inspections Table

Point Layer

Analyze Output

Error check and output Directions

Geocode Addresses

Solve VRP Solve VRP

Again

Page 8: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Parameters that force equal distribution

• OvertimeStartTime

• CostPerUnitOvertime

• MaxOrderCount

• MaxTotalTime

Page 9: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Automating the Process

• Python script run on a daily basis

• Creates directory based on current date

Page 10: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Automating the Process

• Create individual direction files

Page 11: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Directions File

Page 12: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Automating the Process

• Create JPEG of all routes

Page 13: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

JPEG of Routes

Page 14: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

• Create Excel report of all the routes

Automating the Process

Page 15: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Useful Python Module

• xlwt

• Output data to an excel spreadsheet

Page 16: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Another Useful Python Module

• Arcpy.mapping.ExportToJPEG()

• Save mxd to a JPEG file

Page 17: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Routes and Inspections on MapGuide

Page 18: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 19: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Using Esri Navigator

• Navigator 1.2 for iPad is available now

• Navigator for Android mid to late April 2016

Page 20: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 21: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Create The Package

Page 22: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Share The Package

Page 23: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

On the iPad

Page 24: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

On the iPad

Page 25: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

On iPad Select the Map Package

Page 26: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Download the Package

Page 27: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

The Map is now on the iPad

Page 28: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Inspector Routing Webpage

Page 29: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

App Links

• Launch Navigator using App Link

<a href="arcgis-navigator://?stops=16755 N SAN PEDRO RIVER RD, 32.512519,-110.499983, 1605 E RIVER RD,32.290268,-110.947871, 12641 N AJO AV,32.439579,-110.755793, 12900 E ORGANIZATION RIDGE RD,32.408749,-110.719175, 11761 E CALLE DEL VALLE,32.266937,-110.740895, 2988 N SPIRIT DANCER TR,32.262052,-110.726185, Stacey,32.227415,-110.846551&travelMode=Driving Time&start=Stacey,32.227415,-110.846551&navigate=false">Routes for Stacey for Date: 2016-04-07</a>

• Built using Lat/Lon values from VRP

• Webpage created daily for Inspectors

Page 30: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Individual Route in Navigator

Page 31: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

GIS has the Power

• We come up with our own street names based on our

employee’s names:

Jimenez Vernon Al Woods +

Page 32: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

Demo

Page 33: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 34: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 35: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 36: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 37: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 38: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 39: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 40: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 41: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 42: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 43: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 44: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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

Page 45: Pima County’s Building Inspector Routing Apps...Apr 08, 2016  · Routing Apps . What is the vehicle routing problem (VRP)? • Organizations service orders with a fleet of vehicles.

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