Multi-type agricultural machinery scheduling method based on improved genetic algorithm
By using an improved genetic algorithm (IMGA) to divide tasks and optimize coding of farmland areas, the problem of low efficiency in scheduling multiple types of agricultural machinery was solved, and the working efficiency of agricultural machinery was improved and the total working time was shortened.
Patent Information
- Application Number
- CN202510776917.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-19
AI Technical Summary
In the dispatch of multiple types of agricultural machinery, existing technologies are unable to effectively address the problems of the dispersion, small scale and unbalanced resource utilization of family-contracted farmland, resulting in low efficiency in agricultural machinery dispatch and frequent occurrences of "people waiting for vehicles" or missed operations.
An improved genetic algorithm (IMGA) was used to divide the farmland area into tasks, set the population size, mutation rate and crossover rate parameters, and generate the initial population using two-stage coding and multiple initialization principles. The agricultural machinery scheduling plan was optimized by combining tournament selection, mutation and crossover operations.
The working efficiency of agricultural machinery has been improved, the total working time has been significantly reduced, and the optimized agricultural machinery scheduling plan is more efficient.
Smart Images

Figure CN120672060A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multi-type agricultural machinery scheduling, and in particular to a multi-type agricultural machinery scheduling method based on an improved genetic algorithm. Background Art
[0002] During the busy farming season, demand for agricultural machinery increases, and agricultural activities are concentrated within a short period of time. Agricultural operations on different farms have different earliest operating times, influenced by natural conditions and human activities. Different operations on the same farm also have a specific sequence. For example, during the autumn harvest, corn should be harvested as soon as it matures, while the decision to proceed with tillage should be based on actual conditions. Following tillage, new crops should be planted immediately. After harvesting, tillage and new crop planting should proceed as quickly as possible to ensure that crops grow in the appropriate season.
[0003] Due to the small size of contracted farmland and the limited scale of cultivation, small-scale operations restrict the degree of mechanization in agricultural production. Therefore, common agricultural machinery types used in small-scale farmland operations include crop harvesters and agricultural tractors. The autumn harvest season involves a variety of operations, such as crop harvesting, land preparation, and new crop sowing. In this multi-task, multi-machinery scheduling problem, manual scheduling is difficult to achieve an ideal solution due to the dispersed, small-scale, fragmented, and uneven resource utilization characteristics of contracted farmland. Therefore, efficient and intelligent optimization algorithms are needed to support autumn harvest machinery scheduling.
[0004] In practice, during the busy farming season, farmers often determine the harvest time based on the maturity of their crops. Crop harvest time gradually shifts from south to north; even within the same region, harvest times vary due to factors such as planting time, irrigation, and fertilization. After harvesting, the decision to carry out straw return, tillage, and fertilization is made based on local conditions. Once these operations are completed, new crops are finally planted. Rural areas typically use their own agricultural machinery or arrange for external machinery, depending on local conditions. This often results in people waiting for vehicles or missed farm operations.
[0005] At present, research on agricultural machinery scheduling is mostly concentrated in the field of path planning. There are few studies on the scheduling of multiple types of agricultural machinery, and most existing research is limited to small-scale scenarios. Summary of the Invention
[0006] Aiming at the problem of low efficiency of multi-task operation of multiple agricultural machinery solved by genetic algorithm, this paper proposes a multi-type agricultural machinery scheduling method based on Improved Genetic Algorithm (IMGA). With minimizing completion time as the optimization goal, it solves the scheduling problem of multiple agricultural machinery and multiple tasks in different types of areas.
[0007] The technical solution adopted by the present invention is: a multi-type agricultural machinery scheduling method based on an improved genetic algorithm, comprising the following steps:
[0008] S1, divide the farmland area into tasks according to farmland ownership and agricultural machinery capacity, and generate the dataset N_M_TWA, where N represents the number of farmlands, M is the number of agricultural machinery, and TWA is the total number of acres of farmland;
[0009] S2, setting the population size, mutation rate and crossover rate parameters of the improved genetic algorithm;
[0010] S3, the divided farmland and agricultural machinery are coded in two sections, OS-MS, where the number of codes is the number of populations; the OS code consists of a farmland sequence, indicating the order of operations, and its length is the total number of operations; the MS code consists of an available agricultural machinery index, indicating the available agricultural machinery for the corresponding operation, and its length is the same as the OS code;
[0011] S4, using multiple initialization principles to generate the initial population after encoding;
[0012] S5, calculating the fitness of each individual in the population, where the fitness is the maximum completion time of the agricultural machinery corresponding to the individual;
[0013] S6, screens individuals through the tournament selection strategy, randomly selecting three individuals from the population each time and selecting the individual with the smallest fitness;
[0014] S7, performs mutation operation on the selected individuals with the same probability;
[0015] S8, perform crossover operation on the selected individuals with the same probability and update the population;
[0016] S9, repeat steps S5 to S8 until the maximum number of iterations is reached, and output the optimized agricultural machinery scheduling plan.
[0017] Furthermore, the specific steps of S3 are:
[0018] S31, generating an OS code according to the number of farmlands and the operation digital dictionary corresponding to the farmlands;
[0019] S32, allocating available agricultural machinery to each operation in sequence according to the order of the farmlands and the order of operations in each farmland.
[0020] Furthermore, the specific steps of S4 are:
[0021] S41, initializing each OS code according to a random initialization principle, a distance initialization principle, and an earliest harvest time initialization principle with the same probability;
[0022] The random initialization principle: randomly arrange the OS codes;
[0023] The distance-based initialization principle is as follows: the OS is initialized in ascending order according to the distance from each farmland to the dispatching center;
[0024] The initialization principle based on the earliest harvesting time is as follows: the OS is initialized in order from smallest to largest according to the earliest operation time of each farmland;
[0025] S42, according to the load balancing principle, the shortest working time principle and the random initialization principle, a code for each MS is selected with the same probability to initialize;
[0026] The load balancing principle is as follows: the agricultural machinery is allocated from left to right in the farmland sequence. Each time an agricultural machinery is allocated for an operation, the agricultural machinery with the smallest total load is selected.
[0027] The shortest working time principle is as follows: the agricultural machinery is allocated from left to right in the farmland sequence. Each time an agricultural machinery is allocated to an operation, the agricultural machinery with the shortest travel time plus operation time is greedily selected;
[0028] The random initialization principle is as follows: the operation of allocating agricultural machinery to the farmland sequence from left to right is repeated, and each time an agricultural machinery is allocated to an operation, an available agricultural machinery is randomly selected;
[0029] S43, merging the initialized OS code and MS code to generate an initialized individual;
[0030] S44, merge the initialized individuals to generate the initial population.
[0031] Furthermore, the specific steps of S5 are:
[0032] S51, decode the job operations from left to right, assign machines to the selected operations according to the machine code, until all jobs are assigned, and calculate the completion time as the fitness;
[0033] S52, calculate the fitness of all individuals and merge them into a fitness list.
[0034] Furthermore, the specific steps of S7 are:
[0035] S71, each time a mutation operation is performed, an OS code mutation operation and an MS code mutation operation are selected with equal probability;
[0036] S72, when selecting an OS code to perform a mutation operation, randomly selecting one of the minimum path mutation operation, the minimum waiting time mutation operation, or the relocation mutation operation according to the same probability;
[0037] The minimum path variation operation: arrange the OS codes in ascending order according to their distance from the scheduling center;
[0038] The minimum waiting time variation operation is as follows: the OS code sequence is arranged from smallest to largest according to the earliest operation time.
[0039] The relocation mutation operation: randomly selects several positions in the OS code, scrambles and reorganizes the OS codes at the corresponding positions, and puts the scrambled and reorganized codes back to the original positions;
[0040] S73, when selecting the MS code mutation operation, randomly select one from the load balancing mutation operation, the minimum load mutation operation, or the random mutation operation according to the same probability;
[0041] The load balancing mutation operation is: randomly select a type of agricultural machinery, find the agricultural machinery with the largest load in this type of agricultural machinery, and , the total number of jobs is ; Find the agricultural machine with the smallest load of this type , the total number of jobs is ;Choose from the agricultural machinery with the largest load The work is assigned to the machine with the lightest load.
[0042] The minimum load variation operation: randomly select several positions in the MS code, and when decoding from left to right, replace the agricultural machine at that position with the agricultural machine with the shortest travel time plus operation time;
[0043] The minimum load variation operation is as follows: randomly selecting several positions in the MS code and randomly selecting an agricultural machine at the position.
[0044] Furthermore, the specific steps of S8 are:
[0045] S81, each time a crossover operation is performed, an OS coding crossover operation and an MS coding crossover operation are selected with equal probability;
[0046] S82, when the OS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and the set of work points is divided into two subsets, set 1 and set 2. The positions of the work belonging to set 1 in individual 1 remain unchanged, and the work belonging to set 2 in individual 2 are inserted into individual 1 in order; the positions of the work belonging to set 2 in individual 2 remain unchanged, and the work belonging to set 1 in individual 1 are inserted into individual 2 in order;
[0047] S83, when the MS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and several positions are randomly selected in the MS code, and the MS codes of individual 1 and individual 2 at the positions are exchanged.
[0048] The beneficial effects of the present invention are as follows: the present invention provides an optimization method for the scheduling of multiple types of agricultural machinery with higher agricultural machinery working efficiency. Compared with other optimization methods, the total working time after optimization is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described below with reference to the accompanying drawings.
[0051] like Figure 1 As shown, the present invention is a multi-type agricultural machinery scheduling method based on an improved genetic algorithm, comprising the following steps:
[0052] S1, divide the farmland area into tasks according to farmland ownership and agricultural machinery capacity, and generate the dataset N_M_TWA, where N represents the number of farmlands, M is the number of agricultural machinery, and TWA is the total number of acres of farmland;
[0053] S2, setting the population size, mutation rate and crossover rate parameters of the improved genetic algorithm;
[0054] S3: Perform two-stage coding (OS-MS) on the divided farmland and farm machinery. The number of codes is the number of populations. The OS code consists of a farmland sequence, indicating the order of operations, and its length is the total number of operations. The MS code consists of an available farm machinery index, indicating the available farm machinery for the corresponding operation, and its length is the same as the OS code. The specific steps are as follows:
[0055] S31, generating an OS code according to the number of farmlands and the operation digital dictionary corresponding to the farmlands;
[0056] S32, allocating available agricultural machinery to each operation in sequence according to the order of the farmlands and the order of operations in each farmland.
[0057] S4, the encoded population is used to generate the initial population using multiple initialization principles; the specific steps are:
[0058] S41, initializing each OS code according to a random initialization principle, a distance initialization principle, and an earliest harvest time initialization principle with the same probability;
[0059] Random initialization principle: randomly arrange OS codes;
[0060] Initialization principle based on distance: initialize OS in ascending order according to the distance from each farmland to the dispatching center;
[0061] Initialization principle based on the earliest harvest time: Initialize the OS in ascending order according to the earliest operation time of each field;
[0062] S42, according to the load balancing principle, the shortest working time principle and the random initialization principle, a code for each MS is selected with the same probability to initialize;
[0063] Load balancing principle: Allocate agricultural machinery from left to right in the farmland sequence. Each time you assign an agricultural machinery to an operation, select the agricultural machinery with the smallest total load.
[0064] The shortest working time principle: the operation of allocating agricultural machinery to the farmland sequence from left to right, each time the agricultural machinery is assigned to an operation, the agricultural machinery with the shortest travel time plus working time is greedily selected;
[0065] Random initialization principle: the operation of allocating agricultural machinery to the farmland sequence from left to right is carried out. Each time an agricultural machinery is allocated to an operation, an available agricultural machinery is randomly selected.
[0066] S43, merging the initialized OS code and MS code to generate an initialized individual;
[0067] S44, merge the initialized individuals to generate the initial population.
[0068] S5, calculate the fitness of each individual in the population, where the fitness is the maximum completion time of the agricultural machinery corresponding to the individual; the specific steps are:
[0069] S51, decode the job operations from left to right, assign machines to the selected operations according to the machine code, until all jobs are assigned, and calculate the completion time as the fitness;
[0070] S52, calculate the fitness of all individuals and merge them into a fitness list.
[0071] S6, screens individuals through the tournament selection strategy, randomly selecting three individuals from the population each time and selecting the individual with the smallest fitness;
[0072] S7, perform mutation operation on the selected individuals with the same probability; the specific steps are:
[0073] S71, each time a mutation operation is performed, an OS code mutation operation and an MS code mutation operation are selected with equal probability;
[0074] S72, when selecting an OS code to perform a mutation operation, randomly selecting one of the minimum path mutation operation, the minimum waiting time mutation operation, or the relocation mutation operation according to the same probability;
[0075] Minimum path variation operation: sort the OS codes in ascending order based on their distance from the scheduling center;
[0076] Minimum waiting time variation operation: Arrange the OS code sequence from smallest to largest according to the earliest job time.
[0077] Relocation mutation operation: randomly select several positions in the OS code, shuffle and reorganize the OS codes at the corresponding positions, and then put the shuffled and reorganized codes back to the original positions;
[0078] S73, when selecting the MS code mutation operation, randomly select one from the load balancing mutation operation, the minimum load mutation operation, or the random mutation operation according to the same probability;
[0079] Load balancing mutation operation: randomly select a type of agricultural machinery and find the agricultural machinery with the largest load in that type of agricultural machinery , the total number of jobs is ; Find the agricultural machine with the smallest load of this type , the total number of jobs is ;Choose from the agricultural machinery with the largest load The work is assigned to the machine with the lightest load.
[0080] Minimum load variation operation: Randomly select several positions in the MS code and replace the agricultural machine at that position with the agricultural machine with the shortest travel time plus operation time when decoding from left to right;
[0081] Minimum load variation operation: Randomly select several positions in the MS code and randomly select an agricultural machine at this position.
[0082] S8, perform crossover operation on the selected individuals with the same probability and update the population; the specific steps are:
[0083] S81, each time a crossover operation is performed, an OS coding crossover operation and an MS coding crossover operation are selected with equal probability;
[0084] S82, when the OS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and the set of work points is divided into two subsets, set 1 and set 2. The positions of the work belonging to set 1 in individual 1 remain unchanged, and the work belonging to set 2 in individual 2 are inserted into individual 1 in order; the positions of the work belonging to set 2 in individual 2 remain unchanged, and the work belonging to set 1 in individual 1 are inserted into individual 2 in order;
[0085] S83, when the MS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and several positions are randomly selected in the MS code, and the MS codes of individual 1 and individual 2 at the positions are exchanged.
[0086] S9, repeat steps S4 to S8 until the maximum number of iterations is reached, and output the optimized agricultural machinery scheduling plan.
[0087] To further illustrate the superiority of the present invention in solving the multi-type agricultural machinery scheduling optimization problem, Table 1 shows the performance of the present invention method (IMGA) with genetic algorithm (GA), particle swarm algorithm (PSO), differential evolution algorithm (DE), improved non-dominated sorting-based multi-objective genetic algorithm III (INSGA-III), and nearest neighbor rule + load balancing rule (NNR+LBR).
[0088] Table 1 Comparison of experimental results under different methods
[0089]
[0090] The examples provide experimental results on various problems. The proposed method uses 100 iterations, a population size of 500, a crossover rate of 0.5, a mutation rate of 0.5, and an initialization method to initialize the population. The experimental dataset consists of the following: number of farmlands, number of agricultural machinery, and farmland area. Comparative analysis shows that the proposed method achieves superior results in most cases, and the advantages of IMGA increase with increasing problem size.
[0091] Although the present invention has been described in detail above using general descriptions and specific embodiments, modifications and improvements may be made based on the present invention. The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Other changes and modifications made by those skilled in the art without departing from the spirit and scope of protection of the present invention are still included within the scope of protection of the present invention.
Claims
1. A multi-type agricultural machinery scheduling method based on an improved genetic algorithm, characterized in that: The following steps are involved: S1, divide the farmland area into tasks according to farmland ownership and agricultural machinery capacity, and generate the dataset N_M_TWA, where N represents the number of farmlands, M is the number of agricultural machinery, and TWA is the total number of acres of farmland; S2, setting the population size, mutation rate and crossover rate parameters of the improved genetic algorithm; S3, two-stage coding OS-MS is performed on the divided farmland and agricultural machinery. The number of codes is the number of populations. The OS code consists of a farmland sequence, indicating the order of operations, and its length is the total number of operations. The MS code consists of the available machine index, indicating the available machine for the corresponding operation, and has the same length as the OS code; S4, using multiple initialization principles to generate the initial population after encoding; S5, calculating the fitness of each individual in the population, where the fitness is the maximum completion time of the agricultural machinery corresponding to the individual; S6, screens individuals through the tournament selection strategy, randomly selecting three individuals from the population each time and selecting the individual with the smallest fitness; S7, performs mutation operation on the selected individuals with the same probability; S8, perform crossover operation on the selected individuals with the same probability and update the population; S9, repeat steps S5 to S8 until the maximum number of iterations is reached, and output the optimized agricultural machinery scheduling plan.
2. The multi-type agricultural machinery scheduling method based on improved genetic algorithm according to claim 1 is characterized in that: The specific steps of S3 are: S31, generating an OS code according to the number of farmlands and the operation digital dictionary corresponding to the farmlands; S32, allocating available agricultural machinery to each operation in sequence according to the order of the farmlands and the order of operations in each farmland.
3. The multi-type agricultural machinery scheduling method based on improved genetic algorithm according to claim 1 is characterized in that: The specific steps of S4 are: S41, initializing each OS code according to a random initialization principle, a distance initialization principle, and an earliest harvest time initialization principle with the same probability; The random initialization principle: randomly arrange the OS codes; The distance-based initialization principle is as follows: the OS is initialized in ascending order according to the distance from each farmland to the dispatching center; The initialization principle based on the earliest harvesting time is as follows: the OS is initialized in order from smallest to largest according to the earliest operation time of each farmland; S42, according to the load balancing principle, the shortest working time principle and the random initialization principle, a code for each MS is selected with the same probability to initialize; The load balancing principle is as follows: the agricultural machinery is allocated from left to right in the farmland sequence. Each time the agricultural machinery is allocated to an operation, the agricultural machinery with the smallest total load is selected. The shortest working time principle is as follows: the agricultural machinery is allocated from left to right in the farmland sequence. Each time an agricultural machinery is allocated to an operation, the agricultural machinery with the shortest travel time plus operation time is greedily selected; The random initialization principle is as follows: the operation of allocating agricultural machinery to the farmland sequence from left to right is repeated, and each time an agricultural machinery is allocated to an operation, an available agricultural machinery is randomly selected; S43, merging the initialized OS code and MS code to generate an initialized individual; S44, merge the initialized individuals to generate the initial population.
4. The multi-type agricultural machinery scheduling method based on improved genetic algorithm according to claim 1, characterized in that: The specific steps of S5 are: S51, decode the job operations from left to right, assign machines to the selected operations according to the machine code, until all jobs are assigned, and calculate the completion time as the fitness; S52, calculate the fitness of all individuals and merge them into a fitness list.
5. The multi-type agricultural machinery scheduling method based on improved genetic algorithm according to claim 1 is characterized in that: The specific steps of S7 are: S71, each time a mutation operation is performed, an OS code mutation operation and an MS code mutation operation are selected with equal probability; S72, when selecting an OS code to perform a mutation operation, randomly selecting one of the minimum path mutation operation, the minimum waiting time mutation operation, or the relocation mutation operation according to the same probability; The minimum path variation operation: arrange the OS codes in ascending order according to their distance from the scheduling center; The minimum waiting time variation operation is as follows: the OS code sequence is arranged from smallest to largest according to the earliest operation time. The relocation mutation operation: randomly selects several positions in the OS code, scrambles and reorganizes the OS codes at the corresponding positions, and puts the scrambled and reorganized codes back to the original positions; S73, when selecting the MS code mutation operation, randomly select one from the load balancing mutation operation, the minimum load mutation operation, or the random mutation operation according to the same probability; The load balancing mutation operation is: randomly select a type of agricultural machinery, find the agricultural machinery with the largest load in this type of agricultural machinery, and , the total number of jobs is ; Find the agricultural machine with the smallest load of this type , the total number of jobs is ; Choose from the largest load-bearing agricultural machinery The work is assigned to the machine with the lightest load. The minimum load variation operation: randomly select several positions in the MS code, and when decoding from left to right, replace the agricultural machine at that position with the agricultural machine with the shortest travel time plus operation time; The minimum load variation operation is as follows: randomly selecting several positions in the MS code and randomly selecting an agricultural machine at the position.
6. The multi-type agricultural machinery scheduling method based on improved genetic algorithm according to claim 1, characterized in that: The specific steps of S8 are: S81, each time a crossover operation is performed, an OS coding crossover operation and an MS coding crossover operation are selected with equal probability; S82, when the OS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and the set of work points is divided into two subsets, set 1 and set 2. The positions of the work belonging to set 1 in individual 1 remain unchanged, and the work belonging to set 2 in individual 2 are inserted into individual 1 in order; the positions of the work belonging to set 2 in individual 2 remain unchanged, and the work belonging to set 1 in individual 1 are inserted into individual 2 in order; S83, when the MS code crossover operation is selected, two individuals, individual 1 and individual 2, are selected from the parent generation, and several positions are randomly selected in the MS code, and the MS codes of individual 1 and individual 2 at the positions are exchanged.