Skip To Content

Tutorial: Location-Allocation

Available with Network Analyst license.

Complexity: BeginnerData Requirement: ArcGIS Tutorial Data for Desktop

Location-allocation helps find the best locations for facilities to serve a set of demand locations. The locations may be trying to cover the most amount of demand, or minimize costs to reach the demand, or maximize market share. The location-allocation process can be associated with a local network dataset or a network service hosted in ArcGIS Online or ArcGIS Enterprise. This tutorial shows how to use a local network dataset to solve for best retail locations to serve customer demand.

Caution:
If you run the tutorial using ArcGIS Online, credits will be consumed.

Get the data

The data for this tutorial is available for download on arcgis.com.

  1. Go to the item description web page of the Network Analyst tutorial data on arcgis.com.
  2. Click the Download button, and save the file locally.
  3. Unzip the downloaded file.

Create a map

  1. Open ArcGIS Pro.
  2. Create a new project based on the Map.aptx template.

    A new project with a map appears.

Add the tutorial data to the project

A network dataset is an intelligent model of the road system. It contains not only the location and attributes of roads, but also information about how roads relate to one another, such as which roads are connected, which turns between connected roads are allowed or prohibited, and other information that affects what travel paths are possible and how long travel takes. The location-allocation solver references the network dataset to determine the cost/distance matrix of shortest paths between facilities and demand locations. The cost/distance matrix is then used to find the best set of locations to which the demand will be allocated.

If you perform an analysis using ArcGIS Online, the solver references a high-quality, worldwide network dataset stored in the ArcGIS Online cloud and will use ArcGIS Online credits. If you're using your own data, no online credits are used, but you need to associate your network dataset with the project.

In this set of steps, add a network dataset to the map.

  1. In the Catalog pane, which is on the side of the application by default, right-click Folders and choose Add Folder Connection Add Folder Connection.

    The Add Folder Connection dialog box appears.

  2. Browse to the folder where you placed the tutorial data, double-click Network Analyst, and click Tutorial to select the folder.
  3. Click OK.

    A connection to the Tutorial folder is created.

  4. Next, add one of the network datasets contained within the folder to the map.

  5. In the Catalog pane, expand Folders > Tutorial > SanFrancisco.gdb > Transportation.
  6. Drag Streets_ND, which has a network dataset icon Network Dataset, onto the map.

    The network dataset is added to the Contents pane as well as to the map.

  7. Right-click Streets_ND in the Contents pane and choose Zoom To Layer Zoom To Layer to view the San Francisco area.

    By default, network datasets built with traffic data show traffic conditions for the current time when they are added to the map. This network dataset includes historical traffic, so you are seeing typical traffic conditions for the current time and day of the week. Not all roads in this network dataset include traffic, so only the ones that do are shown by default.

    The area covered by the network dataset is where you can perform network analyses.

    Viewing the network dataset isn't required to perform an analysis, so next, you will hide it.

  8. In the Contents pane, uncheck Streets_ND to display the basemap only.
  9. Add the points that represent candidate stores to the map.
  10. In the Catalog pane, browse to Tutorial > SanFrancisco.gdb > Analysis.
  11. In the Catalog pane, right-click the CandidateStores layer and choose Add to Current MapAdd Data.

    The CandidateStores layer is added to the Contents pane and to the map.

  12. Add the points that represent demand to the map.
  13. Repeat step 9 to add the following layers to the Contents pane and to the map.
    • TractCentroids
    • ExistingStores
    • CompetitorStores
    Note:

    You can also add a layer to the map by dragging it from the Catalog pane onto the map.

Create the location-allocation layer

A location-allocation layer provides the structure and properties needed to set up and solve the location problem. It also contains the results after solving.

  1. On the Analysis tab, in the Tools group, click Network Analysis > Location-Allocation Location-Allocation.

    The location-allocation layer is added to the Contents pane. It includes several sublayers that hold the inputs and outputs of the analysis.

    Location-allocation is referencing the San Francisco network dataset because the network was in the Contents pane when the location-allocation layer was created.

    Note:

    To see or change the network data source that will be used to create the network analysis layer, on the Analysis tab, in the Tools group, you can click the Network Analysis drop-down menu and look under Network Data Source.

  2. In the Contents pane, click Location-Allocation to select the group layer.

    The Location-Allocation tab appears in the Network Analyst group at the top of ArcGIS Pro.

  3. Click Location-Allocation to see the tab's controls.
    Location-Allocation tab

    You'll use these controls to define the location-allocation results you want to generate.

    Tip:

    The Location-Allocation tab appears only when you select a location-allocation layer in the Contents pane. Also, if you have multiple location-allocation layers present, each has its own tab.

