Vous êtes sur la page 1sur 14

28/9/2016 Exercise: Make routes for a fleet  Print Window 

Exercise: Make routes for a fleet

The Vehicle Routing Problem solver can assess many variables and inputs to help you create optimized
routes for many logistical operations.

In the previous exercise, your trucking company needed to better assign market areas to distribution
centers. Now you will focus on one distribution center in south Florida and use the VRP to create
optimized routes for a day's worth of pickups.

Along with incorporating many variables in your optimization, you will assign routes to Route Zones to
align with your company's goal of providing continuity between drivers, customers, and service areas.
As is so often the case with complex problems like the VRP, once the first solution has been
determined, you will discover ways to change inputs to find a solution that fits your needs even more.

Estimated completion time: 35 minutes

To complete exercises, you need the following:


ArcGIS 10.0 For Desktop, ArcGIS 10.1 For Desktop, or ArcGIS 10.2 For Desktop (Basic, Standard,
or Advanced)
ArcGIS 10.0 Network Analyst, ArcGIS 10.1 Network Analyst Or ArcGIS 10.2 Network Analyst

ArcGIS 10.0 users: While Esri recommends that you have the latest service pack installed, to complete
this course, you must at least have ArcGIS 10.0 SP1, SP2, or SP3 for Desktop installed.

- Step 1: Download the data

To complete the exercise, you must download the data. If you have already downloaded and
installed the data, continue to the next step.

- Step 2: Explore the map document

Start ArcMap.

In the Getting Started dialog box, under existing maps, click Browse for more.

Navigate to ..\Student\NetAnalysis10_0 and open VRP_Exercise.mxd.

Step 2a: Explore the map document.

This map shows the area covered by the Market Areas that were assigned to the distribution
center in southern Florida. You will use the VRP solver to develop optimized routes to service

1/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

one day's worth of pickups at customer locations.

The layers and tables in the map provide all the information you need to solve this problem.

Click List by Source .

Inspect the layers in this map:


Today's Pick-ups: A sub-set of the customers' data that includes pickup information,
and will be used to set properties for the orders.
South FLA Customers: Geocoded locations with no attribute information beyond a
unique ID field.
South FLA Distribution Center: One location with just an identification field.
South FLA Network Dataset: Network dataset built on highways for the United States.
Market Outlines: Outlines of the markets that were assigned to the Distribution Center
from the Location-Allocation analysis.
Route Zones for Distribution Center 4: Market areas reorganized and edited to better
fit your business needs.
TrucksInfo table: Table that stores the driver and truck information that will be used to
set parameters for the routes to be generated.

The VRP solver can use input from many sources. If you use other database technologies to
manage activities like scheduling of orders, or fleet management operations, you could use an
Object Linking and Embedding database (OLE DB) connection to that database and
incorporate that information into the VRP with the same approach you will use with the
TrucksInfo table.

Switch the table of contents back to List By Drawing Order .

- Step 3: Prepare for analysis

Before being able to develop optimized routes, you will need to set up the map document for
analysis.

Turn on the Network Analyst Extension.

Remind me how
1. Customize > Extensions.

2. Check Network Analyst.

3. Click Close.

Turn on and dock the Network Analyst toolbar.

2/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

On the Network Analyst toolbar, from the Network Analyst menu, select New Vehicle
Routing Problem.

Add the Network Analyst window to ArcMap.

Remind me how
On the Network Analyst toolbar, click the Show/Hide Network Analyst window button .

Dock the Network Analyst window under the Table of Contents.

Specify the Default Geodatabase of the map.

Remind me how
In the Catalog window, if VPRData.gdb is set as the default geodatabase, you will see the Default
Geodatabase icon . If it is not set as the default geodatabase:

1. Right-click VPRData.gdb.

2. Choose Make Default Geodatabase.

In the table of contents, scroll down to turn off the South FLA Customers layer and turn
on the Today's Pick-ups layer.

- Step 4: Add layers to the Vehicle Routing Problem layer

