A method for solving multi-class agricultural machinery sequential task optimization scheduling
By combining multiple migratory bird migration optimization algorithms with improved agricultural machinery operation sequence coding and discrete whale optimization algorithms, the scheduling problem of various types of agricultural machinery operations was solved, improving the efficiency and intelligence level of agricultural machinery operations and minimizing the time of agricultural machinery operations.
Patent Information
- Application Number
- CN202111228990.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-10-21
AI Technical Summary
In the process of agricultural mechanization, how to optimize the sequential task scheduling of various types of agricultural machinery to improve the utilization rate and operational efficiency of agricultural machinery, especially the scheduling of agricultural machinery operations such as corn harvesting, fertilization, plowing and wheat sowing under different regional and climatic conditions.
A hybrid multi-population migratory bird migration optimization algorithm was adopted, which was combined with an improved agricultural machinery operation sequence coding (MNEH) to initialize the population. The discrete version of the whale algorithm (DWOA) was used for population information interaction and local search. The discrete whale optimization algorithm (DWOA) and local search mechanism were designed, and the agricultural machinery operation sequence was optimized through sequential crossover, random crossover and two-stage crossover strategies.
It improves the efficiency and intelligence of agricultural machinery operations, enabling rapid convergence in the early stages of evolution and escaping local optima in the later stages to find the global optimum, significantly reducing the maximum operating time of agricultural machinery.
Smart Images

