Abstract
When the outbreak of COVID-19 began, people could not go out. It was not allowed to provide agricultural machinery services in different places across regions to reduce the flow and gathering of people. Improvement of utilization efficiency of agricultural machinery resources is required through scientific scheduling of agricultural machinery. With seizing the farming season and stabilizing production as the goal, this paper studied the scientific scheduling of tractors within the scope of town and established agricultural machinery operation scheduling model with the minimization of total scheduling cost as the optimization objective. Factors such as farmland area, agricultural machinery, and farmland location information and operating time window are considered in this model to improve the accuracy of the agricultural machinery operation scheduling model. The characteristics of multiple scheduling algorithms are analyzed comprehensively. The scheduling requirements of agricultural machinery operation to ensure spring ploughing are combined to design the agricultural machinery scheduling algorithm based on the SA algorithm. With Hushu Street, Jiangning District, Nanjing City, as an example, a comparative experiment is conducted on the simulated annealing algorithm (SA) designed in this paper and the empirical algorithm and genetic algorithm (GA). The results suggest that the total cost of the scheduling scheme generated by the SA algorithm is 19,042.07 yuan lower than that by the empirical scheduling algorithm and 779.19 yuan lower than that by the genetic algorithm on average. Compared with the GA algorithm, the transfer distance, waiting cost, and delay cost of the SA algorithm are reduced by 11.6%, 100%, and 98.1% on average, indicating that the transfer distance of agricultural machinery in the scheduling scheme generated by the SA algorithm is shorter, so is the waiting and delay time. Meanwhile, it can effectively obtain the near-optimal solution that meets the time window constraint, with good convergence, stability, and adaptability.
1. Introduction
China’s agriculture has a small average household operation scale, high agricultural multiple cropping index, tight farming time, and other problems. The operation capacity of agricultural machinery cannot meet production needs during busy periods. The regional shortage of agricultural machinery can be solved by cross-regional operation of agricultural machinery in regular years. The cross-regional operation area of agricultural machinery for three major food crops in China reached 20,478 thousand hectares, accounting for 21% of the sown area in 2019 [1].
Due to the outbreak of COVID-19, global production and life in 2020 paused; companies suspended production and businesses shut down for a while. According to the epidemic development level, epidemic prevention measures such as shutting down countries, cities, and villages have been continuously introduced. People have to stay at home to protect themselves and avoid adding burdens to society. As a result, cross-regional operations of agricultural machinery were suspended, adding fuel to the fire of insufficient regional agricultural machinery operation. However, as the foundation of the national economy, agriculture is different from the secondary and tertiary industries. It is characterized by strong seasonality, and missing the production season will lead to huge losses. Therefore, governments of various countries have carried out massive measures to seize the farming season and stabilize production while fighting against the epidemic at the same time. Agricultural machinery management departments at all levels in China vigorously carry out agricultural machinery scheduling according to the impact of the epidemic to ensure spring ploughing.
For major catastrophic accidents, scholars have conducted extensive studies, mainly focusing on the distribution of supplies. In large-scale emergencies, the problems and challenges that arise in the management of emergency resource supply chains are significantly different from those in ordinary commercial applications [2–5]. To respond to such disasters effectively, governments and management organizations must consider multiple and unique aspects of emergency operations, such as resource scarcity and disaster uncertainty [6–8]. In addition, reducing the number of casualties and deaths in disaster-stricken areas depends, to a large extent, on the early arrival and rapid deployment of resources for emergency operations. Failure to allocate sufficient resources in time has always been the root cause of adverse effects in case of disaster [9–15].
In addition, unexpected events must be considered in emergencies because there can be multiple uncertain and unpredictable factors [16, 17]. Due to the lack of historical data and possible dissemination ways, it is difficult to set the exact parameters for this problem. The variables that must be considered to obtain a better response rate include key requirements, competition priority, time urgency, and availability of necessary resource allocation. However, potential transportation and condition restrictions have hindered the provision of emergency services [13, 18–20]. Emergency dispatch coordinators and decision-makers often make wrong decisions during natural disasters. The reason is that they rely excessively on their previous experience, are overconfident in their ability to make helpless decisions, and use simple decision heuristics [21, 22]. No relevant literature reports have been found regarding emergency scheduling in agricultural production.
Given that farmers could not organize agricultural production effectively at home in areas with COVID-19 outbreaks, an agricultural machinery operation scheduling model with the minimization of total scheduling cost as the optimization objective was established in this paper. With seizing the farming season and stabilizing production as the goal and the scheduling of tractors within the scope of town as the research object, influencing factors such as farmland area, agricultural machinery, farmland location information, and operating time window time were fully considered based on in-depth analysis of various agricultural machinery operation costs. The model solving method was designed through the improved SA algorithm. The tractor production scheme and scheduling path within the town are obtained to meet the requirements of the farmland operating time window, achieve the objective of total cost minimization, and accomplish the task of ensuring spring ploughing with high efficiency and cost-effectiveness.
2. Problem Description
In areas with the outbreak of COVID-19, it is not allowed to provide agricultural machinery services in different places across regions to reduce the flow and gathering of people. In areas with relatively less agricultural machinery, they can only try to improve the utilization efficiency of agricultural machinery resources through scientific scheduling so as not to miss any or fewer farming hours. All villages uniformly report production demand information to the town’s agricultural station. The agricultural station organizes farmers who own agricultural machinery within the town to carry out production service operations. The service fee is settled by the town’s agricultural station with each village in a unified manner. Agricultural machinery service households (AMSH) and farmers do not need to meet or do deals. The specific process is shown in Figure 1.

