A method for multi-machine collaborative static task allocation of the same type of agricultural machinery

The multi-machine collaborative cost function and two-stage coding are constructed through multi-variant grouping genetic algorithm, which solves the problem of multi-machine collaborative static task allocation in agricultural machinery cooperatives or farms, and achieves more efficient task allocation and shortened operation time.

CN114444829BActive Publication Date: 2025-07-22CHINESE ACAD OF AGRI MECHANIZATION SCI GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011202185.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-02
Publication Date
2025-07-22
Estimated Expiration
2040-11-02

AI Technical Summary

Technical Problem

In the existing technology, when multi-machine collaborative static task allocation in agricultural machinery cooperatives or farms, there are problems such as slow convergence speed, poor global search ability and easy to fall into local optimality, resulting in poor task allocation effect and increasing the cost of multi-machine collaborative operation.

Method used

A multi-machine collaborative cost function is constructed based on multi-variant grouping genetic algorithm, and a task allocation method is represented by two-stage encoding. Combined with roulette selection, group crossover, intergroup exchange variation and 2-opt local optimization operator, the optimal chromosome is searched to achieve optimal task allocation.

Benefits of technology

It improves the efficiency of agricultural machinery operation, shortens the operation time, reasonably allocates tasks and task execution order, and optimizes the overall performance of multi-machine collaborative operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114444829B_ABST
    Figure CN114444829B_ABST
Patent Text Reader

Abstract

A method for multi-machine collaborative static task allocation of the same type of agricultural machinery, which performs task allocation based on a multi-mutation grouped genetic algorithm, includes the following steps: constructing a multi-machine collaborative cost function according to factors such as the operation time, fuel consumption, and non-operation distance of the agricultural machinery fleet; constructing a two-stage encoding to represent the task allocation method according to the characteristics of multi-machine operation, where each encoding represents a chromosome, and constructing a fitness function to represent the task allocation performance represented by each chromosome; and searching for the optimal chromosome based on the multi-mutation grouped genetic algorithm to finally obtain the optimal individual. The present invention solves the problem of how to reasonably allocate tasks and the task execution order in the case where multiple agricultural machines jointly complete multiple tasks during the operation of agricultural machinery cooperatives or farms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technology of multi - machine collaborative operation task allocation for agricultural machinery, and particularly to a method for static task allocation of multiple same - type agricultural machinery based on a multi - mutation grouped genetic algorithm. Background Art

[0002] Agricultural production has a strong "agricultural season" nature. With the development and popularization of the operation modes of agricultural machinery cooperatives and farms in China, both land and agricultural machinery tend to be concentrated. In one operation season, there are often situations where multiple agricultural machines execute multiple operation tasks. Reasonably allocating tasks and paths to the corresponding agricultural machines before operation can effectively improve the operation efficiency of agricultural machinery and shorten the operation time.

[0003] The problem of multi - machine collaborative static task allocation is similar to the multi - traveling salesman problem. This type of problem cannot obtain the optimal solution by an exhaustive method. The common method to solve this type of problem is to use a heuristic algorithm to obtain a better solution. Common methods include genetic algorithms, ant colony algorithms, etc. When using conventional genetic algorithms and ant colony algorithms to solve this type of problem, there are situations such as slow convergence speed, poor global search ability, and easy to fall into local optimality. The multi - machine collaborative task allocation effect using such methods is poor and the multi - machine collaborative cost is large. Therefore, there is an urgent need in this field for a multi - machine collaborative static task allocation method that can overcome the above problems of the existing technology. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method for static task allocation of multiple same - type agricultural machinery based on a multi - mutation grouped genetic algorithm.

[0005] To achieve the above object, the present invention provides a method for static task allocation of multiple same - type agricultural machinery. Among them, this method for static task allocation of multiple same - type agricultural machinery performs task allocation based on a multi - mutation grouped genetic algorithm, and includes the following steps:

[0006] S100. Construct a multi - machine collaborative cost function according to factors such as the operation time, fuel consumption, and non - operation distance of the agricultural machinery fleet;

[0007] S200. Construct a two - stage coding to represent the task allocation method according to the characteristics of multi - machine operation. Each coding represents a chromosome, and construct a fitness function to represent the task allocation performance represented by each chromosome;

[0008] S300. Search for the optimal chromosome based on the multi - mutation grouped genetic algorithm, and finally obtain the optimal individual.

[0009] In the above - mentioned method for static task allocation of multiple same - type agricultural machinery, step S100 further includes:

