3.1.3. ENSGA-II Algorithm
The proposed ENSGA-II introduces a series of targeted improvements over the classical NSGA-II framework, including heuristic insertion-based initial population construction, goal-oriented local search operators, and stage-wise evolutionary control mechanisms.
(1) Improved strategy I: Heuristic insertion-based initial population construction
To enhance the initialization efficiency and solution feasibility of NSGA-II, this study proposes a heuristic insertion-based method for initial population construction. This approach addresses the limitations of traditional random initialization in terms of constraint satisfaction and distribution coverage within the solution space. The core idea is to incrementally construct high-quality initial solutions under the constraint of path feasibility. The improved initialization process is described as follows:
1) A task
is randomly selected to form the initial path
. Each path
R represents a scheduling sequence executed by a specific UAV departing from a designated distribution center. An appropriate combination of distribution center
and UAV model
is assigned to the path to ensure the following constraint is satisfied:
where
denotes the maximum flight range of UAV model
k deployed at distribution center
j, and
is the Euclidean distance between nodes
i and
j.
2) For the remaining tasks
, each task is tentatively inserted into any legal position
l in the existing paths
. After insertion, the feasibility of the updated path must be verified, particularly with respect to the task deadline
. The updated path must satisfy:
where
is the estimated completion time of task
under the current path configuration, and
denotes its maximum allowable completion time. If the condition is met, the task
is inserted at position
l, and the path is updated as:
3) If task
cannot be inserted into any existing path without violating constraints, a new distribution center
and UAV model
are selected, under the condition that the distance between the center and the task does not exceed the maximum flight range:
A new path is then constructed as:
4) The above process is iteratively executed until all tasks are successfully assigned, resulting in a set of feasible solutions
. To ensure structural diversity within the initial population, a uniqueness check is performed after each new solution is generated. A solution is added to the initial population
only if it satisfies:
The resulting initial population P0 thus consists of p structurally diverse and constraint-compliant scheduling solutions. By incorporating constraint-aware evaluation and iterative path insertion strategies, this initialization method significantly reduces the proportion of infeasible solutions and enhances structural diversity within the feasible solution space, thereby providing a high-quality basis for the subsequent multi-objective evolutionary process.
(2) Improved strategy II: Goal-oriented top-down and bottom-up search operators
To enhance both the global exploration ability and local convergence performance in the multi-objective optimization process, a goal-oriented, staged top-down and bottom-up search mechanism is proposed to improve the performance of genetic operators. This mechanism comprises two customized operators: a goal-oriented crossover operator and a goal-oriented mutation operator, which collectively enhance solution quality and diversity through a two-phase construction strategy.
1) Goal-oriented crossover operator
This operator constructs high-quality offspring solutions through a two-stage path recombination mechanism. The first stage focuses on identifying and extracting promising path segments from the parent individuals to build a partial, high-quality offspring; the second stage is responsible for embedding remaining unassigned tasks into the existing path structure to ensure solution completeness and feasibility.
First stage: Construction of partial offspring (path selection and information coordination). In this stage, a partial solution is constructed based on information from two parent solutions, with priority given to extracting potentially valuable delivery paths while coordinating task information across paths to form an initial offspring solution
. Initially, the offspring solution is set to an empty set, i.e.,
. Let the two parent solutions be
and
, with corresponding numbers of delivery paths
and
. Define the minimum and maximum number of paths as:
Then, set the number of path extraction iterations
k based on the current optimization objective. If the objective is to minimize UAV usage (
), set
to encourage path merging and reduce total UAV count. If the objective is minimizing economic cost (
) or delay time (
), set
. In each iteration, a parent solution
is randomly selected. For the selected parent, identify the most promising path
according to the objective function
. The selection strategy is defined as:
where
denotes the currently selected parent solution and
represents the set of delivery paths within that solution,
indicates the number of task points contained in path
. A lower average delay per task point in a path implies a higher preference under objective function
. Once the optimal path
is identified, it is copied and added to the offspring solution
, and simultaneously removed from the current parent solution.
In the other parent solution, all task points included in this selected path undergo a coordinated operation, as follows:
The task point i is removed from its original path, after which its predecessor and successor nodes are directly reconnected to form a continuous path structure. Relevant attributes, such as path length, payload, and time windows, are then updated to ensure the feasibility and consistency of the modified path. This procedure is iteratively executed for k rounds. If at any point during the iterations either parent solution no longer contains feasible paths, the phase is terminated prematurely. Ultimately, the number of paths in the partial offspring solution satisfies . However, some task points may remain unassigned and will be handled in the second phase.
Second stage: Insertion of remaining customer tasks. In the partial offspring solution constructed during the first stage, only a subset of delivery routes inherited from the parent solutions is retained, leaving some task points uncovered. Let the set of these unassigned task points be denoted as U. The aim of this phase is to insert all task points in U into the existing routes in a feasible and efficient manner, or to create new delivery routes when necessary, thereby forming a complete and feasible offspring solution.
Specifically, this stage operator processes the task points in
U one by one. In each iteration, a randomly selected unassigned task point
is chosen, and its optimal insertion position within the current solution
is sought. The evaluation criterion for determining the best insertion position is based on the current optimization objective function
. If the current objective is to minimize the number of UAVs used (
), the primary principle is to avoid adding new routes. Among all existing routes, the one with the largest number of task points is given priority:
Then, within the selected route , the operator sequentially searches for the first insertion position that satisfies all constraint conditions. Once a feasible position is found, the task point is inserted accordingly.
If the current objective is to minimize economic cost (
), the algorithm evaluates all routes and feasible insertion positions to calculate the incremental cost:
The task is inserted at the position with the smallest cost increase:
For minimizing delay time (
), the delay increment is calculated as:
Insertion occurs at the position minimizing delay increment:
If no feasible insertion exists, a new route
is created. First, assign the closest distribution center:
Select a UAV type
satisfying range constraints:
This new route is then added to the current solution . The above steps are repeated iteratively until all unassigned customer task points have been successfully inserted, ultimately forming a complete and feasible offspring solution.
2) Goal-guided mutation operator
To enhance the population’s adaptability and responsiveness during the multi-objective evolutionary process, this study designs two types of mutation operators with objective-awareness mechanisms. These operators apply perturbations and structured repairs tailored to different path characteristics and optimization objectives, such as the number of drones used, economic cost, and service delay time, thereby strengthening the algorithm’s capability to balance multiple objectives.
Mutation operator I: Reconstruction and reinsertion of delayed paths (trigger probability )
This mutation operator aims to identify and adjust paths containing delayed tasks in the current solution to reduce path-layer delay risks, thereby improving the timeliness and feasibility of the scheduling scheme. The specific procedure is as follows:
First, traverse all delivery paths
R in the current solution and extract those containing at least one delayed task point to form a set of delayed paths:
Secondly, for each path
in the set
, remove all task points
where delays have occurred (i.e., tasks satisfying the corresponding delay condition), and denote these removed task points as the set
. It is noteworthy that the original distribution center and drone model of the path remain unchanged. For each removed task point
, an attempt is made to reinsert it into the remaining routes of the current solution. The insertion position must satisfy the following conditions:
Eq. (36) (now without numbering) ensures that, after insertion, the service completion time of all tasks on the path does not exceed the upper bound of their respective time windows. If no feasible insertion position can be found in the existing routes for the task point, a new path is created for task i, starting from its original distribution center. The algorithm then searches for the optimal insertion position within the new path or its neighboring routes. The criterion for selecting the insertion position is to minimize the total service delay of the path, ideally achieving zero, while satisfying all constraints. If the insertion conditions remain unmet, additional backup paths are constructed, and insertion attempts continue iteratively until all delayed task points are successfully reassigned. This strategy effectively reduces the overall delay layer of the solution, providing a target-oriented proactive intervention mechanism that facilitates precise regulation of delay metrics during the multi-objective evolutionary process.
Mutation operator II: Destruction-reconstruction mechanism (trigger probability P=0.75).
This operator integrates dynamic preferences of multiple objective functions to achieve targeted perturbation and reconstruction of path structures, thereby enhancing the local feasibility repair capability and global exploration diversity within the solution space. The mechanism primarily consists of two stages:
In the destruction stage, first, the set U of unassigned task points is constructed. According to the dynamic preference of the current optimization objective function , different destruction strategies are selected:
When the optimization objective is to minimize the number of drones used (
), priority is given to selecting the path with the fewest task points, and all tasks on this path are moved into the set
U. If, after removing tasks from the path, its structure no longer satisfies feasibility constraints, it must be divided and reconstructed into several feasible sub-paths:
When the optimization objective is to minimize economic cost (), two mutually exclusive strategies are employed and executed with probabilities of 70% and 30% respectively: The first is "random path partial removal," in which a path is randomly selected from the set of paths, and n task points are randomly removed from it (). The second is "iterative random removal," where a maximum iteration number is set, and in each iteration, a feasible path is randomly selected and one task point is removed.
When the optimization objective is to minimize delay time (
), two mutually exclusive strategies are also used: The first is "high-delay path partial removal," which selects the path with the largest total delay:
Then, randomly removes several task points from it. The second is "iterative random removal," where removal operations are randomly performed only on customer points in paths that contain service delays.
After completing the destruction phase, the reconstruction phase begins, where task points in the set U are inserted one by one. In each iteration, a task point is randomly selected from U, and its optimal insertion position in the existing or new routes is determined based on the current optimization objective function:
If the objective function is to minimize the number of drones used (
), priority is given to the earliest feasible position where the insertion does not cause service delays for existing task points. If no such position exists, the last feasible position is chosen to maximize the insertion flexibility of the route. If the objective function is to minimize economic cost (
), the position causing the smallest increase in cost after insertion is selected. If the objective function is to minimize delay time (
), the position resulting in the minimum increase in total route delay is selected. If the current task point cannot be inserted into any existing route, a new route is created according to the following rule: the nearest distribution center in terms of Euclidean distance to task point
is selected as the starting point:
Next, assign a UAV model
that meets the current task’s service range requirements, which must satisfy the following range constraint:
Finally, during the population update process, this study adopts a “parent plus offspring” merging strategy to construct an intermediate population of size
, and introduces an elitism-based nondominated sorting mechanism to ensure the continuous preservation of high-quality solutions. The proposed goal-oriented bi-directional search improvement operator strategy integrates structured crossover and mutation operations, enabling directional guidance and local fine-tuning reconstruction for different optimization objectives while maintaining solution feasibility. This strategy, combined with a staged evolutionary mechanism, achieves a balance between global exploration and local exploitation, significantly enhancing solution diversity and the capability to obtain high-quality solutions. It provides efficient and stable optimization support and an algorithmic foundation for multi-UAV task allocation problems. The pseudocode of the proposed ENSGA-II algorithm is presented as follows.
|
Algorithm 1: Enhanced NSGA-II Algorithm
|
|
Input: Task set I, Depot set J, UAV model set K, Population size N, Maximum generations
Output: Pareto-optimal solution set
- 1:
Begin
- 2:
initialize
- 3:
whiledo
- 4:
randomly select depot j, UAV type k
- 5:
construct route set R by inserting tasks greedily, s.t.
- 6:
if insertion fails, reassign and retry
- 7:
encode solution X from route set R
- 8:
if then
- 9:
- 10:
evaluate using objective functions
- 11:
- 12:
whiledo
- 13:
- 14:
for each parent pair do
- 15:
extract elite route and
- 16:
initialize offspring
- 17:
remove duplicate tasks in already included from
- 18:
- 19:
for each task do
- 20:
for each route do
- 21:
for each feasible position l in R do
- 22:
tentatively insert i at l, evaluate cost and constraint violations
- 23:
if time window, energy, payload constraints satisfied then
- 24:
if cost(R with i) < minCost then
- 25:
update minCost, bestRoute, bestPos
- 26:
if bestRoute then
- 27:
insert i into bestRoute at bestPos
- 28:
else
- 29:
randomly select depot , UAV such that
- 30:
create route and add to
- 31:
add feasible offspring to
- 32:
for each solution do
- 33:
if then
- 34:
randomly select route
- 35:
remove a subsegment ,
- 36:
shuffle , reinsert into X using greedy insertion
- 37:
with probability p, change depot or UAV for a random route
- 38:
else
- 39:
identify critical route
- 40:
apply intra-route 2-opt or task swap to
- 41:
reassign 1–2 tasks from to other routes to balance load
- 42:
if total cost reduced and constraints satisfied, accept modification
- 43:
- 44:
apply non-dominated sorting and crowding distance selection
- 45:
select top N individuals
- 46:
- 47:
return final Pareto front
|