A Multi-Agent Task Allocation Method for Dynamic Event Response
By using a global execution state table and a frozen task prefix mechanism, the problem of execution state continuity in multi-agent task allocation under dynamic events is solved, achieving continuity and consistency in task allocation. This is applicable to task allocation in drone swarms, mobile robot swarms, and unmanned vehicle swarms.
Patent Information
- Application Number
- CN202611518196.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-17
AI Technical Summary
Existing multi-agent task allocation methods struggle to maintain execution state continuity under dynamic events, easily leading to duplicate allocation of completed tasks, confusion in numbering and consensus states, high computational overhead, and inability to effectively handle task time window constraints and dynamic events.
By maintaining a global execution state table and introducing a frozen task prefix mechanism, the execution state of completed and non-adjustable tasks is preserved when dynamic events occur. A static allocation subproblem is constructed, and a global consistency package algorithm is used for bid propagation and conflict resolution to ensure the continuity and consistency of task allocation.
It achieves the maintenance of execution continuity of multi-agent systems under dynamic events, reduces the scale of replanning, avoids semantic confusion of numbering and misjudgment of time windows, and is suitable for multi-agent systems with neighbor communication restrictions.
Smart Images

Figure CN123114701A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multi-agent cooperative control, distributed task allocation and online dynamic scheduling technology. Specifically, it relates to a task allocation method for UAV swarms, mobile robot swarms, unmanned vehicle swarms or heterogeneous autonomous agent systems. In particular, it relates to a multi-agent task dynamic allocation technology based on a global consistency package mechanism and integrating task time window constraints and dynamic event processing, namely a multi-agent task allocation method for dynamic event response. Background Technology
[0002] Multi-agent task allocation is a key issue in collaborative operations involving multiple unmanned platforms, such as UAV swarm inspection, robot collaborative handling, and disaster search and rescue. This problem typically requires allocating a set of spatial tasks among multiple agents and determining the order in which each agent performs its tasks, so that the system can achieve a better global task evaluation result or a lower task completion cost while satisfying task capacity, communication topology, and motion constraints.
[0003] In existing technologies, auction algorithms and consensus packet algorithms are widely used for distributed task allocation. These methods typically involve agents bidding on tasks based on their own path rewards, and gradually eliminating competition for the same task among different agents through neighbor communication, thereby obtaining a task allocation result without duplication under limited communication conditions.
[0004] However, existing consensus packet algorithms and global consensus packet algorithms mainly address the problem of bid propagation and conflict resolution under static task sets. Their core states typically revolve around task packets, task paths, task winners, winner bid values, and timestamps. When dynamic events occur, simply resetting all tasks or directly hot-modifying existing consistency variables can easily lead to duplicate allocation of completed tasks, erroneous release of currently executing tasks, confusion in the mapping between agent IDs and task IDs, and inconsistent consensus states.
[0005] Furthermore, existing global consensus packet algorithms improve the consistency between the allocation results and the sequential greedy allocation results by performing global consensus propagation after each task is added in each round, and also improve convergence and optimality guarantees. However, existing global consensus packet algorithms are mainly geared towards static task sets and static agent sets, and their starting point is usually fixed at the initial time. Whether a task is executable is mainly reflected indirectly by path cost or reward function. In real multi-agent systems, tasks often have clear time window constraints, that is, tasks must start or complete within a specified time interval; at the same time, dynamic events such as agent failures, temporary addition of new tasks, addition of new agents, or changes in communication topology may occur during system execution. If a static allocation method is still used, the following problems are likely to occur.
[0006] (1) The task time window constraint is not deeply coupled with the bidding process. If the existing method only checks the feasibility of the time window after the allocation is completed, it may result in a task path that has won the bid but cannot actually be executed on time, leading to a chain failure of subsequent tasks.
[0007] (2) Lack of unified execution state maintenance after dynamic events occur. An agent may have completed part of a task, may be on its way to a task, or may be executing a task. If all tasks are simply reset after an event occurs, completed tasks will be reassigned. If the original task package and consensus matrix are directly modified, it is easy to cause semantic confusion in agent number, task number, and consensus timestamp. Especially when using the global consensus package algorithm, the consensus variables such as task winner, winner bid value, and timestamp depend on the original task set and agent set. Dynamically modifying the above variables can easily destroy the existing consensus results.
[0008] (3) Dynamic task allocation is disconnected from the absolute time axis. Task time windows are usually defined on the global absolute time, while static path evaluation often starts from time 0. If the agent's current available time and current position are not considered during reallocation, the calculated arrival time, waiting time, and completion time will be inconsistent with the actual execution state.
[0009] (4) The allocation scale and computational overhead are large in dynamic environments. If all tasks and all agents are reallocated every time a new task or agent state changes, it will disrupt the continuity of the executed plan and increase the communication and computational burden.
[0010] Therefore, existing multi-agent task allocation methods based on global consensus packet algorithms still have shortcomings in dynamic execution environments: on the one hand, when the task set and agent set change, the original task packets, winner information, and consensus state are difficult to directly transfer, resulting in inconsistencies between the reallocation process and the historical execution state; on the other hand, existing methods typically do not differentiate between completed tasks, tasks currently being executed, and tasks not yet executed, which can easily lead to duplicate allocation of completed tasks or unnecessary adjustments to the original execution plan. Therefore, there is an urgent need for a multi-agent dynamic task allocation method that can maintain the execution state based on the task lifecycle state and reconstruct consistent tasks after dynamic events are triggered. Summary of the Invention
[0011] The purpose of this invention is to provide a multi-agent task allocation method for dynamic event responses. This method retains the advantages of the global consensus packet algorithm in bid propagation and conflict resolution, while focusing on solving the problems of continuous transition of execution states, preservation of frozen tasks, release of adjustable tasks, and stable construction of new static allocation subproblems under dynamic events. This invention maintains a global execution state table, recording the agent's current position, available time, survival status, current task path, and task lifecycle state. When a dynamic event occurs, the system execution state is advanced to the event time, preserving the prefixes of completed and frozen tasks, and only releasing adjustable tasks for reallocation. Subsequently, a static allocation subproblem is constructed based on surviving agents and tasks to be allocated, and the global consensus packet algorithm is used to complete bid propagation and conflict resolution, thereby achieving stable dynamic allocation in scenarios such as faulty agents, new task arrivals, and the addition of new agents.
[0012] Furthermore, to avoid redundant adjustments to already stably executing tasks after dynamic events occur, this invention introduces a frozen task prefix mechanism. When a dynamic event is triggered, based on the task lifecycle state and current execution stage, completed tasks and tasks that have entered an irreplaceable execution stage are classified as frozen task prefixes. Tasks in the frozen task prefixes retain their original execution state and do not participate in subsequent task allocation. Only the set of adjustable tasks outside the frozen task prefixes undergoes sub-problem reconstruction and reallocation. Through this mechanism, the dynamic allocation process maintains the continuity of executed tasks while reducing the scale of replanning and avoiding the loss of historical execution states.
[0013] To achieve the above objectives, the present invention provides the following specific technical solutions:
[0014] A multi-agent task allocation method for dynamic event response includes the following steps:
[0015] Step 1: Obtain the agent set, task set, and communication topology information of the multi-agent system. Each agent shall include at least its current position and movement speed, and each task shall include at least its task position, task execution duration, task weight, and an executable time window consisting of the start and end times of the time window.
[0016] Step 2: Establish a global execution state table, which includes at least the survival status, current position, movement speed, available time and current task path of each agent, as well as the task status of each task, including the pending assignment status, the assigned status and the completed status.
[0017] Step 3: During initial task allocation or upon detection of a dynamic event, select agents in the live state and tasks in the pending state based on the global execution state table, construct a static allocation subproblem for dynamic task allocation, and establish a mapping relationship between local agent numbers, local task numbers, global agent numbers, and global task numbers in the static allocation subproblem; wherein, the static allocation subproblem does not include completed tasks or tasks belonging to the frozen task prefix;
[0018] Step 4: For each agent in the static allocation subproblem, take the available time of the agent as the starting time of the path simulation and the current position of the agent as the starting position of the path simulation. Calculate the arrival time, waiting time, start time, completion time and feasibility of the task time window for each candidate task path to obtain the path simulation results.
[0019] Step 5: For each task to be assigned, insert the task into different positions of the agent's current candidate path. Calculate the path evaluation value corresponding to each insertion position based on the path simulation results obtained in Step 4, and use the path evaluation value as the corresponding bid evaluation value. Select the insertion position with the largest bid evaluation value as the candidate insertion position for the task.
[0020] Step 6: Use the global consensus packet algorithm to perform bidding and conflict resolution, so that each agent bids for the task to be assigned according to the bid evaluation value corresponding to the candidate insertion position, and transmits the task winner, the winner's bid value and timestamp information through communication, and updates or resets the conflicting task packets and task paths.
[0021] Step 7: When the global consensus algorithm satisfies the following conditions: consistent global winner information, unchanged task winner vector for several consecutive rounds, and no unresolved task conflicts, it is determined to have reached convergence. If the above conditions are not met even after reaching the maximum allowed number of iterations, the exception handling process is initiated. After convergence, the local allocation results in the static allocation subproblem are mapped back to the global agent number and global task number to obtain the current global task allocation path.
[0022] Step 8: When a dynamic event occurs, instead of resetting the existing global task allocation path, advance the system execution timeline to the moment the dynamic event occurs. Update the current position, available time, and lifecycle state of each agent based on the actual execution progress before the event. For completed tasks, maintain the completed state. For tasks belonging to the frozen task prefix, maintain the original execution state and exclude them from the current round of allocation. For tasks that have not entered the frozen task prefix and are affected by the dynamic event, reset them to the pending allocation state. Then return to Step 3, reconstruct the static allocation subproblem with the migrated agent state and task state, and perform the allocation.
[0023] Step 9: Generate the corresponding task execution instructions for the agent based on the obtained global task allocation results, and send them to the agent motion control module to drive the agent to execute the replanned task.
[0024] Furthermore, in the task set, each task is represented by a task feature vector, which includes the task's horizontal axis, vertical axis, execution duration, weight, start time of the time window, and end time of the time window. When the start time and end time of the time window are not given in the task feature vector, the start time of the time window for that task is set to 0, and the end time of the time window is set to positive infinity, to indicate that the task does not have time window restrictions enabled.
[0025] Furthermore, the path simulation results described in step 4 are as follows: For any task in the candidate path of the agent, the travel distance is calculated based on the agent's current position and the task position, and the travel time is calculated based on the travel distance and the agent's movement speed; the sum of the current path time and the travel time is taken as the task arrival time; the larger value between the task arrival time and the task time window start time is taken as the task start time; the sum of the task start time and the task execution duration is taken as the task completion time; when the task start time is not later than the difference between the task time window end time and the task execution duration, it is determined that the task satisfies the time window feasibility in the current candidate path.
[0026] Furthermore, in step 5, when selecting candidate insertion positions for the task to be assigned, path simulation is performed on all insertable positions from the beginning to the end of the current candidate path of the agent, and the optimal insertion position is determined according to the path evaluation value or bid evaluation value corresponding to each insertable position, so that the task time window is constrained to participate in candidate path evaluation and bid value generation before the task bid.
[0027] Furthermore, the path evaluation value serves as the corresponding bid evaluation value, which is a weighted penalty evaluation value based on the time of repeated paths. When all tasks in the candidate path meet the time window feasibility, the weighted penalty evaluation value is determined according to the weight of each task and the corresponding actual task completion time, and is expressed as the negative sum of the products of each task weight and the corresponding actual task completion time. The larger the weighted penalty evaluation value, the smaller the weighted completion time penalty of the candidate path. When there are tasks in the candidate path that do not meet the time window feasibility, the evaluation value of the candidate path is set to a preset low value. The preset low value is less than the evaluation value of any candidate path that meets the time window feasibility, and is used to prevent infeasible paths within the time window from being selected in the bid comparison.
[0028] When using a weighted penalty evaluation value based on repeated path time for task bidding, the evaluation value of the candidate path corresponding to each candidate insertion position is used as the bidding evaluation value of the corresponding candidate task, and the task insertion position is determined according to the rule of prioritizing candidate paths with larger evaluation values; wherein, the evaluation value of the candidate path is a non-positive value, and the larger the evaluation value, the smaller the weighted completion time penalty of the candidate path.
[0029] Furthermore, in the global consensus packet algorithm, each agent performs a task addition operation based on the currently known task winner and winner's bid value during each round of allocation. Each agent adds at most one task to its own task packet that meets the bid evaluation value comparison condition per round. After the task is added, each agent propagates the task winner, winner's bid value, and timestamp information through neighbor communication, gradually achieving global consistency of the winner information in the communication topology. During conflict resolution, if an agent determines, based on neighbor information and timestamps, that a task in its own task packet has been won by another agent, it releases that task and subsequent tasks following it, and synchronously updates the task packet, task path, winner's bid value, and task winner information.
[0030] Furthermore, the frozen task prefix is determined based on the time of occurrence of the dynamic event, the current global task allocation path, the agent's execution progress, and the task lifecycle state; the frozen task prefix includes at least tasks that have been completed before the time of occurrence of the dynamic event, as well as tasks that have entered the execution or non-adjustable phase and continue to maintain the original execution arrangement; tasks in the frozen task prefix do not participate in the current round of allocation, and only tasks outside the frozen task prefix that are in an adjustable state are released as tasks to be allocated.
[0031] Furthermore, the dynamic events include agent failure events, new task arrival events, and new agent joining events;
[0032] When an agent failure event occurs, the system execution timeline is first advanced to the time of failure. Based on the task execution progress before the time of failure, the completed tasks, frozen task prefixes, and the position of the failed agent are updated. If the failed agent has completed a task, the task is marked as completed. If the failed agent is on its way to a task or is executing a task that has not yet been completed, the position of the failed agent at the time of failure is updated, and the task and the tasks in the remaining path of the failed agent are set to a pending assignment state. Affected tasks that have not entered the frozen task prefix are set to a pending assignment state, and the failed agent is marked as non-live.
[0033] The events are as follows: When a new task arrives, the system execution timeline is advanced first, and then the new task is added to the task set and set to the pending allocation state. When a new agent joins, the system execution timeline is advanced first, and then the new agent is added to the agent set. The available time of the new agent is set as the joining time, and the new agent is set to the live state. Then, the process returns to step 3 to trigger dynamic task allocation.
[0034] Furthermore, when determining whether there is a conflict in the allocation results of the global task, the conflict determination condition is whether the same task is assigned to two or more agents; for tasks that have not been assigned due to the infeasibility of time windows, limitations in task execution capabilities, or the influence of dynamic events, they are not individually determined as allocation conflicts.
[0035] The present invention can achieve the following beneficial technical effects:
[0036] (1) The present invention performs state transition based on the existing execution state after a dynamic event occurs, instead of re-initializing all task allocations from time 0, which can avoid the repeated allocation of completed tasks and maintain the continuity of the execution process of the multi-agent system.
[0037] (2) By freezing the task prefix mechanism, the present invention keeps completed tasks and tasks that have entered the unadjustable stage in their original execution state, and only releases adjustable tasks to participate in subsequent allocation, which can reduce unnecessary task path disturbances and reduce the scale of replanning.
[0038] (3) The present invention uses the available time and current position of the agent as the starting point for reallocation, and recalculates the arrival time, waiting time, start time, completion time and time window feasibility on the absolute time axis, avoiding the misjudgment of time window caused by the static algorithm recalculating from time 0.
[0039] (4) After a dynamic event occurs, the present invention only reconstructs the static allocation subproblem for surviving agents and tasks to be allocated, and backfills the allocation results through a mapping mechanism between local and global numbers, thereby avoiding semantic confusion of numbers and inconsistent convergence states caused by directly modifying the original consistency variables.
[0040] (5) The present invention embeds the task time window constraint into the candidate path simulation and bid evaluation value calculation process, so that the agent can eliminate or reduce the evaluation of infeasible paths before bidding, thereby reducing the probability of infeasible allocation of tasks with time windows during the execution phase.
[0041] (6) This invention retains the distributed bid propagation and conflict resolution features of the global consensus packet algorithm, is applicable to multi-agent systems with neighbor communication restrictions, and can uniformly support typical dynamic events such as agent failure, arrival of new tasks and addition of new agents.
[0042] (7) The present invention is compatible with different types of dynamic events, including agent failure, arrival of new tasks and addition of new agents, and completes dynamic task allocation through a unified state transition mechanism. Attached Figure Description
[0043] Figure 1 This is the initial task allocation path diagram for step one of the embodiments;
[0044] Figure 2 This is the redistribution path diagram after the A1 failure in step two of the embodiment;
[0045] Figure 3 This is the redistribution path diagram after the arrival of the new task in step three of the embodiment;
[0046] Figure 4 This is the redistribution path diagram after A4 is added in step four of the embodiment;
[0047] Figure 5 This is a Gantt chart of dynamic events and task execution in the implementation example;
[0048] Figure 6 This is a flowchart of the present invention. Detailed Implementation
[0049] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention.
[0050] See Figure 6 The present invention provides a multi-agent task allocation method for dynamic event response, comprising the following steps:
[0051] a) Multi-agent task scenario modeling. Obtain the agent set, task set, and communication topology. Each agent includes at least two-dimensional position and velocity, and each task includes at least two-dimensional position, execution duration, and task weight. Furthermore, each task may include a start time and an end time of a time window. For tasks without an explicitly given time window, set its time window to range from 0 to positive infinity to maintain compatibility with tasks without time windows.
[0052] b) Global execution state table construction. Maintain the survival status, current position, movement speed, available time, and current task path for each agent; maintain the status of each task as pending, completed, or assigned; and maintain the assignment results and executed task logs after each reassignment. The available time represents the absolute time an agent can participate in the next round of task execution after completing a committed task.
[0053] c) Static Allocation Subproblem Reconstruction. When the system initially runs or a dynamic event occurs, the system filters out surviving agents and tasks awaiting allocation based on the global execution state table, constructing a smaller static allocation subproblem. For this subproblem, the communication topology is regenerated or updated, and a mapping between local and global IDs is established. This step avoids directly modifying agent and task IDs in the original global consistency matrix, thereby reducing the complexity of state maintenance during dynamic allocation.
[0054] d) Absolute timeline path simulation. For each agent, using its current position as the path starting point and its available time as the path start time, calculate the travel time, arrival time, waiting time, start time, completion time, and time window feasibility for each candidate path. For the tasks within the candidate paths... If the agent arrives at time The task time window starts at The task time window ends at The task execution time is Then the task starts at Task completion time ;when When the time comes, the task is determined to be feasible in the candidate path.
[0055] e) Calculation of bid evaluation values based on time window awareness. For each task to be assigned, it is inserted into all possible positions on the agent's current path, and the path simulation process in step d) is called to obtain the evaluation value of each inserted path. The evaluation value adopts a weighted penalty objective based on the repeated path time. If any task in the candidate path does not meet the time window feasibility, the evaluation value of the candidate path is set to a preset low value; otherwise, the negative value of the sum of the products of each task weight and the corresponding actual completion time is used as the evaluation value of the candidate path. Thus, the task time window constraint is considered in the bid generation stage, rather than being eliminated retrospectively after allocation.
[0056] f) Global Consistency Package Bidding and Conflict Resolution. Each agent selects candidate tasks based on the bid evaluation value obtained in step e) and adds them to its own task package and task path. Under the global consistency package mechanism, each agent adds at most one task in each outer iteration, and after adding a task, performs global consistency propagation through multiple rounds of neighbor communication related to the communication topology diameter, so that the task winner, the winner's bid value, and timestamp information gradually become consistent within the communication topology. If an agent finds that a task in its own task package has been won by another agent, it removes that task and all subsequent tasks in the task package that follow that task, and updates the path evaluation cache.
[0057] g) Convergence Detection and Global Result Backfilling. When the preset number of iterations is reached or the convergence detection condition is met, the local allocation results in the static allocation subproblem are backfilled to the global task path through the mapping relationship established in step c). The backfilled task path is indexed by the global agent number, and the task number is the global task number.
[0058] h) Dynamic event handling and dynamic allocation. When an agent fails, a new task arrives, or a new agent joins, the system execution timeline is first advanced to the event time, and the agent's position, available time, and task status are updated according to the current allocation path; then, the global execution status table is updated according to the event type, and the process returns to step c) for dynamic allocation.
[0059] The handling of agent failure events includes: if the failed agent has completed a task before the failure time, the task is marked as completed; if the failed agent is on its way to a task, the position of the failed agent is updated according to its proportion on the linear path at the time of failure, and the task and subsequent tasks are returned to the allocation set; if the failed agent has arrived at a task but has not yet completed its execution, the task and subsequent tasks are returned to the allocation set, and the failed agent is marked as non-live.
[0060] The handling of new task arrival events includes: after the propulsion system executes the timeline, the new task is added to the task set and its status is set to pending assignment; tasks that have already been completed are kept in the completed state and do not participate in subsequent assignments.
[0061] The handling of the new agent joining event includes: after the propulsion system executes the timeline, the new agent is added to the agent set, its current position, movement speed and available time are set, and its survival status is set to true, so that it can participate in the reallocation of subsequent tasks to be assigned.
[0062] This invention may further include a result output unit for outputting the task path, task start time, task completion time, waiting time, time window feasibility, completed task logs, and dynamic event history of each agent. The results can be used to generate path diagrams, Gantt charts, or to issue task execution instructions to each agent controller.
[0063] Example
[0064] This embodiment illustrates the method using an unmanned inspection emergency response scenario. Several inspection or response points exist within the area, each corresponding to a spatial task, with the intelligent agent being a drone. Tasks need to be completed within a given time window. During execution, the system needs to handle three types of dynamic events: agent failure, new task arrival, and the addition of a new intelligent agent, and re-form an executable task sequence after each event.
[0065] This embodiment uses two-dimensional planar coordinates, calculates distances using Euclidean distance, and maintains a constant velocity. The algorithm is set to run with a random seed. Seed for communication graph generation Agent communication probability Each intelligent agent can undertake a maximum of [number of tasks]. The path evaluation function takes ,in For the task The actual completion time on the absolute timeline. In the software implementation of this embodiment, agent_alive, agent_pos, agent_ready_time, task_status, and current_assignment are used to record the agent's survival status, current position, available time, task status, and current task path, respectively.
[0066] The agent parameters in this embodiment are shown in Table 1.
[0067] Table 1
[0068]
[0069] In this embodiment, the task is adopted. It means that among them and These are the x and y coordinates of the task location, respectively. The execution time of the task. For time decay parameters, As task weight, and These represent the start and end times of the task's time window, respectively. Each task in this embodiment... All are 0.95; tasks without a set time window are... Processing. The parameters of the tasks in this embodiment are shown in Table 2. Tasks with strict time window constraints are marked with red circles in the figure below.
[0070] Table 2
[0071]
[0072] Step 1: Perform initial allocation at time t=0. At this time, the set of surviving agents is {A0,A1,A2,A3}, and the set of tasks to be allocated is {T0,T1,...,T11}. Generate the initial communication topology with seed=7 and execute the global consensus packet algorithm for allocation. After convergence, the executable task sequence for each agent is A0:[T7,T10,T8], A1:[T2,T6,T3], A2:[T1,T9,T11], and A3:[T4,T0].
[0073] The initial task allocation path diagram is as follows: Figure 1 As shown.
[0074] Step 2: At time t=3.00, failure A1 occurs. The system first advances the execution clock to time 3.00, records the completed tasks T7, T2, T1, T4, and T9, and marks A1 as non-live. A1 becomes invalid on the subsequent path after executing T2, and the unfinished tasks T6 and T3 are returned to the waiting set. The set of surviving agents used for reallocation at this time is {A0, A2, A3}, and the set of tasks to be assigned is {T3, T5, T6, T8, T10, T11}. Local agent mappings are A0→a0, A2→a1, and A3→a2; local task mappings are T3→t0, T5→t1, T6→t2, T8→t3, T10→t4, and T11→t5. At this time, the communication topology is as follows: =3007 was generated, with the local communication matrix being [[0,0,1],[0,0,1],[1,1,0]] and the communication diameter D=2. After convergence, the local paths are a0:[t4,t5], a1:[t3], a2:[t0,t2], which are then backfilled into global paths A0:[T10,T11], A2:[T8], A3:[T3,T6]. The task reassignment path graph is as follows. Figure 2 As shown.
[0075] The path simulation in this step is performed on the absolute time axis. Taking the insertion of A3 into T3 and T6 as an example, the current position and available time of A3 are used as the starting point of the path. First, the travel time from the current position to T3 is calculated to obtain the arrival time, start time, and completion time of T3; then, T6 is calculated using the position and completion time of T3 as the starting point. If the start time of a task is later than the end time of its time window minus the execution time, the candidate insertion path is determined to be infeasible; otherwise, it is determined to be... As the bid value for this path.
[0076] Step 3: A new task arrival event occurs at t=6.50. After advancing the execution state to 6.50, the system adds T12, T13, and T14 to the task set and sets them to the pending allocation state. At this time, A1 is still not alive, the set of alive agents used for redistribution is still {A0, A2, A3}, and the set of tasks to be allocated is {T5, T6, T8, T12, T13, T14}. The local agent mapping is still A0→a0, A2→a1, A3→a2; the local task mapping is T5→t0, T6→t1, T8→t2, T12→t3, T13→t4, T14→t5. The communication topology is generated according to seed=6507, the local communication matrix is [[0,1,1],[1,0,0],[1,0,0]], and the communication diameter D=2. After convergence, we obtain A0:[T12], A2:[T8], and A3:[T14,T6]. T5 and T13 have not yet been assigned. Figure 3 As shown.
[0077] Step four: At time t=6.60, a new agent joins. The new agent A4 is positioned at (0.00, -3.00), has a velocity of 3.00, and is available for 6.60. The system refactors the allocation subproblem, the set of surviving agents becomes {A0, A2, A3, A4}, and the set of tasks to be allocated remains {T5, T6, T8, T12, T13, T14}. Local agent mappings are A0→a0, A2→a1, A3→a2, A4→a3; local task mappings are T5→t0, T6→t1, T8→t2, T12→t3, T13→t4, T14→t5. The communication topology is generated with seed=6607. The local communication matrix is [[0,0,1,0],[0,0,1,1],[1,1,0,1],[0,1,1,0]], and the communication diameter D=2. After convergence, the local paths are a0:[t3], a1:[t5], a2:[t1], a3:[t4,t2], which are backfilled into the global paths A0:[T12], A2:[T14], A3:[T6], A4:[T13,T8]. T5 remains unassigned. Figure 4 As shown.
[0078] The role of A4 can be directly seen from the path simulation of T13. A4 travels 3.81 units from (0.00, -3.00) to (3.50, -1.50) of T13, with a travel time of 1.27 and an arrival / start time of 7.87. T13's time window is [6.70, 9.00], with an execution time of 0.80 and a latest allowed start time of 8.20. Therefore, this insertion is feasible, with a completion time of 8.67. Subsequently, the distance from T13 to T8 is approximately 5.54 units, with a travel time of 1.85. T8 starts at 10.51 and completes at 11.84. The evaluation value of this candidate path is -(5.00 × 8.67 + 1.00 × 11.84) = -55.19. Thus, T13, which was initially unassigned at t=6.50, was assigned and completed on time after A4 was added.
[0079] The system continues execution according to the above redistribution results. The tasks that are ultimately completed are T0, T1, T2, T3, T4, T6, T7, T8, T9, T10, T11, T12, T13, and T14; T5 remains unassigned because its time window [1.93, 4.35] cannot be satisfied in subsequent redistributions. The global task allocation Gantt chart is as follows: Figure 5 As shown in Table 3, the actual start and finish times of each task, i.e., the task execution records, are as follows.
[0080] Table 3
[0081]
[0082] The above embodiments are only used to illustrate the implementation process of the present invention and are not intended to limit the scope of protection of the present invention. Under the same technical concept, the agent type, task coordinates, communication topology generation method, path evaluation function, and number of dynamic events can be replaced with equivalent substitutions, and the method of the present invention can still be executed.
Claims
1. A multi-agent task allocation method for dynamic event response, characterized in that, Includes the following steps: Step 1: Obtain the agent set, task set, and communication topology information of the multi-agent system. Each agent shall include at least its current position and movement speed, and each task shall include at least its task position, task execution duration, task weight, and an executable time window consisting of the start and end times of the time window. Step 2: Establish a global execution state table, which includes at least the survival status, current position, movement speed, available time and current task path of each agent, as well as the task status of each task, including the pending assignment status, the assigned status and the completed status. Step 3: During initial task allocation or upon detection of a dynamic event, select agents in the live state and tasks in the pending state based on the global execution state table, construct a static allocation subproblem for dynamic task allocation, and establish a mapping relationship between local agent numbers, local task numbers, global agent numbers, and global task numbers in the static allocation subproblem; wherein, the static allocation subproblem does not include completed tasks or tasks belonging to the frozen task prefix; Step 4: For each agent in the static allocation subproblem, take the available time of the agent as the starting time of the path simulation and the current position of the agent as the starting position of the path simulation. Calculate the arrival time, waiting time, start time, completion time and feasibility of the task time window for each candidate task path to obtain the path simulation results. Step 5: For each task to be assigned, insert the task into different positions of the agent's current candidate path. Calculate the path evaluation value corresponding to each insertion position based on the path simulation results obtained in Step 4, and use the path evaluation value as the corresponding bid evaluation value. Select the insertion position with the largest bid evaluation value as the candidate insertion position for the task. Step 6: Use the global consensus packet algorithm to perform bidding and conflict resolution, so that each agent bids for the task to be assigned according to the bid evaluation value corresponding to the candidate insertion position, and transmits the task winner, the winner's bid value and timestamp information through communication, and updates or resets the conflicting task packets and task paths. Step 7: When the global consensus packet algorithm satisfies the following conditions: global winner information is consistent, task winner vector remains unchanged for several consecutive rounds, and there are no unresolved task conflicts, it is determined that the convergence state has been reached; if the above conditions are not met even after reaching the maximum allowed number of iterations, the exception handling process is entered; after convergence, the local allocation results in the static allocation subproblem are mapped back to the global agent number and global task number to obtain the current global task allocation path; Step 8: When a dynamic event occurs, instead of resetting the existing global task allocation path, advance the system execution timeline to the moment the dynamic event occurs. Update the current position, available time, and lifecycle state of each agent based on the actual execution progress before the event. For completed tasks, maintain the completed state. For tasks belonging to the frozen task prefix, maintain the original execution state and exclude them from the current round of allocation. For tasks that have not entered the frozen task prefix and are affected by the dynamic event, reset them to the pending allocation state. Then return to Step 3, reconstruct the static allocation subproblem with the migrated agent state and task state, and perform the allocation. Step 9: Generate the corresponding task execution instructions for the agent based on the obtained global task allocation results, and send them to the agent motion control module to drive the agent to execute the replanned task.
2. The multi-agent task allocation method according to claim 1, characterized in that, The task set, in which each task is represented by a task feature vector, includes the task's horizontal axis, vertical axis, task execution duration, task weight, time window start time, and time window end time. When the task feature vector does not specify the time window start time and time window end time, the time window start time of the task is set to 0, and the time window end time is set to positive infinity, to indicate that the task does not have time window restrictions enabled.
3. The multi-agent task allocation method according to claim 1, characterized in that, Step 4, path simulation results, specifically: For any task in the candidate path of the agent, calculate the travel distance based on the agent's current position and the task position, and calculate the travel time based on the travel distance and the agent's movement speed; take the sum of the current path time and the travel time as the task arrival time; take the larger value between the task arrival time and the task time window start time as the task start time; take the sum of the task start time and the task execution time as the task completion time; when the task start time is not later than the difference between the task time window end time and the task execution time, it is determined that the task satisfies the time window feasibility in the current candidate path.
4. The multi-agent task allocation method according to claim 1, characterized in that, In step 5, when selecting candidate insertion positions for the task to be assigned, path simulation is performed on all possible insertion positions from the beginning to the end of the current candidate path of the agent. The optimal insertion position is determined based on the path evaluation value or bid evaluation value corresponding to each possible insertion position, so that the task time window is constrained to participate in the candidate path evaluation and bid value generation before the task bid.
5. The multi-agent task allocation method according to claim 1, characterized in that, The path evaluation value serves as the corresponding bid evaluation value, which is a weighted penalty evaluation value based on the time of repeated paths. When all tasks in the candidate path meet the time window feasibility, the weighted penalty evaluation value is determined according to the weight of each task and the corresponding actual task completion time, and is expressed as the negative sum of the products of each task weight and the corresponding actual task completion time. The larger the weighted penalty evaluation value, the smaller the weighted completion time penalty of the candidate path. When there are tasks in the candidate path that do not meet the time window feasibility, the evaluation value of the candidate path is set to a preset low value. The preset low value is less than the evaluation value of any candidate path that meets the time window feasibility, and is used to prevent infeasible paths within the time window from being selected in the bid comparison. When using a weighted penalty evaluation value based on repeated path time for task bidding, the evaluation value of the candidate path corresponding to each candidate insertion position is used as the bidding evaluation value of the corresponding candidate task, and the task insertion position is determined according to the rule of prioritizing candidate paths with larger evaluation values; wherein, the evaluation value of the candidate path is a non-positive value, and the larger the evaluation value, the smaller the weighted completion time penalty of the candidate path.
6. The multi-agent task allocation method according to claim 1, characterized in that, The global consensus packet algorithm involves each agent adding a task to its own packet based on the known task winner and the winner's bid value during each round of allocation. Each agent adds at most one task that meets the bid evaluation value comparison condition to its own packet per round. After the task is added, each agent propagates the task winner, winner's bid value, and timestamp information through neighbor communication, gradually achieving global consistency of the winner information in the communication topology. During conflict resolution, if an agent determines, based on neighbor information and timestamps, that a task in its own packet has been won by another agent, it releases that task and all subsequent tasks following it, and simultaneously updates the packet, task path, winner's bid value, and task winner information.
7. The multi-agent task allocation method according to claim 1, characterized in that, The frozen task prefix is determined based on the time of occurrence of the dynamic event, the current global task allocation path, the agent's execution progress, and the task lifecycle state. The frozen task prefix includes at least tasks that were completed before the time of occurrence of the dynamic event, as well as tasks that have entered the execution or non-adjustable phase and continue to maintain their original execution schedule. Tasks in the frozen task prefix do not participate in the current round of allocation; only tasks outside the frozen task prefix that are in an adjustable state are released as tasks to be allocated.
8. The multi-agent task allocation method according to claim 1, characterized in that, The dynamic events include agent failure events, new task arrival events, and new agent joining events; When an agent failure event occurs, the system execution timeline is first advanced to the time of failure. Based on the task execution progress before the time of failure, the completed tasks, frozen task prefixes, and the position of the failed agent are updated. If the failed agent has completed a task, the task is marked as completed. If the failed agent is on its way to a task or is executing a task that has not yet been completed, the position of the failed agent at the time of failure is updated, and the task and the tasks in the remaining path of the failed agent are set to a pending assignment state. Affected tasks that have not entered the frozen task prefix are set to a pending assignment state, and the failed agent is marked as non-live. The events are as follows: When a new task arrives, the system execution timeline is advanced first, and then the new task is added to the task set and set to the pending allocation state. When a new agent joins, the system execution timeline is advanced first, and then the new agent is added to the agent set. The available time of the new agent is set as the joining time, and the new agent is set to the live state. Then, the process returns to step 3 to trigger dynamic task allocation.
9. The multi-agent task allocation method according to claim 1, characterized in that, When determining whether there is a conflict in the allocation results of the global task, the conflict determination condition is whether the same task is assigned to two or more agents. Tasks that have not yet been assigned due to time window infeasibility, task execution capacity limitations, or the impact of dynamic events will not be separately identified as assignment conflicts.