[0010] S101. Define symbols. Assume that m agricultural machines are operating, and use the set {a1,..., am} is represented; the number of operation tasks is n, represented by the set {T1, …, T n}; the performance parameters of the i-th agricultural machine are expressed as:

[0011] a i = {v wi , d i , w i , v i , t ti}, T , (i = 1, 2, …, m),

[0012] where v wi represents the average operation speed (km / h) of the i-th agricultural machine, d i represents the operation width (m) of the i-th agricultural machine, w i represents the average operation ability (m 2 / h) of the i-th agricultural machine, v i represents the average non-operation driving speed (km / h) of the i-th agricultural machine, t ti represents the average time (h) for each U-turn during the operation of the i-th agricultural machine; the parameters of the j-th task are expressed as T j = {x 1j , y 1j , x 2j , y 2j , x 3j , y 3j , x 4j , y 4j , d Tj , l Tj , S j}, T , (j = 1, 2, …, n),

[0013] where (x 1j , y 1j ), (x 2j , y 2j ), (x 3j , y 3j ) and (x 4j , y 4j ) respectively represent the coordinates of the four vertices of the plot of task T j , d Tj represents the width of the vertical operation path of task T j , l Tj represents the length of the parallel operation path of task T j , S j represents the area of task T j ;

[0014] S102. Calculate the non-operation distance of each agricultural machine using the following formula:

[0015]

[0016] where s(a i , T j ) represents the distance of agricultural machine a i to its first task T j ; s(a i , T j T k ) represents the distance of agricultural machine a i from the j-th task T j to the k-th task T k ; s(a i , T l ) represents the distance of agricultural machine a i from the last task T l back to the garage; j, k, l ∈ {1, …, n};

[0017]

[0018] S103. Calculate the total fuel consumption of each agricultural machine using the following formula. The total fuel consumption includes the fuel consumption of the agricultural machine on the road, the fuel consumption for turning around during operation, and the fuel consumption for operation:

[0019]

[0020] where,

[0021] k ij is the number of operating rows of the i-th agricultural machine in the j-th task plot, in the formula is the ceiling symbol, and the value is the smallest integer not less than the value inside the symbol;

[0022] S104. Calculate the total time for each agricultural machine to complete the task using the following formula. The total time includes the time of the agricultural machine on the road, the time of the agricultural machine for operation, and the time of the agricultural machine for turning around in the field:

[0023]

[0024] where, s i represents the total distance (km) traveled by agricultural machine a i when it completes the operation, v i represents the speed (km / h) of agricultural machine a i traveling on the road, S j represents the area (m j ) of task T 2 , w i represents the average operation ability (m i ) of agricultural machine a2 / h), t ti represents the average time (h) for the agricultural machine a to i make a U-turn;

[0025] S105. Calculate the distance between tasks. Starting from the garage, with n tasks serving as the 2nd to (n + 1)th points in sequence, establish the distance matrix D for the roads between any two points;

[0026] where d ij represents the distance on the road between the (i - 1)th task point and the (j - 1)th task point, (i, j = {2, …, n + 1}, i ≠ j).

[0027] For the above - mentioned multi - machine collaborative static task allocation method for the same type of agricultural machines, in step S105, if the fields of two tasks are adjacent, consider the shortest distance between the two task points to be 0; if the fields are not adjacent, then the shortest distance between the two task points is equal to the distance on the road between the two tasks, and establish the nearest - distance matrix D′;

[0028] where d′ ij represents the shortest distance between the (i - 1)th task point and the (j - 1)th task point, (i, j = {2, …, n + 1}, i ≠ j).

[0029] For the above - mentioned multi - machine collaborative static task allocation method for the same type of agricultural machines, step S102 further includes:

[0030] In the non - operating distance of each agricultural machine, s(a i , T j ) = d 1,j+1 , s(a i , T l ) = d 1,l+1 ; The way for the agricultural machine to enter the task plot is divided into entering from the road and entering from the connection at the field head. Let x = 0 represent that the agricultural machine enters the task plot from the road, and x = 1 represent that the agricultural machine enters the task plot from the connection at the field head; Let y = 0 represent that the agricultural machine returns to the roadside after completing the task, and y = 1 represent that the agricultural machine returns to the connection at the field head after completing the task; When the agricultural machine enters the first task plot, it enters from the road. The position of the i - th agricultural machine after completing the operation in the j - th task plot is: y ij = (k ij + x ij ) % 2, where x ij is the way for the i - th agricultural machine to enter the j - th task plot, and % is the modulo operation;

[0031] When d j+1,k+1 = d′ j+1,k+1 , the fields of tasks i and j are not connected. At this time, the agricultural machine a iThe distance from task j to task k is:

[0032] s(a i , T j T k ) = d j+1,k+1 +y ij l Tj , x ik = 0;

[0033] When d j+1,k+1 ≠ d′ j+1,k+1 , tasks i and j are adjacent at the head. At this time, agricultural machine a i The distance from task j to task k is: s(a i , T j T k ) = d′ j+1,k+1 +|y ij -1|l Tj , x ik = 1.

[0034] The above-mentioned multi-machine collaborative static task allocation method for the same type of agricultural machines, wherein step S106 further includes:

[0035] Construct the objective function:

[0036] where f represents the multi-machine collaborative cost, s i is the total distance of the non-operating state when the i-th agricultural machine completes the operation task, α is the weight of s in the objective function, α ∈ [0, 1], c i is the fuel consumption of the i-th agricultural machine to complete the task, β is the weight of c in the objective function, β ∈ [0, 1], t i is the time for the i-th agricultural machine to complete the task, and γ is the weight of max(t i ) in the objective function, γ ∈ [0, 1].

[0037] The above-mentioned multi-machine collaborative static task allocation method for the same type of agricultural machines, wherein step S200 further includes:

[0038] S201. Construct the chromosome of the genetic algorithm represented by two-segment encoding. The first segment is the sorting of tasks, and n tasks are represented by n digits from 1 to n; the second segment is the position of grouping, with a total of m - 1 bits;

[0039] S202. Construct the fitness function, Fit = 1 / f, and the fitness function is the task allocation performance represented by each chromosome.

[0040] The above-mentioned multi-machine collaborative static task allocation method for the same type of agricultural machines, wherein step S300 further includes:

[0041] S301, randomly generate chromosomes, and produce an initial population of N as the parent generation;

[0042] S302, using a roulette wheel selection method to select two parents for crossover;

[0043] S303, generate a random number rand∈[0,1), if rand <P c , execute the group crossover operator, otherwise select the parent with high fitness as the offspring directly; the group crossover process is as follows:

[0044] S3031. Generate a random sequence from 1 to m;

[0045] S3032. Perform group inheritance in the order of random sequence. Let the first number of the random sequence be k. Generate a random number rand∈[0,1). If rand<0.5, the kth group of the first parent generation is used as the kth group of the offspring. If rand≥0.5, the kth group of the second parent generation is used as the kth group of the offspring.

[0046] S3033, deleting the tasks included in the offspring from the two parent generations, and performing group crossover inheritance according to the method of step 3032 for the number of groups represented by the 2nd to mth positions of the sequence;

[0047] S3034, randomly inserting the remaining tasks that do not participate in the crossover operation into the offspring to obtain the final offspring;

[0048] S304, executing the mutation operator from the first individual of the offspring to the last individual of the offspring, to generate a new population.

[0049] In the above-mentioned method for allocating static tasks for cooperative multi-machine collaboration of the same agricultural machinery, step S304 further comprises:

[0050] S3041. Generate a random number rand∈[0,1). If rand <P m1 , execute the inter-group exchange mutation operator, otherwise remain unchanged;

[0051] The inter-group exchange variation process includes:

[0052] S30411. Randomly select two different groups on a chromosome as the outgoing group and incoming group oGroup, iGroup∈{1,…,m};

[0053] S30412, if the number of tasks in the outgoing group oGroup is greater than 1, randomly select two points oPoint and oPoint from the outgoing group and the incoming group as the outgoing task position and the incoming task position;

[0054] S30413. Move the task corresponding to the oPoint of the removed task to the iPoint position of the moved-in point to complete the transfer between groups, and correspondingly modify the value of the grouping breakpoint;

[0055] S3042. Generate a random number rand ∈ [0, 1). If rand < P m2 , execute the mutation operator of swapping between groups, otherwise remain unchanged;

[0056] Among them, the process of swapping between groups mutation:

[0057] S30421. Randomly select points for swapping tasks from the 1st to the mth groups of the chromosome respectively;

[0058] S30422. Remove the tasks at the selected points;

[0059] S30423. Sort the removed tasks and insert them into the swapping task points in the arranged order;