Add candidate facilities

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

  1. On the Location-Allocation tab, in the Input Data group, click Import Facilities Import Facilities.

    The Geoprocessing pane appears showing the Add Locations tool. Add Locations loads features into a network analysis layer, such as a location-allocation layer. The tool can load the points that represent the candidate stores into the Facilities sublayer.

  2. Make sure Input Network Analysis Layer is set to Location-Allocation and Sub Layer is set to Facilities.
  3. Click the drop-down arrow below Input Locations and choose CandidateStores. This is the point feature class you previously added to the map.
  4. Leave the default settings for the rest of the tool parameters and click the Run button Run at the bottom of the Geoprocessing pane.

    Run button on Add Locations

    The 16 candidate stores load as facilities. These locations are drawn on the map with the candidate facility symbol.

Add demand points

The stores need to be located to best serve the existing population. The Tract centroids point feature class will serve as the demand. The solution from the location-allocation process will allocate these demand locations to the chosen store.

  1. On the Location-Allocation tab, in the Input Data group, click Import Demand Points Import Demand Points.

    The Geoprocessing pane appears showing the Add Locations tool. Add Locations loads features into a network analysis layer, such as a location-allocation layer. The tool can load the points that represent the candidate stores into the Facilities sublayer.

  2. Make sure Input Network Analysis Layer is set to Location-Allocation and Sub Layer is set to Demand Points.
  3. Click the drop-down arrow for Input Locations and choose TractCentroids. This is the point feature class you previously added to the map.
  4. From Field Mappings > Property, choose Weight.
  5. From the Field Name drop-down list, choose POP2000. Leave the other settings as they are.
  6. Click the Run button Run at the bottom of the Geoprocessing pane.

    Run button on Add Locations

    The 208 Tract Centroids load as demand and the population at each location is mapped to the weight property for the demand. These locations are drawn on the map with the demand symbol.

Set up properties of the location-allocation analysis

The Location-Allocation ribbon includes a Problem Type section, where you can specify properties for the locations.

  1. On the Location-Allocation tab, in the Problem Type group, click the arrow under Type Location-Allocation and choose Maximize Attendance.

    Maximize Attendance option

    Maximize attendance is a good problem type for choosing retail store locations. It assumes that all stores are equally attractive and that people are likely to shop at nearby stores.

  2. On the Location-Allocation tab, in the Problem Type group, double-click the Facilities up arrow to 3. This will choose 3 out of the 16 candidate stores to optimally serve the 208 demand points.
  3. On the Location-Allocation tab, in the Travel Settings group, in the Cutoff text box, type 5.

    This implies that people are not willing to travel more than 5 minutes to shop at these stores. The units for this cutoff value are in the units of the current impedance attribute. Since the current impedance is TravelTime, the units are in minutes.

Run the analysis to determine the best store locations

  1. On the Location-Allocation tab, click Run Run.

    Run button on the Location-Allocation tab

    The results show the chosen stores connected to the demand they serve with straight lines. These lines also appear in the lines feature class.

  2. Now you'll inspect the results in more detail.
  3. In the Contents pane, right-click the Facilities layer and click Attribute Table to open the attribute table.
  4. Examine the attributes of the Facilities table. Three of the features show the 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 115 were allocated to the chosen facilities because some of the points were farther than the 5-minute cutoff.

    The DemandWeight column lists the demand that is allocated to each of the chosen facilities. These values represent the number of people likely to shop at that store.

  5. In the Contents pane, right-click the Demand Points layer and click Attribute Table to open the attribute table.
  6. Examine the attributes of the Demand Points table. The FacilityID column has a value of <Null> if the demand point was outside the 5-minute cutoff; however, if a numeric value is present, it represents the ID of the chosen facility to which the demand point was allocated.

    The Weight column contains the population count 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 5-minute cutoff you set.