Farmers report the location, area, and operating time window of the farmland run by them to their village committee. Agricultural machinery service households report all tractor models, locations, and operating efficiency to their village committee. The village committee collects the order information based on the farmland location and time window and reports it to the town (township) agricultural station. The town’s agricultural station uniformly formulates a scheduling scheme and sends it to the agricultural machinery service household. The tractors depart from their locations to the responsible areas according to the established scheme and route, providing farming services in turn.
3. Tractor Scheduling Model
The tractor scheduling issue can be expressed as follows: there are m individual entrepreneurs owning agricultural machinery. To avoid the gathering of machinery operators and farmers, the township government divides the whole township into n small operation areas according to the working needs. The farmland area of the i-th area is si, i = 1, 2, …, n. The tractors should arrive within a certain time range [ETi, LTi], that is, arrive no earlier than ETi and leave no later than LTi. When the tractor arrives earlier than ETi, the waiting cost of agricultural machinery is caused by personnel wages and the profit loss of idle machinery. When the tractor arrives later than LTi, it causes timely loss of crops. The route arrangement is made by solving the tractor operation with the lowest cost that meets the demand for spring ploughing within the township scope. The costs of spring ploughing operation include the cost of tillage and that of field transfer; the fixed cost of tractors is not considered yet. The specific model is as follows.
The operation area number is 1, 2, ..., N, and the parking yard number of farmers that own agricultural machinery is N + 1, N + 2, ..., N + M. The operation area and the parking yard numbers are both denoted by i and j. i: the operation area and the parking yard numbers, i = 1, 2, ..., N, N + 1, N + 2, ..., N + M j: the operation area and the parking yard numbers, j = 1, 2, ..., N, N + 1, N + 2, ..., N + M k: tractor number, k = 1, 2, …, K dij: distance between points i and j xijk: decision variable for tractor field transfer, indicating whether the k-th tractor travels from point i to point j. If so, xijk is 1; otherwise, its value is 0 yik: decision variable for tractor operation, indicating that if tractor k operates in operation area i, its value is 1; otherwise, its value is 0 si: area of the farmland in the i-th operation area sik: operation area completed by tractor k in the i-th operation area tijk: time taken by the k-th tractor to travel from point i to point j, equal to distance (dij) divided by speed (vk) tik: time taken by tractor k to complete the tillage in the operation area i, equal to the operation area (sik) divided by the efficiency (wk) : moment when tractor k arrives at the operation area i : moment when tractor k completes the task of tillage and soil preparation in the operation area i PEk: waiting cost to be paid due to tractor k arriving earlier than ETi PLk: penalty for timeliness loss to be paid due to tractor k completing work later than LTi ρk: cost per kilometer traveled by tractor k for the field transfer φk: operating cost per unit area of tractor k
3.1. Objective Function
3.2. Constraints
In the model, equation (1) is the objective function, which indicates the minimal total cost required to complete all spring ploughing tasks in the township area, including field transfer costs, operating costs, and penalties for timeliness loss. Inequality (2) constrains the tractor traveling sequence; that is, when transferring from point i to point j, the time of arrival at point j must be later than that at point i. Equation (3) shows the relationship between the tractor arrival time and the operation completion time. Inequality (4) stipulates that the number of tractors dispatched from the parking yard of individual entrepreneurs owning agricultural machinery cannot exceed the total number of tractors. Equation (5) stipulates that all plots in the operation area must be tilled. Equation (6) shows the relationship between tractor operation time and efficiency. Equation (7) indicates that if tractor k works at point j, then tractor k must move from point i to point j. Equation (8) indicates that if tractor k works at point i, tractor k must move to other points j after finishing work at point i.
4. Design of Scheduling Algorithm Based on Simulated Annealing (SA)
Agricultural machinery scheduling to ensure spring ploughing during an epidemic is a typical NP-hard problem. As the operation space size ((n−1)!) shows a factorial increase, the exact solution cannot be obtained through the exhaustive method [23], dynamic programming [24, 25], linear programming [26], branch and bound [27, 28], and other precise algorithms for large-scale problems. With the development of computers, many intelligent optimization algorithms have emerged in the field of artificial intelligence, such as the genetic algorithm [29–31], tabu search algorithm [32], ant colony algorithm [33], particle swarm optimization algorithm [34], simulated annealing algorithm [35, 36], online-learning algorithm [37], adaptive polyploid memetic algorithm [38], many-objective evolutionary algorithm [39], and salp swarm algorithm [40]. Among them, the idea of simulated annealing algorithm (SA) is derived from simulating the cooling process of solid annealing, that is, heating the solid to a sufficiently high temperature, then allowing it to cool down slowly to balance the internal energy, avoid falling into local minimum effectively, and eventually tend to a global optimum.
4.1. Solution Coding
Based on the characteristics of the agricultural machinery job scheduling problem and related research, the solution coding can adopt a two-layer coding method, as shown in Figure 2.