The Network Analysis layer and Network Analyst window are coordinated to show and manage
the inputs to and the output of any type of network solver. You will use the Network Analyst
window to add Order, Depot, Route, and Route Zone features to the Network Analysis layer in
the map.

First, you will add Orders to the Network Analysis layer.

In the Network Analyst window, right-click Orders (0), then select Load Locations.

In the Load From drop-down list, select Today's Pick-ups.

For the Name property, click in the first empty cell of the Field column to access the
drop-down list, then select CustomerID.

3/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Step 4a: Add layers to the Vehicle Routing Problem layer.


Setting Name property to use values from the CustomerID field.

Repeat this process to specify the following parameters:

Property Field Default Value

Name CustomerID

Description

ServiceTime ServiceTime

TimeWindowStart1 Pickup_Start

TimeWindowEnd1 Pickup_Done

TimeWindowStart2

TimeWindowEnd2

MaxViolationTime1

MaxViolationTime2

DeliveryQuantities

PickupQuantities Pickups

Revenue Revenue

SpecialtyName

AssignmentRule Override

RouteName

Sequence

CurbApproach Either side of vehicle

The Load Orders Location Analysis Properties input table.

4/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Step 4b: Add layers to the Vehicle Routing Problem layer.


Load Orders properties set.

Click OK.

Step 4c: Add layers to the Vehicle Routing Problem layer.


The color symbology of your Orders may be different from the colors shown in
the graphic.

The orders have been loaded into the Vehicle Routing Problem layer, and are displayed on the
map.

Next, you will add Depots to the Network Analysis layer.

Open the Load Locations dialog box for Depots.

Remind me how
1. In the Network Analyst window, right-click Depots (0).

2. Select Load Locations.

From the Load From drop-down list, select South FLA Distribution Center.

For the Name property, click in the first empty cell of the Field column to access the
drop-down list, then select DistributionID.

Specify the following parameters:

Property Field Default Value

Name DistributionID

Description

TimeWindowStart1 7 AM

TimeWindowEnd1 8 PM

TimeWindowStart2

5/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

TimeWindowEnd2

CurbApproach Either side of vehicle

Tip: After you type 7 AM and 8 PM and press the Enter key, the value will automatically be
formatted for you.

Step 4d: Add layers to the Vehicle Routing Problem layer.


Load Depots properties set.

You have defined the block of time that the route should be there to service the order, by
setting the start and end of the time windows.

Click OK.

Step 4e: Add layers to the Vehicle Routing Problem layer.


The color symbology of your Depots may be different from the colors shown in
the graphic.

The depot has been loaded into Vehicle Routing Problem layer, and is displayed on the map.

Next, you will add Routes to the Network Analysis layer.

Open the Load Locations dialog box for Routes.

Uncheck Only show line layers to make the tables available for selection.

For Load From, select TrucksInfo.

In the table, specify the following parameters.

Property Field Default Value

6/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Name RouteID

Description DriverName

StartDepotName StartDepot

EndDepotName EndDepot

StartDepotServiceTime StartingTime

EndDepotServiceTime EndingTime

EarliestStartTime EStartTime 8:00:00 AM

LatestStartTime LStartTime 10:00:00 AM

ArriveDepartDelay

Capacities 30

FixedCost

CostPerUnitTime CostMin 1

CostPerUnitDistance CostMile

OvertimeStartTime StartOvertime

CostPerUnitOvertime 1

MaxOrderCount 30

MaxTotalTime MaxTotalTime

MaxTotalTravelTime

MaxTotalDistance

SpecialtyNames

AssignmentRule AssignmentRule Include

Load Routes properties table.

You are taking advantage of the ability to use unique values associated with records in the
source table and setting global values used for all the input records. You can use either or both
methods in these tables.

Tip: If you specify a field to get the feature properties from, and the input field has a Null
value for a feature or record, then the Default value will be used.

Step 4f: Add layers to the Vehicle Routing Problem layer.

Click OK.

7/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

You will not see anything change in the map, because you only loaded some of the attributes of
the routes. Once the problem is solved, you will see lines for each route.

