Overview

You will learn: how to use the Map Viewer to find optimized routes and directions for delivery and service vehicles.

The Map Viewer has a powerful set of analysis tools that can be used to solve transportation and routing problems such as finding the shortest path to locations, calculating drive times, and routing delivery vehicles to multiple destinations. One of the most powerful tools is the Plan Routes tool. This tool helps you to solve complex multi-vehicle, multi-stop routing problems. For example, if you have a service center or fleet delivery center, you can determine the optimum route and directions that each vehicle should take to visit all of the required stops each day. The tool requires a number of inputs such as the stop locations, start and finish depots, number of vehicles, number of maximum stops, maximum time at each stop, and the maximum time allotted for each vehicle to complete each route. Once you have the results you can create delivery schedules, maps, and turn-by-turn directions for vehicles and drivers. Under the hood the Plan Routes tool uses the ArcGIS Transportation Routing and Network Analytics Services and the REST API.

In this tutorial you will use the Plan Routes tool to find the optimized route and directions for an appliance delivery company using two vehicles which start from a warehouse and return to the same location at the end of the working day. The vehicles will depart at 8:00 AM and each vehicle is required to complete each route in less than 1 hour.

Steps

Create a copy of the web map

  1. Go to the Route Multiple Vehicles Map web map and click Sign In.

  2. Click Save > Save As > Save Map to save a copy.

Add a warehouse

With the Map Viewer you can add a location to a map that represents a warehouse by creating a Map Notes layer, searching for a location, and then saving the point.

  1. In the top bar, click + Add > Add Map Notes. Set the name to Warehouse > Create.

  2. In the top bar, type Bay Cities Kitchens & Appliances into the Search and select the first result.

  3. In the Popup, click Add to Map Notes > Warehouse. This will add the warehouse.

  4. Change the symbol by clicking the on the blue warehouse pin > Edit > Change Symbol > Basic and select the first purple circle. Feel free to change the Fill Color. Click Ok > Close to close the popup.

  5. In the top bar, click Details to open the Contents panel, and click Warehouse > ... > Save Layer. Add text to the Tags and Summary and click Create Item. This saves the notes as a layer item that can be used as input for the routing analysis.

Add restaurants

Create another Map Notes layer and add a number of locations that represent restaurants to visit. These locations are known as "stops".

  1. In the top bar, click + Add > Add Map Notes. Set the name to Restaurants > Create.

  2. In the top bar, use the Search tool to add stops at six different restaurants.

    • Type Father's Office into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
    • Type R&D Kitchen into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
    • Type Pono Burger into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
    • Type Il Ristorante di Giorgio Baldi into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
    • Type Milo & Olive into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
    • Type Dialogue into the Search and select the first result. In the Popup, click Add to Map Notes > Restaurants.
  3. In the map, zoom out until you can see all six restaurants and the warehouse.

Set the vehicle routing parameters and create the results

In this scenario there are two vehicles and six restaurants that need to be visited. Each vehicle can visit a maximum of three locations and can spend a maximum of 10 minutes at each location. Each vehicle must complete each route in 1 hour or less. All vehicles will depart from the warehouse at 8:00 AM. Follow the steps below to apply these parameters.

  1. In the top bar, click Analysis.

  2. In the panel, click Use Proximity > Plan Routes and set the following:

    • 1. Choose point layer representing stops to visit: Restaurants (Points)
    • 2. Travel mode for routes: Driving Time
    • 3. Routes begin at stops: Warehouse (Points)
      • Route ID field: Title
      • Start time for all routes: Current date and 8:00 AM
    • 4. Routes end at stops: Check Return to start
    • 5. Maximum number of vehicles to route: 2
    • 6. Maximum number of stops per vehicle: 4
    • 7. Time spent at each stop: 10 min
    • 8. Limit the total route time per vehicle: 1 hr
    • 9. Result layer name: Delivery Vehicle Routes
    • Check Include route layers.
    • Uncheck Use current map extent.
    • Click Run Analysis to create the routes.

NOTE: Computing a multi-vehicle route analysis is a very complex operation. Please be patient as this will take a few minutes to complete.

Explore the results

When the service completes the operation, it creates a line layer for the "routes" and a point layer for the "assigned stops" and then adds them to the map. The routes and stops are color coded accordingly. Each stop is marked with a number that represents the stop order. Any stops that can't be reached will be added to a separate "unassigned stops" layer and drawn with a red symbol.

  1. In the Map, click on the one of the route line features to show the popup. Identify the following values:

    • Route Name: ___
    • Stop Count: ___
    • Total Time: ___
    • Total Service Time: ___
    • Total Travel Time: ___
    • Total Miles: ___
    • Total Kilometers: ___
    • Start Time: ___
    • End Time: ___
  2. Click on the one of the stop point features to show the popup. Identify the following values:

    • Service Time: ___
    • Route Name: ___
    • Sequence: ___
    • Travel Time from Previous Stop (Minutes): ___
    • Travel Distance from Previous Stop (Miles): ___
    • Arrive Time: ___
    • Depart Time: ___
  3. Save your map.

Congratulations, you're done!

Your web map should look something like this.

NOTE: The routing service takes into consideration high and low traffic areas throughout the day, so your results might look different depending on the time of day the analysis was run.

Challenge

Reduce the total route time per vehicle

Go back to Step 12 and change the Limit the total route time per vehicle to 30 minutes and then run the Plan Routes task again. Be sure to change the Result layer name to something different e.g. Delivery Vehicle Routes 30 minutes Max.

How do the routing results differ from the first analysis? Why?