Add a required facility

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

  1. On the Location-Allocation tab, in the Input Data group, click Import Facilities Import Facilities.

    The Geoprocessing pane appears showing the Add Locations tool. Add Locations allows you to load additional features into an existing network analysis layer, such as a location-allocation layer. The tool can load the point that represents the existing store into the Facilities sublayer.

  2. Make sure Input Network Analysis Layer is set to Location-Allocation and Sub Layer is set to Facilities.
  3. Click the drop-down menu below Input Locations and choose ExistingStore. This is the point feature class you previously added to the map.
  4. In the Field Mappings > > Property section, choose FacilityType.
  5. From the Default Value drop-down menu, choose Required.

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

  6. Click the Run button Run at the bottom of the Geoprocessing pane to finish loading the required facility into the analysis layer.

Run the process to determine the best store locations with the required facility

  1. In the Contents pane, click Location-Allocation to select the group layer.

    The Location-Allocation tab appears in the Network Analyst group at the top of ArcGIS Pro.

  2. Make sure theLocation-Allocation tab shows the Problem Type to be Maximize Attendance with a 5-minute cutoff and three facilities to locate.
  3. On the Location-Allocation tab, click Run Run.

    Run button on the Location-Allocation tab

    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 facilities are now at a different location.

Add competing facilities

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.

  1. On the Location-Allocation tab, in the Input Data group, click Import Facilities Import Facilities.

    The Geoprocessing pane appears showing the Add Locations tool. Add Locations allows you to load additional features into an existing network analysis layer, such as a location-allocation layer. The tool can load the point that represents the existing store into the Facilities sublayer.

  2. Make sure Input Network Analysis Layer is set to Location-Allocation and Sub Layer is set to Facilities.
  3. Click the drop-down menu below Input Locations and click CompetitorStores. This is the point feature class you previously added to the map.
  4. In the Field Mappings section, click FacilityType, and in the Default Value drop-down menu, choose Competitor.

    This ensures that when the store is loaded as a facility it will have a status of Competitor. Competitor facilities are only used by the Maximize Market Share and the Target Market Share problem types.

  5. Click the Run button Run at the bottom of the Geoprocessing pane to finish loading the competitor facilities into the analysis layer.

Set up the properties for maximizing market share with competing facilities

Change the properties of the location-allocation analysis layer so it solves using the Maximize Market Share problem type.

  1. In the Contents pane, click Location-Allocation to select the group layer.

    The Location-Allocation tab appears in the Network Analyst group at the top of ArcGIS Pro.

  2. On the Location-Allocation tab, in the Problem Type group, click the arrow under Type and choose Maximize Market Share. Maximize Market Share computes the probability of customers visiting your facilities as well as competing facilities. It then chooses a set of facilities that maximizes your market share.
  3. On the Location-Allocation tab, in the Problem Type group, click the arrow under Cost Transformation Function and change it from Linear to Power.
    Cost Transformation Function type
    The solver will now use a power decay distance function to determine the propensity to visit the store.
  4. On the Location-Allocation tab, in the Problem Type group, click the arrow under Cost Transformation Function Parameter and change the Cost Transformation Function Parameter from 1 to 2.
    Cost transformation beta decay parameter

    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 using Esri Business Analyst Online.

Run the process to determine the best store locations while maximizing market share

  1. On the Location-Allocation tab, click Run Run.

    Run button on the Location-Allocation tab

    The results show straight lines connecting the demand to the chosen stores as well as the 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.

  2. In the Contents pane, right-click the Facilities layer and click Attribute Table to open the attribute table.
  3. Examine the attributes of the Facilities table. Three facilities have a FacilityType value of Competitor, one has a value of Required, and two have a value of Chosen, which indicate 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 5-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 determine the market share that was reported after the solve process finished.

Achieve a target market share

In the previous section, the three stores chosen accounted for 33.25 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.

  1. In the Contents pane, click Location-Allocation to select the group layer.

    The Location-Allocation tab appears in the Network Analyst group at the top of ArcGIS Pro.

  2. On the Location-Allocation tab, in the Problem Type group, click the Type drop-down arrow and change the problem type to Target Market Share.
  3. In the Market box, change the default market share from 10% to 70%.
    Change target market share percentage
  4. On the Location-Allocation tab, click Run Run.

    Run button on the Location-Allocation tab

    The results show straight lines connecting the demand to the chosen stores as well as the competitor stores. Notice there are additional chosen stores in response to the higher market share.

    On the Location-Allocation tab, under the Run button, click the small launcher icon.

    Launcher icon for GP messages
    This opens the status message from the previous solve. It reports that you have achieved 71.06% market share.

    Open the attribute table for Facilities and note that there are now nine chosen facilities in addition to the one required facility. This means you'll need a total of 10 facilities to obtain the 70 percent market share considering the three competitor sites.