Method for dynamically distributing operation tasks of agricultural machinery group
By using a two-stage dynamic optimization model and a multi-population co-evolutionary genetic algorithm, combined with a hybrid constraint mechanism of hard and soft time windows, the problem of insufficient resource utilization and delayed order response in farmland operation scenarios under the traditional static scheduling mode is solved, and efficient and economical operation of agricultural machinery fleets is achieved.
Patent Information
- Application Number
- CN202511698478.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional static scheduling models are difficult to adapt to complex and ever-changing farmland operation scenarios, resulting in insufficient utilization of agricultural machinery resources, delayed order response, and high overall operation costs. Existing intelligent optimization algorithms are prone to getting stuck in local optima when dealing with high-dimensional dynamic scheduling problems, and it is difficult to balance multiple objectives such as task balance, energy consumption minimization, and time constraints.
A two-stage dynamic optimization model and a multi-population co-evolutionary genetic algorithm are adopted, combined with a hybrid constraint mechanism of hard and soft time windows. The algorithm is solved by multi-population co-evolutionary genetic algorithm, which receives dynamic orders in real time and inserts paths to optimize the allocation of agricultural machinery group operation tasks.
It has enabled flexible and efficient operation of agricultural machinery fleets, reduced idle agricultural machinery and order rejections, improved resource utilization and operational efficiency, reduced operating costs, and promoted refined management and sustainable development of agricultural production.
Smart Images

