Solve Territories (Territory Design)

获得 Business Analyst 许可后可用。

摘要

Solves the territory solution based on specified criteria such as attribute constraints or distance constraints.

使用情况

  • The Classic option in the Algorithm parameter is the original method to solve territories and is suitable for most use cases.

    The Genetic option is a newer method based on a genetic growth algorithm and is suitable for more complex solutions such as solutions with distance and capacity constraints. This option creates a large number of random possible solutions and produces a better solution but will take longer to process.

  • When using the User Defined option in the Number of Territories Method parameter, the number of territories must be specified using the Number of Territories parameter.

  • Attribute or distance constraints are required for the Number of Territories Method parameter's Optimal option.

参数

标注说明数据类型
Input Territory Solution

The territory solution that will be used to solve territories.

Group Layer; Feature Dataset; String
Level

The level that will be used to solve territories.

String
Number of Territories Method

Specifies the method that will be used when calculating the number of territories.

  • User DefinedThe number of territories will be defined by the Number of Territories parameter value. This is the default.
  • PreferredThe number of territories will be defined by the Number of Territories parameter value, but only territories that meet the criteria of the constraints will be created.
  • OptimalThe number of territories will be calculated automatically.
  • Optimal Max Coverage The number of territories will be calculated automatically using a maximum coverage of the base features.
String
Number of Territories
(可选)

The number of territories to be specified.

Long
Quality (%)
(可选)

An integer between 1 and 200 that determines the performance of a solve operation. A lower value will provide better performance but quality may be affected. The default value is 100.

Long
Iterations Limit
(可选)

The number of times the territory search process will be repeated. For larger datasets, increasing the number is recommended to find an optimal solution. The default value is 50.

Long
Algorithm

Specifies the algorithm that will be used to solve the territory solution.

  • Classic The original algorithm will be used to solve the territory solution. This is the default.
  • Genetic A newer and more modern algorithm based on a genetic growth algorithm will be used to solve the territory solution.
String
Number of Candidate Solutions
(可选)

The number of possible solutions. For larger datasets, increasing this number will increase the search space and the probability of finding a better solution. The default is 10 and must be greater than 1. This parameter is only used when the Algorithm parameter is set to Genetic.

Long

派生输出

标注说明数据类型
Updated Territory Solution

The updated territory solution.

Group Layer

arcpy.td.SolveTerritories(in_territory_solution, level, method, {number_territories}, {quality}, {iterations_limit}, algorithm, {candidate_solutions})
名称说明数据类型
in_territory_solution

The territory solution that will be used to solve territories.

Group Layer; Feature Dataset; String
level

The level that will be used to solve territories.

String
method

Specifies the method that will be used when calculating the number of territories.

  • USER_DEFINEDThe number of territories will be defined by the number_territories parameter value. This is the default.
  • PREFERREDThe number of territories will be defined by the number_territories parameter value, but only territories that meet the criteria of the constraints will be created.
  • OPTIMALThe number of territories will be calculated automatically.
  • OPTIMAL_MAX_COVERAGE The number of territories will be calculated automatically using a maximum coverage of the base features.
String
number_territories
(可选)

The number of territories to be specified.

Long
quality
(可选)

An integer between 1 and 200 that determines the performance of a solve operation. A lower value will provide better performance but quality may be affected. The default value is 100.

Long
iterations_limit
(可选)

The number of times the territory search process will be repeated. For larger datasets, increasing the number is recommended to find an optimal solution. The default value is 50.

Long
algorithm

Specifies the algorithm that will be used to solve the territory solution.

  • CLASSIC The original algorithm will be used to solve the territory solution. This is the default.
  • GENETIC A newer and more modern algorithm based on a genetic growth algorithm will be used to solve the territory solution.
String
candidate_solutions
(可选)

The number of possible solutions. For larger datasets, increasing this number will increase the search space and the probability of finding a better solution. The default is 10 and must be greater than 1. This parameter is only used when the algorithm parameter is set to GENETIC.

Long

派生输出

名称说明数据类型
out_territory_solution

The updated territory solution.

Group Layer

代码示例

SolveTerritories example (Python window)

The following Python window script demonstrates how to use the SolveTerritories function.

import arcpy
arcpy.td.SolveTerritories("MyProject.gdb\Solution", "Territories[1]", "USER_DEFINED", 7, 100, 50, "CLASSIC", None)

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题