Skip To Content

Set Territory Attribute Constraints

Summary

Sets variables for adding constraints when solving the territory solution. Territories will be constrained by minimum, maximum, or ideal value.

The Minimum and Maximum values are hard constraints, and territories will not exceed or be below the specified values. Ideal Value is a soft constraint, and territories can exceed or be below the specified value.

Usage

  • Only variables that have been added to the level will be available.

  • Set the Weight parameter to 100 if there is only one variable to be used for constraints.

  • The Weight parameter will be set if there are multiple variables.

  • The Maximum and Minimum parameter values are hard constraints.

  • The Ideal Value parameter is a soft constraint.

Syntax

SetTerritoryAttributeConstraints_td (in_territory_solution, level, {constraints})
ParameterExplanationData Type
in_territory_solution

The Territory Design solution layer to be used in the analysis

Group Layer; Feature Dataset; String
level

The level to which the constraints will be applied.

String
constraints
[[variable, minimum, maximum, ideal_value, weight],...]
(Optional)

The variables that will be used for constraining the territory solution.

  • variable—Numeric value to be used as the constraint.
  • minimum—Numeric value that sets a hard limit for the territories' lower bound.
  • maximum—Numeric value that sets a hard limit for the territories' upper bound.
  • ideal_value—Numeric value that sets a soft limit for the ideal value for the territory solution.
  • weight—The influence a constraint value has on the territory solution. The number must be greater than 0.
Value Table

Derived Output

NameExplanationData Type
out_territory_solution

The updated territory solution.

Group Layer

Code sample

SetTerritoryAttributeConstraints example (Python window)

The following Python window script demonstrates how to use the SetTerritoryAttributeConstraints tool.

import arcpy
arcpy.td.SetTerritoryAttributeConstraints("TerritorySolution", "Territories[1]", "populationtotals_totpop_cy 10000 100000 # 100")

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics