Task allocation method and system based on genetic auction algorithm
Through a two-stage allocation strategy based on the genetic auction algorithm, the problem of over-completed tasks in the existing technology being missed with small tasks, achieving stability and efficiency improvement in task allocation, ensuring the task completion progress balance.
Patent Information
- Application Number
- CN202410999847.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-26
AI Technical Summary
Existing task allocation algorithms may lead to overcompletion and miss tasks with less urgency when dealing with tasks with high urgency, affecting allocation efficiency, and poor stability and solution time.
A two-stage allocation strategy based on genetic auction algorithm is adopted, and the number of tasks is consistent with the number of agents through task replication, and one-to-one allocation is combined with integer encoding and auction algorithms to optimize the task allocation results.
It improves the stability and efficiency of task allocation, prevents the missed task, reduces the complexity of the algorithm, and ensures the balance of task completion progress.
Smart Images

Figure CN119025264A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of task allocation, and relates to a task allocation method and system based on a genetic auction algorithm. Background Art
[0002] Existing algorithm research for solving task allocation problems mainly focuses on heuristic algorithms and sub-heuristic algorithms. The stability of the solutions is poor, and the results of solving the problems purely with heuristic algorithms are somewhat random. On the one hand, the stability of the algorithm solution is poor. On the other hand, in order to obtain a more ideal solution, the number of iterations must be increased, and the corresponding solution time will also increase. It is not suitable for solving the solution of task allocation studied in the present invention.
[0003] At the same time, the current task allocation problem is not well studied in the case where at least one agent is assigned to a task. Most methods first sort the tasks according to their urgency and assign more agents to tasks with high urgency to achieve a many-to-one allocation scheme. Such a strategy may cause tasks with high urgency to be "over-completed" and tasks with less urgency to be missed, affecting the efficiency of task allocation. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that most methods in the prior art first sort tasks according to their urgency and assign more agents to tasks with high urgency, which leads to "over-" completion of tasks with high urgency and omission of tasks with less urgency, and to provide a task allocation method and system based on a genetic auction algorithm.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A task allocation method based on a genetic auction algorithm comprises the following steps:
[0007] Formulate a task replication plan, set each task replication plan as a chromosome, encode each chromosome with an integer, perform task replication operations based on the encoded chromosome, make the number of tasks consistent with the number of agents, and obtain the cost-effectiveness matrix of allocating agents to complete tasks;
[0008] Based on the cost-effectiveness matrix, the copied tasks and agents are assigned one-to-one to obtain the one-to-one assignment result;
[0009] Based on the one-to-one allocation result, the fitness function of the chromosome corresponding to each task replication scheme is calculated, and the fitness functions of all chromosomes are obtained. According to the fitness functions of all chromosomes, the parent chromosomes of the new generation are selected, and the selected parent chromosomes are subjected to uniform crossover and random mutation operations in turn to obtain the offspring chromosomes. Based on the offspring chromosomes, a new one-to-one allocation result is obtained. This step is repeated until the number of loop iterations meets the set maximum number of iterations. According to the currently obtained fitness function, the chromosome corresponding to the maximum fitness function is output, and the chromosome is decoded to obtain the final task allocation scheme.
[0010] A further improvement of the present invention is:
[0011] The integer encoding of each chromosome comprises the following steps:
[0012] Consider m agents and n tasks, encoded using integer symbol encoding:
[0013] The task replication in the first phase is encoded as an integer vector of length mn, where the vector elements are any elements in the set T = {1, 2, ..., n}.
[0014] The step of sequentially performing uniform crossover and random mutation operations on the selected parent chromosome to obtain the offspring chromosome comprises the following steps:
[0015] Two father individuals are selected through the roulette strategy, and the chromosomes of the father are uniformly crossovered, that is, two tasks are randomly selected and the agents assigned to them are exchanged;
[0016] Then select the single-point mutation method, randomly generate mutation sites, and mutate the chromosome of the selected father to any element in the set T = {1, 2, ..., n}.
[0017] The obtaining of the one-to-one allocation result comprises the following steps:
[0018] S1: Minimum completion requirement for initialization task;
[0019] S2: Agent i calculates the task j with the largest remaining energy i ;
[0020] S3: Task j i Assign to the corresponding agent i and update task j i minimum requirements;
[0021] S4: Determine whether there is an agent that is dissatisfied with the assigned task based on the assignment result. If so, return to S2; if not, output the result.
[0022] The task j with the largest remaining energyi Calculated by formula (1):
[0023] j i ∈argmax j=1,2,…,n {c ij -p j} (1)
[0024] Among them, c ij -p j It represents the remaining energy of agent j after completing task i.
[0025] Update the minimum completion requirement of the task through formula (2):
[0026]
[0027] Among them, ε satisfies:
[0028]
[0029] Here, n represents the number of tasks.
[0030] The fitness function is calculated by formula (4):
[0031]
[0032] where x ij The following constraints are met:
[0033]
[0034] In the formula, x ij represents the decision variable.
[0035] A task allocation system based on genetic auction algorithm, comprising:
[0036] The task replication module is used to formulate a task replication plan, set each task replication plan as a chromosome, encode each chromosome with an integer, perform task replication operations based on the encoded chromosome, make the number of tasks consistent with the number of agents, and obtain the cost-effectiveness matrix of allocating agents to complete tasks;
[0037] A one-to-one allocation module is used to allocate the copied tasks and agents one-to-one based on the cost-effectiveness matrix to obtain the one-to-one allocation results;
[0038] The result acquisition module is used to calculate the fitness function of the chromosome corresponding to each task replication scheme based on the one-to-one allocation result, obtain the fitness functions of all chromosomes, select the parent chromosome of the new generation from the fitness functions of all chromosomes, perform uniform crossover and random mutation operations on the selected parent chromosomes in turn to obtain offspring chromosomes, obtain new one-to-one allocation results based on the offspring chromosomes, and execute this step repeatedly until the number of loop iterations meets the set maximum number of iterations. According to the currently obtained fitness function, the chromosome corresponding to the maximum fitness function is output, and the chromosome is decoded to obtain the final task allocation scheme.
[0039] 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.
[0040] 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.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] The invention discloses a task allocation method based on a genetic auction algorithm. The method proposes a two-stage allocation strategy. First, virtual tasks are added to make the number of tasks consistent with the number of intelligent agents, so as to facilitate the purpose of one-to-one allocation in the later stage. The task replication strategy of the first stage can greatly shorten the chromosome length, compress the feasible solution space, and make the solution result more stable. Combined with the auction algorithm, tasks are allocated one-to-one, and the chromosomes corresponding to the final determined fitness function are decoded to obtain the optimal result of task allocation. The method can prevent the situation of missing the execution of tasks and does not affect the progress of task completion. The algorithm has high stability and low complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] 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.
[0044] Figure 1 is a flow chart of the genetic-auction algorithm of the present invention;
[0045] Figure 2 It is a schematic diagram of the task allocation scheme of the present invention;
[0046] Figure 3 A schematic diagram of the cross operation of the present invention is shown;
[0047] Figure 4 It is a schematic diagram of the variation operation of the present invention;
[0048] Figure 5 It is a fitness curve diagram in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0054] See also Figure 1 The embodiment of the present invention discloses a task allocation method based on a genetic auction algorithm. In order to prevent the situation where a task is missed, the present invention is inspired by the Hungarian algorithm, proposes a two-stage allocation strategy, and designs a genetic-auction solution algorithm.
[0055] Based on this embodiment, the present invention performs the following solution calculation process:
[0056] Assume there are n tasks T j (j=1,2,…,n), we have m agents W i (i=1,2,…,m). Task T j The urgency is v j , W i For task T j The completion probability is p ij (i=1,2,…,m;j=1,2,…,n), in order to complete the task more efficiently, it is necessary to select an allocation plan that can complete all tasks and has the best cost-effectiveness.
[0057] Mathematical programming modeling is performed for the above process. Assuming that the agents are independent of each other, x ij Defined as agent Wi for task T j The probability of completing the execution is: (1-x ij )+x ij (1-p ij )=1-x ij p ij Taking the product of the urgency of the task and the probability of the task not being completed as its residual urgency, taking the task of minimizing the residual urgency of the overall task as the task, and the agent resources as the constraint condition, the mathematical model is initially established as follows:
[0058]
[0059] In the above model, the constraints Represents the agent W i Must be assigned to perform tasks.
[0060] In combination with practical problems, there are generally only two situations: execution and non-execution. Therefore, in the intelligent agent W i For the set of all task completion probabilities {x ij |j=1,2,...,n}, only one value is 1, and the rest are 0. ij =0 or 1, (1-x ij p ij )and Equivalently, let task T be j The maximum number of agents assigned is y j , then the mathematical model can be changed to:
[0061]
[0062] The main challenge of the above model is how to deal with nonlinear terms Introduce Task Tj The expected minimum urgency d j , that is, introduce constraints After moving the terms, we take the logarithm of both sides at the same time, and transform the exponential function with complex calculation into addition and logarithmic operation, which reduces the calculation complexity. At this time, we consider to improve the cost-effectiveness of the overall allocation scheme as much as possible when meeting the task completion requirements, that is, the agent W i Assigning tasks T j The above model will become:
[0063]
[0064] Furthermore, in order to understand the cost-effectiveness parameter c ij , let the agent's execution capability parameter be c attack , then according to the urgency of the task, c ij Defined as:
[0065]
[0066] That is, when the urgency of the task and the execution ability of the agent are equal, the cost-effectiveness is the largest. The larger the gap between the two, the smaller the cost-effectiveness.
[0067] The solution based on the above model includes the following steps:
[0068] Since the problem mentioned above is a combinatorial optimization problem, an enumeration method is used. The enumeration scheme is to divide m different agents into n parts, and each part is assigned at least one. If m and n are small, the allocation schemes can be listed one by one using the heap idea, but when m and n are large, it is difficult to enumerate. Here, the following recursive dimensionality reduction formula is used to calculate the total number of possible schemes:
[0069] f(m,n)=n×f(m-1,n)+f(n-1,m-1).
[0070] If m=5, n=10, 42525 solutions are calculated, which is m n The power series increases. Therefore, the computational complexity of the enumeration solution is relatively large and is not suitable for solving the problem. Based on this, the embodiment of the present invention proposes the following two assumptions for the above model based on the Hungarian algorithm for solving the allocation problem:
[0071] First, an agent can only complete one task;
[0072] Second, a task can only be performed by one agent. If the task is of high urgency, the task can be copied into two or more agents to achieve a one-to-one task.
[0073] Based on the above assumptions, a two-stage allocation problem is proposed. In the first stage, tasks are copied so that the number of tasks is equal to the number of agents. In the second stage, one-to-one allocation is performed based on the copied tasks to finally find the optimal solution to the problem.
[0074] See also Figure 1 Specifically, a genetic-auction algorithm is proposed. The genetic-auction algorithm is designed to solve the task allocation problem. This algorithm is mainly divided into two stages:
[0075] The first stage is to encode the selected replication task strategies one by one using integer symbol encoding. This encoding corresponds to a unique task replication strategy and also corresponds to the unique auction algorithm solution in the second stage.
[0076] The second stage is to expand the corresponding cost-effectiveness matrix using coding, then enter the auction algorithm stage to obtain a one-to-one allocation plan, and finally perform corresponding task replication decoding on the one-to-one allocation plan, and finally output a many-to-one task allocation plan.
[0077] See Table 1 for pseudo code of genetic auction algorithm
[0078] Table 1 Genetic-auction algorithm pseudo code
[0079]
[0080] Further, see Table 2, which is the pseudo code of the auction algorithm:
[0081] Table 2 Auction module pseudo code
[0082] The specific steps include:
[0083] Step 1: Task replication phase
[0084] The task replication phase refers to adding virtual tasks so that the number of tasks and the number of agents are consistent, so as to achieve the purpose of one-to-one allocation.
[0085] Assume there are n tasks, numbered as: T1, T2, …, T n , m agents, then the task T i Copy mn times, or you can copy task T i ,T j ,…,T m-n Each is copied once, then the total number of possible task copying schemes is n m-nHowever, when the difference between m and n is large, the task replication scheme will also be quite large, and it is not realistic to enumerate all the possibilities. Based on this, this step uses genetic algorithm to continue the selection of task replication scheme.
[0086] Encode the chromosomes in the following way:
[0087] Considering m agents and n tasks, the present invention adopts integer symbol encoding. The task replication in the first stage can be encoded as an integer vector of length mn, where the vector elements are any elements in the set T = {1, 2, ..., n}. Figure 2 The code corresponding to the allocation scheme is [1 1 4].
[0088] Crossover operation, see Figure 3 :
[0089] Two paternal individuals are selected through the roulette strategy, and the chromosomes of the paternal individuals are uniformly crossovered, that is, two tasks are randomly selected and their assigned agent numbers are exchanged.
[0090] Mutation operations, see Figure 4 :
[0091] A single-point mutation method is adopted, that is, a mutation site is randomly generated and mutated into any element in the set T = {1, 2, ..., n}.
[0092] Step 2: One-to-one allocation stage
[0093] In the one-to-one stage, the auction algorithm has the characteristics of parallel computing, which is suitable for treating each intelligent agent as a processor for calculation. In this case of parallel computing, its solution speed is much faster than the classic Hungarian algorithm. Therefore, this step selects an auction algorithm with a distributed structure to perform the one-to-one allocation stage of task allocation.
[0094] Assume that a task j (there are n tasks in total) has a minimum work requirement p j , and the agent must consume energy p to complete the task j , at this time, the remaining energy of task j for agent i (there are m agents in total) is c ij -p j , each agent hopes to be assigned to the task j with the largest remaining energy i , at this time:
[0095]
[0096] If the above conditions are met, it means that the agent is satisfied. When all agents are satisfied, the optimal allocation is found. Specifically, the auction algorithm includes the following steps:
[0097] Step 2.1: Initialize the minimum completion requirements of the task;
[0098] p j =0,j=1,2,…,n
[0099] Step 2.2: Agent i calculates the task j with the largest remaining energy i :
[0100] j i ∈argmax j=1,2,…,n {c ij -p j}
[0101] Step 2.3: Set task j i , assigned to agent i, and updates task j i The minimum completion requirement is in:
[0102]
[0103] v i =max j {c ij -p j},
[0104] w i =max i≠j {c ij -p j},
[0105]
[0106] Step 2.4: Determine whether there is an agent that is dissatisfied with the assigned task. If yes, return to step 2.2. Otherwise, the algorithm terminates and outputs the result. Specifically, according to the fitness function, i.e., the following formula, decode the corresponding chromosome to obtain the task assignment result.
[0107] Furthermore, the method for determining whether the above is satisfactory is as follows:
[0108] Determine whether the agent is satisfied with the task assigned to it, that is, calculate whether it satisfies the following expression:
[0109]
[0110]
[0111] Among them, the constraints of objective function (4) are:
[0112]
[0113] Step 2.5: In the above steps, the cost-effectiveness parameter c ij If they are not all integers, they need to be multiplied by a common multiple to enlarge them to integers, because only c ij When it is an integer, in the non-negative constant The algorithm can converge to the optimal state.
[0114] The invention discloses a task allocation method and system based on a genetic auction algorithm. For the situation where multiple intelligent agents collaborate to complete multiple tasks, where the number of intelligent agents is greater than the number of tasks, the method proposes a two-stage allocation strategy. First, a task duplication operation is performed through a genetic algorithm to transform the unbalanced task allocation problem into a balanced task allocation problem. Second, a one-to-one allocation is performed in combination with an auction algorithm. Finally, the optimal task duplication strategy is selected and decoded according to the fitness function to obtain the final task allocation result. The method can maximize the cost-effectiveness of the allocation scheme while ensuring the task completion rate. The algorithm has low complexity and high stability and feasibility.
[0115] The embodiment of the present invention also discloses a verification method for verifying the effectiveness of the method, comprising the following steps:
[0116] The enumeration scheme is to divide m different agents into n parts, and each part is assigned at least one. If m and n are relatively small, this problem can be enumerated one by one using a simple combination number formula, but when m and n are large, it is difficult to enumerate. Here we use the following recursive formula to illustrate the total number of possible solutions:
[0117] f(m,n)=n×f(m-1,n)+f(n-1,m-1).
[0118] If n = 10, m = 5, we can calculate 42525 solutions, which is m n Therefore, the computational complexity of the enumeration scheme is very large and is not suitable for solving this problem. The auction algorithm involved in the present invention has a time complexity of Where O(n) is the time required for n agents to bid in the algorithm. is the maximum number of iterations required. The algorithm stops when the difference between the allocation and the optimal allocation does not exceed nε.
[0119] According to the above analysis, when using a two-stage strategy to solve the many-to-one agent and task allocation model, even if the enumeration algorithm is selected in the first stage and the auction algorithm is selected in the second stage, the total time complexity of the algorithm is Therefore, the genetic auction algorithm proposed in the present invention greatly reduces the amount of calculation to a certain extent.
[0120] In order to further verify the practicability of the genetic-auction algorithm designed by the present invention, the present invention selects the improved particle swarm algorithm and the improved genetic algorithm proposed in the existing literature as comparative experiments to verify the convergence of the designed genetic-auction algorithm; at the same time, in order to compare the gap between the optimal solution solved by the example of the present invention and the true optimal solution, the present invention uses the enumeration-Hungarian algorithm to give the true solution to the problem.
[0121] The present invention will simulate the model on MATLAB 2021. The experimental operating environment is: the operating system is Windows 11 Home Chinese version, the CPU is 12th Gen Intel (R) Core (TM) i7-12700 2.10 GHz, and the memory is 16 GB.
[0122] Assume that the number of tasks n = 10, the number of agents m = 13, and the task T j The urgency is v j (j=1,2,...,n) and the values are: V=[3,8,1,4,8,1,3,1,3,4], agent w i For task T j The completion probability matrix P is:
[0123]
[0124] Take c attack = 10. See Table 3 for experimental parameter settings:
[0125] Table 3 Experimental parameter settings
[0126]
[0127] According to the above experiments, the final results are shown in Table 4 below:
[0128] Table 4 Simulation results
[0129]
[0130] The solution result [5,9,7,10,9,4,6,2,7,3,1,8,6] means that agent 1 performs task 5, agent 2 performs task 9, agent 3 performs task 7, agent 4 performs task 10, ..., agent 13 performs task 6.
[0131] By comparing the results, it is found that the solution time of the genetic-auction algorithm designed by the present invention is much shorter than that of the improved particle swarm algorithm and the improved genetic algorithm, and the results obtained are also close to those of the exact algorithm.
[0132] For a more intuitive expression, the fitness curves of the improved particle swarm algorithm, improved genetic algorithm and genetic-auction algorithm can be found in Figure 5By comparing the curves, it can be found that the improved particle swarm algorithm is prone to fall into the local optimal solution, the convergence speed of the improved genetic algorithm is not as fast as the genetic-auction algorithm designed by the present invention, and the optimal solution of the genetic-auction algorithm designed by the present invention is better. The reason for analyzing the above results is that the genetic-auction algorithm designed by the present invention compresses the scale of the feasible solution space from m! to n! at the beginning of the genetic algorithm coding. (m-n) ,After this operation, the algorithm converges faster and has higher stability.
[0133] This embodiment discloses a task allocation system based on a genetic auction algorithm, which is characterized by comprising:
[0134] The task replication module is used to formulate a task replication plan, set each task replication plan as a chromosome, encode each chromosome with an integer, perform task replication operations based on the encoded chromosome, make the number of tasks consistent with the number of agents, and obtain the cost-effectiveness matrix of allocating agents to complete tasks;
[0135] A one-to-one allocation module is used to allocate the number of replicated tasks and the number of agents one-to-one based on the cost-effectiveness matrix to obtain a one-to-one allocation result;
[0136] The result acquisition module is used to calculate the fitness function of the chromosome corresponding to each task replication scheme based on the one-to-one allocation result, obtain the fitness functions of all chromosomes, select the parent chromosome of the new generation from the fitness functions of all chromosomes, perform uniform crossover and random mutation operations on the selected parent chromosomes in turn to obtain offspring chromosomes, obtain new one-to-one allocation results based on the offspring chromosomes, and execute this step repeatedly until the number of loop iterations meets the set maximum number of iterations. According to the currently obtained fitness function, the chromosome corresponding to the maximum fitness function is output, and the chromosome is decoded to obtain the final task allocation scheme.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] The memory may be used to store the computer program and / or module, and the processor implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0142] 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.
[0143] 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 genetic auction algorithm, characterized in that: The following steps are involved: Formulate a task replication plan, set each task replication plan as a chromosome, encode each chromosome with an integer, perform task replication operations based on the encoded chromosome, make the number of tasks consistent with the number of agents, and obtain the cost-effectiveness matrix of allocating agents to complete tasks; Based on the cost-effectiveness matrix, the copied tasks and agents are assigned one-to-one to obtain the one-to-one assignment result; Based on the one-to-one allocation result, the fitness function of the chromosome corresponding to each task replication scheme is calculated, and the fitness functions of all chromosomes are obtained. According to the fitness functions of all chromosomes, the parent chromosomes of the new generation are selected, and the selected parent chromosomes are subjected to uniform crossover and random mutation operations in turn to obtain the offspring chromosomes. Based on the offspring chromosomes, a new one-to-one allocation result is obtained. This step is repeated until the number of loop iterations meets the set maximum number of iterations. According to the currently obtained fitness function, the chromosome corresponding to the maximum fitness function is output, and the chromosome is decoded to obtain the final task allocation scheme.
2. The task allocation method based on genetic auction algorithm according to claim 1 is characterized in that: The integer encoding of each chromosome comprises the following steps: Consider m agents and n tasks, encoded using integer symbol encoding: The task replication in the first phase is encoded as an integer vector of length mn, where the vector elements are any elements in the set T = {1, 2, ..., n}.
3. The task allocation method based on genetic auction algorithm according to claim 1 is characterized in that: The step of sequentially performing uniform crossover and random mutation operations on the selected parent chromosome to obtain the offspring chromosome comprises the following steps: Two father individuals are selected through the roulette strategy, and the chromosomes of the father are uniformly crossovered, that is, two tasks are randomly selected and the agents assigned to them are exchanged; Then select the single-point mutation method, randomly generate mutation sites, and mutate the chromosome of the selected father to any element in the set T = {1, 2, ..., n}.
4. The task allocation method based on genetic auction algorithm according to claim 1 is characterized in that: The obtaining of the one-to-one allocation result comprises the following steps: S1: Minimum completion requirement for initialization task; S2: Agent i calculates the task j with the largest remaining energy i ; S3: Task j i Assign to the corresponding agent i and update task j i minimum requirements; S4: Determine whether there is an agent that is dissatisfied with the assigned task based on the assignment result. If so, return to S2; if not, output the result.
5. The task allocation method based on genetic auction algorithm according to claim 4 is characterized in that: The task j with the largest remaining energy i Calculated by formula (1): j i ∈argmax j=1,2,…,n {c ij -p j } (1) Among them, c ij -p j It represents the remaining energy of agent j after completing task i.
6. The task allocation method based on genetic auction algorithm according to claim 4 is characterized in that: Update the minimum completion requirement of the task through formula (2): Among them, ε satisfies: Here, n represents the number of tasks.
7. The task allocation method based on genetic-auction algorithm according to claim 1 is characterized in that: The fitness function is calculated by formula (4): where x ij The following constraints are met: In the formula, x ij represents the decision variable.
8. A task allocation system based on genetic auction algorithm, characterized in that: include: The task replication module is used to formulate a task replication plan, set each task replication plan as a chromosome, encode each chromosome with an integer, perform task replication operations based on the encoded chromosome, make the number of tasks consistent with the number of agents, and obtain the cost-effectiveness matrix of allocating agents to complete tasks; A one-to-one allocation module is used to allocate the number of replicated tasks and the number of agents one-to-one based on the cost-effectiveness matrix to obtain a one-to-one allocation result; The result acquisition module is used to calculate the fitness function of the chromosome corresponding to each task replication scheme based on the one-to-one allocation result, obtain the fitness functions of all chromosomes, select the parent chromosome of the new generation from the fitness functions of all chromosomes, perform uniform crossover and random mutation operations on the selected parent chromosomes in turn to obtain offspring chromosomes, obtain new one-to-one allocation results based on the offspring chromosomes, and execute this step repeatedly until the number of loop iterations meets the set maximum number of iterations. According to the currently obtained fitness function, the chromosome corresponding to the maximum fitness function is output, and the chromosome is decoded to obtain the final task allocation scheme.
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.