[0060] S3043. Generate a random number rand ∈ [0, 1). If rand < P m3 , execute the 2-opt local optimization mutation operator, otherwise remain unchanged, including:

[0061] S30431. Randomly select two points i and j within a certain group of the chromosome;

[0062] S30432. Keep the path before i unchanged and add it to the new path, flip the encoding of the path between i and j and add it to the new path, and keep the path after j unchanged and add it to the new path;

[0063] S30433. If the fitness increases after mutation, accept the mutation. If the fitness does not increase, keep the original individual unchanged.

[0064] For the above-mentioned multi-machine collaborative static task allocation method for the same type of agricultural machinery, among them, step S300 further includes:

[0065] S305. Execute the elitist strategy, including:

[0066] S3051. Find out the individual with the highest fitness and the individual with the lowest fitness in the current population;

[0067] S3052. If the fitness of the best individual in the current population is higher than the fitness of the best individual so far, then use the best individual in the current population as the best individual so far;

[0068] S3053. Replace the worst individual in the current population with the best individual so far.

[0069] The above-mentioned method for multi-machine collaborative static task allocation of the same type of agricultural machinery, wherein the optimal individual retention strategy is implemented, including taking the individual with the highest fitness as the optimal task allocation result after reaching the number of iterations.

[0070] The technical effect of the present invention is as follows:

[0071] The present invention solves the problem of how to reasonably allocate tasks and the task execution order in the case where multiple agricultural machines jointly complete multiple tasks during the operation of an agricultural machinery cooperative or a farm.

[0072] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, but it is not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 It is a task allocation flowchart of an embodiment of the present invention;

[0074] Figure 2 It is a schematic diagram of task grouping coding of an embodiment of the present invention;

[0075] Figure 3 It is a schematic diagram of the grouping crossover operator process of an embodiment of the present invention;

[0076] Figure 4 It is a schematic diagram of the inter-group transfer mutation operator of an embodiment of the present invention;

[0077] Figure 5 It is a schematic diagram of the inter-group exchange mutation operator of an embodiment of the present invention;

[0078] Figure 6 It is a schematic diagram of the 2-opt local optimization operator of an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0079] The structural principle and working principle of the present invention will be specifically described below in conjunction with the accompanying drawings:

[0080] Refer to Figure 1 , Figure 1 It is a task allocation flowchart of an embodiment of the present invention. The method for multi-machine collaborative static task allocation of the same type of agricultural machinery of the present invention is characterized in that the method for multi-machine collaborative static task allocation of the same type of agricultural machinery performs task allocation based on a multi-mutation grouping genetic algorithm, and includes the following steps:

[0081] Step S100, constructing a multi-machine collaborative cost function according to factors such as the operation time, fuel consumption, and non-operation distance of the agricultural machinery fleet;

[0082] Step S200, constructing a two-stage coding to represent the task allocation method according to the characteristics of multi-machine operation, each coding representing a chromosome, and constructing a fitness function to represent the task allocation performance represented by each chromosome; and

[0083] Step S300: Search for the optimal chromosome based on the multi-mutation grouped genetic algorithm, and finally obtain the optimal individual.

[0084] In this embodiment, step S100 further includes:

[0085] Step S101: Define symbols. Assume that there are m agricultural machines for operation, which are represented by the set {a1,..., a m}; the number of operation tasks is n, which is represented by the set {T1,..., T n}; the performance parameters of the i-th agricultural machine are expressed as:

[0086] a i = {v wi , d i , w i , v i , t ti} T , (i = 1, 2,..., m),

[0087] where v wi represents the average operation speed (km / h) of the i-th agricultural machine, d i represents the operation width (m) of the i-th agricultural machine, w i represents the average operation ability (m 2 / h) of the i-th agricultural machine, v i represents the average non-operation state driving speed (km / h) of the i-th agricultural machine, t ti represents the average time (h) for each U-turn during the operation of the i-th agricultural machine; the parameters of the j-th task are expressed as T j = {x 1j , y 1j , x 2j , y 2j , x 3j , y 3j , x 4j , y 4j , d Tj , l Tj , S j} T , (j = 1, 2,..., n),

[0088] where (x 1j , y 1j ), (x 2j , y 2j ), (x 3j , y 3j ) and (x 4j , y 4j ) respectively represent the coordinates of the four vertices of the plot of task T j , dTj Denote task T j Width of the vertical operation path, l Tj Denote task T j Length of the parallel operation path, S j Denote task T j The area of;

[0089] Step S102: Calculate the non-operation distance of each agricultural machine using the following formula:

