Solves the territory solution based on specified criteria such as attribute constraints or distance constraints.
Usage
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 in the Number of Territories parameter.
Attribute or distance constraints are required for the Number of Territories Method parameter's Optimal option.
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 Defined—The number of territories will be defined by the Number of Territories parameter value. This is the default.
Preferred—The 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.
Optimal—The 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.
Maximize Territories Count—The number of territories will be calculated automatically to create an increased number of territories of smaller size—closer to minimum constraints.
Minimize Territories Count—The number of territories will be calculated automatically to create a decreased number of territories of large size—closer to maximum constraints.
String
Number of Territories
(Optional)
The number of territories that will be used to solve the territory solution.
Long
Quality (%)
(Optional)
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
(Optional)
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
(Optional)
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.
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_DEFINED—The number of territories will be defined by the number_territories parameter value. This is the default.
PREFERRED—The 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.
OPTIMAL—The 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.
OPTIMAL_MAX_TCOUNT—The number of territories will be calculated automatically to create an increased number of territories of smaller size—closer to minimum constraints.
OPTIMAL_MIN_TCOUNT—The number of territories will be calculated automatically to create a decreased number of territories of large size—closer to maximum constraints.
String
number_territories
(Optional)
The number of territories that will be used to solve the territory solution.
Long
quality
(Optional)
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
(Optional)
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
(Optional)
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
advanced_parameters
(Optional)
Note:
This parameter is for internal use only.
String
Derived output
Name
Explanation
Data type
out_territory_solution
The updated territory solution.
Group Layer
Code sample
SolveTerritories example (Python window)
The following Python window script demonstrates how to use the SolveTerritories function.