Territory Planning
Facilities Preparation
Description
Processes and formats facilities data for use in a Location Allocation analysis.
Inputs
Candidate Facilities input table: The source table containing candidate facility data. These represent facilities that could be opened or activated based on the allocation strategy.
Required Facilities input table:
optional
The source table containing required facility data. These are pre-selected locations that are always active, regardless of optimization results.Competitor Facilities input table:
optional
The source table containing competitors data. These are used to model competition and influence demand allocation or market share in the optimization process.
Settings
Candidate facilities ID column: The column containing the candidate facility unique IDs.
Candidate facilities geometry column: The column containing the candidate facility point locations.
Use required facilities: Whether to consider mandatory or pre-selected facilities. Requires a Required Facilities input table to be connected. If enabled:
Required facilities ID column: The column containing the required facility unique IDs.
Required facilities geometry column: The column containing the required facility point locations.
Use competitor facilities: Whether to consider competitors. Requires a Competitor Facilities input table to be connected. If enabled:
Competitor facilities ID column: The column containing the competitor facility unique IDs.
Competitor facilities geometry column: The column containing the competitor facility point locations.
Use facility groups: Whether to use facility groups (i.e. region, brand) to limit the number of facilities to be opened.
Candidate facilities group ID column: The column containing the ID representing the group each candidate facility belongs to.
Required facilities group ID column: The column containing the ID representing the group each required facility belongs to. Requires a Required Facilities input table to be connected.
Enforce minimum usage of facilities: Whether to use the minimum usage of a facility.
Candidate facilities minimum usage column: The column containing the minimum usage of each candidate facility.
Required facilities minimum usage column: The column containing the minimum usage of each required facility. Requires a Required Facilities input table to be connected.
Use facility maximum capacities: Whether to use the maximum capacity of a facility.
Candidate facilities maximum capacity column: The column containing the maximum capacity of each candidate facility.
Required facilities maximum capacity column: The column containing the maximum capacity of each required facility. Requires a Required Facilities input table to be connected.
Use facility costs of opening: Whether to use the fixed costs of opening a specific facility.
Candidate facilities cost of open column: The column containing the cost of opening each candidate facility.
Required facilities cost of open column: The column containing the cost of opening each required facility. Requires a Required Facilities input table to be connected.
Outputs
Output table: The table with the prepared facilities data, which contains the following columns:
facility_id
: The selected ID column.geom
: The selected Geometry column.facility_type
: The type of facility: candidate (0), required (1) or competitor (2).group_id
: The selected Group ID column. If no group ID column is provided, it will be filled up withNULL
values.min_usage
: The selected Minimum usage column. If no minimum usage column is provided, it will be filled up withNULL
values.max_capacity
: The selected Maximum capacity column. If no maximum capacity column is provided, it will be filled up withNULL
values.cost_of_open
: The selected Cost of open column. If no cost of open column is provided, it will be filled up withNULL
values.
Demand Points Preparation
Description
Processes and formats demand points (customers, delivery addresses, clinics...) data for use in a Location Allocation analysis.
Inputs
Demand points input table: The source table containing demand points data.
Settings
ID column: The column containing the unique identifier for each demand point.
Geometry column: The column containing each demand point location.
Use demand: Whether each demand point should have an associated demand value. If enabled:
Demand column: The column containing demand values for each demand point.
Outputs
Output table: The table with the prepared demand points data, which contains the following columns:
dpoint_id
: The selected ID column.geom
: The selected Geometry column.demand
: The selected Demand column. If no demand column is provided, it will be filled up withNULL
values.
Cost Matrix Preparation
Description
Processes and formats cost data for use in a Location Allocation analysis.
Inputs
Costs input table: The source table containing the cost of assigning each facility to each demand point (such as travel distace, travel time...).
Settings
Facilities ID column: The column containing the facility IDs.
Demand points ID column: The column containing the demand point IDs.
Costs column: The column containing the cost of assigning each facility to each demand point.
Apply transformation to cost: Whether to apply a transformation to the cost. If enabled:
Tranformation function: The function to apply:
linear
,power
,exponential
.Tranformation parameter: The parameter value to use. Only applicable for
power
andexponential
transformations.
You can use native workflows components to compute costs based on distance or time, such as Distance
or Create Routing Matrix
.
Outputs
Output table: The table with the prepared costs data, which contains the following columns:
facility_id
: The ID of the facilities.dpoint_id
: The ID of the demand points.cost
. The resulting cost.
Constraints Definition
Description
Processes and formats constraint-specific additional data for use in a Location Allocation analysis.
Inputs
Required input table:
optional
The source table containing required facility-demand point pairs (for every row k, facility k must serve demand point k).Forbidden input table:
optional
The source table containing banned facility-demand point pairs (for every row k, facility k cannot serve demand point k).
Settings
Consider required facility-demand point pairs: Whether to consider mandatory relationships between facilities and demand points. Requires a Required input table to be connected. If enabled:
Facilities ID column: The column containing the facility IDs.
Demand points ID column: The column containing the demand point IDs.
Consider forbidden facility-demand point pairs: Whether to consider prohibited relationships between facilities and demand points. Requires an Forbidden input table to be connected. If enabled:
Facilities ID column: The column containing the facility IDs.
Demand points ID column: The column containing the demand point IDs.
Outputs
Output table: The table with the metadata of the prepared contraints data, which contains the following columns:
constraint_id
: The ID of the prepared data.constraint_description
: The description of the prepared data.table_name
. The name of the prepared table containning the necessary data to useconstraint_id
in the Location Allocation problem.
Location Allocation
Description
Performs Location Allocation optimization, enabling users to determine the best locations for facilities (e.g., warehouses, stores, hospitals, service centers) and assign demand points to those facilities. The goal is to minimize total/maximum cost or maximize coverage, while respecting a variety of customizable constraints.
This component uses Google's OR-Tools under the hood for solving the optimization problem.
It is mandatory to use the Prepare
components in advance, to ensure correct formatting of input sources.
Inputs
Facilities input table: A table with facilities data, as produced by the Facilities Preparation.
Demand points input table: A table with demand points data, as produced by the Demand Points Preparation.
Costs matrix input table: A table with costs data, as produced by the Cost Matrix Preparation.
Constraints input table:
optional
A table with additional constraints metadata, as output by Constraints Definition.
Settings
Optimization strategy: The strategy of the solver to solve optimization. It can be one of the following:
Minimize total cost
: Minimizes the total sum of costs between assigned demand points and open facilities.Minimize maximum cost
: Minimizes the highest individual cost between any assigned facility-demand point pairs.Maximize coverage
: Maximizes the number of demand points within the specified coverage radius of each open facility.
Facilities coverage radius: Maximum distance or time (e.g., in kilometers or minutes) that a facility can cover. Used for the "Maximize coverage" strategy.
Use required facilities: Whether to consider mandatory facilities. If enabled, these facilities are guaranteed to be opened.
Use competitor facilities: Whether to account for competitor locations that may influence demand point assignment.
Cost threshold: The distance under which a demand point is considered fully influenced by a competitor, and thus removed from consideration.
Use facility costs of opening: If enabled, the fixed cost of opening each facility is added to the objective function.
Use maximum budget: Whether to consider a maximum budget for opening facilities. When enabled, the sum of opening costs of selected facilities must not exceed the specified budget limit.
Budget limit: Maximum budget allowed for opening facilities (in cost of open units). This parameter is only available when "Use maximum budget" is enabled.
Limit the total number of facilities: If enabled, restricts the number of facilities that can be opened.
Maximum number of facilities: The maximum number of facilities allowed to open if the above option is enabled.
Limit the total number of facilities per group: If enabled, restricts the number of facilities that can be opened per defined group (e.g., region, brand).
Maximum number of facilities per group: The maximum number of facilities allowed to open per group if the above option is enabled.
Use demand: If enabled, ensures that the full demand of each demand point is met across assigned facilities.
Enforce minimum usage of facilities: If enabled, restricts facilities from being opened unless they meet a minimum utilization level.
Use facility maximum capacities: If enabled, restricts the total amount of demand a facility can serve.
Use required/forbidden assignments: Allows enforcing or excluding specific demand point-facility assignments (e.g., a facility must serve a specific demand point). Requires the Constraints input table to be connected.
Relative Gap Tolerance (%): The maximum allowed relative optimality gap between the best known solution and the theoretical optimum.
Maximum Solving Time (sec): The maximum allowed time taken for the solver to solve the problem (in seconds).
Outputs
Output table: The table with the optimized assignments:
facility_id
: The ID of the open facilities.dpoint_id
: The ID of the demand point.demand
: The amount of demand allocated from the facility to the demand point.geom
: The line geometry connecting the facility with the assigned demand point.
Metrics table: The table with solver's metrics and statistics:
objective_value
: Final value of the objective function (e.g., total cost or coverage).gap
: The relative optimality gap between the best known solution and the theoretical optimum.solving_time
: Time taken for the solver to solve the problem (in seconds).termination_reason
: Reason why the solver stopped (e.g., optimal, infeasible...).stats
: Additional statistics such as open facilities ID, total demand satisfied or percentage of demand covered.
Territory Balancing
Description
A component that splits a gridified area into a set of optimal, continuous territories, ensuring balance according to a specified metric while maintaining internal similarity within each territory.
If the input grid contains disconnected elements—such as isolated cells or cell clusters—the algorithm applies a proxy mechanism to establish connectivity across all regions. However, the presence of numerous unconnected components may lead to unexpected behavior or suboptimal results.
For more details, refer to the official METIS documentation.
Inputs
Input table: The table with the gridify-enriched Area of Interest (AOI).
Settings
Index column: Unique identifier for each spatial cell. Must be an H3 or Quadbin index.
Demand column: The business KPI used for balancing territories. This must be an extensive variable (i.e., one that adds up across space, such as number of points of sale, total population, etc.).
Similarity features(s): Optional variable(s) used to measure similarity between neighboring cells. The similarity score influences the grouping of the cells by penalizing large differences between them:
If multiple variables are selected, their values are normalized and averaged.
If a single variable is selected, it is normalized to the [0, 1] range.
If no similarity features are provided, only the demand column is used for partitioning, and similarity is not considered.
Number of territories: The desired number of partitions (i.e., territories) to divide the Area of Interest (AOI) into.
Keep input columns: Whether to include all input columns in the output table.
Outputs
Output table: The table with the specified territories that will contain the index column, the territory ID (
cluster
) and, if specified, the remaining input columns.
Last updated
Was this helpful?