[0090]

[0091] Where s(a i , T j ) represents the distance of agricultural machine a i to its first task T j ; s(a i , T j T k ) represents the distance of agricultural machine a i from the jth task T j to the kth task T k ; s(a i , T l ) represents the distance of agricultural machine a i from the last task T l back to the garage; j, k, l ∈ {1, …, n};

[0092]

[0093] Step S103: Calculate the total fuel consumption of each agricultural machine using the following formula. The total fuel consumption includes the fuel consumption on the road, the fuel consumption for turning around during operation, and the fuel consumption for operation:

[0094]

[0095] Where,

[0096] k ij is the number of rows of operation of the ith agricultural machine in the jth task plot, In the formula is the ceiling symbol, and the value is the smallest integer not less than the value inside the symbol;

[0097] Step S104: Calculate the total time for each agricultural machine to complete the task using the following formula. The total time includes the time on the road, the time for agricultural machine operation, and the time for agricultural machine turning around in the field:

[0098]

[0099] Where, s i represents agricultural machine ai Total distance traveled (km) during task completion, v i Denote agricultural machine a i Speed on the road (km / h), S j Denote task T j Area (m 2 ), w i Denote agricultural machine a i Average operation capacity (m 2 / h), t ti Denote agricultural machine a i Average time for U-turn (h).

[0100] Step S105: Calculate the distance between tasks. Starting from the garage, take n tasks as the 2nd to the n+1th points in sequence, and establish the distance matrix D of the road between any two points;

[0101] Where d ij Represents the distance on the road between the (i-1)th task point and the (j-1)th task point, (i, j = {2,…,n+1}, i≠j).

[0102] Among them, in step S105, if the fields of two tasks are adjacent, it is considered that the shortest distance between the two task points is 0; if the fields are not adjacent, the shortest distance between the two task points is equal to the distance on the road between the two tasks, and establish the nearest distance matrix D' between the two points;

[0103] Where d' ij Represents the shortest distance between the (i-1)th task point and the (j-1)th task point, (i, j = {2,…,n+1}, i≠j).

[0104] Among them, step S102 further includes:

[0105] In the non-operation distance of each agricultural machine, s(a i , T j ) = d 1,j+1 , s(a i , T l ) = d 1,l+1 ; The way for the agricultural machine to enter the task plot is divided into entering from the road and entering from the connection at the field head. Let x = 0 indicate that the agricultural machine enters the task plot from the road, and x = 1 indicate that the agricultural machine enters the task plot from the connection at the field head; Let y = 0 indicate that the agricultural machine returns to the roadside after completing this task, and y = 1 indicate that the agricultural machine returns to the connection at the field head after completing this task; When the agricultural machine enters the first task plot, it enters from the road. The position of the i-th agricultural machine after completing the operation in the j-th task plot is: y ij = (k ij + x ij)%2, where x ij is the way for the i-th agricultural machine to enter the j-th task plot, and % is the remainder operation;

[0106] When d j+1,k+1 = d′ j+1,k+1 , the fields of tasks i and j are not connected. At this time, the distance of agricultural machine a i from task j to task k is:

[0107] s(a i , T j T k ) = d j+1,k+1 + y ij l Tj , x ik = 0;

[0108] When d j+1,k+1 ≠ d′ j+1,k+1 , the fields of tasks i and j are connected. At this time, the distance of agricultural machine a i from task j to task k is: s(a i , T j T k ) = d′ j+1,k+1 + |y ij - 1|l Tj , x ik = 1.

[0109] Among them, step S106 further includes:

[0110] Construct the objective function:

[0111] Among them, f represents the multi-machine cooperation cost, s i is the total distance of the i-th agricultural machine in the non-operating state when completing the operation task, α is the weight of s in the objective function, α ∈ [0, 1], c i is the fuel consumption of the i-th agricultural machine to complete the task, β is the weight of c in the objective function, β ∈ [0, 1], t i is the time for the i-th agricultural machine to complete the task, and γ is the weight of max(t i ) in the objective function, γ ∈ [0, 1].

[0112] See Figure 2 , Figure 2 is the schematic diagram of task grouping coding according to an embodiment of the present invention. Among them, step S200 further includes:

[0113] Step S201, construct a chromosome representing the genetic algorithm with a two-stage coding, where the first stage is the sorting of tasks, and n tasks are represented by n numbers from 1 to n, with a total of n bits; the second stage is the position of grouping, with a total of m - 1 bits;