Figure CN121563084A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural machinery scheduling, and in particular to a method for dynamically allocating agricultural machinery fleet operations with the goal of minimizing the agricultural machinery's travel path and maximizing the number of dynamic orders received. Background Technology
[0002] With the improvement of modern smart agriculture technology systems, the deep integration of the Internet of Things, intelligent sensing devices, and big data technologies is driving the rapid development of agricultural mechanization towards intelligence. As the core carrier of large-scale production, the efficiency of agricultural machinery clusters in collaborative operations directly affects the utilization rate of farmland resources and production benefits.
[0003] However, in complex and ever-changing farmland operation scenarios, traditional static scheduling models struggle to adapt to dynamic task demands, resulting in problems such as "uneven task allocation, partial resource idleness, and delayed collaborative response." Especially in time-sensitive operations like harvesting and sowing, various types of agricultural machinery need to adjust their task allocation in real time based on factors such as crop maturity and weather changes. Existing research often employs intelligent optimization methods such as genetic algorithms and particle swarm optimization, but these are prone to getting trapped in local optima when dealing with high-dimensional dynamic scheduling problems and struggle to balance multiple objectives such as task balance, energy minimization, and time constraints.
[0004] Therefore, existing technologies lack a dynamic task allocation method that can effectively balance real-time response and multi-objective optimization, resulting in the need to further improve the efficiency of agricultural machinery operations and resource utilization. Summary of the Invention
[0005] To address the shortcomings of existing static scheduling and single optimization algorithms in dealing with dynamic, multi-objective agricultural machinery scheduling problems, this invention provides a method for dynamically allocating agricultural machinery fleet tasks.
[0006] The present invention provides a method for dynamically allocating agricultural machinery fleet tasks, comprising the following steps:
[0007] Step S1: Construct a dynamic allocation model for agricultural machinery group operation tasks. The model includes a parameter system, decision variables, objective function, and constraints. The parameter system includes a set of all nodes, a set of farmland operation points, a set of agricultural machinery points, a set of directed arcs, a set of all agricultural machinery, a batch set, a set of dynamically arriving order points, and a set of path insertion segments.
[0008] Step S2: Based on the dynamic allocation model of agricultural machinery group operation tasks, a multi-population co-evolutionary genetic algorithm is used to solve the problem and output the initial task allocation scheme and agricultural machinery coordination path.
[0009] Step S3: During the operation of agricultural machinery, receive dynamic orders in real time, and determine whether to insert the dynamic orders into the current operation route based on the improved saving algorithm, so as to update the task allocation scheme.
[0010] Preferably, in step S1, constructing the dynamic allocation model includes the following two models:
[0011] The first-stage model is used to perform initial route planning for known fixed orders before the start of the workday. Its objective function is to minimize the total travel cost of all agricultural machinery in all batches.
[0012] The second-stage model is used to make insertion decisions for newly arriving dynamic orders during the operation. Its objective function is to maximize the number of dynamic orders successfully inserted by all agricultural machines in all batches.
[0013] Preferably, the constraints of the first-stage model include:
[0014] Batch activation and resource limit constraints are used to ensure that each agricultural machine is allocated and activated with at least one work batch, while the total number of departure batches dispatched from any agricultural machine station does not exceed the total number of agricultural machines currently available at that station.
[0015] The flow balance constraint is used to ensure that each farm operation point is served by one and only one batch of agricultural machinery, and that the operation path of each batch of each agricultural machinery must form a closed loop, that is, starting from a certain farm station and returning to the same station after completing the operation;
[0016] The unique service constraint at each work site is used to ensure that each farmland work site is served by one and only one batch of agricultural machinery, without duplication or omission.
[0017] Hard time windows and path-ensuring constraints are used to ensure that the movement and service time of agricultural machinery between work points meet the hard time window requirements specified by each work point, and to ensure the continuity of the path in time sequence.
[0018] Total working hours constraint is used to limit the sum of the cumulative driving time and working time of each agricultural machine in all batches to not exceed the daily set limit for the total working time of a single machine.
[0019] Preferably, the constraints of the second-stage model include:
[0020] Traffic balancing constraint: Insert time period for each path For each batch b of agricultural machinery, after inserting a dynamic order, the agricultural machinery's travel path must still maintain network flow balance, that is, the number of paths entering any node is consistent with the number of paths leaving that node, thereby ensuring the continuity and feasibility of the path.
[0021] Soft time window constraint: After inserting a dynamic order, the time when the agricultural machinery arrives at the end of the inserted segment must not be later than the latest service time allowed for that end point;
[0022] Avoid duplicate insertion constraint: The same dynamic order point can only be inserted into a batch of one agricultural machine at most once to prevent the order from being repeatedly assigned and served;
[0023] Comprehensive constraints on capacity and working hours: The insertion of dynamic orders must simultaneously meet the following conditions: the total workload of the batch does not exceed the single batch capacity of the agricultural machinery, the total working hours of the agricultural machinery throughout the day do not exceed the upper limit, and the insertion operation is carried out in the preset path insertion segment.
[0024] Preferably, in step S2, the multi-population co-evolutionary genetic algorithm includes the following processes:
[0025] S21. Encoding: Chromosomes are constructed using integer encoding, where genes represent work points or agricultural machinery points;
[0026] S22. Initialization: Multiple initial subpopulations are obtained using a random generation method;
[0027] S23. Decoding: Based on the chromosome gene sequence, the operation priority is determined by calculating the distance between the operation point and the agricultural machinery point. The operation point is then assigned to the agricultural machinery point according to this priority, generating a specific operation path sequence for the agricultural machinery. priority The smaller the value, the higher the priority.
[0028] S24. Genetic operations: Within each subpopulation, selection based on roulette wheel selection, crossover based on sequence crossover, and mutation based on exchange are performed sequentially to generate new individuals.
[0029] S25. Cooperative Strategy: Periodically select the individuals with the best fitness from each subpopulation as representative individuals, combine these representative individuals into a complete solution and evaluate it, and feed the obtained fitness back to each subpopulation to guide its subsequent evolutionary direction.
[0030] Preferably, in step S3, the process of making a judgment based on the improved saving algorithm includes: calculating the saving value that can be generated by inserting the dynamic order into different positions of the existing path, and determining the priority order of attempting to insert according to the size of the saving value.
[0031] Preferably, the saving value is a time saving value. Calculate using the following formula:
[0032] ,
[0033] In the formula, Used to characterize the work point Insert work point The time saved on the subsequent route;
[0034] Indicates work point and work points The travel time between them is set. ;
[0035] Indicates agricultural machinery point and work points Travel time between;
[0036] Indicates agricultural machinery point and work points Travel time between.
[0037] Preferably, in step S3, after determining the priority order of insertion based on the size of the saving value, the feasibility of the candidate insertion positions needs to be verified in sequence; the feasibility verification includes: determining whether the operation capacity constraint, total working time constraint and soft time window constraint of the batch of agricultural machinery are met after insertion.
[0038] Preferably, in step S3, the system update task allocation scheme includes: updating the operation path sequence of the affected agricultural machinery, recalculating the estimated time of each node on the path, and synchronously updating the workload and the consumed working time of the relevant agricultural machinery.
[0039] Preferably, after step S3, a machine selection step is also included: for each work route in the updated task allocation scheme, the unit power consumption of different models of agricultural machinery executing that route is calculated. The route is then assigned to the agricultural machinery model with the lowest power consumption per unit of operation; among them, , The total workload for route r; This indicates the power output per unit time of this agricultural machinery model.
[0040] The beneficial effects of this invention are as follows: Based on the aforementioned technical solution, the beneficial effects of this invention are mainly reflected in its systematic solution to the core pain points and efficiency improvement of smart agriculture operation modes. Traditional static scheduling modes, due to their inherent rigidity, often lead to insufficient utilization of agricultural machinery resources, delayed order response, and high overall operating costs when dealing with dynamic and ever-changing farmland operation scenarios. This invention, by introducing a two-stage dynamic optimization model and a multi-population co-evolutionary algorithm, achieves a fundamental transformation from preset fixed paths to real-time response and dynamic optimization.
[0041] Specifically, this method constructs a two-stage model that considers both initial fixed orders and real-time dynamic orders, and designs a hybrid constraint mechanism combining hard and soft time windows. This allows the scheduling system to flexibly absorb new order demands generated during operations while ensuring the timely completion of planned tasks. This design significantly enhances the flexibility and adaptability of fleet operations, effectively reducing idle agricultural machinery or order rejections caused by information update delays, thereby maximizing the operating area and the number of farmers served in complex farmland environments.
[0042] At the optimization algorithm level, the multi-population co-evolutionary genetic algorithm employed in this invention effectively overcomes the shortcomings of traditional optimization algorithms that are prone to getting trapped in local optima when solving high-dimensional, multi-constraint scheduling problems through parallel search and inter-population information interaction mechanisms. This algorithm can explore the solution space more efficiently, thereby generating a global scheduling scheme that is superior in terms of travel path, resource utilization, and order completion rate, providing high-quality decision support for large-scale agricultural machinery collaborative operations.
[0043] Furthermore, the real-time insertion strategy based on improved energy-saving algorithms and the agricultural machinery selection strategy based on unit operating power consumption together constitute the key technical support for ensuring the efficient and economical operation of the system. The real-time insertion strategy ensures the speed and feasibility of new order allocation, avoiding the huge computational overhead and execution chaos caused by global rescheduling; while the economical selection strategy extends the optimization objective from a single path distance to the energy consumption dimension, achieving effective control of operating costs while completing the task, and promoting the refined management and sustainable development of agricultural production.
[0044] In summary, the dynamic task allocation method provided by this invention has been innovatively designed in terms of model framework, solution algorithm and execution strategy. Together, they have significantly improved the collaborative operation efficiency, resource utilization efficiency and system economy of agricultural machinery fleets. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the decoding process in an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of sequence crossover operation in an embodiment of the present invention.
[0047] Figure 3 This is a schematic diagram of the exchange mutation operation in an embodiment of the present invention.
[0048] Figure 4 This is a sequence diagram of order receiving and decision planning in an embodiment of the present invention.
[0049] Figure 5 This is a flowchart illustrating the overall algorithm of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0052] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0053] Specific Implementation Method 1: The following is combined with... Figures 1 to 5 This embodiment describes a method for dynamically allocating agricultural machinery group work tasks, which includes the following steps:
[0054] Step S1: Construct a dynamic task allocation model for agricultural machinery fleet operations. The model includes a parameter system, decision variables, an objective function, and constraints. The parameter system includes a set of all nodes. Farmland work site collection Agricultural machinery collection points Directed arc set All agricultural machinery collection Batch set Dynamically arriving order point set and the set of path insertion segments ;
[0055] Step S2: Based on the dynamic allocation model of agricultural machinery group operation tasks, a multi-population co-evolutionary genetic algorithm is used to solve the problem and output the initial task allocation scheme and agricultural machinery coordination path.
[0056] Step S3: During the operation of agricultural machinery, receive dynamic orders in real time, and determine whether to insert the dynamic orders into the current operation route based on the improved saving algorithm, so as to update the task allocation scheme.
[0057] In step S1, the parameter system is as follows:
[0058] gather:
[0059] : The set of all nodes, including work points and agricultural machinery points.
[0060] Assembly point for farmland operations;
[0061] Agricultural machinery collection points;
[0062] : A set of directed arcs;
[0063] All agricultural machinery; ;
[0064] Batch aggregation: Each agricultural machine can perform multiple batches of departure-operation-return operations per day;
[0065] A dynamically arriving set of order points;
[0066] General parameters:
[0067] : Path insertion segments, each corresponding to a time window segment , , , , Insertable spaces within the five segments;
[0068] Agricultural machinery point Total number of available agricultural machines;
[0069] Daily maximum total working time per machine (hours), set to 10. ;
[0070] Maximum number of batches per machine;
[0071] Agricultural machinery Maximum workload per batch;
[0072] Work Point Travel time ( );
[0073] :arc Average speed ( );
[0074] Agricultural machinery exist Unit distance travel cost (yuan) );
[0075] Agricultural machinery At the work site Homework time ( );
[0076] Agricultural machinery Operating efficiency (per mu) );
[0077] Work Point Hard time window; For work points The earliest time allowed to start running. For work points The latest time allowed to start running;
[0078] Single-point workload.
[0079] Decision variables:
[0080] Agricultural machinery Enable batch processing? 0 indicates not started, 1 indicates started; ;
[0081] If batch agricultural machinery via arc The value is 1 if it is 1, otherwise it is 0.
[0082] If batch agricultural machinery Service points The value is 1 if it is 1, otherwise it is 0.
[0083] Agricultural machinery batch Departure time from the agricultural machinery station;
[0084] Agricultural machinery batches Arrive at the work site And the start time of the assignment;
[0085] If agricultural machinery ,batch In the section Insert work points The value is 1 if it is 1, otherwise it is 0.
[0086] If agricultural machinery ,batch In the section Middle If the vehicle is in motion, the value is 1; otherwise, it is 0.
[0087] In step S1, the construction of the dynamic allocation model includes the following two models:
[0088] The first-stage model is used for initial route planning of known fixed orders before the start of the workday. Its objective function is to minimize the total travel cost of all agricultural machinery across all batches. Constraints include:
[0089] Batch activation and resource limit constraints are used to ensure that each agricultural machine is allocated and activated with at least one work batch, while the total number of departure batches dispatched from any agricultural machine station does not exceed the total number of agricultural machines currently available at that station.
[0090] The flow balance constraint is used to ensure that each farm operation point is served by one and only one batch of agricultural machinery, and that the operation path of each batch of each agricultural machinery must form a closed loop, that is, starting from a certain farm station and returning to the same station after completing the operation;
[0091] The unique service constraint at each work site is used to ensure that each farmland work site is served by one and only one batch of agricultural machinery, without duplication or omission.
[0092] Hard time windows and path-ensuring constraints are used to ensure that the movement and service time of agricultural machinery between work points meet the hard time window requirements specified by each work point, and to ensure the continuity of the path in time sequence.
[0093] Total working hours constraint is used to limit the sum of the cumulative driving time and working time of each agricultural machine in all batches to not exceed the daily set limit for the total working time of a single machine.
[0094] The second-stage model is used to make insertion decisions for newly arriving dynamic orders during the operation. Its objective function is to maximize the number of dynamic orders successfully inserted by all agricultural machines in all batches. Constraints include:
[0095] Traffic balancing constraint: Insert time period for each path And each batch of agricultural machinery After inserting dynamic orders, the agricultural machinery travel path must still maintain network flow balance, that is, the number of paths entering any node is consistent with the number of paths leaving that node, thereby ensuring the continuity and feasibility of the path.
[0096] Soft time window constraint: After inserting a dynamic order, the time when the agricultural machinery arrives at the end of the inserted segment must not be later than the latest service time allowed for that end point;
[0097] Avoid duplicate insertion constraint: The same dynamic order point can only be inserted into a batch of one agricultural machine at most once to prevent the order from being repeatedly assigned and served;
[0098] Comprehensive constraints on capacity and working hours: The insertion of dynamic orders must simultaneously meet the following conditions: the total workload of the batch does not exceed the single batch capacity of the agricultural machinery, the total working hours of the agricultural machinery throughout the day do not exceed the upper limit, and the insertion operation is carried out in the preset path insertion segment.
[0099] In step S2, the multi-population co-evolutionary genetic algorithm includes the following process:
[0100] S21. Encoding: Chromosomes are constructed using integer encoding, where genes represent work points or agricultural machinery points;
[0101] S22. Initialization: Multiple initial subpopulations are obtained using a random generation method;
[0102] S23. Decoding: Based on the chromosome gene sequence, the operation priority is determined by calculating the distance between the operation point and the agricultural machinery point. The operation point is then assigned to the agricultural machinery point according to this priority, generating a specific operation path sequence for the agricultural machinery. priority The smaller the value, the higher the priority.
[0103] S24. Genetic operations: Within each subpopulation, selection based on roulette wheel selection, crossover based on sequence crossover, and mutation based on exchange are performed sequentially to generate new individuals.
[0104] S25. Cooperative Strategy: Periodically select the individuals with the best fitness from each subpopulation as representative individuals, combine these representative individuals into a complete solution and evaluate it, and feed the obtained fitness back to each subpopulation to guide its subsequent evolutionary direction.
[0105] In step S3, the process of making a judgment based on the improved saving algorithm includes: calculating the saving value that can be generated by inserting the dynamic order into different positions of the existing path, and determining the priority order of attempting to insert according to the size of the saving value.
[0106] The savings value is a time saving value. Calculate using the following formula:
[0107] ,
[0108] In the formula, Used to characterize the work point Insert work point The time saved on the subsequent route;
[0109] Indicates work point and work points The travel time between them is set. ;
[0110] Indicates agricultural machinery point and work points Travel time between;
[0111] Indicates agricultural machinery point and work points Travel time between.
[0112] In step S3, after determining the priority order of insertion based on the size of the saving value, the feasibility of the candidate insertion positions needs to be verified in sequence. The feasibility verification includes: determining whether the operation capacity constraint, total working time constraint and soft time window constraint of the batch of agricultural machinery are met after insertion.
[0113] In step S3, the system update task allocation scheme includes: updating the operation path sequence of the affected agricultural machinery, recalculating the estimated time of each node on the path, and synchronously updating the workload and the consumed working time of the relevant agricultural machinery.
[0114] Following step S3, the process also includes a farm machinery selection step: for each work route in the updated task allocation scheme, the unit work power consumption of different models of farm machinery executing that route is calculated. The route is then assigned to the agricultural machinery model with the lowest power consumption per unit of operation; among them, , The total workload for route r; This indicates the power output per unit time of this agricultural machinery model.
[0115] The present invention will be specifically illustrated below with specific examples.
[0116] I. Scene and Parameter Settings
[0117] Suppose a certain agricultural machinery cooperative owns 2 agricultural machinery outlets ( ), 5 agricultural machines available for dispatch ( Its model and parameters are shown in Table 1:
[0118] Table 1
[0119]
[0120] There are 10 fixed work points ( Its workload, time window, and arrival at agricultural machinery depots The travel time is shown in Table 2 (for simplicity, it is assumed that the travel speed of all agricultural machinery is constant, so the travel time is independent of the model of agricultural machinery):
[0121] Table 2
[0122]
[0123] System general parameters:
[0124] Daily single-machine total working time limit Hour.
[0125] Maximum number of batches per machine =2.
[0126] Path Insert Time Period Set Corresponding time window: , , , , .
[0127] Total amount of agricultural machinery available at agricultural machinery depots: Agricultural machinery depots Total number of available agricultural machines Agricultural machinery point Total number of available agricultural machines .
[0128] II. Construction of Dynamic Scheduling Model
[0129] 1. Set up sets, general parameters, and decision variables.
[0130] 2. First stage: Initial static programming
[0131] Objective function: Minimize total driving cost .
[0132]
[0133] In the formula, For arc driving distance ( )
[0134] The constraints include:
[0135] (1) Batch activation and resource limit constraints:
[0136]
[0137]
[0138]
[0139] In the formula, Indicates if agricultural machinery In batch The route from the farm machinery station Drive directly to the work site (As the departure arc for this batch), take 1; otherwise take 0.
[0140] This constraint defines the batch activation and resource limit, ensuring that each agricultural machine is activated in at least one batch, and that the total number of trips departing from each agricultural machine point does not exceed the available quantity.
[0141] (2) Flow balance constraint:
[0142]
[0143]
[0144] In the formula, For agricultural machinery In batch From the work point on the route Return directly to the agricultural machinery station (As the return arc for this batch), take 1; otherwise, take 0. For agricultural machinery In batch Visiting work points continuously along the route Then, the work site was visited. ( If the result is 1, then take 1; otherwise, take 0.
[0145] This constraint establishes flow balance (independent return within a batch), ensuring that each batch independently departs from and returns to the same agricultural machinery point, and that the inbound and outbound degrees are balanced for each service point.
[0146] (3) Unique service constraint at the work point:
[0147]
[0148] This constraint ensures that each work site provides unique service, and each farmland is served exactly once.
[0149] (4) Hard time window and path ensure connection constraints:
[0150]
[0151]
[0152] In the formula, For a very large number, take 1,000,000. For agricultural machinery batches Arrive at the work site And the start time of the assignment.
[0153] This constraint ensures the connection between the time window and the path. The time window for agricultural machinery to travel from the current work point to the next work point should meet the following conditions: the agricultural machinery arrives at the work point. Time + at the work site Working hours + from the work point The total time should belong to the work point The time window, i.e., the work point The earliest allowed start time and planned finish time are specified; otherwise, this constraint is invalid. Ensure that operations within a hard window are sequentially connected if a path is selected; M is sufficiently large.
[0154] (5) Total working hours constraint:
[0155]
[0156]
[0157]
[0158] In the formula, For several batches agricultural machinery Directly move the arc If it is 1, then it is 1; otherwise, it is 0.
[0159] In this constraint, the first two constraints ensure that batches are connected on time and the total daily duration does not exceed the limit; the last constraint prohibits unloaded empty running between different agricultural machinery points.
[0160] 3. Second stage: Dynamic order insertion
[0161] When agricultural machinery leaves its designated work point for field operations, newly received orders are treated as optional tasks. The objective function for the current stage is to maximize the area served by serving the farmers who receive the most services. When the initial time window and operational constraints are met, the new order is inserted into the machinery's current route. During this process, the time window for new orders is used as a soft time window. If the work area requirements of the current route are met, the new order is inserted; otherwise, it is rejected and reserved for planning on the next workday. Let A→B→C→D→E represent the operational sequence of the first work point in each time period of the day.
[0162] During the time period This phase is triggered when a new dynamic order is received.
[0163] Objective function: Maximize the number of dynamically inserted orders. :
[0164]
[0165] The constraints include:
[0166] (1) Flow balance constraint:
[0167]
[0168]
[0169] Let agricultural machinery be the decision variable. batch In the section Middle section starting point With candidate dynamic order points Connected (i.e. using arcs) (As the first arc after insertion), take 1, otherwise 0.
[0170] Let agricultural machinery be the decision variable. batch In the section Middle of the candidate dynamic order points End of segment Connected (i.e. using arcs) (As the last arc after insertion), take 1, otherwise 0.
[0171] This constraint applies to each segment. and each batch ,in They are respectively segments The starting and ending nodes (such as the starting point A and ending point B of segment AB).
[0172] (2) Soft time window constraint:
[0173]
[0174] This is the upper bound of the segment's end time (the upper bound of the soft time window). It indicates the time at which the segment is completed. After insertion and service, the segment reaches its endpoint. The latest permitted time.
[0175] After insertion, the time to reach the end of the segment must not be later than its latest time. .
[0176] (3) Avoid duplicate insertion constraints:
[0177]
[0178] This constraint prevents duplicate insertions; the same dynamic order can be inserted at most once.
[0179] (4) Combined constraints of capacity and working hours:
[0180]
[0181]
[0182] This constraint updates capacity and total working hours. After inserting an order, the capacity and total working hours constraints for that batch must still be met. Similar to the first phase, the constraints are only accumulated for the corresponding batch: for each agricultural machine in each batch, whether it is an original planned order or a newly inserted dynamic order, its cumulative workload cannot exceed the maximum carrying capacity of the agricultural machine in a single trip; the sum of the travel time and working time of all batches must not exceed the prescribed total daily working hours T to ensure that the agricultural machine schedule is reasonable and does not overload.
[0183] III. Algorithm Solution Steps
[0184] S21. Encoding: Chromosomes are constructed using integer encoding, where genes represent work points or agricultural machinery points;
[0185] The multi-population co-evolutionary genetic algorithm is encoded as an integer, where For agricultural work sites, For agricultural machinery points.
[0186] Encoding example, where chromosomes are integer sequences, for example ,in 11 and 12 represent work sites, while 11 and 12 represent agricultural machinery sites. .
[0187] S22. Initialization: Multiple initial subpopulations are obtained using a random generation method;
[0188] Example: Randomly generate 4 subpopulations, each containing 50 chromosomes.
[0189] S23. Decoding: Based on the chromosome gene sequence, the operation priority is determined by calculating the distance between the operation point and the agricultural machinery point. The operation point is then assigned to the agricultural machinery point according to this priority, generating a specific operation path sequence for the agricultural machinery. priority The smaller the value, the higher the priority.
[0190] like Figure 1 As shown, the operation sequence of the agricultural machinery is obtained after decoding. .
[0191] S24. Genetic operations: Within each subpopulation, selection based on roulette wheel selection, crossover based on sequence crossover, and mutation based on exchange are performed sequentially to generate new individuals.
[0192] The selection operation uses the roulette wheel selection operator, which randomly selects and retains individuals with the best fitness values. The crossover operation uses a sequential crossover method, such as... Figure 2 As shown.
[0193] The steps for sequence crossover are as follows.
[0194] Step 24-1: Select two chromosomes from the current population, parent 1 and parent 2, and randomly select two loci. , As the intersection point, it satisfies ;
[0195] Step 24-2: Locate the position in chromosome parent1 and The work point information between the parents is directly copied to the new offspring; Step 3: From the parent chromosome 2 position traversal to The first step involves copying the activity point information from parental chromosome 2 to offspring that do not yet appear; the fourth step involves exchanging the functions of the two chromosomes to produce another offspring chromosome. Mutation operations using exchange can only occur along the same pathway, as described in the following process... Figure 3 As shown. The steps of the mutation operation are as follows. Step 1: Generate a random route. and .if The value is less than the current mutation probability. If the mutation is successful, then proceed to step 24-3; otherwise, do not perform the mutation operation.
[0196] Step 24-3: Set the chromosome length to Generate random routes These represent two mutation sites on the same chromosome, and the genes at these two sites are swapped.
[0197] Between steps 24 and 25, a mutation probability determination is made to determine whether to eliminate individuals. These individuals are combined with representative individuals from other populations in some way. Whether they will be eliminated in evolution depends on the performance of the individual combination in solving the objective problem. This shows that selecting cooperative representative individuals is a key aspect of information interaction among populations. This paper uses the inverse of the objective function as the fitness value of an individual and employs a greedy strategy to select the individual with the highest fitness value in the subpopulation as the representative individual to cooperate with other groups.
[0198] S25. Cooperative Strategy: Periodically select the individuals with the best fitness from each subpopulation as representative individuals, combine these representative individuals into a complete solution and evaluate it, and feed the obtained fitness back to each subpopulation to guide its subsequent evolutionary direction.
[0199] The current allocation of rural land ownership determines that the operating area of unit orders is relatively small. When the number of orders generated during the operating season reaches its peak, the scheduling system will inevitably reach a highly dynamic stage. Since the decision-making time is limited within two consecutive cycles, adopting a real-time insertion strategy will save more scheduling time and computational costs, and is less likely to cause confusion in travel routes during the path transfer of agricultural machinery. Therefore, whenever a new request is received, the algorithm should attempt to find a feasible location to insert the new order without rearranging the operational tasks already in the solution. Whether a new order is received depends on the limitation of the remaining operating capacity of the agricultural machinery, as well as the operating costs and various events that occur during the travel and operation of the agricultural machinery, such as weather factors leading to extended operating time or poor road conditions leading to reduced travel speed, and the arrival of new orders. Facing real-time dynamic information, how to react quickly and implement corresponding strategies is a key issue to improve operational efficiency. At the end of the period, orders that need to be executed during the period are received, and the order receiving and decision-making planning sequence is as follows: Figure 4 As shown in Table 1, by managing a plan set to respond to dynamic events in real time, some high-quality solutions are preserved for the feasible solutions obtained by the algorithm. The structure of the plan set is shown in Table 1. Assumptions To determine the optimal solution in the current planning set, all path options in the planning set are feasible before the agricultural machinery begins work. These options are ordered in descending order of total workload. After completing a task at each work point, the agricultural machinery checks the feasibility of the remaining routes before moving to the next work point. Thus, the planning set is updated after the agricultural machinery completes each work task.
[0200] Furthermore, the following steps are also included:
[0201] S26. Decoding and Evaluation
[0202] Encoding: Calculate the work point for each chromosome gene sequence. priority Prioritize high-priority ( Small-scale (small) work sites are assigned to the nearest capable agricultural machinery, forming a system such as " The path of "".
[0203] Evaluation: Calculate the total driving cost (Phase 1) and the number of dynamic orders successfully inserted (Phase 2) for the corresponding chromosome scheme, and calculate the overall fitness.
[0204] S27. Dynamic Insertion Processing (Improved Saving Algorithm)
[0205] Different models of agricultural machinery have varying operating costs and power consumption, and they can handle different workloads. To maximize the utilization of existing agricultural machinery resources, an improved cost-saving algorithm is used to determine the travel route and the model of agricultural machinery.
[0206] (1) Calculate the savings:
[0207] (2) Sorting and Trial: Sort all Sort in descending order. Starting from the position with the largest savings, try to allocate the work points... Insert work point back.
[0208] (3) Feasibility verification: Check whether the following conditions are met after insertion:
[0209] Soft time window (to meet as much as possible) ), capacity constraints, and total working hours (updated total working hours ≤ T).
[0210] If the conditions are met, the insertion of a new order can be accepted; otherwise, it will be rejected.
[0211] Indicates agricultural machinery Visit the work point Time, Indicates agricultural machinery At the work site runtime Indicates agricultural machinery From the work site To the work site Travel time, Indicates work point The latest time allowed to start running.
[0212] (4) Perform insertion: The first position that passes the verification is adopted, and the path and planning set are updated.
[0213] S28, Agricultural Machinery Model Allocation
[0214] For each route that was finally determined :
[0215] Calculate the unit operating power consumption for each optional agricultural machine k:
[0216] Since different machine models can handle different workloads, the lower the power required for agricultural machinery to complete a unit of work, the more economical the scheduling scheme. Therefore, calculations were performed on different combinations of agricultural machinery routes, including the minimum... The path with the most occurrences is the optimal solution. Choose the path that... The smallest agricultural machinery To execute the route .
[0217] IV. Results of the Implementation Example
[0218] Through the above implementation methods, the system generated two batches of work paths for five agricultural machines after initialization. During simulation, when three dynamic orders were received, two were successfully inserted based on the improved cost-saving algorithm, increasing the order acceptance rate by approximately 66%. Ultimately, through the economical agricultural machine allocation strategy, the total energy consumption of the selected scheme was reduced by approximately 15% compared to the simple nearest-neighbor allocation strategy, verifying the significant effect of the method of this invention in improving operational efficiency and reducing operating costs.
[0219] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A method for dynamically allocating agricultural machinery group operation tasks, characterized in that, Includes the following steps: Step S1: Construct a dynamic allocation model for agricultural machinery group operation tasks. The model includes a parameter system, decision variables, objective function, and constraints. The parameter system includes a set of all nodes, a set of farmland operation points, a set of agricultural machinery points, a set of directed arcs, a set of all agricultural machinery, a batch set, a set of dynamically arriving order points, and a set of path insertion segments. Step S2: Based on the dynamic allocation model of agricultural machinery group operation tasks, a multi-population co-evolutionary genetic algorithm is used to solve the problem and output the initial task allocation scheme and agricultural machinery coordination path. Step S3: During the operation of agricultural machinery, receive dynamic orders in real time, and determine whether to insert the dynamic orders into the current operation route based on the improved saving algorithm, so as to update the task allocation scheme.
2. The method for dynamically allocating agricultural machinery group operation tasks according to claim 1, characterized in that, In step S1, the construction of the dynamic allocation model includes the following two models: The first-stage model is used to perform initial route planning for known fixed orders before the start of the workday. Its objective function is to minimize the total travel cost of all agricultural machinery in all batches. The second-stage model is used to make insertion decisions for newly arriving dynamic orders during the operation. Its objective function is to maximize the number of dynamic orders successfully inserted by all agricultural machines in all batches.
3. The method for dynamically allocating agricultural machinery group operation tasks according to claim 2, characterized in that, The constraints of the first-stage model include: Batch activation and resource limit constraints are used to ensure that each agricultural machine is allocated and activated with at least one work batch, while the total number of departure batches dispatched from any agricultural machine station does not exceed the total number of agricultural machines currently available at that station. The flow balance constraint is used to ensure that each farm operation point is served by one and only one batch of agricultural machinery, and that the operation path of each batch of each agricultural machinery must form a closed loop, that is, starting from a certain farm station and returning to the same station after completing the operation; The unique service constraint at each work site is used to ensure that each farmland work site is served by one and only one batch of agricultural machinery, without duplication or omission. Hard time windows and path-ensuring constraints are used to ensure that the movement and service time of agricultural machinery between work points meet the hard time window requirements specified by each work point, and to ensure the continuity of the path in time sequence. Total working hours constraint is used to limit the sum of the cumulative driving time and working time of each agricultural machine in all batches to not exceed the daily set limit for the total working time of a single machine.
4. The method for dynamically allocating agricultural machinery group operation tasks according to claim 2, characterized in that, The constraints of the second-stage model include: Traffic balancing constraint: Insert time period for each path For each batch b of agricultural machinery, after inserting a dynamic order, the agricultural machinery's travel path must still maintain network flow balance, that is, the number of paths entering any node is consistent with the number of paths leaving that node, thereby ensuring the continuity and feasibility of the path. Soft time window constraint: After inserting a dynamic order, the time when the agricultural machinery arrives at the end of the inserted segment must not be later than the latest service time allowed for that end point; Avoid duplicate insertion constraint: The same dynamic order point can only be inserted into a batch of one agricultural machine at most once to prevent the order from being repeatedly assigned and served; Comprehensive constraints on capacity and working hours: The insertion of dynamic orders must simultaneously meet the following conditions: the total workload of the batch does not exceed the single batch capacity of the agricultural machinery, the total working hours of the agricultural machinery throughout the day do not exceed the upper limit, and the insertion operation is carried out in the preset path insertion segment.
5. The method for dynamically allocating agricultural machinery group operation tasks according to claim 1, characterized in that, In step S2, the multi-population co-evolutionary genetic algorithm includes the following process: S21. Encoding: Chromosomes are constructed using integer encoding, where genes represent work points or agricultural machinery points; S22. Initialization: Multiple initial subpopulations are obtained using a random generation method; S23. Decoding: Based on the chromosome gene sequence, the operation priority is determined by calculating the distance between the operation point and the agricultural machinery point. The operation point is then assigned to the agricultural machinery point according to this priority, generating a specific operation path sequence for the agricultural machinery. priority The smaller the value, the higher the priority. S24. Genetic operations: Within each subpopulation, selection based on roulette wheel selection, crossover based on sequence crossover, and mutation based on exchange are performed sequentially to generate new individuals. S25. Cooperative Strategy: Periodically select the individuals with the best fitness from each subpopulation as representative individuals, combine these representative individuals into a complete solution and evaluate it, and feed the obtained fitness back to each subpopulation to guide its subsequent evolutionary direction.
6. The method for dynamically allocating agricultural machinery group operation tasks according to claim 1, characterized in that, In step S3, the process of making a judgment based on the improved saving algorithm includes: calculating the saving value that can be generated by inserting the dynamic order into different positions of the existing path, and determining the priority order of attempting to insert according to the size of the saving value.
7. The method for dynamically allocating agricultural machinery group operation tasks according to claim 6, characterized in that, The savings value is a time saving value. Calculate using the following formula: , In the formula, Used to characterize the work point Insert work point The time saved on the subsequent route; Indicates work point and work points The travel time between them is set. ; Indicates agricultural machinery point and work points Travel time between; Indicates agricultural machinery point and work points Travel time between.
8. The method for dynamically allocating agricultural machinery group operation tasks according to claim 6, characterized in that, In step S3, after determining the priority order of insertion based on the size of the saving value, the feasibility of the candidate insertion positions needs to be verified in sequence. The feasibility verification includes: determining whether the operation capacity constraint, total working time constraint and soft time window constraint of the batch of agricultural machinery are met after insertion.
9. The method for dynamically allocating agricultural machinery group operation tasks according to claim 1, characterized in that, In step S3, the system update task allocation scheme includes: updating the operation path sequence of the affected agricultural machinery, recalculating the estimated time of each node on the path, and synchronously updating the workload and the consumed working time of the relevant agricultural machinery.
10. The method for dynamically allocating agricultural machinery group operation tasks according to claim 1, characterized in that, Following step S3, the process also includes a farm machinery selection step: for each work route in the updated task allocation scheme, the unit work power consumption of different models of farm machinery executing that route is calculated. The route is then assigned to the agricultural machinery model with the lowest power consumption per unit of operation; among them, , The total workload for route r; This indicates the power output per unit time of this agricultural machinery model.
Citation Information
Cited By
Tower crane cluster task scheduling method based on multi-target genetic algorithm and storage medium
CN122155236A