Electric agricultural machine operation scheduling method
By constructing an electric agricultural machinery operation scheduling model and using the firefly algorithm to solve it, the problem of power limitation of electric agricultural machinery in continuous operation in multiple fields was solved. It achieved optimized path planning with high power utilization and low scheduling cost, thus improving the reliability and economy of electric agricultural machinery operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEAST AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-01-04
- Publication Date
- 2026-04-17
AI Technical Summary
Existing electric agricultural machinery scheduling methods have failed to effectively solve the problems of scheduling difficulties, high operating costs, low power utilization and unreasonable path planning caused by power limitations. Especially in the scenario of continuous operation in multiple fields, the nonlinear discharge characteristics of batteries and charging strategies are out of sync with path planning, resulting in high actual energy consumption, frequent charging and non-optimal path.
An electric agricultural machinery operation scheduling model is constructed and solved using the Firefly algorithm. Combining nonlinear power modeling and multi-objective optimization, the optimal operation path and scheduling scheme are generated through path constraints, power constraints, and cost constraints to ensure maximum power utilization and minimum total scheduling cost.
It improves the feasibility and energy efficiency of electric agricultural machinery operations, balances economy and reliability, avoids the risks of operation interruption and power depletion, and achieves efficient scheduling under complex constraints.
Smart Images