The first-level code is the sorting of farmland, and the order of farmland in the entire coding is the service order of farmland orders. As shown in Figure 2, F1∼Fn are farmland operation orders, and the operation areas are sorted according to the starting work time ETi to study the serial and parallel issues between the operation areas. The operation is executed sequentially in the serial operation areas and in a parallel way in the parallel operation areas. The second-level code is the order of tractors in the farmland. For example, the tractor operating in the F1 farmland is M11, M12, and M13, and the tractor operations in the same farmland are in no particular order. The number of tractors required for the farmland operating site is the local code length of the farmland operating site. Assuming that Fi in the i-th area is coded, the maximum quantity of agricultural machinery required for Fi is Ki = , and MiKi represents the Ki-th tractor in the i-th area. Now, partial coding is performed on Fi.
4.2. Initial Solution Settings
The initial solution is the starting point of algorithm iteration. The selection quality of the initial solution can improve the computational efficiency of the algorithm and enhance the reliability of the final solution. In this paper, the following three directions are mainly considered in setting the initial solution of the algorithm: (1) priority is given to the operation area with an early harvest time window; (2) the minimum number of tractors that can meet the production capacity requirements are arranged in each area; (3) when tractors are allocated to the operation area, idle tractors or those that can reach the target area faster are arranged first.
According to the above coding strategy, the initial solution of the SA algorithm is generated. The specific steps are as follows: Step 1: establish the task set of the operation area and schedule the work sequence according to the direction I to build the operating agricultural machinery depot set Step 2: determine whether the task set of the operation area is empty. If so, go to step 5; otherwise, go to step 3 Step 3: allocate tractors to area tasks according to directions II and III Step 4: go to Step 2 Step 5: the initial scheduling scheme matching is completed
4.3. Domain Generation Rules
The neighborhood generation rule in the SA algorithm is crucial. When the initial solution is generated, what rules are used to generate a new solution is related to whether the whole algorithm can be effectively performed to achieve the goal. For this issue, it is about how to generate a new scheme based on an existing scheduling scheme for further judgment. The commonly used neighborhood generation strategy of 2-opt mapping is used in this paper to generate a new scheduling scheme. Two vertices p and q are randomly selected. Assuming p < q, tractor code (p, p+1,…, q−1, q) is reversed. The details are shown in Figure 3.