[0114] Step S202: Construct a fitness function, Fit = 1 / f. The fitness function represents the task allocation performance of each chromosome.

[0115] See Figure 3 , Figure 3 which is a schematic diagram of the grouped crossover operator process according to an embodiment of the present invention. Step S300 further includes:

[0116] Step S301: Randomly generate chromosomes and produce an initial population of N as the parent generation;

[0117] Step S302: Select two parents for crossover using the roulette wheel selection method;

[0118] Step S303: Generate a random number rand ∈ [0, 1). If rand < P c , execute the grouped crossover operator; otherwise, directly select the parent with higher fitness as the offspring. The grouped crossover process is as follows:

[0119] Step S3031: Generate a random sequence from 1 to m;

[0120] Step S3032: Perform grouped inheritance in the order of the random sequence. Let the first number of the random sequence be k, and generate a random number rand ∈ [0, 1). If rand < 0.5, then the k-th group of the first parent is used as the k-th group of the offspring; if rand ≥ 0.5, then the k-th group of the second parent is used as the k-th group of the offspring;

[0121] Step S3033: Delete the tasks included in the offspring from the two parents, and perform grouped crossover inheritance for the groups represented by the 2nd to m-th positions of the sequence in the manner of step 3032;

[0122] Step S3034: Randomly insert the remaining tasks that have not participated in the crossover operation into the offspring to obtain the final offspring;

[0123] Step S304: Starting from the first individual of the offspring, execute the mutation operator in sequence to the last individual of the offspring to generate a new population.

[0124] Step S3041: Generate a random number rand ∈ [0, 1). If rand < P m1 , execute the inter-group exchange mutation operator; otherwise, keep it unchanged;

[0125] See Figure 4 and Figure 5 , Figure 4 which is a schematic diagram of the inter-group transfer mutation operator according to an embodiment of the present invention, Figure 5 which is a schematic diagram of the inter-group exchange mutation operator according to an embodiment of the present invention. Among them, the inter-group exchange mutation process includes:

[0126] Step S30411: Randomly select two different groups on a certain chromosome as the removal group and the insertion group, iGroup, iGroup ∈ {1, …, m};

[0127] Step S30412: If the number of tasks in the removal group iGroup is greater than 1, randomly select two points oPoint and oPoint from the removal group and the insertion group as the removal task position and the insertion task position;

[0128] Step S30413: Move the task corresponding to the oPoint of the removal task to the oPoint position of the insertion to complete the inter-group transfer, and correspondingly modify the value of the grouping breakpoint;

[0129] Step S3042: Generate a random number rand ∈ [0, 1). If rand < P m2 , execute the inter-group exchange mutation operator, otherwise remain unchanged;

[0130] Among them, the inter-group exchange mutation process includes:

[0131] Step S30421: Randomly select points for exchanging tasks from the 1st to mth groups of the chromosome;

[0132] Step S30422: Remove the tasks at the selected points;

[0133] Step S30423: Sort the removed tasks and insert them into the exchange task points in the arranged order;

[0134] Step S3043: Generate a random number rand ∈ [0, 1). If rand < P m3 , execute the 2-opt local optimization mutation operator, otherwise remain unchanged, including:

[0135] Step S30431: Randomly select two points i and j within a certain group of the chromosome;

[0136] Step S30432: The path before i remains unchanged and is added to the new path. The path between i and j is flipped and its encoding is added to the new path. The path after j remains unchanged and is added to the new path;

[0137] Step S30433: If the fitness increases after the mutation, accept the mutation. If the fitness does not increase, keep the original individual unchanged.

[0138] Step S300 of this embodiment further includes:

[0139] Step S305: Execute the optimal individual retention strategy, including:

[0140] Step S3051: Identify the individual with the highest fitness and the individual with the lowest fitness in the current population;

[0141] Step S3052: If the fitness of the best individual in the current population is higher than the fitness of the best individual so far, then use the best individual in the current population as the best individual so far;

[0142] Step S3053: Replace the worst individual in the current population with the best individual so far.

[0143] Among them, when implementing the elitist strategy, it also includes that after reaching the number of iterations, the individual with the highest fitness is taken as the optimal task allocation result.

[0144] Among them, c vi is the average fuel consumption per unit time when the i-th agricultural machine is operating, with the unit of L / h;

[0145] c wi is the average fuel consumption per unit time when the i-th agricultural machine is traveling in a non-operating state, with the unit of L / h;

