Optimizing Organic Waste Diversion Using a Vehicle Routing Model

Table of Contents

  1. Optimizing Organic Waste Diversion Using a Vehicle Routing Model
  2. Setting up Your Workspace
  3. Preparing the Data
  4. Skill Drill: Clip the Roads Layer to the City of Eureka
  5. Skill Drill: Add a Time Cost Attribute to the Roads Layer
  6. Skill Drill: Adding XY Data
  7. Skill Drill: Geocoding an Address  and Creating a CSV Table to Import As XY Data
  8. Creating A Network Dataset
  9. Setting up a Vehicle Routing Problem (VRP)
  10. Loading Orders into the Model
  11. Loading the Depot into the Model
  12. Adding Route Parameters into the Model
  13. Adding a Route Renewal into the Model
  14. Adjusting the Analysis Setting of Model
  15. Running the Vehicle Routing Model
  16. Skill Drill: Adding a Second Garbage Truck to the Model
  17. Skill Drill: Adjusting the Model to include Rear-Loading Trucks
  18. Skill Drill: Creating a Map of the Results

Running the Vehicle Routing Model

One of the advantages of creating a vehicle routing model via the Network Analyst extension is the ability to run the model multiple times while making small adjustments in between. In this activity, you will run several models, adjusting the parameters each time. For the first run of the model, all of our parameters were set in the previous steps. To run the model currently loaded in the Network Analyst Window, click on the Solve button in the Network Analyst Toolbar.

Note: Depending on the speed of your computer, the model may take a while to run. Expect to wait up five or ten minutes. Take a moment to stand, walk around, or stretch. Do not try to work in the ArcGIS software while the model is running.

When the Network Analyst completes the first run, it writes the results into the temporary memory layers in the Table of Contents. ArcMap assigns a number to each order, and the route appears on the map.

An image of the Network Analyst Toolbar Solve Button
The Solve button, located on the Network Analyst Toolbar will run the model currently loaded in the Network Analyst Window.

You may also see a warning message appear. Click OK and take a moment to inspect the results of the first run of the vehicle routing model.

An image of the Network Analyst Error Message Time Violation

You should see that, as the warning indicated, some orders were not met. The orders that could not be routed appear as red circles, both on the map as well as in the Network Analyst Window. To find out why these orders were not fulfilled, you will have to find the answers to several questions.

  • Which orders were not filled?
  • What constraints were violated?
  • How much time did the garbage truck spend on the route from start to finish?

Based on our model parameters, we know the garbage dump is only open between 5 am and 7 pm. We also know that a single truck driver is only allowed a maximum shift of twelve hours. Also, some businesses prefer to have the organic waste pick-ups during shorter time windows than others. All of these factors represent constraints in our model.

An image of the first results in ArcMap using one Side-Loading Truck
The red dots indicate orders not fulfilled. The Humboldt County boundary layer was added to the map and the dataframe background color set to light blue.

Open the attribute table from the Orders layer in the Table of Contents. Use Select by Attributes to select the records with a Status of Not reached. Look for the ViolatedConstraints field. Many of the attributes have a NULL value, but the attribute for ViolatedContraints might say MaxTotalTime exceeded. This may not seem completely intuitive to some. For more information, you can also look at the results written to the Routes Layer in the Table of Contents.

Clear the select features from the Orders attribute table. Then open the attribute table for the Routes layer. Because there is only one route, you will see only one record in the attribute table. Locate the TotalTime field and find out how long, in minutes, did the garbage truck spend on the route. How close was it to the 720-minute maximum? If it was very close, then it is likely that the garbage truck spent nearly twelve hours on the road before running out of time.

An image of the attribute table showing violated constraints.

Open a blank Excel workbook and create a table recording the following results from your first model. You will find these results in the Routes attribute table.

  • A description of the truck
  • The total cost of the route, in dollars.
  • The total time spent on the route, in minutes.
  • The number of time violations

Note: Time Violations are garbage pickups that were fulfilled, but outside of the preferred time window specified by the participating businesses. They show up on the map as red squares.

From the Orders Attribute table, add:

  • The number of orders not reached.

Title the table, VRM Model 1. An example table is shown below.

VRM Model 1Results
DescriptionOne side-loading truck
Total cost in dollars?
Total time in minutes?
Number of time violations?
Orders not reached?

Save your excel file in your final folder for later use.