# Exercise 9: Choosing optimal store locations using location-allocation

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data Setup Data Path: C:\ArcGIS\ArcTutor\Network Analyst\Tutorial Goal: Choose store locations using a location-allocation analysis.

In this exercise, you will choose the store locations that would generate the most business for a retail chain. The main objective is to locate stores close to population centers, which provide demand for the stores. This objective is based on the premise that people tend to shop more at nearby stores than at those that are farther away. You will perform the location-allocation analysis using three different problem types: maximize attendance, maximize market share, and target market share. The differences among these problem types will become apparent as you work through the exercise.

Steps:
1. If you have Exercise09.mxd open in ArcMap, skip to step 6.
2. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.
3. On the ArcMap - Getting Started dialog box, click Existing Maps > Browse for more.
4. Browse to C:\ArcGIS\ArcTutor\Network Analyst\Tutorial.

This is the default installation location for the tutorial data.

5. Double-click Exercise09.mxd.

The map document opens in ArcMap.

6. Enable the Network Analyst extension.
1. Click Customize > Extensions.

The Extensions dialog box opens.

2. Check Network Analyst.
3. Click Close.
7. If the Network Analyst toolbar is not displayed, you need to add it.

8. Click Customize > Toolbars > Network Analyst.

The Network Analyst toolbar is added to ArcMap.

9. If the Network Analyst window is not displayed, you need to add it.

10. On the Network Analyst toolbar, click the Show/Hide Network Analyst Window button .

The dockable Network Analyst window opens.

11. You can dock or undock the Network Analyst window. In this exercise, it is docked below the Table Of Contents window.

## Creating the location-allocation analysis layer

Steps:
1. Click Network Analyst on the Network Analyst toolbar and click New Location-Allocation.

The location-allocation analysis layer is added to the Network Analyst window. The network analysis classes (Facilities, Demand Points, Lines, Point Barriers, Line Barriers, and Polygon Barriers) are empty.

You will add the candidate store locations to the network analysis class Facilities. These are the potential places where you can open a store. The solution from the location-allocation process will include a subset of these stores.

The candidate store locations are already added as a layer (CandidateStores) in the map document. The names of the stores are contained in the layer's attribute table. You will load the point features from CandidateStores into the Facilities class of the location-allocation layer.

Steps:
1. In the Network Analyst window, right-click Facilities (0) and choose Load Locations.

The Load Locations dialog box opens.

2. Select CandidateStores from the Load Locations drop-down list.

3. The Location Analysis Properties section of the Load Locations dialog box lets you specify which attributes of the CandidateStores feature class contain the values that Network Analyst will use to solve this location-allocation problem.
4. In the Location Analysis Properties section, make sure the Name property is automatically mapped to the NAME field.
5. Network Analyst tries to match location analysis properties automatically for a newly created location-allocation layer based on a configuration file (usually located in C:\Program Files\ArcGIS\Desktop10.0\NetworkAnalyst\NetworkConfigurations\NASolverConfiguration.xml).
6. Click OK.

Sixteen candidate stores are loaded into the Facilities network analysis class. The new facilities are listed in the Network Analyst window and displayed on the map.

The stores need to be located to best service the existing populations. A point layer of census tract centroids is already added to ArcMap. Now you will load these centroids into the demand points network analysis class.

Steps:
1. In the Network Analyst window, right-click Demand Points (0) and choose Load Locations.
2. Select TractCentroids from the Load Locations drop-down list.
3. In the Location Analysis Properties section, make sure the Name property is automatically mapped to the NAME field.
4. Click the Field column for the Weight property and choose POP2000.

Each demand point will be weighted by the population from the 2000 census.

5. Click OK.

The 208 census tract centroids are loaded into the Demand Points class. The new demand points are listed in the Network Analyst window and displayed on the map.

## Setting up the properties of the location-allocation analysis

Steps:
1. Click the Analysis Layer Properties button on the Network Analyst window.

The Layer Properties dialog box opens.

2. Click the Analysis Settings tab.
3. Make sure that Impedance is set to TravelTime (Minutes).
4. Set Travel From to Demand to Facility.