[0146] x ik is the way the i-th harvester enters the k-th task plot. x ik = 0 means the i-th harvester enters the plot from the road, and x ik = 1 means the i-th harvester enters the plot from the connection at the edge of the field;

[0147] P c is the crossover probability, that is, the probability of selecting this coding string to perform the next operation;

[0148] P m1 、P m2 、P m3 are parameters determined through orthogonal experiments. P m1 is the 2-opt local optimization mutation probability; P m2 is the inter-group transfer mutation probability; P m3 is the inter-group exchange mutation probability.

[0149] The present invention solves the problem of how to reasonably allocate tasks and the task execution order in the case where multiple agricultural machines jointly complete multiple tasks during the operation of an agricultural machinery cooperative or a farm.

[0150] Of course, the present invention can also have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding changes and deformations should all fall within the protection scope of the appended claims of the present invention.

Claims

1. A method for multi-machine collaborative static task allocation of the same type of agricultural machinery, characterized in that, The method for allocating static tasks for multiple agricultural machines of the same type based on a multi-variation grouping genetic algorithm includes the following steps: S100, constructing a multi-machine coordination cost function according to the operation time, fuel consumption and non-operation distance of the agricultural machinery fleet; S200, constructing a two-segment encoding method to represent the task allocation method according to the characteristics of multi-machine operation, each encoding represents a chromosome, and constructing a fitness function to represent the task allocation performance represented by each chromosome; as well as S300, searching for the optimal chromosome based on the multi-variation grouping genetic algorithm, and finally obtaining the optimal individual; Wherein, step S100 further includes: S101. Define symbols. Assume that there are m agricultural machines for operation, which are represented by the set {a1, …, a m}; the number of operation tasks is n, which is represented by the set {T1, …, T n}; the performance parameters of the i-th agricultural machine are expressed as: a i = {v wi , d i , w i , v i , t ti} T , (i = 1, 2,..., m), where v wi represents the average operation speed of the i-th agricultural machine, with the unit of km / h, and d i represents the operation width of the i-th agricultural machine, with the unit of m, and w i represents the average operation capacity of the i-th agricultural machine, with the unit of m 2 / h, and v i represents the average non-operation driving speed of the i-th agricultural machine, with the unit of km / h, and t ti represents the average time for each U-turn during the operation of the i-th agricultural machine, with the unit of h; the parameters of the j-th task are expressed as T j ={x 1j , y 1j , x 2j , y 2j , x 3j , y 3j , x 4j , y 4j , d Tj , l Tj , Sj}, T , (j = 1, 2,..., n), where (x 1j , y 1j ), (x 2j , y 2j ), (x 3j , y 3j ) and (x 4j , y 4j ) respectively represent the coordinates of the four vertices of plot of task T j , d Tj represents the width of the vertical operation path of task T j , l Tj represents the length of the parallel operation path of task T j , S j represents the area of task T j , with the unit of m 2 ; S102. Calculate the non-operating distance of each agricultural machine using the following formula: where s(a i , T j ) represents the distance of agricultural machine a i to its first task T j ; s(a i , T j T k ) represents the distance of agricultural machine a i from the j-th task T j to the k-th task T k ; s(a i , T l ) represents the distance of agricultural machine a i from the last task T l back to the garage; j, k, l ∈ {1,..., n}; S103. Calculate the total fuel consumption of each agricultural machine using the following formula, where the total fuel consumption includes the fuel consumption of the agricultural machine on the road, the fuel consumption of turning around during operation, and the fuel consumption of operation: in, k ij is the number of operating rows of the i-th agricultural machine in the j-th task plot, wherein is the ceiling symbol, and the value is the smallest integer not less than the value inside the symbol; S104. The total time for each agricultural machine to complete the task is calculated using the following formula, where the total time includes the time the agricultural machine is on the road, the time the agricultural machine is operating, and the time the agricultural machine is turning around in the field: S105, calculating the distance between tasks, taking the garage as the starting point, and taking n tasks as the 2nd to n+1th points in sequence, and establishing a distance matrix D between any two points on the road; where d ij represents the distance on the road between the (i - 1)-th task point and the (j - 1)-th task point, (i, j = {2, …, n + 1}, i ≠ j); If two task locations are adjacent, the shortest distance between the two task points is considered to be 0; if the locations are not adjacent, the shortest distance between the two task points is equal to the distance on the road between the two tasks, and the shortest distance matrix D′ between the two points is established; where d′ ij represents the shortest distance between the (i - 1)-th task point and the (j - 1)-th task point, (i, j = {2, …, n + 1}, i ≠ j); S106. Construct the objective function: Among them, f represents the multi-machine cooperation cost, and s i is the total distance of the i-th agricultural machine in the non-operating state when it completes the operation task. α is the weight of s in the objective function, α ∈ [0, 1], and c i is the fuel consumption of the i-th agricultural machine to complete the task. β is the weight of c in the objective function, β ∈ [0, 1], and t i is the time for the i-th agricultural machine to complete the task. γ is the weight of max(t i ) in the objective function, γ ∈ [0, 1]; Step S200 further includes: S201, construct a two-segment encoding to represent the chromosome of the genetic algorithm, wherein the first segment is the order of tasks, n tasks are from 1 to n, and n numbers represent a total of n bits; the second segment is the position of the group, a total of m-1 bits; and S202, constructing a fitness function, Fit=1 / f, where the fitness function allocates performance to the task represented by each chromosome; Step S300 further includes: S301, randomly generate chromosomes, and produce an initial population of N as the parent generation; S302, using a roulette wheel selection method to select two parents for crossover; S303. Generate a random number rand ∈ [0, 1). If rand < P c , execute the grouped crossover operator; otherwise, directly select the parent with higher fitness as the offspring. The grouped crossover process is as follows: S3031. Generate a random sequence from 1 to m; S3032, perform group inheritance in the order of random sequence, set the first number of the random sequence to be k, generate a random number rand∈[0,1), if rand<0.5, then the kth group of the first parent generation is used as the kth group of the offspring, if rand≥0.5, then the kth group of the second parent generation is used as the kth group of the offspring; S3033, deleting the tasks included in the offspring from the two parent generations, and performing group crossover inheritance according to the number of groups represented by the 2nd to mth positions of the sequence in the manner of step S3032; S3034, randomly inserting the remaining tasks that do not participate in the crossover operation into the offspring to obtain the final offspring; S304, executing the mutation operator from the first individual of the offspring to the last individual of the offspring, to generate a new population; further comprising: S3041. Generate a random number rand ∈ [0, 1). If rand < P m1 , perform the inter-group transfer mutation operator; otherwise, remain unchanged. The inter-group transfer variation process includes: S30411. Randomly select two different groups on a chromosome as the outgoing group and incoming group oGroup, iGroup∈{1,…,m}; S30412. If the number of tasks in the removal group oGroup is greater than 1, randomly select two points oPoint and iPoint from the removal group and the insertion group as the removal task position and the insertion task position respectively; S30413. Move the task corresponding to the oPoint of the removal task to the iPoint position of the insertion to complete the inter-group transfer, and modify the value of the group break point accordingly; S3042. Generate a random number rand ∈ [0, 1). If rand < P m2 , execute the inter-group exchange mutation operator; otherwise, remain unchanged. Among them, the inter-group exchange mutation process: S30421. Randomly select points for swapping tasks from the 1st to the mth groups of the chromosome respectively; S30422. Remove the tasks at the selected points; S30423. Sort the removed tasks and insert them into the swapping task points in the sorted order; S3043. Generate a random number rand ∈ [0, 1). If rand < P m3 , execute the 2-opt local optimization mutation operator; otherwise, keep it unchanged, including: S30431. Randomly select two points i and j within a certain group of the chromosome; S30432. Keep the path before i unchanged and add it to the new path, flip the encoding of the path between i and j and add it to the new path, and keep the path after j unchanged and add it to the new path; S30433. If the fitness increases after mutation, accept the mutation, and if the fitness does not increase, keep the original individual unchanged; S305. Implement the elitist strategy, including: S3051. Find the individual with the highest fitness and the individual with the lowest fitness in the current population; S3052. If the fitness of the best individual in the current population is higher than the fitness of the best individual so far, use the best individual in the current population as the best individual so far; S3053. Replace the worst individual in the current population with the best individual so far.

2. The same kind of agricultural machinery multi-machine collaborative static task allocation method according to claim 1, characterized in that Implement the elitist strategy, including that after reaching the iteration number, take the individual with the highest fitness as the optimal task assignment result.

Citation Information

Patent Citations

  • Multi-unmanned aerial vehicle cooperative task allocation method based on improved genetic algorithm

    CN110766254A

  • Multi-heterogeneous unmanned aerial vehicle task allocation method based on improved genetic algorithm

    CN111860984A