4.4. Acceptance Probability of New Solutions
Acceptance probability is the probability of accepting a new feasible solution Pnew (another state) to replace the current feasible solution Pold (current state). It is not fixed but decreases as the temperature parameter T drops. Metropolis criterion is generally adopted:
4.5. Temperature Attenuation Function
The temperature attenuation function is also known as the cooling strategy. The common exponential cooling strategy selected in this paper is . In the formula, α is the temperature attenuation index, 0 > α < 1, and m is the number of temperature drops.
4.6. Stop Criterion
A reasonable stop criterion can not only ensure that the algorithm converges to an approximate solution but also make the final solution global to some extent. The SA algorithm includes inner- and outer-loop stops. In this paper, the fixed iteration step size is adopted for the inner loop, and the temperature reaching the termination threshold is adopted for the outer loop to exit the iteration.
4.7. Algorithm Flow
According to the tractor production scheduling model and solution coding, the simulated annealing algorithm process is designed as shown in Figure 4.(1)Randomly generate an initial solution X0, let Xbest = X0, and calculate the objective function value Z (X0); set the initial temperature T(0) = T0 and the number of iterations i = l.(2)Do while T > Tmin. For i = 1 to m (m is the number of cycles, which is related to the township scale). For the current optimal solution Pbest neighborhood function, generate a new solution Pnew, calculate the new objective function value Z(Pnew), and calculate the increment ΔZ = Z(Pbest)- Z(Pnew) of the objective function value. If ΔZ < 0, then Zbest = Znew; if ΔZ > 0, then p = exp(−ΔZ/T). If c = random [0, 1] < p, Pbest = Pnew; otherwise, Pbest remains unchanged. end for. i = i + 1. End Do.

5. Example Verification
In this paper, Hushu Street, Jiangning District, Nanjing City, is taken as an example. Located at the junction of Jiangning, Jurong, and Lishui, Hushu Street is a typical suburban town, where mainly grains, vegetables, and fruits are planted, with a relatively complicated planting structure. In the season for spring ploughing before the epidemic, Hushu will attract agricultural machinery from the surrounding counties and cities to carry out operation services. However, due to the impact of the epidemic this year, agricultural machinery from other places cannot enter Hushu Street, and spring ploughing production can only be ensured through scientific scheduling of local agricultural machinery. We divided the farmland in Hushu Street into 13 operation areas on Google Earth (blue markers in Figure 5) and marked four agricultural machinery cooperatives in Hushu Street (red markers in Figure 5); distribution and area of farming sites are shown in Supplementary Table 1, distribution and machine information of agricultural machinery cooperatives is shown in Supplementary Table 2; distance matrix between farming sites and cooperatives is shown in Supplementary Table 3. The tractors of the cooperatives were all 80 horsepower. The average operating efficiency is 0.5 hm2/h, the operating cost is 300 yuan/hm2, the average transfer speed is 35 km/h, the transfer cost is 2 yuan/km, the waiting cost is 42 yuan/h, and the timely loss cost coefficient 5.4 yuan/h.

