3.1. Problem Formulation and Hexagonal Grid Spatial Representation
Task area allocation is one of the core problems in multi-robot collaboration, aiming to partition the task space rationally and assign it to different robots in a known environment, thereby minimizing the total system cost and improving overall execution efficiency. This paper addresses the task area allocation problem in two-dimensional known environments by proposing a collaborative task allocation method based on a hexagonal grid map. This method comprehensively considers factors such as robot initial position differences, execution capability weights, and obstacle distribution, enabling optimal task allocation while enhancing the overall collaborative performance of the system. The key notations used in HGTA are listed in
Table 1.
Assume the system contains
M robots, represented by the set:
The task area is partitioned into
N assignable grid units, denoted as
Each task unit
corresponds to a specific unit
in the hexagonal grid. For conciseness,
is used uniformly hereafter to represent a task unit. The allocation variable
is defined as
where
indicates the allocation relationship between robots and task units.
The system optimization objective is to minimize the total cost for all robots across the entire task area. A cost matrix is defined, where represents the comprehensive cost for robot to travel from its initial position to task unit and complete the task.
Costs may include factors such as distance, energy consumption, time, or environmental constraints. The overall optimization model is
where
F is the total cost function, and the constraints ensure unique and mutually exclusive allocation of task units.
To facilitate subsequent distance-based allocation, the cost
is associated with the wavefront propagation distance
:
where
is the normalized distance and
is a scaling coefficient (set to 1 in experiments). This framework can be naturally extended to incorporate factors such as energy consumption
or task execution time
, forming a linear combined cost
.
This model represents a typical combinatorial optimization problem, aiming to minimize the total group cost under the condition of full task coverage. Given the known environment and robot communication capability, the system can compute the cost matrix and find solutions through distributed parallel processing.
Robots differ in speed, energy consumption, and load capacity. To reflect this heterogeneity, a set of capability weights is introduced:
where
denotes the comprehensive execution capability of robot
.
Based on capability proportions, the expected number of task units for each robot is
Equation (
7) ensures that robots with stronger capabilities undertake larger task areas, while those with weaker capabilities are assigned fewer tasks, achieving global load balancing. Before task allocation, the continuous two-dimensional space must be discretized. This paper employs a hexagonal grid modeling approach, which offers higher spatial utilization and six-directional uniformity compared to Cartesian grids, avoiding path errors in diagonal directions. Hexagonal units are represented using axial coordinates, with each unit denoted by an integer pair
, where
q is the column coordinate and
r is the row coordinate. The six adjacent directions are defined as
Let the side length of a hexagonal unit be
l, and its center coordinates be
. The coordinates of its six vertices are
The task area boundary is defined as
. The number of rows and columns in the hexagonal grid are
After discretization, the entire area forms a set of hexagonal units:
Each unit possesses geometric position and adjacency attributes, facilitating subsequent distance propagation and area partitioning.
To prevent overlap between robots, the hexagonal unit side length should satisfy
where
is the maximum robot diameter in the system.
The adjacency set for any unit
is defined as
This adjacency relationship forms the basis for subsequent wavefront propagation and connectivity analysis.
The total number of units in the hexagonal grid is
Combined with Equation (
7), the expected task count
for each robot can be obtained, which is used for error evaluation in the proportional correction stage.
3.2. Wavefront Distance Computation and Initial Task Area Partitioning
After constructing the hexagonal grid representation, it is necessary to compute the shortest distance from each robot to every traversable unit within this discrete environment. This distance distribution serves as the basis for task allocation, quantifying the cost disparity between robots and individual task units. This paper employs a wavefront expansion algorithm based on the axial coordinate system to compute the distance matrix. This method offers low computational load, high accuracy, and is naturally suited for six-directional propagation in hexagonal grids. This wavefront propagation based on hexagonal grids produces a distance field that is more uniform and isotropic compared to quadrilateral grids, thereby establishing a foundation for generating task areas with more natural boundaries and reasonable paths.
Wavefront expansion is a layer-by-layer distance computation method commonly used in path planning and reachability analysis. Let the initial position of the
i-th robot be
, with corresponding coordinates
. The wavefront distance
is defined as the shortest number of steps for the robot to travel from its initial position
to a reachable unit
c:
where
is the set of hexagonal units, and
denotes the adjacency set defined by Equation (
13). If unit
c is an obstacle or non-traversable region, then
. This recursive relation embodies the core idea of wavefront propagation: the distance of the current unit is obtained by adding one to the minimum distance of its adjacent known units.
To efficiently obtain the distance distribution across the entire map, this paper adopts an iterative algorithm based on six-directional queue expansion. Starting from each robot’s initial position, neighboring units are enqueued sequentially and expanded layer by layer until the distance values of all traversable units are updated. If the current unit is
c and its neighbor is
, the propagation relation is
When the queue is empty, wavefront propagation concludes, and the shortest distances to all reachable units are labeled. Due to the equal distance in all six directions within the hexagonal structure, common diagonal traversal errors in square grids are absent, resulting in more uniform computations that better align with geometric reality.
After propagation, each robot obtains a distance distribution map, where values represent the number of steps or cost from that robot to any unit.
Figure 1 illustrates the wavefront propagation process for two robot initial positions on a
hexagonal grid containing obstacles. Storing the wavefront distance results by unit index forms the decision matrix for the
i-th robot:
where
N is the total number of traversable units. If unit
is an obstacle, then
.
The decision matrix
describes the reachability and cost distribution of spatial positions relative to the robot, serving as the primary input for the task allocation phase. By comparing distance matrices from different robots, it can be determined which robot is more suitable for executing a specific task unit. To eliminate scale differences in distances between different robots, wavefront distances need normalization. Let the maximum distance in the entire map be
. The normalized result is
where
is the normalized distance weight. Non-traversable units are directly assigned a value of 1, corresponding to the maximum cost. This normalized matrix can be directly mapped to the cost matrix
and connected to the task allocation model in Equation (
4).
Since the adjacency degree of the hexagonal grid is constant at six, the overall complexity of the wavefront propagation algorithm is , i.e., linear with the total number of units, making it highly suitable for real-time parallel computing environments.
Using the computed distance results, the initial task area partitioning is generated based on the wavefront distance from each robot to every unit. The core principle is that each unit should be allocated to the robot with the minimum cost to reach it. This method can be viewed as a process of constructing a generalized, discrete Voronoi diagram that considers obstacles. It overcomes the limitations of conventional geometric Voronoi diagrams, which rely solely on Euclidean distance, by incorporating obstacles and robot heterogeneity, thus better reflecting real-world robot motion scenarios.
Mathematically, this is expressed as
All allocation variables
form the allocation matrix:
where each column contains exactly one element equal to 1, ensuring unique unit allocation.
Accordingly, the task area set for the
i-th robot is defined as
which contains all units allocated to robot
. The area size is
reflecting the robot’s task load or coverage area.
If a unit
is an obstacle, its reachability flag
is defined as
The overall allocation constraint can then be written as
This equation ensures that only traversable units participate in allocation.
Spatially, the initial task areas possess the following geometric characteristics: Any two robot areas are disjoint,
and each area is typically connected, with its boundary formed by units satisfying
, i.e., the discrete Voronoi boundary under the hexagonal structure.
This natural demarcation allows for smooth transitions in task partitioning, with area morphology highly consistent with spatial reachability. The time complexity of initial allocation is , meaning each unit requires comparing M distance values. When , this process is computationally efficient and suitable for real-time allocation. Following this step, the system completes the initial task area partitioning based on wavefront distance, achieving full task coverage and preliminary connectivity. However, due to differing robot capabilities, the resulting area sizes may not align with the expected proportions . Therefore, proportional adjustment and connectivity correction are required.
3.3. Task Area Proportional Adjustment and Connectivity Optimization
Following the initial wavefront-distance-based task area partitioning, each robot obtains a designated spatial task area. Nevertheless, as the initial allocation relies solely on the shortest distance principle without fully accounting for performance variations among robots, some robots may end up with excessive workloads or inadequately small task areas. To achieve a balance between task load and execution capability, this work introduces proportional adjustment and connectivity optimization mechanisms, ensuring that each robot’s allocated area aligns with its capability proportion while preserving spatial connectivity.
First, to quantify the proportional deviation in task allocation, the number of task units for the
i-th robot is defined as
, with its ideal expected value being
. Their difference constitutes the proportional error:
where
indicates robot task overload, and
indicates insufficient tasks. The overall system task allocation error is defined as
when
approaches zero, it indicates that the system has achieved proportional consistency in task allocation.
To dynamically correct the proportional error, a correction factor
is introduced to adjust the distance matrix of the
i-th robot:
where
is an upper bound constant (typically set to 10) to prevent division by zero. If
, it indicates the robot’s task load is less than expected and should expand its coverage in the next allocation round; if
, it indicates the allocated area is too large and should be reduced accordingly.
The scaling factor is interpreted as a continuous control variable that modulates the relative expansion speed of the wavefront of robot i over the grid. By globally scaling the distance matrix, HGTA embeds workload proportionality directly into the distance competition process, rather than relying on post hoc reassignment. This design enables smooth convergence toward balanced allocation while preserving region connectivity. The global scaling approach is chosen for its simplicity and monotonic convergence properties, which ensure that workload error decreases consistently without oscillatory behavior, as observed in heuristic local-swap methods.
The correction factor acts directly on the original wavefront distance matrix
, yielding the updated corrected matrix:
when
, distances are globally amplified, reducing the robot’s competitiveness; when
, distances are globally reduced, making it easier for the robot to acquire new units.
Substituting the corrected matrix into the task allocation formula allows recalculation of the allocation result:
by continuously repeating the computation of Equations (
28)–(
30), the system can gradually approach proportional balance. The iteration termination condition is defined as
where
is the error tolerance, typically set to 1–3% of the total task units.
To accelerate convergence, this paper employs the cyclic coordinate descent (CD) method to minimize the error function (
27). Each iteration updates only one correction factor:
where
is the step size coefficient. The approximate partial derivative of the error is expressed as
where
is the sign function. When
, the partial derivative is positive,
increases, thereby reducing the robot’s task share; conversely,
decreases, allowing it to acquire more units.
This update mechanism ensures the system’s overall error monotonically decreases and eventually converges. The correction effect can be expressed by the error reduction rate:
Typically, within 5–10 iterations, the error converges to within 5% of its initial value, completing proportional balancing adjustment.
Although proportional adjustment achieves a match between task load and capability, in complex environments, obstacles may cause some robot task areas to be split into multiple disconnected sub-regions. To eliminate such fragmentation phenomenon, connectivity optimization must be performed. Let the task area of the
i-th robot be
, which may consist of several disjoint connected subsets:
where
denotes the number of connected components. When
, it indicates the robot’s task area is fragmented.
To quantitatively describe regional connectivity, a connectivity matrix
is defined:
The matrix represents the adjacency relationships within the area. The number of connected components can be computed via the connected components of this matrix.
Using the robot’s initial position
as a reference, the main connected component and isolated units can be distinguished. The main connected component is defined as:
where the non-connected units form the set:
To suppress these isolated units, a connectivity correction matrix
is introduced:
where
is a penalty coefficient. Applying this to the corrected distance matrix yields the final corrected result:
where ⊙ denotes the Hadamard (element-wise) product. If a unit belongs to an isolated region, its distance is amplified, making it more likely to be taken over by neighboring robots. It should be noted that when the penalty coefficient
is between
and
, a good balance is achieved between rapidly eliminating isolated regions and maintaining the stability of the main region.
Connectivity correction is performed iteratively by the following three processes, including identify isolated regions, compute the correction matrix, and reallocate tasks. When all robots satisfy , it indicates the task areas are fully connected in space. Since each iteration reduces the number of non-connected units and the error has a lower bound, the algorithm is guaranteed to converge within a finite number of steps.
Combining proportional adjustment and connectivity constraints, the task area allocation problem can be uniformly described as
This optimization objective simultaneously minimizes path cost, proportional error, and connectivity penalty, ensuring the final allocation result is both economical and geometrically reasonable.
The iteration terminates when the system satisfies the following conditions:
The iterative correction mechanism in HGTA ensures both workload balance and spatial connectivity through two key properties: monotonic convergence and connectivity preservation. The former ensures that the workload error
(where
) decreases with each iteration. This is achieved by the correction factor
(Equation (
28)), which adjusts the competitiveness of each robot based on its current load deviation: when
(overloaded),
reduces the expansion tendency of the robot; when
(underloaded),
increases it. This directional adjustment guarantees
for all iterations
k. The latter ensures that if the initial allocation produces connected regions, they remain connected throughout the correction process. The connectivity penalty matrix
(Equation (
39)) assigns higher costs to disconnected cells, making them more likely to be reassigned to neighboring robots. Crucially, such reassignment only occurs when it reduces the overall cost without breaking the connectivity of the region belonging to the receiving robot.
Furthermore, the algorithm’s iteration complexity is bounded by , where N is the total number of task cells and is the maximum initial load deviation. These three theoretical guarantees—monotonic convergence, connectivity preservation, and bounded iteration complexity—ensure that HGTA converges to a solution satisfying both proportional balance () and spatial connectivity () within finite iterations, while maintaining the practical feasibility of the allocated regions for robot navigation.
The final results show that after optimization, the task area boundaries are clear, the distribution is balanced, all robots are located within their respective task areas, and the area partitioning is continuous and compact. This method effectively enhances the collaboration and execution feasibility of the system, laying a reliable foundation for subsequent path planning and swarm control.