Note: You can also use an existing routes layer with geometry to make new routes. Then
once the VRP is solved, the updated geometry and attributes will be shown.

Finally, you will add Route Zones to the Network Analysis layer.

With Route Zones, you can specify that a single route can only service orders in an assigned
area. For this exercise, you want to ensure route/order continuity as much as is practical, that's
why you are choosing to add route zones.

It is important to keep in mind that if other routes do not have assigned zones, those routes
could still service orders in a zone assigned to a different route.

Open the Load Locations dialog box for Route Zones (0).

For Load From, select Route Zones for Distribution Center 4.

In the table, specify the following parameters:

Properties Field Default Value

RouteName RouteID

IsHardZone True

Load Route Zones properties table.

Step 4g: Add layers to the Vehicle Routing Problem layer.

The IsHardZone value tells the VRP solver if the route can service orders outside of the assigned
zone or not. Remember, you are not required to specify Route Zones; but if you do, in some
cases you may want to allow flexibility in the routes.

For example, if a route is assigned to a particular zone, and passes near an order in a different
zone that is not being serviced, it will not service that order if you have set the IsHardZone value
to True. However, if you have set the IsHardZone value to False, this gives Network Analyst the
option to have that route service the order that has not been serviced, and is outside of its
zone.

Click OK.

Step 4h: Add layers to the Vehicle Routing Problem layer.


Your route zones may be symbolized differently than the route zones in this
graphic.

8/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

With what you know about the possible inputs to the VRP, What is another class that should
? have been defined in order to account for rest-type regulations on a work day? How would
this impact the results?

- Step 5: Set Vehicle Routing Problem layer properties

You will set the analysis properties for the Vehicle Routing Problem layer.

In the Network Analyst window, click the Vehicle Routing Problem properties button .

Click the Analysis Setting tab.

Under Settings, specify the following parameters:


Time Attribute: Time (Minutes)
Distance Attribute: Miles (Miles)
U-Turn at Junctions: Not Allowed

Step 5a: Set Vehicle Routing Problem layer


properties.

Not allowing U-turns will make the route as basic as possible.

Select the Advanced Settings tab.

For Time Window Violations Importance, select High.

Step 5b: Set Vehicle Routing Problem layer


properties.

Click OK.

- Step 6: Solve the problem and inspect the results

Now that you have specified your settings and loaded your inputs, you are prepared to solve
the VRP.

On the Network Analyst toolbar, click the Solve button .

9/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Notice that the status is displayed both at the bottom of the Network Analyst window and in the
status bar of the application.

Note: Once the problem is solved, you see a warning message. This message notifies you
that some of the orders could not be routed due to violated constraints. You will look at
the results then change some of the properties of this problem to improve the results.

Click Close to dismiss the message.

Step 6a: Solve the problem and inspect the results.

The solution displays on the map. Now you will inspect the results more closely.

In the table of contents, look under Orders.

By looking at the map, and using the table of contents as your guide, you see that there are
orders on the map that are marked as Located, Errors, and Time Violations.

You will now inspect the solution for the Orders.

In the Network Analyst window, expand Orders.

Notice that six orders were not assigned to a route.

Truck1 had nine orders assigned with no violations.

Scroll down to Truck11.

This route has one time violation for stop 10 on the route.

You will now use the results to determine the total revenue made with this solution.

Open the Orders layer's attribute table, and select all of the records were reached (i.e.
those that were OK, or have a time window violation.)

Scroll to the right to view the Revenue column. Right-click the Revenue field, then select
Statistics.

? What is the total revenue from this solution?

Close the Selection Statistics of Orders window.

In the attribute table, clear the selected features, then close the attribute table.

In the Network Analyst window, collapse Orders.

10/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Now you will inspect the solutions for the Routes.

Expand Routes in the Network Analyst window.

Click Truck2 to select it.

Step 6b: Solve the problem and inspect the results.

Notice that the route feature is also selected in the map.

Open the attribute table for the Routes.

? What is the total cost for the Route Truck2?

Look at other fields in the table to see what other information was calculated.

? What is the total cost for all routes?

? What is the total profit made?

Close the table.

Lastly, you will inspect the solution for the Depot Visits.

In the Network Analyst window, collapse Routes, and expand Depot Visits.

Notice that only 14 trucks were used to solve this problem, even though you had 22 trucks
available.

In the TruckInfo table you used to establish the routes, you set the AssignmentRule for the
unused routes to Exclude so you could first force the orders to be picked-up only by the trucks
that are assigned to service each zone. In the next step, you will use the extra routes to improve
the solution.

Collapse Depot Visits.

- Step 7: Improve the solution

When solving the VRP, you may find that the results may not be what you expected. This does
not mean that Network Analyst provided an incorrect solution, but rather that the inputs to the
problems were incomplete or could be improved.
11/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

That is the case in this solution. While Network Analyst provided the best results with what it
had to work with, there were not enough routes enabled to fully service all the orders in a
timely fashion. There are many changes that could be made to improve the results. Take a look
at the question below and chose the options that could be changed to improve the results.

? What three parameters could be changed to your routing problem to service all the orders
within the time requirements?

Change the time windows for servicing the


orders to improve the efficiency of the route.

Use a different network dataset to travel over


local streets.

Use soft route zones so orders close to the


boundary of zones could be serviced by
different routes.

Assign more than one route to a route zone.

Enable more routes to increase the number of


trucks available to service the orders.

Decrease the amount of time it takes to service


an order, so more orders can be serviced in the
same amount of time.

You will now test the cost/revenue balance, and improve the route by making more routes
available to the solver.

First, since you want to have daily continuity between drivers and customers, and we have a
solution that is centered around this business goal, you will use the current assignments from
the first solution to maintain the continuity.

Select orders that have a Status of OK.

Remind me how
1. In the Network Analyst layer, right-click Orders.

2. Select Open Attribute Table.

3. Click the Select By Attribute button .

4. In the expression pane, input "Status" = 0.

5. Click Apply.

Set AssignmentRule Attribute value to Preserve route (the coded value is 2).

Once complete, clear the selected features and close the attribute table.

12/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

Now you will change the properties of two existing routes to give Network Analyst the option to
use two more trucks.

In the Network Analyst window, expand Routes.

Right-click Truck15, then select Properties.

In the properties window, set the AssignmentRule value to Include.

Remind me how
Click Exclude to select Include from the drop-down list.

Step 7a: Improve the solution.

Click OK.

Repeat this process for Truck16.

Clear selected features.

You will now solve the VRP with the two new routes, then you will inspect the results.

On the Network Analyst toolbar, click the Solve button .

Remember, you can view the progress at the bottom of the application.

Using the same method you followed in the last step, answer the following questions:

? Which route had orders with time violations?

Remind me how
To see which routes had orders with time violations:

1. In the Network Analyst window, expand Orders.

2. Scroll down to view the results for each truck, and look for the symbol indicating that a time violation
occurred.

? What is the total revenue, costs, and profit made for the modified routes?

Remind me how
To find the total revenue:

Open the attribute table for Orders.

Right-click Revenue, then select Statistics to see the total revenue.

13/14
28/9/2016 Exercise: Make routes for a fleet  Print Window 

To find the total costs:

Open the attribute table for Routes.

Right-click TotalCost, then select Statistics to see the total cost.

To calculate the profit:

Subtract TotalCost from Revenue.

Overall, you lost a small amount in profit, but were able to improve customer service by arriving
at all but one order on time.

In this exercise, you used the area assigned to a distribution center from a location-allocation
analysis, and managed a day's operation of a fleet of trucks picking-up orders from customers
all over south Florida. You saw how to increase the importance of meeting time windows to
decrease the number of time window violations, and how route zones can be used to limit
which orders can be serviced by which routes. You learned how to assess the results of a VRP
solution, and how to take steps to improve on a VRP solution.

14/14

Vous aimerez peut-être aussi