Figure CN121882402A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for scheduling electric agricultural machinery operations, belonging to the field of smart agriculture and automated scheduling of agricultural machinery. Background Technology
[0002] With the acceleration of global agricultural modernization, the electrification of agricultural machinery has become a key trend in the development of smart and green agriculture. Electric agricultural machinery, with its advantages of low noise, zero emissions, low operating and maintenance costs, and high energy efficiency, is gradually replacing traditional fuel-powered agricultural machinery and becoming the main equipment for large-scale farmland operations.
[0003] However, the large-scale application of electric agricultural machinery still faces a series of severe challenges, with the core bottlenecks being limited battery range and dynamic energy consumption management. In typical farmland operation scenarios, agricultural machinery needs to continuously perform tasks such as tilling, sowing, fertilizing, and harvesting across multiple spatially dispersed fields. The operation paths are complex and often involve long-distance empty travel. Most existing agricultural machinery scheduling methods still follow the scheduling logic of traditional fuel vehicles, or simplify electric agricultural machinery into an ideal model of "fixed range and constant energy consumption," failing to fully consider its unique dynamic energy characteristics and operational constraints. This leads to the following prominent problems in practical applications:
[0004] 1. Oversimplified energy consumption modeling leads to unrealistic scheduling schemes: Most existing scheduling models assume that the energy consumption per unit distance of agricultural machinery is constant, or only linearly related to the load. However, the battery system of electric agricultural machinery exhibits significant nonlinear discharge characteristics. Studies show that when the battery charge is low, its internal resistance increases, leading to higher actual energy consumption for the same power output and lower operational efficiency. If this characteristic of "higher energy consumption with lower charge" is ignored, the scheduling scheme will underestimate actual energy consumption, resulting in a passive situation where the battery runs out midway through operation and the task is interrupted.
[0005] 2. Disconnect between charging strategy and route planning, resulting in high scheduling costs: Existing research often treats charging decisions simply as charging at fixed intervals or when the battery level is below a threshold, failing to integrate and optimize charging timing, charging amount decisions, and global route planning. This easily leads to problems such as unnecessary frequent re-charging trips and inappropriate charging timing (such as charging during peak electricity prices), which not only increases empty driving distance and time costs but also directly drives up energy costs and equipment wear and tear.
[0006] 3. Single optimization objective makes it difficult to balance economy and energy efficiency: Traditional scheduling methods typically use the shortest total operating time or the shortest total travel distance as the sole optimization objective. For electric agricultural machinery, this may lead to sacrificing the rationality of power usage in pursuit of the shortest path, forcing the machinery to operate with low battery levels or travel long distances. Single-objective optimization cannot achieve a balance between operating costs (including travel costs, operating costs, and charging costs) and system energy efficiency (power utilization rate and effective operating power).
[0007] 4. Insufficient ability of model solution methods to handle complex constraints: The electric agricultural machinery scheduling problem is a strongly constrained, multi-objective, nonlinear NP-hard combinatorial optimization problem. Exact algorithms (such as branch and bound methods) face "combinatorial explosion" when the problem size is slightly larger, making it difficult to find a feasible solution in real time. Some early simple heuristic algorithms (such as nearest neighbor and energy-saving algorithms) often get stuck in local optima when dealing with complex constraints such as power constraints, nonlinear energy consumption, and multi-machine cooperation, resulting in poor solution quality and robustness.
[0008] In recent years, although some research has begun to focus on the Electric Vehicle Routing Problem (EVRP) and its application in logistics and distribution, agricultural operations have unique characteristics: the "service time" of the work site (field) is highly correlated with and variable in terms of energy consumption; the working environment (such as terrain and soil resistance) has a significant impact on energy consumption; and operational safety requires agricultural machinery to return to a fixed garage or charging station before its battery is depleted. Directly applying the EVRP model from urban logistics to agricultural machinery scheduling still suffers from insufficient adaptability.
[0009] Therefore, there is an urgent need for an intelligent scheduling method specifically designed for electric agricultural machinery operation scenarios. This method aims to fundamentally improve the economy, reliability, and energy sustainability of electric agricultural machinery operation systems by integrating nonlinear power modeling, multi-objective optimization, and improved metaheuristic algorithms. Summary of the Invention
[0010] The purpose of this invention is to solve the problems of scheduling difficulties, high operating costs, low power utilization and unreasonable path planning caused by power limitations in the continuous operation of electric agricultural machinery in multiple fields, and to provide a scheduling method for electric agricultural machinery operations.
[0011] The present invention provides a method for scheduling electric agricultural machinery operations, comprising:
[0012] Step 1: Construct an electric agricultural machinery operation scheduling model. The model includes an objective function and constraints. The objective function is to minimize the total scheduling cost and maximize the power utilization rate. The constraints include path constraints, power constraints, task allocation constraints, and cost constraints.
[0013] Step 2: Solve the scheduling model based on the firefly algorithm to obtain the optimal operation path and scheduling scheme for electric agricultural machinery;
[0014] Step 3: Output the optimal path and the corresponding objective function value.
[0015] Preferably, the objective function in step 1 is specifically:
[0016] ;
[0017] in, This represents the value of the comprehensive objective function. Indicates the total scheduling cost. The weighting coefficient represents the total scheduling cost. This represents the total electricity consumed by all agricultural machinery during its movement. Weighting coefficients representing mobile energy consumption;
[0018] The objective function for minimizing the total scheduling cost is:
[0019] ;
[0020] in, This represents the agricultural machinery serial number, which belongs to a set. This indicates all available agricultural machinery; This represents the set of farmland plots, i.e., the set of work points; This represents a plot of land, and also a node representing a work point; Indicates agricultural machinery unit distance travel cost Indicates from node To the node distance, Indicates agricultural machinery From node Drive to the node , Indicates the plot of land The unit cost coefficient for performing the operation. This represents the unit charging cost coefficient. Indicates agricultural machinery The electricity replenished when returning to the garage during operation;
[0021] The objective function for maximizing power utilization is represented by minimizing the total power consumed by the agricultural machinery during its movement. This is equivalent to maximizing the effective amount of electricity available for operation, i.e., power utilization rate, specifically:
[0022] ;
[0023] Indicates agricultural machinery from node To the node The amount of electricity consumed.
[0024] Preferably, the constraints in step 1 include:
[0025] Path constraints include: the number of farm machines starting from the garage does not exceed the maximum available number, each farm machine must return to the garage after operation, the number of farm machines flowing in and out of each field is equal, and the movement path of farm machines is determined according to the principle of minimum energy consumption.
[0026] Power constraints include: dynamic update constraints on the remaining power of agricultural machinery, the power level upon arrival at the field must be greater than its operational requirements, the remaining power of agricultural machinery must be non-negative and not exceed the rated capacity, the initial power level of agricultural machinery must be fully charged, agricultural machinery must have sufficient power to return to the garage, and the total energy consumption of agricultural machinery must not exceed the rated power level; the power constraints further consider the non-linear relationship between power consumption and remaining power.
[0027] Task assignment constraints include that each field must be served exactly once;
[0028] Cost constraint: This is reflected in the optimization of the total scheduling cost in the objective function, which includes mobility cost, operation cost, and charging cost.
[0029] Preferably, the constraint conditions are as follows:
[0030] The path constraints are as follows:
[0031] The constraint that the number of agricultural machines departing from the garage does not exceed the maximum available number is as follows:
[0032] ;
[0033] in, This indicates the maximum number of agricultural machines that can be used for operations in the garage; This represents the garage node, which represents the starting and returning points of the agricultural machinery. It is a binary decision variable, representing agricultural machinery. From node Drive to the node ;
[0034] The specific constraint that each agricultural machine must return to the garage after operation is as follows:
[0035] ;
[0036] in, Indicates agricultural machinery From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. Whether it is dispatched or used, if This indicates agricultural machinery. Start from the garage and eventually return to the garage; if This indicates agricultural machinery. Not yet shipped;
[0037] The constraint that the number of agricultural machines flowing into and out of each field is equal is specifically as follows:
[0038]
[0039] in, It is a binary decision variable, representing agricultural machinery. Whether or not the farmland plots Perform the task;
[0040] The specific constraints on the movement path of the agricultural machinery, determined according to the principle of minimum energy consumption, are as follows:
[0041]
[0042] in, Indicates agricultural machinery in the field The amount of electricity consumed during operation. This indicates the rated total capacity of the battery in a single agricultural machine;
[0043] The specific power constraints are as follows:
[0044] The specific constraints for the dynamic update of the remaining power of the agricultural machinery are as follows:
[0045] ;
[0046] It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; Indicates agricultural machinery Is it a plot of farmland? Perform the task;
[0047] Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path into the node. ;when When that happens, there is no path into the node. ;
[0048] Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path leaving the node. ;when At that time, there is no path leaving the node. ;
[0049] The specific constraint that the electricity required upon arrival at the field must be greater than its operational needs is as follows:
[0050]
[0051]
[0052] in, Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery in the field The amount of electricity consumed during operation. Indicates agricultural machinery Whether or not the farmland plots Perform the task;
[0053] The specific constraints that the remaining power is non-negative and does not exceed the rated capacity are as follows:
[0054]
[0055] The specific constraint that the agricultural machinery must initially be fully charged is as follows:
[0056]
[0057] in, Indicates agricultural machinery At the node Remaining battery power at the start;
[0058] The specific constraint that the agricultural machinery must have sufficient power to return to the garage is as follows:
[0059]
[0060] in, Indicates agricultural machinery from the field plot The amount of electricity consumed to drive back to the garage;
[0061] The constraint that the total energy consumption of agricultural machinery shall not exceed the rated power is specifically as follows:
[0062]
[0063]
[0064] in, Indicates agricultural machinery In the field Remaining battery power after completing the task;
[0065] The energy constraint further considers the nonlinear relationship between energy consumption and remaining energy, and the specific constraint conditions are as follows:
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072] in, Indicates agricultural machinery Completed field plots Remaining battery power after operation Indicates agricultural machinery Arrival at the field plot Battery level before operation Indicates agricultural machinery In the field Actual power consumption during operation In mathematical modeling, large numbers are commonly used. constant, Indicates segmented selection variables, Indicates the number of battery level segments. Indicates the battery threshold. This indicates the power consumption amplification factor for the power range. , This represents the baseline operating power consumption rate per unit area. Indicates a plot of farmland The working area; the task allocation constraints are specifically:
[0073] The constraint that each field must be served exactly once is as follows:
[0074] .
[0075] Preferably, the specific method for solving the scheduling model based on the firefly algorithm in step 2 includes:
[0076] S2-1. Generate a candidate scheduling scheme population: Generate an initial population consisting of multiple fireflies, where the position of each firefly corresponds to a complete agricultural machinery operation scheduling candidate scheme through encoding;
[0077] S2-2, Calculate fitness and decode evaluation: For each firefly in the population, its position is encoded and decoded into a specific scheduling scheme, and the comprehensive objective function corresponding to the scheme is calculated as the fitness.
[0078] S2-3. Update firefly positions: Based on the relative brightness and attraction between fireflies, update the position codes of fireflies with lower brightness so that they can learn from the better scheduling scheme represented by fireflies with higher brightness.
[0079] S2-4, Iterative Optimization and Output: Repeat S2-2 and S2-3 until the preset iteration termination condition is met; finally, output the decoding scheme corresponding to the firefly with the best fitness in the population, as the optimal scheduling scheme for electric agricultural machinery.
[0080] Preferably, before generating the initial population, S2-1 also includes initializing the control parameters of the firefly algorithm, specifically: firefly population size, maximum attraction, light intensity absorption coefficient, step size factor, and maximum number of iterations.
[0081] The firefly population size is set to a range of 20-100;
[0082] The maximum attraction value is set to a range of 0.8-1.5;
[0083] The light intensity absorption coefficient is set to a range of 0.1-1.0;
[0084] Set the step size factor to a range of 0.1-0.5;
[0085] The maximum number of iterations is set to a range of 300-500.
[0086] Preferably, in S2-1, the encoding maps the agricultural machinery operation scheduling scheme into a data structure that the algorithm can process. The data structure includes a multi-layer sequence of task allocation, operation path sequence, and charging decision information.
[0087] The task allocation layer consists of an arrangement sequence containing the numbers of all fields to be assigned tasks;
[0088] The operation path sequence layer, associated with the task allocation layer, is used to allocate the field subsequence in the arrangement sequence to different agricultural machines, thereby determining the specific operation path sequence for each agricultural machine.
[0089] The charging decision information layer is used to embed charging decision flags in the sequence of the operation path. The charging decision flags indicate whether the agricultural machinery should return to the garage to charge after visiting a specific field, and are combined with the power status model to ensure the power feasibility of the path.
[0090] Preferably, in S2-2, the comprehensive objective function value is a weighted sum of the total scheduling cost and the total mobile energy consumption. Before calculating the fitness, it is verified whether the decoding scheme meets the power constraint and task allocation constraint, and a penalty is imposed on the scheme that does not meet the constraints.
[0091] Preferably, in S2-3, the update operation includes a structured adjustment of the task order, agricultural machinery allocation, or charging decisions in the encoding.
[0092] Preferably, in S2-4, the preset iteration termination condition includes at least one of the following:
[0093] Reaching the maximum number of iterations;
[0094] The improvement in the optimal fitness value over multiple consecutive iterations is less than a preset threshold.
[0095] The optimal scheduling scheme obtained by decoding remains unchanged in multiple consecutive iterations.
[0096] Advantages of this invention: The electric agricultural machinery operation scheduling method proposed in this invention differs from traditional linear assumptions. This invention meticulously introduces the nonlinear relationship between power consumption and remaining power (lower power consumption corresponds to higher unit energy consumption) into the scheduling model and uses piecewise constraints for description, making the model more consistent with the actual energy consumption patterns of electric agricultural machinery. This improves the feasibility and energy efficiency accuracy of the scheduling scheme in actual operation. Addressing the complex characteristics of this problem—multi-objective, multi-constraint, and nonlinear—this invention employs the firefly algorithm for solution. By encoding the scheduling scheme as firefly positions and mapping the total cost and power utilization targets to fitness, it achieves efficient search of the solution space, obtaining an approximate optimal solution that meets engineering requirements within a finite time, effectively balancing solution quality and computational efficiency. This invention constructs a complete constraint system covering path, power, task, and cost, particularly including key power constraints such as initial full charge, operational power requirements, safe return power, and total energy consumption upper limit. This eliminates risks such as operation interruption and power depletion at the model level, ensuring the reliability and safety of the output scheme in actual execution. Attached Figure Description
[0097] Figure 1This is a schematic diagram of the overall process of the electric agricultural machinery operation scheduling optimization method described in this invention;
[0098] Figure 2 This is a flowchart illustrating the specific steps of solving the scheduling model using the firefly algorithm employed in this invention. Detailed Implementation
[0099] 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.
[0100] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0101] 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.
[0102] Example 1:
[0103] The following is combined with Figure 1 and Figure 2 This embodiment describes a method for scheduling electric agricultural machinery operations, which includes:
[0104] Step 1: Construct an electric agricultural machinery operation scheduling model. The model includes an objective function and constraints. The objective function is to minimize the total scheduling cost and maximize the power utilization rate. The constraints include path constraints, power constraints, task allocation constraints, and cost constraints.
[0105] Step 2: Solve the scheduling model based on the firefly algorithm to obtain the optimal operation path and scheduling scheme for electric agricultural machinery;
[0106] Step 3: Output the optimal path and the corresponding objective function value.
[0107] Furthermore, the objective function described in step 1 is specifically:
[0108] ;
[0109] in, This represents the value of the comprehensive objective function. Indicates the total scheduling cost. The weighting coefficient represents the total scheduling cost. This represents the total electricity consumed by all agricultural machinery during its movement. Weighting coefficients representing mobile energy consumption;
[0110] The objective function for minimizing the total scheduling cost is:
[0111] ;
[0112] in, This represents the agricultural machinery serial number, which belongs to a set. This indicates all available agricultural machinery; This represents the set of farmland plots, i.e., the set of work points; This represents a plot of land, and also a node representing a work point; Indicates agricultural machinery unit distance travel cost Indicates from node To the node distance, Indicates agricultural machinery From node Drive to the node , Indicates the plot of land The unit cost coefficient for performing the operation. This represents the unit charging cost coefficient. Indicates agricultural machinery The electricity replenished when returning to the garage during operation;
[0113] The objective function for maximizing power utilization is represented by minimizing the total power consumed by the agricultural machinery during its movement. This is equivalent to maximizing the effective amount of electricity available for operation, i.e., power utilization rate, specifically:
[0114] ;
[0115] Indicates agricultural machinery from node To the node The amount of electricity consumed.
[0116] Furthermore, the constraints described in step 1 include:
[0117] Path constraints include: the number of farm machines starting from the garage does not exceed the maximum available number, each farm machine must return to the garage after operation, the number of farm machines flowing in and out of each field is equal, and the movement path of farm machines is determined according to the principle of minimum energy consumption.
[0118] Power constraints include: dynamic update constraints on the remaining power of agricultural machinery, the power level upon arrival at the field must be greater than its operational requirements, the remaining power of agricultural machinery must be non-negative and not exceed the rated capacity, the initial power level of agricultural machinery must be fully charged, agricultural machinery must have sufficient power to return to the garage, and the total energy consumption of agricultural machinery must not exceed the rated power level; the power constraints further consider the non-linear relationship between power consumption and remaining power.
[0119] Task assignment constraints include that each field must be served exactly once;
[0120] Cost constraint: This is reflected in the optimization of the total scheduling cost in the objective function, which includes mobility cost, operation cost, and charging cost.
[0121] Furthermore, the constraints are specifically as follows:
[0122] The path constraints are as follows:
[0123] The constraint that the number of agricultural machines departing from the garage does not exceed the maximum available number is as follows:
[0124] ;
[0125] in, This indicates the maximum number of agricultural machines that can be used for operations in the garage; This represents the garage node, which represents the starting and returning points of the agricultural machinery. It is a binary decision variable, representing agricultural machinery. From node Drive to the node ;
[0126] The specific constraint that each agricultural machine must return to the garage after operation is as follows:
[0127] ;
[0128] in, Indicates agricultural machinery From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. Whether it is dispatched or used, if This indicates agricultural machinery. Start from the garage and eventually return to the garage; if This indicates agricultural machinery. Not yet shipped;
[0129] The constraint that the number of agricultural machines flowing into and out of each field is equal is specifically as follows:
[0130]
[0131] in, It is a binary decision variable, representing agricultural machinery. Whether or not the farmland plots Perform the task;
[0132] The specific constraints on the movement path of the agricultural machinery, determined according to the principle of minimum energy consumption, are as follows:
[0133]
[0134] in, Indicates agricultural machinery in the field The amount of electricity consumed during operation. This indicates the rated total capacity of the battery in a single agricultural machine;
[0135] The specific power constraints are as follows:
[0136] The specific constraints for the dynamic update of the remaining power of the agricultural machinery are as follows:
[0137] ;
[0138] It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; Indicates agricultural machinery Is it a plot of farmland? Perform the task;
[0139] Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path into the node. ;when When that happens, there is no path into the node. ;
[0140] Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path leaving the node. ;when At that time, there is no path leaving the node. ;
[0141] The specific constraint that the electricity required upon arrival at the field must be greater than its operational needs is as follows:
[0142]
[0143]
[0144] in, Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery in the field The amount of electricity consumed during operation. Indicates agricultural machinery Whether or not the farmland plots Perform the task;
[0145] The specific constraints that the remaining power is non-negative and does not exceed the rated capacity are as follows:
[0146]
[0147] The specific constraint that the agricultural machinery must initially be fully charged is as follows:
[0148]
[0149] in, Indicates agricultural machinery At the node Remaining battery power at the start;
[0150] The specific constraint that the agricultural machinery must have sufficient power to return to the garage is as follows:
[0151]
[0152] in, Indicates agricultural machinery from the field plot The amount of electricity consumed to drive back to the garage;
[0153] The constraint that the total energy consumption of agricultural machinery shall not exceed the rated power is specifically as follows:
[0154]
[0155]
[0156] in, Indicates agricultural machinery In the field Remaining battery power after completing the task;
[0157] The energy constraint further considers the nonlinear relationship between energy consumption and remaining energy, and the specific constraint conditions are as follows:
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
[0164] in, Indicates agricultural machinery Completed field plots Remaining battery power after operation Indicates agricultural machinery Arrival at the field plot Battery level before operation Indicates agricultural machinery In the field Actual power consumption during operation In mathematical modeling, large numbers are commonly used. constant, Indicates segmented selection variables, Indicates the number of battery level segments. Indicates the battery threshold. This indicates the power consumption amplification factor for the power range. , This represents the baseline operating power consumption rate per unit area. Indicates a plot of farmland The working area; the task allocation constraints are specifically:
[0165] The constraint that each field must be served exactly once is as follows:
[0166] .
[0167] Furthermore, the specific method for solving the scheduling model based on the firefly algorithm in step 2 includes:
[0168] S2-1. Generate a candidate scheduling scheme population: Generate an initial population consisting of multiple fireflies, where the position of each firefly corresponds to a complete agricultural machinery operation scheduling candidate scheme through encoding;
[0169] S2-2, Calculate fitness and decode evaluation: For each firefly in the population, its position is encoded and decoded into a specific scheduling scheme, and the comprehensive objective function corresponding to the scheme is calculated as the fitness.
[0170] S2-3. Update firefly positions: Based on the relative brightness and attraction between fireflies, update the position codes of fireflies with lower brightness so that they can learn from the better scheduling scheme represented by fireflies with higher brightness.
[0171] S2-4, Iterative Optimization and Output: Repeat S2-2 and S2-3 until the preset iteration termination condition is met; finally, output the decoding scheme corresponding to the firefly with the best fitness in the population, as the optimal scheduling scheme for electric agricultural machinery.
[0172] Furthermore, before generating the initial population, S2-1 also includes initializing the control parameters of the firefly algorithm, specifically: firefly population size, maximum attraction, light intensity absorption coefficient, step size factor, and maximum number of iterations.
[0173] The firefly population size is set to a range of 20-100;
[0174] The maximum attraction value is set to a range of 0.8-1.5;
[0175] The light intensity absorption coefficient is set to a range of 0.1-1.0;
[0176] Set the step size factor to a range of 0.1-0.5;
[0177] The maximum number of iterations is set to a range of 300-500.
[0178] Furthermore, in S2-1, the encoding maps the agricultural machinery operation scheduling scheme into a data structure that the algorithm can process. The data structure includes a multi-layer sequence of task allocation, operation path sequence, and charging decision information.
[0179] The task allocation layer consists of an arrangement sequence containing the numbers of all fields to be assigned tasks;
[0180] The operation path sequence layer, associated with the task allocation layer, is used to allocate the field subsequence in the arrangement sequence to different agricultural machines, thereby determining the specific operation path sequence for each agricultural machine.
[0181] The charging decision information layer is used to embed charging decision flags in the sequence of the operation path. The charging decision flags indicate whether the agricultural machinery should return to the garage to charge after visiting a specific field, and are combined with the power status model to ensure the power feasibility of the path.
[0182] Furthermore, in S2-2, the comprehensive objective function value is a weighted sum of the total scheduling cost and the total mobile energy consumption. Before calculating the fitness, it is verified whether the decoding scheme meets the power constraint and task allocation constraint, and a penalty is imposed on the scheme that does not meet the constraints.
[0183] Furthermore, in S2-3, the update operation includes a structured adjustment of the task order, agricultural machinery allocation, or charging decisions in the encoding.
[0184] Furthermore, in S2-4, the preset iteration termination condition includes at least one of the following:
[0185] Reaching the maximum number of iterations;
[0186] The improvement in the optimal fitness value over multiple consecutive iterations is less than a preset threshold.
[0187] The optimal scheduling scheme obtained by decoding remains unchanged in multiple consecutive iterations.
[0188] In this invention, an electric agricultural machinery operation scheduling model is constructed; the electric agricultural machinery multi-task scheduling model includes: a set of fields consisting of multiple farmlands in the target area, a set of paths consisting of multiple path types, and an electric agricultural machinery garage. and the preset related constraints;
[0189] This method aims to address the need to consider changes in the electric farm machinery's battery level during operation and ensure sufficient remaining battery power for return to the depot. Each field has specific requirements for the electric farm machinery's operational capacity and battery safety threshold. Furthermore, the rate of battery consumption exhibits a non-linear relationship with the remaining battery power; the lower the remaining battery power, the faster the power is consumed. After the work is completed, there must be sufficient battery power for the electric farm machinery to return to the depot. The goal of this method is to minimize the total scheduling cost and maximize battery utilization.
[0190] For each field operation point, considering the location factors of the operation point and the electric agricultural machinery garage, as well as the remaining power of the electric agricultural machinery, path arcs are constructed between the electric agricultural machinery garage and the field operation point, between field operation points, and between the field operation point and the electric agricultural machinery garage. Each arc has three indicators: minimum path distance, minimum path power consumption, and minimum path cost. For each pair of nodes, different distances, power consumption, and costs can be obtained according to different arc types.
[0191] In addition, each field has four indicators: operating area, electric machinery power consumption before operation, electric machinery power consumption after operation, and distance between the operation point and the garage. A maximum electric machinery power consumption is specified for each closed path. The sum of all power consumption for operations on that closed path, power consumption for movement between paths, and power consumption for returning to the garage cannot exceed the maximum electric machinery power consumption, thus constraining the power consumption of each electric machinery.
[0192] Starting from a garage with multiple identical electric agricultural machines, the system needs to operate on multiple plots of land within the area, each with different energy consumption requirements. Each plot can only be served once. During operation, if the remaining power of the electric agricultural machine is insufficient to meet the energy requirements of the next plot, the machine needs to return to the garage to replenish its power. Furthermore, the machine must have sufficient remaining power to return to the garage.
[0193] Objective function: (1) Minimize total scheduling cost. Total scheduling cost is the sum of movement cost, operation cost and charging cost. (2) Maximize the utilization of electric agricultural machinery power. While meeting the operation needs of each field and the power requirements for returning to the garage, reduce the power consumption of electric agricultural machinery during movement.
[0194] Problem assumptions:
[0195] (1) Electric agricultural machinery garages can have both outflow and inflow, and multiple electric agricultural machinery can flow out and in. The number of electric agricultural machinery flowing out of the garage cannot exceed the maximum number of available electric agricultural machinery. At the same time, the number of electric agricultural machinery flowing in is equal to the number of electric agricultural machinery flowing out. That is, each electric agricultural machinery must return to the garage after operation.
[0196] (2) Each field can only be visited once, and the operation requirements of all fields must be met;
[0197] (3) The total power of each electric agricultural machine is the same and is the rated power. The power consumption of the electric agricultural machine in one day does not exceed the total rated power.
[0198] (4) The operating efficiency, travel speed, energy consumption rate, operating cost, rated battery capacity, charging power and other parameters of each electric agricultural machine are consistent.
[0199] (5) In order to complete the operation smoothly, the remaining power of the electric farm machine must be greater than the power requirement of the operation of each field when it reaches each field; at the same time, the electric farm machine must have enough power to return to the garage. This data is related to the distance between the electric farm machine and the garage and the amount of remaining power. In addition, the remaining power of the electric farm machine is always a non-negative number.
[0200] (6) Record the electricity consumption before and after each task is completed, as well as the area of the completed task.
[0201] The objective function expression is:
[0202] (1)
[0203] (2)
[0204] (3)
[0205] Objective function (1) represents the total scheduling cost of electric agricultural machinery, which is the sum of movement cost, operation cost, and charging cost. Objective function (2) represents the power utilization efficiency of electric agricultural machinery, which is reflected by minimizing the energy consumption generated during movement. The lower the movement energy consumption, the more fully the power is utilized, and the more effective power can be used for field operations. Objective function (3) is the overall scheduling objective, which is to improve power utilization efficiency while ensuring the lowest total scheduling cost. By weighting the two objectives of cost and energy consumption, a balance is achieved between economy and energy efficiency in the scheduling scheme.
[0206] The constraints include:
[0207] (4)
[0208] (5)
[0209] (6)
[0210] (7)
[0211] (8)
[0212] (9)
[0213] (10)
[0214] (11)
[0215] (12)
[0216] (13)
[0217] (14)
[0218] (15)
[0219] (16)
[0220] (17)
[0221] (18)
[0222] (19)
[0223] (20)
[0224] Constraint (4) stipulates that the number of electric farm machines leaving the electric farm machine garage cannot exceed the maximum number of available electric farm machines. Constraint (5) stipulates that all electric farm machines leaving the garage must eventually return to the garage. Then the machine It starts from the warehouse and eventually returns to the warehouse; it does not leave the warehouse. Constraint (6) stipulates that the number of electric agricultural machines entering and leaving a field is equal, and each field can only be visited once. Constraint (7) stipulates the dynamic change process of the electric agricultural machine's power, so that the remaining power of each machine is accurately updated throughout the operation. Constraints (8) to (14) impose power constraints on the electric agricultural machines, among which constraints (8) and (9) stipulate that when a certain field is reached, the remaining power of the electric agricultural machine must be greater than the operation power requirement of that field. Constraint (10) stipulates that the remaining power of the electric agricultural machine is always non-negative and the upper limit of the electric agricultural machine's power cannot exceed the rated battery capacity. Constraint (11) stipulates that the initial power of the electric agricultural machine must be fully charged. Constraint (12) stipulates that the electric agricultural machine must have enough power to return to the depot. Constraint (13) stipulates that the total daily energy consumption of the electric agricultural machine for movement and operation cannot exceed its total rated power. Constraint (14) stipulates that the movement path of the electric agricultural machine operates according to the principle of minimum energy consumption. Constraints (15) to (20) impose constraints on the impact of changes in the electric agricultural machinery's power consumption. Among them, constraints (15) and (16) specify the power consumption of the electric agricultural machinery before and after operation in the field, as well as the field area. Constraint (17) specifies the range of the remaining power consumption of the electric agricultural machinery. Constraints (18) and (19) specify the power consumption of the electric agricultural machinery as the power consumption range changes. Constraint (20) specifies that the lower the power consumption, the greater the power consumption.
[0225] The design principle of embedding the electric agricultural machinery operation scheduling problem into the firefly algorithm is mainly to transform the path planning, power utilization maximization and cost minimization objectives of the problem into a fitness optimization problem by simulating the collective behavior of fireflies.
[0226] The principle of nesting the electric agricultural machinery operation scheduling problem into the firefly algorithm:
[0227] (1) The position (solution) of each firefly is used to represent the path planning scheme of electric agricultural machinery operation. Specifically, it can be encoded as: I. The order of nodes passed through each path. II. The distance between nodes on each path. Through this encoding, the solution space of the electric agricultural machinery operation scheduling problem corresponds to the search space of the firefly algorithm.
[0228] (2) The objective function is directly mapped to the fitness function of the firefly algorithm, which is used to evaluate the quality of each firefly. It includes two objectives: I. Maximizing the utilization of electric farm machinery power: Calculate the minimum power consumption for movement by reducing the distance the electric farm machinery travels between fields, thereby maximizing the power consumption for operation. II. Minimizing total cost: This includes movement cost, operation cost, and charging cost.
[0229] (3) The relative fluorescence brightness, attractiveness and position update formula of fireflies are used to generate new path planning schemes.
[0230] Solution steps:
[0231] Initialize the basic parameters of the algorithm:
[0232] Set the number of fireflies ;
[0233] Set maximum attraction ;
[0234] Set the light intensity absorption coefficient ;
[0235] Set step size factor ;
[0236] Set the maximum number of iterations. Or search precision.
[0237] Randomly initialize firefly positions:
[0238] Randomly generate the initial spatial position of each firefly. ;
[0239] Calculate the objective function value for each firefly and use it as the maximum fluorescence intensity. ;
[0240] Find the firefly with the highest brightness (i.e., the optimal objective function) in the current population. .
[0241] Calculate the relative brightness and attractiveness of fireflies:
[0242] Firefly relative brightness formula:
[0243] (twenty one)
[0244] in:
[0245] (twenty two)
[0246] The formula for attraction between fireflies:
[0247] (twenty three)
[0248] Position update formula:
[0249] (twenty four)
[0250] Random perturbation location update:
[0251] Generate random numbers :
[0252] If the current global optimal solution is randomly perturbed:
[0253] Otherwise, continue updating the position according to the position update formula.
[0254] Recalculate brightness: Recalculate the brightness of the fireflies based on their updated positions.
[0255] Termination condition: If any of the following conditions are met, proceed to step (7); otherwise, increment the search count by 1 and continue iterating:
[0256] (1) The current optimal solution achieves the search precision specified by the objective function;
[0257] (2) Reaching the maximum number of searches .
[0258] Output: Output the optimal path Objective function values (total cost and power utilization rate).
[0259] This method can basically satisfy the two objectives of maximizing power utilization and minimizing total scheduling cost, and output the optimal scheduling scheme for multiple electric agricultural machines.
[0260] 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 scheduling electric agricultural machinery operations, characterized in that, It includes: Step 1: Construct an electric agricultural machinery operation scheduling model. The model includes an objective function and constraints. The objective function is to minimize the total scheduling cost and maximize the power utilization rate. The constraints include path constraints, power constraints, task allocation constraints, and cost constraints. Step 2: Solve the scheduling model based on the firefly algorithm to obtain the optimal operation path and scheduling scheme for electric agricultural machinery; Step 3: Output the optimal path and the corresponding objective function value.
2. The method for scheduling electric agricultural machinery operations according to claim 1, characterized in that, The objective function described in step 1 is as follows: ; in, This represents the value of the comprehensive objective function. Indicates the total scheduling cost. The weighting coefficient represents the total scheduling cost. This represents the total electricity consumed by all agricultural machinery during its movement. Weighting coefficients representing mobile energy consumption; The objective function for minimizing the total scheduling cost is: ; in, This represents the agricultural machinery serial number, which belongs to a set. This indicates all available agricultural machinery; This represents a set of farmland plots, i.e., a set of work sites; This represents a plot of land, and also a node representing a work point; Indicates agricultural machinery unit distance travel cost Indicates from node To the node distance, Indicates agricultural machinery From node Drive to the node , Indicates the plot of land The unit cost coefficient for performing the operation. This represents the unit charging cost coefficient. Indicates agricultural machinery The electricity replenished when returning to the garage during operation; The objective function for maximizing power utilization is represented by minimizing the total power consumed by the agricultural machinery during its movement. This is equivalent to maximizing the effective amount of electricity available for operation, i.e., power utilization rate, specifically: ; Indicates agricultural machinery from node To the node The amount of electricity consumed.
3. The method for scheduling electric agricultural machinery operations according to claim 2, characterized in that, The constraints described in step 1 include: Path constraints include: the number of farm machines starting from the garage does not exceed the maximum available number, each farm machine must return to the garage after operation, the number of farm machines flowing in and out of each field is equal, and the movement path of farm machines is determined according to the principle of minimum energy consumption. Power constraints include: dynamic update constraints on the remaining power of agricultural machinery; the power must be greater than its operational requirements when arriving at the field; the remaining power of agricultural machinery must be non-negative and not exceed the rated capacity; the initial power of agricultural machinery must be fully charged; agricultural machinery must have sufficient power to return to the garage; and the total energy consumption of agricultural machinery must not exceed the rated power. The power constraints further consider the non-linear relationship between power consumption and remaining power. Task assignment constraints include that each field must be served exactly once; Cost constraint: This is reflected in the optimization of the total scheduling cost in the objective function, which includes mobility cost, operation cost, and charging cost.
4. The method for scheduling electric agricultural machinery operations according to claim 3, characterized in that, The specific constraints are as follows: The path constraints are as follows: The constraint that the number of agricultural machines departing from the garage does not exceed the maximum available number is as follows: ; in, This indicates the maximum number of agricultural machines that can be used for operations in the garage; This represents the garage node, which represents the starting and returning points of the agricultural machinery. It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; The specific constraint that each agricultural machine must return to the garage after operation is as follows: ; in, Indicates agricultural machinery From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. Whether it is dispatched or used, if This indicates agricultural machinery. Start from the garage and eventually return to the garage; if This indicates agricultural machinery. Not yet shipped; The constraint that the number of agricultural machines flowing into and out of each field is equal is specifically as follows: in, It is a binary decision variable, representing agricultural machinery. Whether or not the farmland plots Perform the task; The specific constraints on the movement path of the agricultural machinery, determined according to the principle of minimum energy consumption, are as follows: in, Indicates agricultural machinery in the field The amount of electricity consumed during operation. This indicates the rated total capacity of the battery in a single agricultural machine; The specific power constraints are as follows: The specific constraints for the dynamic update of the remaining power of the agricultural machinery are as follows: ; It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; It is a binary decision variable, representing agricultural machinery. From node Drive to the node ; Indicates agricultural machinery Is it a plot of farmland? Perform the task; Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path into the node. ;when When that happens, there is no path into the node. ; Indicates if and only if agricultural machinery For farmland plots When performing the task, that is At that time, there must be one and only one path leaving the node. ;when At that time, there is no path leaving the node. ; The specific constraint that the electricity required upon arrival at the field must be greater than its operational needs is as follows: in, Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery Reaching the node The remaining battery power at that time Indicates agricultural machinery in the field The amount of electricity consumed during operation. Indicates agricultural machinery Whether or not the farmland plots Perform the task; The specific constraints that the remaining power is non-negative and does not exceed the rated capacity are as follows: The specific constraint that the agricultural machinery must initially be fully charged is as follows: in, Indicates agricultural machinery At the node Remaining battery power at the start; The specific constraint that the agricultural machinery must have sufficient power to return to the garage is as follows: in, Indicates agricultural machinery from the field plot The amount of electricity consumed to drive back to the garage; The constraint that the total energy consumption of agricultural machinery shall not exceed the rated power is specifically as follows: in, Indicates agricultural machinery In the field Remaining battery power after completing the task; The energy constraint further considers the nonlinear relationship between energy consumption and remaining energy, and the specific constraint conditions are as follows: in, Indicates agricultural machinery Completed field plots Remaining battery power after operation Indicates agricultural machinery Arrival at the field plot Battery level before operation Indicates agricultural machinery In the field Actual power consumption during operation In mathematical modeling, large numbers are commonly used. constant, Indicates segmented selection variables, Indicates the number of battery level segments. Indicates the battery threshold. This indicates the power consumption amplification factor for the power range. , This represents the baseline operating power consumption rate per unit area. Indicates a plot of farmland The working area; the task allocation constraints are specifically: The constraint that each field must be served exactly once is as follows: 。 5. The method for scheduling electric agricultural machinery operations according to claim 1, characterized in that, Step 2 describes the specific method for solving the scheduling model based on the firefly algorithm, which includes: S2-1. Generate a candidate scheduling scheme population: Generate an initial population consisting of multiple fireflies, where the position of each firefly corresponds to a complete agricultural machinery operation scheduling candidate scheme through encoding; S2-2, Calculate fitness and decode evaluation: For each firefly in the population, its position is encoded and decoded into a specific scheduling scheme, and the comprehensive objective function corresponding to the scheme is calculated as the fitness. S2-3. Update firefly positions: Based on the relative brightness and attraction between fireflies, update the position codes of fireflies with lower brightness so that they can learn from the better scheduling scheme represented by fireflies with higher brightness. S2-4, Iterative Optimization and Output: Repeat S2-2 and S2-3 until the preset iteration termination condition is met; finally, output the decoding scheme corresponding to the firefly with the best fitness in the population, as the optimal scheduling scheme for electric agricultural machinery.
6. The method for scheduling electric agricultural machinery operations according to claim 5, characterized in that, Before generating the initial population, S2-1 also includes control parameters for initializing the firefly algorithm, specifically: firefly population size, maximum attraction, light intensity absorption coefficient, step size factor, and maximum number of iterations. The firefly population size is set to a range of 20-100; The maximum attraction value is set to a range of 0.8-1.5; The light intensity absorption coefficient is set to a range of 0.1-1.0; Set the step size factor to a range of 0.1-0.5; The maximum number of iterations is set to a range of 300-500.
7. The method for scheduling electric agricultural machinery operations according to claim 5, characterized in that, In S2-1, the encoding maps the agricultural machinery operation scheduling scheme into a data structure that the algorithm can process. The data structure includes a multi-layer sequence of task allocation, operation path sequence, and charging decision information. The task allocation layer consists of an arrangement sequence containing the numbers of all fields to be assigned tasks; The operation path sequence layer, associated with the task allocation layer, is used to allocate the field subsequence in the permutation sequence to different agricultural machines, thereby determining the specific operation path sequence for each agricultural machine. The charging decision information layer is used to embed charging decision flags in the sequence of the operation path. The charging decision flags indicate whether the agricultural machinery should return to the garage to charge after visiting a specific field, and are combined with the power status model to ensure the power feasibility of the path.
8. The method for scheduling electric agricultural machinery operations according to claim 5, characterized in that, In S2-2, the comprehensive objective function value is the weighted sum of the total scheduling cost and the total mobile energy consumption. Before calculating the fitness, it is verified whether the decoding scheme meets the power constraint and task allocation constraint, and a penalty is imposed on the scheme that does not meet the constraints.
9. The method for scheduling electric agricultural machinery operations according to claim 5, characterized in that, In S2-3, the update operation includes structural adjustments to the task order, agricultural machinery allocation, or charging decisions in the encoding.
10. The method for scheduling electric agricultural machinery operations according to claim 5, characterized in that, In S2-4, the preset iteration termination condition includes at least one of the following: Reaching the maximum number of iterations; The improvement in the optimal fitness value over multiple consecutive iterations is less than a preset threshold. The optimal scheduling scheme obtained by decoding remains unchanged in multiple consecutive iterations.