Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration guide updates next #1909

Merged
merged 6 commits into from
Sep 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,19 @@
"\n",
"Having the `facilities` and `demand points` defined as above is already sufficient for the basic functions of solving location allocation analysis. However, if you want to involve complicated models, for example, to take existing stores into consideration, or to beat competition from other pizza stores, here is something you need to:\n",
"\n",
"1. Specify whether the facility is a candidate, required, or a competitor facility. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):\n",
"1) Specify whether the facility is a candidate, required, or a competitor facility. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):\n",
"\n",
" - 0 (Candidate)—A facility that may be part of the solution.\n",
" - 1 (Required)—A facility that must be part of the solution.\n",
" - 2 (Competitor)—A rival facility that potentially removes demand from your facilities. Competitor facilities are specific to the `Maximize Market Share` and `Target Market Share` problem types; they are ignored in other problem types.\n",
" * 0 (Candidate)—A facility that may be part of the solution.\n",
" * 1 (Required)—A facility that must be part of the solution.\n",
" * 2 (Competitor)—A rival facility that potentially removes demand from your facilities. Competitor facilities are specific to the `Maximize Market Share` and `Target Market Share` problem types; they are ignored in other problem types.\n",
"\n",
"\n",
"2. Specify Weight for the demands points feature class.\n",
"2) Specify Weight for the demands points feature class.\n",
"\n",
" - The relative weighting of the demand point. A value of 2.0 means the demand point is twice as important as one with a weight of 1.0. If demand points represent households, for example, weight could indicate the number of people in each household. In this case, the population of each census tract is applied as weight.\n",
" \n",
"\n",
"3. Choose the correct `problem type` per analysis - problem types are often referred to as models. For example, `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.\n",
"3) Choose the correct `problem type` per analysis - problem types are often referred to as models. For example, `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.\n",
"\n",
"Further explanations to the specifications of the input arguments of the API method can be found in the <a href=\"https://logistics.arcgis.com/arcgis/rest/directories/arcgisoutput/World/LocationAllocation_GPServer/World_LocationAllocation/SolveLocationAllocation.htm\">help doc of REST API</a>."
]
Expand All @@ -412,7 +412,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Facility Type\n",
"### Facility Type\n",
"\n",
"In order to specify `facility type` per feature in the `facilities` feature set, we will need to:\n",
" - First, assign the `candidate`, `required`, and `competitor` facilities a new field called `FacilityType`.\n",
Expand Down Expand Up @@ -687,7 +687,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Tabularizing the response from solve_location_allocation\n",
"### Tabularizing the response from solve_location_allocation\n",
"\n",
"Now, let's explore the tabularized output from `solve_location_allocation`:"
]
Expand Down Expand Up @@ -958,7 +958,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Visualizing the response from from solve_location_allocation\n",
"### Visualizing the response from from solve_location_allocation\n",
"\n",
"To improve the re-usablity of codes, we will wrap up the lines for visualizing returned results into an individual function called `visualize_locate_allocate_result`:"
]
Expand Down Expand Up @@ -1922,6 +1922,13 @@
"`TotalWeighted_Minutes` - This field stores the cumulative weighted cost for a facility. The weighted cost for a demand point is its weight multiplied by the least-cost path between the facility and the demand point. The weighted cost for a facility is the sum of all the weighted costs of demand points allocated to the facility. For example, if a demand point with a weight of two is allocated to a facility 10 minutes of drive away, the TotalWeighted_Minutes value is 20 (2 x 10). If another demand point with a weight of three is allocated to the same facility and is 5 minutes of drive away, the TotalWeighted_Minutes value increases to 35 (3 x 5 + 20)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Visualizing the results"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -2468,6 +2475,13 @@
"print('Solve succeeded? {}'.format(result2b.solve_succeeded))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tabularizing the results"
]
},
{
"cell_type": "code",
"execution_count": 28,
Expand Down Expand Up @@ -3107,6 +3121,13 @@
"From the output table above, we can see that in order to reach a 1/3 market share, at least 8 stores, namely Store_2, Store_3, Store_7, Store_11, Store_12, Store_13, Store_14, and Store_15 are chosen as new sites."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Visualizing the results"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -3958,6 +3979,13 @@
"What's worth mentioning here, is that now the `Impedance` is changed from time-based to distance-based, and hence the output fields no longer contain 'TotalWeighted_Minutes' and 'Total_Minutes', but instead 'TotalWeighted_Kilometers' and 'Total_Kilometers'."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Visualizing the results"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -4605,7 +4633,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.11.0"
},
"toc": {
"base_numbering": 1,
Expand Down