The default option, Facility to Demand, is a good choice for the classic minimize impedance and maximize coverage problem types. However, for maximize attendance, maximize market share, and target market share, the demand tends to travel to the facilities, thus Demand to Facility is often a good choice for them.

5. Click the U-Turns at Junctions drop-down arrow and choose Allowed.
6. Set Output Shape Type to Straight Line.

Although the output will be displayed with straight lines, the travel costs are still measured along the network.

7. Make sure that the Use Hierarchy and Ignore Invalid Locations boxes are checked.
8. In the Restrictions frame, make sure that RestrictedTurns and Oneway are checked.
9. Your Analysis Settings tab should look like the following graphic:
10. Click the Advanced Settings tab.
11. Click the Problem Type drop-down list and choose Maximize Attendance.

These problem types are often referred to as models. Maximize attendance is a good problem type for choosing retail store locations, since it assumes that all stores are equally attractive and people are more likely to shop at nearby stores.

12. Increase Facilities To Choose to 3.

ArcGIS will try to choose 3 facilities out of the 16 to optimally serve the 208 demand points.

13. Increase Impedance Cutoff to 5.

This setting implies that people are not willing to travel more than five minutes to shop at these stores. The units for this value are determined by the units of the impedance attribute. Therefore, since TravelTime uses minutes, this value is also in minutes.

14. Make sure that Impedance Transformation is set to Linear. ArcGIS will use a linear decay in calculating people's propensity to visit a store. That is, with a five-minute impedance cutoff and a linear impedance transformation, the probability of visiting a store decays at 1/5, or 20 percent; therefore, a store one minute away from a demand point has an 80 percent probability of a visit compared to a store four minutes away, which only has a 20 percent probability.
15. Click OK.

## Run the process to determine the best store locations

Steps:
1. Click the Solve button on the Network Analyst toolbar.

Once the solve process is completed, lines in the map display connect chosen stores to their associated demand points. The lines also appear in the Lines class in the Network Analyst window.

2. Now you will inspect the results in more detail.

4. Examine the attributes of the Facilities table. Three of the features have their FacilityType field values set to Chosen instead of the default status, Candidate.

The DemandCount column lists the number of demand points assigned to each of the chosen facilities. Note that out of the 208 demand points, only 113 were allocated to the chosen facilities because some of the points were farther than the five-minute cutoff.

The DemandWeight column lists the demand that is allocated to each facility. In this case, the value represents the number of people that are likely to shop at the store.

5. Close the Facilities table.

7. Examine the attributes of the Demand Points table. The Facility ID column has a value of <Null> if the demand point was outside the five-minute cutoff, but if a numeric value is present, it represents the ID of the chosen facility the demand point was allocated to.

The Weight column contains the population count that was loaded from the census tract feature class. The AllocatedWeight column contains the amount of demand that was apportioned to the associated facility. The amount of weight allocated is based on the linear distance decay and the five-minute cutoff parameters you set in the Layer Properties dialog box.

9. This table contains one record for each demand point allocated to a facility. It also lists the shortest path impedance between the two locations and the weight captured by the facility.

In the previous section, you generated results for where to locate three new stores. In this section, you will use location-allocation to solve a store-expansion scenario, in which you will start with an existing store and optimally locate two additional stores.

Steps:
1. In the Network Analyst window, right-click Facilities (16) and choose Load Locations.

The Load Locations dialog box opens.

2. Select ExistingStore from the Load From drop-down list.
3. In the Location Analysis Properties section, make sure that the Name property is automatically matched to the NAME field.
4. In the Default Value column for Facility Type, change Candidate to Required.

This ensures that when the store is loaded as a facility, it will have a status of Required. Required facilities must always be part of the solution.

5. Click OK.

## Setting up the properties of the analysis (maximize attendance with required facility)

You will use the same properties from the previous solution to solve this problem.

Steps:
1. Click the Analysis Layer Properties button on the Network Analyst window.

The Layer Properties dialog box opens.

2. Make sure that the problem type is set to Maximize Attendance, the facilities to find is 3, the impedance cutoff is 5, and the impedance transformation is Linear.
3. Click OK.

## Run the process to determine the best store locations (maximize attendance with required facility)