Figure CN113962550B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent agricultural machinery, and further relates to a method for optimizing the scheduling of sequential tasks for various types of agricultural machinery. Background Technology
[0002] The transformation of Chinese agriculture towards mechanization and modernization has led to land transfers, highlighting the urgent need for rational allocation, management, and optimized scheduling of large-scale agricultural machinery. Agricultural production exhibits distinct seasonal and regional characteristics; due to regional differences and climate influences, harvesting and sowing times vary slightly. Therefore, optimizing the scheduling of agricultural machinery can significantly improve its utilization rate and operational efficiency. Henan is a major corn and wheat producing province. This invention proposes a hybrid multi-group migratory bird migration optimization method to solve the sequential task scheduling problem of various agricultural machinery in corn harvesting, fertilization, plowing, and wheat sowing processes, showing promising application prospects. Summary of the Invention
[0003] The purpose of this invention is to propose a method for optimizing the scheduling of various types of agricultural machinery sequential tasks, so as to improve the operating efficiency of agricultural machinery and enhance the intelligence level of agricultural machinery equipment.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A method for optimizing the scheduling of sequential tasks for various types of agricultural machinery, such as... Figure 1 As shown, it includes the following steps:
[0006] (1) Initialize the population with MNEH, the population size is 3×Np, and randomly assign the best Np individuals to each population as the leader birds of each subpopulation, and randomly assign the remaining 2×Np individuals to each subpopulation, with two individuals in each subpopulation as follower birds.
[0007] Methods for initializing a population using MNEH include:
[0008] (a) Calculate the value of each farmland in p refers to the travel time of the k-th type of agricultural machinery from its storage point to the j-th plot of farmland. k,j This refers to the operating time of type k agricultural machinery on plot j of farmland, relative to ψ. j Sort in ascending order to obtain the operating sequence of Class 1 agricultural machinery.
[0009] (b) Put π 1 Based on the number of agricultural machinery units in category 1, M1, they are divided into... and Two subsequences,
[0010] (c) Random replacement in the order of and combine to obtain a new agricultural machinery operation order
[0011] (d) Repeat step (c) to obtain the operation order of the first type of agricultural machinery equal to the population size, that is, the scheduling solution, and calculate their fitness values respectively.
[0012] (2) Set the leading bird of each sub-population as the initial population individual of the whale algorithm, and the iteration number t = 1.
[0013] (3) Set the sub-population serial number f to 1, f = 1.
[0014] (4) Set the tour number g = 1.
[0015] (5) The leading bird is updated using neighborhood individuals;
[0016] The update of the leading bird in each sub-population adopts a serial neighborhood strategy. The serial neighborhood strategy includes three neighborhood strategies: insertion, exchange, and destruction and construction (DC) in the iterated greedy (IG) algorithm. When generating the neighborhood individuals of the leading bird, insert, exchange, and DC are executed in sequence. As long as a better neighborhood individual can be generated using a certain strategy, it will continue to be used. Otherwise, the next strategy will be executed until the last one. The insertion, exchange, and destruction and construction operations are described as follows:
[0017] The operation method of the insertion strategy includes: randomly select a farmland v from the scheduling order, delete it, and insert it into the position of farmland u, where u ≠ v;
[0018] Backward insertion: v < u, then π′ = {π1,…,π v-1 ,π v+1 ,...,π u ,π v ,π u+1 …π n}
[0019] Forward insertion: v > u, then π′ = {π1,…,π u-1 ,π v ,π u ,...,π v-1 ,π v+1 …π n}
[0020] The operation method of the exchange strategy includes: exchanging the operation order of any two farmlands in the scheduling order;
[0021] If v < u, then π′ = {π1,…,πv-1 ,π u ,π v+1 ,...,π u-1 ,π v ,π u+1 …π n};
[0022] If v>u, then π′={π1,…,π u-1 ,π v ,π u+1 ,...,π v-1 ,π u ,π v+1 …π n};
[0023] Destructive reconstruction methods include:
[0024] ③ Randomly select d different farmlands from the sorted π and fill them into the subsorted π. d And remove it from the original sequence, the remaining farmland forms another sub-sorting π r ;
[0025] ④ Put π d The first farmland in the π is inserted into π. r Find the sub-sorting that minimizes makespan among all possible positions, and update π accordingly. r Delete π d The first element in;
[0026] ③If π d If it is not an empty set, proceed to step ②, until π. d It is an empty set, so we get π. r This is the new agricultural machinery scheduling and sorting.
[0027] (6) Use neighboring individuals to update with flying birds;
[0028] The follower birds in the subpopulation are updated using their neighboring individuals. The neighborhood solutions for the follower birds must not only maintain quality but also increase diversity. A hybrid approach of insertion and exchange neighborhoods is used to generate the follower birds' neighborhood individuals. Since insertion and exchange neighborhoods are more likely to produce better neighborhood solutions, p is set in this invention. m =0.6, that is, randomly generate an r∈(0,1), if r <p m Insertion is performed, and the bird is used until it can no longer be updated; otherwise, a swap operation is performed. If a neighboring individual is superior to the bird in the flock, it will be replaced, i.e., greedy selection. If the bird in the flock is replaced and then becomes superior to its leader bird, the two are swapped, thus completing the information exchange between the leader bird and the bird in the subpopulation.
[0029] (7) g = g + 1.
[0030] (8) If g <= G, then return to (5); otherwise, continue execution.
[0031] (9) f = f + 1.
[0032] (10) If f <= Np, then return (4); otherwise, continue execution.
[0033] (11) Perform the discrete whale algorithm on the leader bird of the subpopulation and use simulated annealing to accept individuals;
[0034] In multi-population migratory bird algorithms, individuals within each subpopulation evolve through neighborhood individuals. However, as the algorithm progresses, individuals within each subpopulation become very similar, leading to a loss of diversity and premature convergence. Therefore, information exchange between populations is crucial, as it enhances the algorithm's global search capability. Since the lead birds in each subpopulation guide the algorithm's exploration direction, information exchange between populations occurs only among these lead birds. Thus, an interaction mechanism needs to be designed. The whale optimization algorithm (WOA) has strong global search capabilities; therefore, embedding WOA into HMMBO improves its global search performance. However, WOA is a continuous algorithm and cannot be directly applied to agricultural machinery operation scheduling problems, which belong to combinatorial optimization problems. Therefore, the discrete whale optimization algorithm (DWOA) was designed. In DWOA, the whale siege and spiral ascent processes are simulated using an individual's sequential crossover with the optimal individual and two-stage crossover, respectively; random prey hunting is simulated using an individual's random crossover with random individuals in the population. These three crossover strategies simulate the whale's predation process. The specific operations of the three crossover strategies are as follows: Figure 3 , Figure 4 , Figure 5 As shown, P1 and P2 are two parent individuals, and C1 and C2 are two offspring crossover individuals;
[0035] Order crossover (OX):
[0036] Step 1: Randomly select two intersection points (r1, r2), where 1 ≤ r1 < r2 ≤ n;
[0037] Step2, P1(r1:r2)→C1(r1:r2), P2(r1:r2)→C2(r1:r2);
[0038] Step 3: Copy the elements of P1 that are not contained in C2(r1:r2) to C2 in sequence; copy the elements of P2 that are not contained in C1(r1:r2) to C1 in sequence.
[0039] Step 4: Select the crossover result between C1 and C2 with the smaller makespan.
[0040] Job-based crossover (JBX):
[0041] Step 1: Construct two subsequences S1 and S2;
[0042] Step 2: Copy the element corresponding to S1 in P1 to C1; copy the element corresponding to S2 in P2 to P2.
[0043] Step 3: Copy the element corresponding to S2 in P2 to C1; copy the element corresponding to S1 in P1 to C2.
[0044] Step 4: Select the crossover result between C1 and C2 with the smaller makespan.
[0045] Two-segment crossover (TSX):
[0046] Step 1: Randomly select two intersection points (r1, r2), where 1 ≤ r1 < r2 ≤ n;
[0047] Step2, sub1=P1(r1:r2); sub2=P2-sub1;
[0048] Step3, C1=[sub1,sub2]; C2=[sub2,sub1];
[0049] Step 4: If r < 0.5, r ∈ [0, 1], C1 is the end of the crossover; otherwise, C2 is the result of the crossover.
[0050] The specific DWOA algorithm:
[0051] The dynamic adjustment of global exploration and local exploration during whale foraging is controlled by pb. Its change curve over time is a non-linear curve, which allows for better control of the algorithm's search process and achieves better search results. The expression for pb is shown in the following formula:
[0052] In the formula, pb max and pb min These are the maximum and minimum values of pb, set to 1 and 0 respectively; t and Max_iter are the current generation and the maximum generation, respectively.
[0053] Whether to accept crossover individuals is determined using simulated annealing, which involves accepting weaker crossover individuals with a certain probability to increase the algorithm's global search capability. The acceptance probability is: Where T refers to the annealing temperature, and the initial value is set to... Each iteration updates by T*0.95, simulating the annealing process. (C) max (π) refers to the current makespan of the individual whale, C max (π′) refers to the makespan of the resulting crossover individuals.
[0054] Discrete Whale Optimization Algorithm (DWOA)
[0055]
[0056] (12) Prioritize interfering with the best individual in the population, and then perform a local search;
[0057] To further improve the quality of the global optimum, i.e., the best individual among the leader birds in each subpopulation, a local search (LS) is performed. Since the optimal solution is obtained through multiple evolutions, directly performing a local search may lead to a loop. To find a better solution, the best individual is perturbed before the local search, and then the local search is performed on the perturbed individual. The algorithm is described below:
[0058] Step 1: Randomly perform 3 insertion perturbations on the best individual;
[0059] Step 2, execute LS;
[0060] Step2.1, flag=0; flag1=0, k=1;
[0061] Step 2.2: Randomly select farmland r1 and insert it into all possible positions of the individual. If the best individual among the newly generated individuals is better than the original individual, flag = 1; k = 1, go to Step 2.2; otherwise, k = k + 1, go to Step 2.3.
[0062] Step 2.3: Randomly select farmland r1 and exchange it with farmland in all other locations. If the best individual in the new generation is better than the original individual, flag1 = 1; k = 2, go to Step 2.3; otherwise, k = k + 1, go to Step 2.4.
[0063] Step 2.4: If k=3 and one of the insertions and swaps above has been updated in this round, flag=flag1=0, go to step 2.2; otherwise, end the local search, return the optimal individual, and put it into the population to replace the original optimal individual.
[0064] (13) Preserve the best individual.
[0065] (14) Update the age of the leader bird in each population. If it is greater than the limit, reset the individual, put it into the population, and delete the leader bird.
[0066] To further improve the algorithm's global search capability, a population reset mechanism is designed. The algorithm only records the update level of all leader birds. Each leader bird is assigned an age variable to record its update level; the older the age, the worse the individual's update capability. The age of each leader bird is initialized to 0 and updated during algorithm iteration. If the individual updates, the age is set to 0; otherwise, the age is increased by 1 and compared with a set maximum limit. The limit indicates that the individual is old enough that the algorithm may get stuck in a local optimum and may be searching cyclically in its neighborhood. In this case, the reset mechanism is activated, generating a new individual to replace the old one. Randomly generated reset individuals may be of very poor quality, leading to a decrease in the algorithm's convergence speed. Since abandoned individuals have evolved for many generations, they inevitably carry information from better individuals, and their neighborhood may represent a better feasible region. Therefore, this invention proposes a population reset mechanism that both preserves the better information of the original individuals and allows the algorithm to search towards better regions.
[0067] To avoid getting trapped in local optima, this invention performs several insertion operations on the abandoned individual. Three random insertions are performed to generate a neighboring individual. Generating only one neighboring individual might result in a worse individual; therefore, to find a better neighboring individual and direct the algorithm towards the desired region, this operation is repeated several times (τ), generating τ neighboring individuals. These τ neighboring individuals are evaluated, and the best one, regardless of whether it is better than the original individual, is added to the population to replace the original individual. Here, τ is set to 10 in the algorithm, which ensures that better individuals are found without significantly reducing the algorithm's convergence efficiency.
[0068] (15) If t <= Max_iter, then t = t + 1 and return (3); otherwise, output the optimal individual.
[0069] The hybrid multi-group migratory bird migration optimization method of the present invention has the following advantages compared with the prior art:
[0070] This invention addresses the problem of scheduling agricultural machinery with sequential tasks and preparation time. With the goal of minimizing the maximum operating time of the machinery, a hybrid multi-population migratory bird migration optimization algorithm is proposed. The algorithm uses an encoding based on the operating sequence of the machinery in the field, generates an initial population using a modified NEH (modify NEH, MNEH), and arranges the populations in ascending order of fitness value. The first third of each subpopulation serves as the leader birds, and the latter two-thirds serve as the follower birds. Leader birds in each subpopulation use a serial neighborhood search to find their neighbors, while follower birds use a parallel neighborhood structure to generate their neighbors, employing a greedy selection method. If a follower bird is superior to a leader bird, they are swapped, ensuring information exchange within the population. Inter-population interactions are optimized using a discrete whale optimization algorithm for the leader birds of each subpopulation. To further ensure the algorithm's local search capability, a local search algorithm is designed to operate on the optimal individual. In order to avoid premature convergence of the algorithm, an age variable is designed to record the update status of the leader bird in each population. If the age of a leader bird reaches a certain limit, a new individual is generated to replace the original individual and put into the population.
[0071] The algorithm of this invention exhibits a fast convergence speed in the early stages of evolution and is able to escape local optima in the later stages. The optimization mechanism used in the algorithm effectively balances its global and local search capabilities, achieving good optimization results. This algorithm not only improves the operational efficiency of agricultural machinery but, more importantly, enhances the intelligence level of agricultural equipment. Attached Figure Description
[0072] Figure 1 This is a flowchart of the method for optimizing the scheduling of various types of agricultural machinery sequential tasks proposed in this invention.
[0073] Figure 2 This is a schematic diagram of the sequential operation scheduling of agricultural machinery with preparation time according to the present invention.
[0074] Figure 3 This is a schematic diagram of the sequence of the present invention.
[0075] Figure 4 This is a schematic diagram of random crossover in this invention.
[0076] Figure 5 This is a schematic diagram of the two intersecting segments of the present invention.
[0077] Figure 6 This is a comparison of the convergence curves of the sequential operation agricultural machinery scheduling example SSD100_P8_80 solved by the present invention with those solved by several existing algorithms. Detailed Implementation
[0078] The present invention will be further described below with reference to the accompanying drawings and preferred embodiments.
[0079] This invention relates to algorithms written in Matlab R2016b and running on an Intel(R) Core(TM) i5-9600KF / 3.7GHZ / 16.0GB system with Windows 10 as the software platform.
[0080] This invention employs a task scheduling example with preparation time sequence, randomly generated to simulate actual conditions. Figure 2 The example shown is a randomly generated calculation of sequential operation agricultural machinery scheduling with preparation time.
[0081] There are three scenarios with 60, 80, and 100 farmland plots. Since the operating efficiency of the four types of agricultural machinery is roughly the same, we will discuss three scenarios with 5, 8, and 10 machines of each type, and three scenarios with preparation time of 10%, 50%, and 100% of the average agricultural machinery operating time. There are a total of 3×3×3 = 27 possible combinations of farmland plots, number of agricultural machinery, and preparation time. The examples are shown in column 1 of Table 6, such as SSD10_P5_60, which represents 60 farmland plots, 5 machines of each type, and a preparation time of 10% of the average operating time. The preparation time matrix is an n×nm matrix, where n is the number of farmland plots and m is the type of agricultural machinery. Each n×n matrix is a real symmetric matrix. In practice, the number of farmland plots, the number of machines of each type, and the preparation time can be changed according to specific circumstances. The algorithm proposed in this invention was used to solve 27 agricultural machinery scheduling examples, and the scheduling results were compared with those of three other existing algorithms. The comparison results are shown in Table 6. In the table, BER and AVG represent the best and average makespan of the algorithm in 5 independent tests, respectively, and STD is the standard deviation of the 5 test results, as shown in the following formula:
[0082]
[0083] In the formula, C i and C AVG These represent the maximum completion time (iemakespan) for each test and the average makespan for 5 tests, respectively.
[0084] Table 6. Comparison of HMMBO / DMBO / IG_MRLS / ILS_MRLS algorithms in solving the agricultural machinery scheduling problem with preparation time.
[0085]
[0086] Table 6 presents the results of the four algorithms optimizing agricultural machinery scheduling examples. The minimum makespan for the same metric tested by different algorithms is highlighted in bold. It is easy to see that HMMBO's optimization results (BRE and ARE) are significantly better than the other algorithms, especially in the STD part, demonstrating the effectiveness of the proposed HMMBO algorithm in solving the sequential task agricultural machinery scheduling problem. Table 6 also shows that, excluding HMMBO, comparing the optimization results of the other three algorithms, for most examples (especially the latter half), algorithm DABC performs best, followed by IG_MRLS, while ILS_MRLS performs worst. In the earlier examples, IG_MRLS outperforms DABC. Figure 6 This section presents convergence curves for four algorithms optimized for the agricultural machinery scheduling example SSD100_P8_80. Due to space limitations, only a comparison of convergence curves for one example is shown here. The graph shows that, compared to other algorithms, the HMMBO algorithm has a faster convergence speed in the early stages of iteration and a stronger ability to escape local optima and find the global optimum in the later stages of algorithm evolution. Comparing the other three algorithms, the DABC algorithm performs slightly better than the two heuristic algorithms ILS_MRLS and IG_MRLS. Between ILS_MRLS and IG_MRLS, IG_MRLS is slightly better. ILS_MRLS converges faster in the early stages of algorithm evolution but is prone to premature convergence, while the DABC algorithm has a stronger ability to escape local optima in the later stages of evolution.
[0087] These embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
Claims
1. A method for optimizing the scheduling of sequential tasks for various types of agricultural machinery, characterized in that, The steps include the following: (1) Initialize the population with MNEH, the population size is 3×Np, and randomly assign the best Np individuals to each population as the leader birds of each subpopulation, and randomly assign the remaining 2×Np individuals to each subpopulation, with two individuals in each subpopulation as follower birds. Methods for initializing a population using MNEH include: (a) Calculate the cost of each farmland ,in , This refers to the travel time of the k-th type of agricultural machinery from its storage point to the j-th plot of farmland. This refers to the operating time of type K agricultural machinery on plot j of farmland. Sort in ascending order to obtain the operating sequence of Class 1 agricultural machinery. ; (b) Put Based on the number of Class 1 agricultural machinery units Divided into and Two subsequences, ; (c) Random swap The order obtained ,and The new agricultural machinery operation sequence is obtained by merging. ; (d) Repeat step (c) to obtain the operation sequence of the first type of agricultural machinery with the same population size, i.e., the scheduling solution, and calculate its fitness value respectively; (2) The leader bird of each subpopulation is set as the initial population individual of the whale algorithm, and the number of iterations is t=1; (3) Set the subpopulation number f to 1, f=1; (4) Set the number of cycles g=1; (5) Leading birds utilize neighboring individuals for updates; The method for updating the neighboring individuals of the leader bird in the subpopulation is to use a serial neighborhood strategy to generate the neighboring individuals of the leader bird: The three neighborhood strategies—insertion, swapping, and iterative greedy algorithm—are executed sequentially. If a strategy can generate better neighborhood individuals, it is used; otherwise, the next strategy is executed until the last one. The insertion strategy operation method includes: randomly selecting farmland v from the scheduling order, deleting it, and inserting it into the position of farmland u, where u ≠ v. Insertion backward: if v < u, then Forward insertion: v>u, then The operation method of the swap strategy includes: swapping the operation order of any two farmlands in the scheduling sequence; If v < u, then ; If v>u, then ; Destructive reconstruction methods include: ① Randomly sorted Select any d different farmlands and fill them into the sub-sorting. And remove it from the original sequence, the remaining farmland forms another sub-sorting. ; ② Put The first farmland in the middle was inserted into Find the sub-sorting that minimizes makespan from all possible positions and update accordingly. ,delete The first element in; ③If If it is not an empty set, proceed to step ② until... It is an empty set, and the result is... This is the new agricultural machinery scheduling order; (6) Use neighboring individuals to update with flying birds; The subpopulation and bird populations utilize a neighborhood update method that employs a parallel neighborhood strategy to generate neighborhood individuals. Neighborhood strategies include two types: insertion and swapping. Set p m =0.6, meaning a random number is generated. If r <p m Perform an insert operation and continue using it until it can no longer be updated; otherwise, perform a swap operation. (7) g = g + 1; (8) If g <= G, then return to (5); otherwise, continue execution; (9) f = f + 1; (10) If f <= Np, then return to (4); otherwise, continue execution; (11) Perform the discrete whale algorithm on the leader bird of the subpopulation and use simulated annealing to accept individuals; The discrete whale algorithm simulates the whale's predation process using three crossover strategies in the whale algorithm: When the random number p < 0.5 and another random number r is less than the dynamic adjustment probability pb, the order of the leading bird individual and the current best individual is alternated. When p < 0.5 and the random number r is not less than pb, random crossover is performed between the leader bird and the random individual; when p ≥ 0.5, two-stage crossover is performed between the leader bird and the current best individual; and simulated annealing is used with probability p = min{exp( ,1)} Accepts crossover individuals; (12) Prioritize interfering with the best individual in the population, and then perform a local search; The local search algorithm is as follows: inserting a neighbor and exchanging neighbors in sequence. As long as one of the two neighbors can update the individual, the two neighbors are used again in sequence until neither of the two neighbors can update the individual. (13) Preserve the optimal individual; (14) Update the age of the leader bird in each population. If it is greater than the limit, reset the individual, put it into the population, and delete the leader bird. The population reset mechanism used for resetting individuals is as follows: Perform τ insertion operations on the abandoned individual to generate τ neighboring individuals; For each of the τ neighboring individuals, the best one, regardless of whether it is better than the original individual, is added to the population to replace the original individual. (15) If t <= Max_iter, then t = t + 1 and return (3); otherwise, output the optimal individual.