Task allocation method and system based on time window constraint
Through the task allocation method under the time window constraint, the marginal gain and bidding rights transfer strategy after the task is inserted into the position is calculated, which solves the problem of incomplete task allocation under the time window constraints, and improves the allocation rate and quality.
Patent Information
- Application Number
- CN202411257901.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-11-26
AI Technical Summary
Under the strict time window constraints, the prior art is difficult to ensure that all tasks are allocated, resulting in the problem of low allocation solution quality and inability to allocate some tasks.
Using a task allocation method based on time window constraints, by calculating the bidding ability to execute tasks, selecting the optimal bidder, and designing the time window criteria during the bidding stage to calculate the marginal gain after the task is inserted, ensuring that the task is obtained within the time window. Reasonable allocation; during the winning phase, tasks that are not assigned are secondary allocation, tasks that can be abandoned are selected and bidders are allowed to transfer bidding rights to ensure that all tasks are allocated within the time window constraints.
The task allocation rate and the quality of the allocation solution are improved, ensuring that all tasks can be allocated under strict time window constraints, and improving the complete allocation rate and the quality of the allocation solution of the task.
Smart Images

Figure CN119026873A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of contract network task allocation, and relates to a task allocation method and system based on time window constraints. Background Art
[0002] The existing contract network protocol solution algorithms for task allocation problems under time window constraints mostly focus on satisfying time window constraints. The subject of time window constraints can be tasks or agents. The time window constraint of tasks means that tasks must be executed within a specified time period, and the time window constraint of agents means whether the agents are idle within the corresponding time period. The vehicle routing problem with time windows (VRPTW) is a classic task allocation problem with time window constraints. It generally refers to organizing and calling a certain number of vehicles for a series of shipping points and receiving points, arranging appropriate driving routes, and achieving certain goals (for example, the lowest transportation cost, the least number of vehicles used, and the shortest total idle mileage of vehicles, etc.) under the conditions of satisfying a series of constraints including time window constraints (for example, vehicle capacity constraints, driving time constraints, mileage constraints, and cargo demand and delivery volume, etc.). Many allocation problems with time window constraints in actual production and life can be attributed to VRPTW for processing.
[0003] Based on the contract network protocol, Zheng Gang proposed an algorithm for multi-order batch release, combined with the time window constraint rules, while ensuring the allocation quality, it improved the negotiation efficiency between intelligent agents in dynamic real-time allocation. Heng Hongjun et al. combined the contract network protocol with the vehicle path scheduling algorithm based on dynamic planning time windows, effectively ensuring the efficiency of real-time scheduling of airport vehicles and the utilization of vehicle resources. Choi et al. extended the CBBA algorithm from the perspective of time window constraints and the matching degree between agents and tasks, designed a scoring function based on the influence of time windows, realized real-time task planning under dynamic communication topology, and obtained support from Boeing Research and Technology Company. Ponda et al. proposed the CBBATW algorithm based on the CBBA framework, comprehensively considering the effective time window of the task and the fuel cost of the vehicle. Wei Zhaotian et al. aimed at the problem of task allocation with time windows for heterogeneous multi-UAVs, took the task execution benefit as the goal, entered the time window constraint in the bundle construction stage, designed the CBBA algorithm, and realized conflict-free task allocation.
[0004] Many previous algorithm designs represented by the above methods can obtain conflict-free task allocation solutions that meet the time window constraints. However, when the time window constraints are stricter, some tasks are prone to being unable to be allocated. To address this problem, Li Ruilin et al. proposed a distributed task allocation algorithm based on the framework of the distributed PI algorithm, which takes the minimum average task completion time as the optimization goal. The addition of the task reallocation stage effectively improved the success rate of task allocation, but the algorithm mechanism relies on the design of the global objective function and the local objective function, and its application scope has certain limitations.
[0005] From the analysis of past research, we know that the time window constraint is a constraint that is relatively easy to satisfy. By setting the corresponding criteria in the algorithm, we can assign the task to the idle agents within the time window to perform the task. However, the task allocation problem with time window constraints is an NP-hard problem. How to make the obtained task allocation solution closer to the optimal solution on the basis of satisfying the time window constraints has always been a research difficulty. At the same time, for some time-sensitive tasks, when the time window constraints are relatively strict, it is easy for some tasks to not be assigned. Summary of the invention
[0006] The purpose of the present invention is to solve the problem in the prior art that under strict time window constraints, some tasks cannot be allocated and the quality of the allocated solution is not high, and to provide a task allocation method and system based on time window constraints.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] A task allocation method based on time window constraints includes the following steps:
[0009] Obtain task bidding requests, calculate the bidding capacity for executing the task, and select the best bidder based on the bidding capacity;
[0010] Based on the constraints of the time window, the feasible positions of all time windows of the optimal bidder and the objective function of generating profit by executing the task under the constraints of the time window are calculated. Based on the objective function, the marginal gain after the task is inserted into the feasible position of the time window is calculated, and the optimal task winning bid is obtained based on the marginal gain.
[0011] Based on the optimal task winning bid, determine whether there are any tasks that have not been assigned within the time window constraint:
[0012] If not, a bid is generated based on the best task winning bid to complete the task allocation;
[0013] If so, a second allocation is performed on the unallocated tasks, and a re-allocation tender document is generated. Based on the re-allocation tender document and the time window constraints of the tasks, the discardable tasks are selected, and the tasks that need to be re-allocated are inserted into the feasible positions of the discarded tasks. Then, the optimal task bid is generated to complete the task allocation.
[0014] A further improvement of the present invention is:
[0015] The selecting the best tenderer based on the tendering capability also includes the following steps:
[0016] When a bidder fails or encounters a bidding request with higher benefits, the bidder will transfer the bidding rights for the tasks for which it has obtained the bidding rights but has not yet completed the assignment, and select the latest bidder for the task from the neighboring agents.
[0017] The calculation of the bidding capability of the execution task comprises the following steps:
[0018]
[0019] Among them, Agent i In the multi-agent system communication topology, it can communicate with Agent i The communicating agents set, A j (Agent k ) is Agent k Has execution tasks j Some ability of BestA j (Agent i ) is with Agent i The communicating agents satisfy the task j The strongest individual ability required; F(Agent i ) is Agent i Number of times the bidder failed to win the bid; TW j (Agent k ) indicates Agent k When executing a task j Whether there is idle time within the limited time window, ω1, ω2, ω3 and ω4 are the influence weights of the four factors respectively.
[0020] The calculation of the feasible positions of all time windows of the optimal bidder based on the time window constraint includes the following steps:
[0021] For any task j , when Agent i When you can execute this task, if you execute the path i Insert the task at position k, Then execute task task at position k j Satisfy its time window constraints and define the execution start time
[0022] in, and Represents the agent i according to Execute task j The earliest start time and the latest start time are affected by the original execution path path i The time window constraint of the task in the path i The previous task at this location in the path i The k-1th task in task x The start time of execution, calculate the task j The earliest execution time At the same time, through path i The task at that location, that is, path i The kth task in task y Calculate the latest execution time of task j The latest execution time Need to be satisfied, earliest execution time Earlier than the latest execution time
[0023] If the task j Insert execution path path i The position k satisfies the above constraints and calculates the new execution path In the task j The time when the task starts executing is The k+1th task in task y The time when execution starts;
[0024] Calculate execution path The lth (l>k+1)th task in task z The time when execution starts;
[0025] Determine the execution path Whether the start execution time of all tasks starting from the lth (l>k+1)th task satisfies the time window constraint can determine whether position k is a task j On the path i The feasible position of the time window in .
[0026] The method of obtaining the optimal task winning bid based on marginal gain includes the following steps:
[0027] Define the objective function for the total profit of task allocation:
[0028]
[0029] Among them, Rew i,j Cost i,j Represents the agent i Execute task j Rewards and benefits, Rew i,j It consists of two parts: fixed income from executing tasks and reward income. Fixed income for the task, rew i,j is the reward income for completing the task fastest within the time window, t ij is the time when the task starts executing, and its value range is
[0030] Based on the objective function of the total profit of task allocation, define the agent i The individual profit function is:
[0031]
[0032] The maximum value of the agent's profit growth is defined as task task j The marginal gain is:
[0033]
[0034] Among them, J i (path i ) represents the profit of the agent executing all tasks according to the original execution path, Indicates that the task task j Insert it in the execution path path i The profit of the agent performing all tasks after the feasible position k in the time window.
[0035] After inserting the task that needs secondary allocation into the feasible position of the abandoned task, generating the optimal task winning bid includes the following steps:
[0036] When the agent i Receive task task j When redistributing the tender, first provide alternative discardable tasks l ;
[0037] Based on disposable tasks l , each time a discardable task is removed from the execution path l ∈ExpendableTask, we can get a new execution path Update execution path The time when the task starts to execute;
[0038] Calculate the optimal time window to insert a new task task j After that, the execution profit of the new execution path is and the execution profit of the discardable task J i (path i ) is used as the discarded task task l After that, when the marginal gain is greater than 0, bidding on the task is allowed.
[0039] The task to be executed after the abandonment l The marginal gain is:
[0040]
[0041] A task allocation system based on time window constraints includes the following steps:
[0042] The bidding module is used to obtain task bidding requests, calculate the bidding capacity for executing tasks, and select the best bidder based on the bidding capacity;
[0043] The bidding module is used to calculate the feasible positions of all time windows of the optimal bidder based on the constraints of the time window and the objective function of generating profits by executing the task under the constraints of the time window, calculate the marginal gain after the task is inserted into the feasible position of the time window based on the objective function, and obtain the optimal task winning bid based on the marginal gain;
[0044] The bid winning module is used to determine whether there are any tasks that have not been assigned within the time window constraint based on the optimal task winning bid. If not, a bid is generated based on the optimal task winning bid to complete task assignment; if so, a secondary assignment is performed on the unassigned tasks to generate a reassignment tender document, and based on the reassignment tender document and the time window constraint of the task, the discardable tasks are selected, and the tasks that need to be reassigned are inserted into the feasible position of the discarded tasks, and then the optimal task winning bid is generated to complete task assignment.
[0045] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any method described in the present invention when executing the computer program.
[0046] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any method described in the present invention.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention discloses a task allocation method based on time window constraints. The method makes improvements in the three stages of bidding, tendering and winning the bid. In the bidding stage, the bidding capacity of executing the task is first calculated to facilitate the screening of the best tenderer for the task. In the bidding stage, the time window criterion is designed to calculate the marginal gain generated after the task is inserted into the execution path, so as to judge the contribution of the intelligent agent to the global objective function when the task is executed. It is convenient to give the optimal insertion position of the task. In the winning bid stage, in order to avoid the phenomenon that when the time window constraint of the task is relatively strict, the allocated task occupies part of the time window of the intelligent agent, which may cause the later allocated task to not be allocated because it cannot be executed within its time window limit, the tasks that are not allocated are secondary allocated and tendered, and a post-abandonment bidding strategy is designed for the bidder, and the winning bidder is allowed to bid for the abandoned tasks, so as to ensure that all tasks can still be allocated under the strict time window constraint, thereby improving the task allocation rate and the quality of the task allocation solution.
[0049] Furthermore, in the present invention, during the bidding stage, a bidding right transfer strategy is also disclosed. Based on the bidder's bid capacity and idle time window, a better bidder is selected for the task, which can improve the task complete allocation rate and the quality of task decomposition.
[0050] Furthermore, in the present invention, by determining the specific execution position of the time window, it is ensured that the execution of the tasks meets the time window constraint.
[0051] Furthermore, in the present invention, the post-abandonment bidding strategy in the task reallocation stage ensures that the marginal gain of executing the task after abandonment is positive, thereby improving the task complete allocation rate and improving the quality of the task allocation solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 The flowchart of the contract network protocol algorithm considering the time window constraint of the present invention;
[0054] Figure 2 It is a flow chart of the bidding right transfer mechanism of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0056] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0058] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0059] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0060] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0061] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0062] See also Figure 1 to Figure 2 The embodiment of the present invention discloses a task allocation method based on time window constraint. Based on the contract network protocol algorithm, the quality of task allocation solution and the task complete allocation rate under the time window constraint are not high. The contract network protocol algorithm is extended from the three stages of bidding, tendering and winning the bid, and a bidding right transfer mechanism, a time window constraint criterion and a post-abandonment bidding strategy in the secondary bidding stage are proposed to effectively improve the quality of task allocation solution and the task complete allocation rate.
[0063] The specific steps include:
[0064] Step 1: Bidding stage: Design a bidding strategy that takes into account the transfer of bidding rights
[0065] Defining Agents i For task j T_Ability(Agent i ), when the agent finds a task, it initiates a transfer tender for the bidding right of the task, makes a negotiation decision on the bidding right with the help of the multi-agent system communication network, compares the bidding capabilities of each agent, and transfers the bidding right to the best bidder.
[0066] The specific steps include:
[0067] In the traditional contract network protocol algorithm, each task is tendered by a unique agent, and the principle of "first finder, first tender" is often adopted. When the communication topology of the multi-agent system is a complete graph, the task is indifferent no matter which agent tenders it. However, when the communication topology is not a complete graph, the objects that each agent can tender are different. If the best agent to perform the task cannot receive the tender document, it will not get the best allocation, and even if there is no agent that can perform the task within the bidding range, it will lead to allocation failure. Therefore, in order to improve the optimality of the task allocation solution and ensure that more tasks are allocated, it is a problem worth studying to select the best tenderer for each task.
[0068] In this embodiment, we first define the agent i Task j The bidding capabilities are as follows:
[0069]
[0070] Among them, Agent i In the multi-agent system communication topology, it can communicate with Agent i The communicating agents set, A j (Agent k ) is Agent k Has execution tasks jSome ability, such as task j It is a patrol security mission, A j (Agent k ) indicates Agent k Endurance, task j It is an interception and strike mission. j (Agent k ) indicates Agent k The destructive capability of BestA j (Agent i ) is with Agent i The communicating agents satisfy the task j The strongest individual capability of the demand reflects the best bid that the current agent can attract; F(Agent i ) is Agent i The number of times the bidder failed to win the bid is used to balance the bidding load of each agent; TW j (Agent k ) indicates Agent k When executing a task j Is there free time within the limited time window? TW j (Agent k )=0 means no, TW j (Agent k )=1 means yes. ω1, ω2, ω3 and ω4 are the influence weights of the four factors, which can be determined according to actual application requirements.
[0071] See also Figure 2 , based on the calculation of the agent's bidding ability for the task, it is initiated by the agent that discovers the task, and the negotiation decision of the bidding right is made with the help of the multi-agent system communication network, and the bidding right is transferred to the best bidder.
[0072] In order to obtain a more satisfactory solution to the task allocation problem and ensure that more tasks are allocated within the time window constraint, the agent immediately transfers the bidding right based on the above mechanism after discovering the task and selects the best bidder for the task.
[0073] Furthermore, in order to adapt to the task allocation problem in a dynamic environment, when a bidder fails or a bidding request with more relevant interests appears, it is allowed to perform the "bidding right transfer" operation for the task for which it has obtained the bidding right but has not yet completed the assignment, and select the new bidder for the task from the neighboring agents. In addition, the bidding right identifier is set to ensure that the bidding right of the task will not be repeatedly transferred to the hands of the delegated agent.
[0074] In this step, the bidding right transfer strategy selects a better bidder for the task based on the bidder's bidding capacity and idle time window, which can improve the task complete allocation rate and the quality of decomposition.
[0075] Step 2: Bidding stage: Design a bidding strategy that meets the time window constraints
[0076] According to the feasible criteria of the time window for the earliest execution time and the latest execution time of the task, after receiving the task bidding, the intelligent agent determines whether it has an idle time window to execute the task based on the feasible criteria of the time window. After screening out all feasible positions of the time window, the marginal gain after the task is inserted into the feasible position of the time window is calculated based on the objective function, and the best bid is selected.
[0077] The specific steps include:
[0078] In the task allocation problem with time window constraints, after receiving the tender document, the agent enters the single agent task planning stage. When evaluating its own capabilities according to the requirements of the tender document to decide whether to bid, it needs to evaluate from three aspects:
[0079] First, we need to evaluate whether our own resource capabilities meet the resource requirements of the task, that is, whether the agent is capable of performing the task;
[0080] Secondly, it is necessary to determine whether the agent can perform the task within the task time window and not affect the execution of other tasks in the execution path within the time window, that is, whether the agent can perform the task within the time window constraint;
[0081] Finally, it is necessary to calculate the marginal gain generated by inserting the task into the execution path, that is, the contribution of the agent's execution of the task to the global objective function.
[0082] Furthermore, to determine whether the execution time of a task inserted into a certain position violates the time window constraint, we can give the following proposition:
[0083] Proposition 1: For any task j , when Agent i When you can execute this task, if you execute the path i Insert the task at position k, Then execute task task at position k j Satisfy its time window constraints and define the execution start time
[0084] In Proposition 1 and Represents the agent i according to Execute task j The earliest start time and the latest start time of the execution path are affected by the original execution pathi The time window constraint of the task in the path i The previous task at this location (path i The k-1th task in task x ) starts execution time, calculates task j The earliest execution time
[0085]
[0086] in, It is a task j The earliest starting time under the time window constraint, t i,x Agent i Start executing the task x time, duration x It is a task x The execution time of dt(a,b) is the time it takes for the agent to move from a to b. i The task at this location (path i The kth task in task y Calculate the latest execution time of task j The latest execution time
[0087]
[0088] in, and They are tasks j and task y The latest end time under the time window constraint, duration j and duration y They are tasks j and task y Obviously, only when the earliest execution time is earlier than the latest execution time can the agent execute the task within the time window constraint. j In addition, in order to complete all tasks as quickly as possible, the earliest execution time of the task is taken as the execution time of the task.
[0089] If the task j Insert execution path path i The position k of satisfies Proposition 1, then the new execution path is further calculated. In the task j The time when the task starts executing. The k+1th task in task y The start time of execution is:
[0090]
[0091] And there must be t′ i,y ≥t i,y .Execution path The lth (l>k+1)th task in task z The start time of execution is:
[0092] t′ i,z =t i,z +(t′ i,y -t i,y ),
[0093] Determine the execution path Whether the start execution time of all tasks starting from the lth (l>k+1)th task satisfies the time window constraint can determine whether position k is a task j On the path i The feasible position of the time window in .
[0094] Define the objective function of task allocation with time window constraints, expressed in the form of profit of "benefit$-$cost":
[0095]
[0096] Among them, Rew i,j Cost i,j Represents the agent i Execute task j Rewards and benefits, Rew i,j It consists of two parts: fixed income from executing tasks and reward income. Fixed income for the task, rew i,j is the reward income for completing the task fastest within the time window. The reward income is defined as a function with time as the independent variable, t ij is the time when the task starts executing, and its value range is And the reward income of executing the task decreases as the execution time is delayed. This step assumes that the objective function is non-negative, so the fixed income of executing the task is not less than the execution cost.
[0097] Based on the setting of the overall objective function of the system task allocation, the individual objective function of a single agent when selecting a task can be given, that is, the total profit of the agent performing all tasks in its execution path. i The individual profit function is expressed as follows:
[0098]
[0099] Because the reward income of executing a task is affected by the time when the task starts, the task j Insert agent execution path path i After the feasible position k of the time window, the agent's execution profit will change. On the one hand, it will execute the newly added task task j Produce profit gains, on the other hand, the execution path is ranked in the task j The delay in the start of the task after that leads to a decrease in the execution reward. The maximum value of the agent's execution profit growth is defined as task task j The marginal gain is calculated as:
[0100]
[0101] Among them, J i (path i ) represents the profit of the agent executing all tasks according to the original execution path, Indicates that the task task j Insert it in the execution path path i After the feasible position k in the time window, the profit of the agent performing all tasks is Compared with J i (path i ) is affected by two aspects. The value of may be positive or negative. To maximize the global profit function, the agent is only allowed to Bidding for tasks.
[0102] In this step, the time window criterion ensures that the execution of tasks meets the time window constraint.
[0103] Step 3: Bidding stage: Designing a redistribution strategy when the winning bidder does not exist
[0104] In the bidding stage, before the bidding deadline, the bidding agent selects the one with the best objective function value from the received bids as the winning bid. When the time window constraint of the task is relatively strict, the assigned tasks occupy part of the time window of the agent, which may cause the later assigned tasks to not be assigned because they cannot be executed within their time window constraints.
[0105] For the tasks for which the winning bidder does not exist, a secondary allocation is designed. The bidding agent generates a re-allocation bidding document and sends it to the communicative agent. After receiving the re-allocation bidding document, the agent screens the discardable tasks according to the time window relationship of the tasks, calculates the marginal gain of executing the tasks after abandonment, and selects the best bid.
[0106] The specific steps include:
[0107] The main contents of the redistribution tender document are the same as those of the initial allocation tender document. Both contain task information such as task ID, type, requirements, execution fixed income, time window constraints, and execution duration. However, the two can be distinguished by the tender document type identifier BidType:
[0108] BidType=1 means the task in the tender document is the first assignment;
[0109] BidType=2 means that the task in the tender document is reallocated.
[0110] After receiving the tender, the bidding agent first determines the type of tender based on BidType. If it is the first time to allocate the tender, it generates a bid based on the bidding strategy described above.
[0111] If the tender is to be allocated again, it means that there is no feasible time window in the current execution path of the agent to execute the task. Therefore, if you want to add the task to your own execution path, you need to abandon the task that has won the bid. However, not all the original tasks can be abandoned to bid for the new task. The agent needs to screen out the discardable tasks and evaluate the execution marginal gains of the discarded tasks and the newly added tasks. Only when the execution marginal gain of the newly added task is greater than the discarded task can it bid for the new task. Specifically:
[0112] When the agent i Receive task task j The reassignment tender first provides alternative discardable tasks. l , that is, in the task task j Time window constraint time period All the tasks that have been awarded within the task, including those that are completely within the task j Tasks executed within the time window, the execution ends at task j The tasks within the time window and the start time of execution are Previously, execution ended at The following tasks cover the execution time period and task j All tasks overlap.
[0113] Remove each discardable task from the execution path l ∈ExpendableTask, we can get a new execution path If there are several tasks in ExpendableTask, you can get several new execution paths and update the execution paths. The start time of the task in l On the path i The kth position in The execution time of the first k-1 tasks remains unchanged, and the start execution time of the kth task tasky is:
[0114] t′ i,y =t i,x +duration x +dt(task x ,task y ),
[0115] Among them, task x yes The k-1th task in . The mth (m>k)th task in task z The start time of execution:
[0116] t′ i,z =t i,z -(t i,y -t′ i.y ),
[0117] Among them, t i,z and t i,y Agent i By path i Execute task z and task y The starting moment of .
[0118] In the execution path Based on the feasible position of the time window, the feasible position of the time window is selected, and the new task task is inserted into the optimal feasible position of the time window. j Execution profit of the later execution path definition With J i (path i )The maximum value of the difference is the task to be executed after the task is discarded l The marginal gain is calculated as follows:
[0119]
[0120]
[0121] Execution Path Compared to path i A task was abandoned and a task was added, so The value of may be positive or negative. To maximize the global profit, the agent is only allowed to Bidding for tasks.
[0122] Before the bidding deadline:
[0123] If the bidding agent still has not received a bid, it will give up the assignment of the task;
[0124] If a bid is received, the best bid is selected as the winning bid, and the winning bid information is fed back to the corresponding agent. After the winning agent receives the winning bid message:
[0125] First, according to the content of your own bid, remove the tasks that need to be abandoned from the execution path l , and the winning task j Insert optimal time window feasible position;
[0126] Then generate the abandoned task task l The tender is sent to the communicative agents.
[0127] Regardless of whether there is a successful bidder in this bidding, the task will not be bid again. Therefore, even if the task is abandoned l The bidding failed and could not be assigned. The operation of abandoning and adding tasks also made the objective function value better.
[0128] In this step, the post-abandonment bidding strategy in the task redistribution phase ensures that the marginal gain of executing the task after abandonment is positive, thereby increasing the task complete allocation rate and improving the quality of decomposition.
[0129] This embodiment also discloses a task allocation system based on time window constraints, comprising the following steps:
[0130] The bidding module is used to obtain task bidding requests, calculate the bidding capacity for executing tasks, and select the best bidder based on the bidding capacity;
[0131] The bidding module is used to calculate the feasible positions of all time windows of the optimal bidder based on the constraints of the time window and the objective function of generating profits by executing the task under the constraints of the time window, calculate the marginal gain after the task is inserted into the feasible position of the time window based on the objective function, and obtain the optimal task winning bid based on the marginal gain;
[0132] The bid winning module is used to determine whether there are any tasks that have not been assigned within the time window constraint based on the optimal task winning bid. If not, a bid is generated based on the optimal task winning bid to complete task assignment; if so, a secondary assignment is performed on the unassigned tasks to generate a reassignment tender document, and based on the reassignment tender document and the time window constraint of the task, the discardable tasks are selected, and the tasks that need to be reassigned are inserted into the feasible position of the discarded tasks, and then the optimal task winning bid is generated to complete task assignment.
[0133] A schematic diagram of a terminal device provided in an embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0134] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.
[0135] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0136] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0137] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0138] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0139] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A task allocation method based on time window constraints, characterized in that: The following steps are involved: Obtain task bidding requests, calculate the bidding capacity for executing the task, and select the best bidder based on the bidding capacity; Based on the constraints of the time window, the feasible positions of all time windows of the optimal bidder and the objective function of generating profit by executing the task under the constraints of the time window are calculated. Based on the objective function, the marginal gain after the task is inserted into the feasible position of the time window is calculated, and the optimal task winning bid is obtained based on the marginal gain. Based on the optimal task winning bid, determine whether there are any tasks that have not been assigned within the time window constraint: If not, a bid is generated based on the best task winning bid to complete the task allocation; If so, a second allocation is performed on the unallocated tasks, and a re-allocation tender document is generated. Based on the re-allocation tender document and the time window constraints of the tasks, the discardable tasks are selected, and the tasks that need to be re-allocated are inserted into the feasible positions of the discarded tasks. Then, the optimal task bid is generated to complete the task allocation.
2. The task allocation method based on time window constraint according to claim 1 is characterized in that: The selecting the best tenderer based on the tendering capability also includes the following steps: When a bidder fails or encounters a bidding request with higher benefits, the bidder will transfer the bidding rights for the tasks for which it has obtained the bidding rights but has not yet completed the assignment, and select the latest bidder for the task from the neighboring agents.
3. The task allocation method based on time window constraint according to claim 1 is characterized in that: The calculation of the bidding capability of the execution task comprises the following steps: Among them, Agent i In the multi-agent system communication topology, it can communicate with Agent i The communicating agents set, A j (Agent k ) is Agent k Has execution tasks j Some ability of BestA j (Agent i ) is with Agent i The communicating agents satisfy the task j The strongest individual ability required; F(Agent i ) is Agent i Number of times the bidder failed to win the bid; TW j (Agent k ) indicates Agent k When executing a task j Whether there is idle time within the limited time window, ω1, ω2, ω3 and ω4 are the influence weights of the four factors respectively.
4. The task allocation method based on time window constraint according to claim 1 is characterized in that: The calculation of the feasible positions of all time windows of the optimal bidder based on the time window constraint includes the following steps: For any task j , when Agent i When you can execute this task, if you execute the path i Insert the task at position k, Then execute task task at position k j Satisfy its time window constraints and define the execution start time in, and Represents the agent i according to Execute task j The earliest start time and the latest start time are affected by the original execution path path i The time window constraint of the task in the path i The previous task at this location in the path i The k-1th task in task x The start time of execution, calculate the task j The earliest execution time At the same time, through path i The task at that location, that is, path i The kth task in task y Calculate the latest execution time of task j The latest execution time Need to be satisfied, earliest execution time Earlier than the latest execution time If the task j Insert execution path path i The position k satisfies the above constraints and calculates the new execution path In the task j The time when the task starts executing is The k+1th task in task y The time when execution starts; Calculate execution path The lth (l>k+1)th task in task z The time when execution starts; Determine the execution path Whether the start execution time of all tasks starting from the lth (l>k+1)th task satisfies the time window constraint can determine whether position k is a task j On the path i The feasible position of the time window in .
5. The task allocation method based on time window constraint according to claim 1 is characterized in that: The method of obtaining the optimal task winning bid based on marginal gain includes the following steps: Define the objective function for the total profit of task allocation: Among them, Rew i,j Cost i,j Represents the agent i Execute task j Rewards and benefits, Rew i,j It consists of two parts: fixed income from executing tasks and reward income. Fixed income for the task, rew i,j is the reward income for completing the task fastest within the time window, t ij is the time when the task starts executing, and its value range is Based on the objective function of the total profit of task allocation, define the agent i The individual profit function is: The maximum value of the agent's profit growth is defined as task task j The marginal gain is: Among them, J i (path i ) represents the profit of the agent executing all tasks according to the original execution path, Indicates that the task task j Insert it in the execution path path i The profit of the agent performing all tasks after the feasible position k in the time window.
6. The task allocation method based on time window constraint according to claim 1 is characterized in that: After inserting the task that needs secondary allocation into the feasible position of the abandoned task, generating the optimal task winning bid includes the following steps: When the Agent i Receive task task j When redistributing the tender, first provide alternative discardable tasks l ; Based on disposable tasks l , each time a discardable task is removed from the execution path l ∈ExpendableTask, we can get a new execution path Update execution path The time when the task starts to execute; Calculate the optimal time window to insert a new task task j After that, the execution profit of the new execution path and the execution profit of the discardable task J i (path i ) is used as the discarded task task l After that, when the marginal gain is greater than 0, bidding on the task is allowed.
7. The task allocation method based on time window constraint according to claim 6 is characterized in that: The task to be executed after the abandonment l The marginal gain is: 。 8. A task allocation system based on time window constraints, characterized in that: The following steps are involved: The bidding module is used to obtain task bidding requests, calculate the bidding capacity for executing tasks, and select the best bidder based on the bidding capacity; The bidding module is used to calculate the feasible positions of all time windows of the optimal bidder based on the constraints of the time window and the objective function of generating profits by executing the task under the constraints of the time window, calculate the marginal gain after the task is inserted into the feasible position of the time window based on the objective function, and obtain the optimal task winning bid based on the marginal gain; The bid winning module is used to determine whether there are any tasks that have not been assigned within the time window constraint based on the optimal task winning bid. If not, a bid is generated based on the optimal task winning bid to complete task assignment; if so, a secondary assignment is performed on the unassigned tasks to generate a reassignment tender document, and based on the reassignment tender document and the time window constraint of the task, the discardable tasks are selected, and the tasks that need to be reassigned are inserted into the feasible position of the discarded tasks, and then the optimal task winning bid is generated to complete task assignment.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Multi-unmanned aerial vehicle dynamic task allocation method based on three-party limitation and CNP
CN120355129A
A multi-UAV dynamic task allocation method based on tripartite constraints and CNP
CN120355129B