5.1. Example Calculation Results
In the actual production scheduling, farm management personnel usually adopt the three strategies mentioned in Section 4.2 for agricultural machinery and farmland matching and generate empirical scheduling solutions, which can be further optimized using the optimization algorithm in this paper. To further illustrate the superiority of the algorithm designed in this paper, the GA algorithm commonly used in the research of similar agricultural machinery scheduling issues is applied to comparison experiments. On a personal computer with Intel Core i5 CPU 3.0 GHz, 8.0 GB memory, and Windows 10 operating system, Matlab R. 2018a software programming is used to implement three algorithms to solve real cases 20 times, respectively. The calculation results are shown in Table 1.
Table 1 shows that compared with the empirical scheduling algorithm, GA and SA algorithms can reduce the total cost of agricultural machinery significantly. The total cost of the scheduling scheme generated by SA designed in this paper is 19,042.07 yuan lower than that by the empirical scheduling algorithm and 779.19 yuan lower than that by GA on average. Compared with GA, the transfer distance, waiting cost, and delay cost of SA are reduced by 11.6%, 100%, and 98.1% on average, indicating that the transfer distance of agricultural machinery in the scheduling scheme generated by SA is shorter, so is the waiting and delay time.
Figure 6 shows the total cost of solving real cases 20 times by GA and SA, respectively. It can be seen that the total cost of the scheduling scheme obtained by SA is generally lower than that by GA. The standard deviation of the 20 scheduling schemes obtained by SA is 35.78, while that of various scheduling schemes obtained by GA is 1424.08, indicating that the solution obtained by SA has superior quality and higher stability. This is because SA uses the initial solution generation algorithm, with a good start for the optimization process. Moreover, based on the Metropolis criterion, the SA algorithm can avoid being trapped in local minima and implement full optimization, whereas the GA algorithm is prone to get stuck in local minima when handling such complex scheduling problems. The experimental results suggest that the agricultural machinery operation scheduling model based on the SA algorithm in this paper can satisfy the time window constraints with the lowest total cost and meet the spring ploughing scheduling demand in practice.

The scheduling algorithm based on SA designed in this paper can be used to solve the agricultural machinery transfer paths of various agricultural machinery cooperatives, as shown in Figure 7. Among them, the transfer paths of some agricultural machinery in the same cooperative are overlapped, such as agricultural machinery No. 1, 2, and 3 in the cooperative N1, and agricultural machinery No. 10 and 11 in the cooperative N2. In addition, the cooperation of different cooperatives in agricultural machinery to complete orders is observed. For example, order 13 is jointly completed by agricultural machinery No. 4 and 15, which suggests that the algorithm designed in this paper can implement unified scheduling of agricultural machinery in the same cooperative and collaboration among different cooperatives to meet the needs of multimachinery coordinated scheduling of multiple cooperatives in reality. Meanwhile, it can be seen intuitively from the transfer path diagram 6 that the order tasks assigned to each agricultural machinery have spatial proximity, indicating the rationality of the experimental results.

(a)

(b)

(c)

(d)
The scheduling Gantt chart of the tractor is shown in Figure 8. The bars in the chart represent the operation scheme of each fleet, including the operation order number, operation start time, and operation ending time, which can be used for specific guidance of actual production scheduling.

5.2. Algorithm Convergence
The change in the optimal value of each cost in the operation process is shown in Figure 9. The total cost, the total length of transfer path, waiting time, and delay time decrease as the number of iterations increases. The total cost can converge to a stable value when the number of iterations is increased to about 350; the delay and waiting time can converge to 0 within 50 iterations. The calculation results suggest that the algorithm can achieve stable convergence with relatively search performance.

(a)

(b)

(c)