Steps:
1. Click the Solve button on the Network Analyst toolbar.

When the solve process is complete, lines connect chosen stores to demand points. Note that the original solution changed, and the ExistingStore location is now part of the solution. The other two chosen facility locations are now at different places.

Location-allocation can locate new stores to maximize market share in light of competing stores. The market share is computed using a Huff, or gravity, model. A Huff model assumes that demand points have a probability of visiting stores based on some properties of the store as well as the distance away from that store.

Steps:
1. In the Network Analyst window, right-click Facilities (17) and choose Load Locations.
2. Choose CompetitorStores in the Load From drop-down list.
3. In the Location Analysis Properties section, make sure that the Name property is automatically matched to the NAME field.
4. In the Default Value column for Facility Type, change Candidate to Competitor.

5. Click OK.

## Setting up the properties of the analysis (maximize market share)

You will change the properties of the location-allocation analysis layer so that it solves using the maximize market share problem type.

Steps:
1. Click the Analysis Layer Properties button on the Network Analyst window.

The Layer Properties dialog box opens.

2. Click the Advanced Settings tab.
3. Click the Problem Type drop-down list and choose Maximize Market Share.

4. Click the Impedance Transformation drop-down list and choose Power.

ArcGIS will use a power distance decay in determining people's propensity to visit a store. Notice that Impedance Parameter becomes available for you to edit.

5. Change the Impedance Parameter value to 2.

An impedance parameter of 2 on a power impedance transformation means the probability of visiting a store decays with the square of the distance between a demand point and a facility location. Usually, an accurate value of the impedance parameter is computed from other analyses, such as those provided by using ArcGIS Business Analyst.

6. The Advanced Settings tab should look like the following graphic:

7. Click OK.

## Run the process to determine the best store locations (maximize market share)

Steps:
1. Click Network Analyst on the Network Analyst toolbar and click Options.

The Network Analyst Options dialog box opens.

2. Click the General tab.
3. Click All Messages.

By choosing All Messages with a market share problem, the market share you capture will be reported in a dialog box once the solve process is completed.

4. Click OK.
5. Click the Solve button on the Network Analyst toolbar.

When the solve process is completed, a message indicates how much of the market share you captured.

6. Close the message box.
7. Lines in the map connect demand points to chosen and competitor stores. Notice the chosen stores have changed to maximize the amount of demand given the presence of the three competitors.

The lines overlap more than in the previous solutions, since each demand point in the maximize market share problem can interact with all the facilities that are within the impedance cutoff.

9. Three facilities have a FacilityType value of Competitor, one has a value of Required, and two have a value of Chosen, which indicates the solver chose them as the best facilities to open.

The DemandCount column lists the number of demand points assigned to each of the facilities. Note that some demand points were not assigned, since they were outside the five-minute cutoff.

The DemandWeight column lists the sum of the demand weight assigned to each of the chosen facilities. The weight assigned to your stores versus that assigned to the competitor stores can be used to figure out the market share that was reported after the solve process finished.

## Achieving a target market share

In the last section, the three stores chosen accounted for 33.79 percent of the market share. Say, however, you want to capture 70 percent of the market share. You need to know the minimum number of stores that would be needed, and where they should be located, to accomplish that goal. The target market share problem type can help you find the answer.

Steps:
1. Click the Analysis Layer Properties button on the Network Analyst window.

The Layer Properties dialog box opens.

2. Click the Advanced Settings tab.
3. Click the Problem Type drop-down list and choose Target Market Share.

Notice that when you change the problem type to Target Market Share, the Target Market Share (%) property becomes available for you to edit.

4. Change Target Market Share (%) to 70.
5. The Advanced Settings tab should look like the following graphic:
6. Click OK.

## Run the process to determine the best store locations (target market share)

Steps:
1. Click the Solve button on the Network Analyst toolbar.

When the solve process is complete, a message indicates how much of the market share you captured and the total number of facilities required to capture that share. The percentage is more than the 70 percent you had indicated, because opening any fewer facilities would result in a market share below your target of 70 percent.

2. Close the message box.
3. Once again, lines connect the solution facilities to demand points in the map display.