(d)
5.3. Algorithm Stability and Adaptability
The stability of the algorithm is an important index for evaluating whether the scheduling algorithm can stably obtain a scheduling scheme with relatively good quality. It is usually measured by parameters such as mean, standard deviation, and coefficient of standard deviation [41]. At the same time, a case set containing 13, 26, 39, 52, and 65 orders is constructed based on the case data of Hushu Street to test the adaptability of the SA algorithm designed in this paper to the application scenarios with relatively larger order scales. The algorithm is run 10 times for each case set. Statistical comparison is performed on the mean, standard deviation, and standard deviation coefficient of the computing time and total cost of different cases to test the stability and adaptability of the algorithm. The experimental results are shown in Table 2.
Table 2 shows that when the number of orders in the case increases, the standard deviation is not multiplied, and the coefficients of standard deviation are all less than 10−5. The experimental results suggest that the algorithm designed in this paper has relatively good stability. When the number of orders increases to 52, the computing time is not significantly increased but still remains within 30 seconds. The results suggest that the algorithm designed in this paper can adapt to larger-scale case operations. However, when the number of orders increases, the computing time is not significantly increased. The main reason is that when the number of orders increases, the operation area per order will decrease, and the quantity of agricultural machinery allocated to each order will decrease, which objectively reduces the complexity of the problem.
6. Conclusions
(1)The agricultural machinery scheduling in the major epidemic to ensure spring ploughing is taken as the research object to analyze various costs of agricultural machinery scheduling and establish agricultural machinery operation scheduling model with the minimum total scheduling cost as the optimization objective. Factors such as farmland area, agricultural machinery, and farmland location information and operating time window are considered in this model to improve the accuracy of the agricultural machinery operation scheduling model.(2)Agricultural machinery scheduling to ensure spring ploughing during an epidemic is a typical NP-hard problem. Through the comprehensive analysis of the characteristics of multiple scheduling algorithms, combined with the scheduling requirements of agricultural machinery operation to ensure spring ploughing, agricultural machinery scheduling algorithm based on the SA algorithm is designed. The farmland and tractor coding method is determined by two-level multilayer coding. The neighborhood generation strategy of 2-opt mapping is used to generate a new scheduling scheme, and the new solution acceptance mechanism is determined based on the Metropolis criterion. The fixed compensation is used for the inner loop of the algorithm, and the iteration ends when the threshold temperature is reached.(3)With Hushu Street, Jiangning District, Nanjing City, as an example, a comparative experiment is conducted on the SA algorithm designed in this paper and the empirical and GA algorithms. The results suggest that the total cost of the scheduling scheme generated by the SA algorithm designed in this paper is 19,042.07 yuan lower than that by the empirical scheduling algorithm and 779.19 yuan lower than that by the genetic algorithm on average. Compared with the GA algorithm, the transfer distance, waiting cost, and delay cost of the SA algorithm are reduced by 11.6%, 100%, and 98.1% on average, indicating that the transfer distance of agricultural machinery in the scheduling scheme generated by the SA algorithm is shorter, so is the waiting and delay time. Meanwhile, it can effectively obtain the near-optimal solution that meets the time window constraint, with good convergence, stability, and adaptability.(4)This paper does not consider unexpected situations such as infection of tractor drivers and road blockades that may occur during the epidemic. In future research, we will focus on the impact of unexpected conditions on agricultural machinery scheduling and carry out research on agricultural machinery dynamic scheduling.Data Availability
The example data used to support the findings of this study are included within Supplementary Tables 1–3, mainly including the location of farmland in the case area, the location of cooperatives, and the parameters of agricultural machinery.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This paper was supported by the National Key R&D Program Project (2017YFD0700601-2) and Special Fund Project of Basic Scientific Research Business Expenses of Chinese Academy of Agricultural Sciences (S202021, S202010, and S202109-02).
Supplementary Materials
There are 3 tables in the supplementary materials of this paper. Supplementary Table 1: distribution and area of farming sites in Hushu Street, which mainly contains the location, area, and operation time window of farming sites. Supplementary Table 2: distribution and machine information of agricultural machinery cooperatives in Hushu Street, which mainly includes the location of the cooperatives, the number of tractors, and the main parameters of the tractors. Supplementary Table 3: distance matrix between farming sites and cooperatives in Hushu Street. (Supplementary Materials)