Optimization of Agricultural Machinery Allocation in Heilongjiang Reclamation Area Based on Particle Swarm Optimization Algorithm

: Aiming at the imbalance of seasonal agricultural machinery operations in different regions and the low efficiency of agricultural machinery, an experiment is proposed to use particle swarm algorithm to plan agricultural machinery paths to solve the current problems in agricultural machinery operations. Taking the harvesting of autumn soybeans at Jianshan Farm in Heilongjiang Reclamation Area as the experimental object, this paper constructs the optimization target model of the maximum net income of farm machinery households, and uses particle swarm algorithm to carry out agricultural machinery operation distribution and path planning gradually. In this paper, by introducing 0 - 1 mapping, the improved algorithm adopts continuous decision variables to solve the optimization of discrete variables in agricultural machinery operations. The test results show that the particle swarm algorithm can realize the optimal allocation of agricultural machinery path, and the particle swarm algorithm is scientific and explanatory to solve the agricultural machinery allocation problem. This research can provide a scientific basis for farm agricultural machinery allocation and decision analysis.


INTRODUCTION
Since the beginning of the 21st century, China's agricultural mechanization has developed rapidly. The total power of agricultural machinery has increased from 520 million kilowatt in 2000 to 1.027 billion kilowatt in 2019, and the comprehensive agricultural mechanization rate has increased to 69%. However, the unbalanced and uncoordinated contradiction between the ownership of agricultural machinery, the total power of agricultural machinery and the cultivated area of the land, the regional layout of cultivation, and the seasonality of agricultural production have not been well resolved. On the one hand, there is a serious shortage of agricultural machinery in individual seasons and regions. On the other hand, there is a surplus of agricultural machinery in other regions in the same season. In recent years, the Heilongjiang Reclamation Area, which has the advantages of advanced agricultural machinery equipment, radiates to the local countryside through the cross-regional operation of agricultural machinery. On the one hand, it has solved the problem of low utilization of agricultural machinery in the Reclamation Area, and on the other hand, it has effectively solved the problem of insufficient power of local rural machinery, which promotes the process of agricultural modernization in the rural areas of Heilongjiang Province. However, in the process of cross-regional operation of agricultural machinery, there are still problems that huge agricultural machinery resources have not fully utilized, agricultural machinery allocation paths are not optimal, and benefits have not maximized. How to improve the means of agricultural machinery allocation and improve the scientific nature of agricultural machinery allocation is of great significance to the development of agricultural mechanization.
At present, the allocation of agricultural machinery is mainly based on expert system evaluation and artificial decision-making. There are few automatic allocation systems and allocation tools [1]. The ant colony optimization algorithm is used to generate automated follow-up routes for agricultural machinery equipped with autonomous driving navigation systems, thereby improving work efficiency [2], which can also effectively and quickly solve the agricultural machinery allocation tasks in emergency situations [3]. However, the calculation time of ant colony algorithm is longer and the convergence speed is slow. In order to solve this problem, this paper introduces an optimization model of agricultural machinery allocation algorithm based on heuristic priority rules in agricultural machinery allocation with the goal of high income and low cost [4]. Based on this research, an improved heuristic search algorithm is also applied to solve the problem of agricultural machinery cross-regional operation service, and it is verified that the algorithm is more effective than Zhang Fan's research results in terms of performance and running time [5]. At the same time, a multi-objective judgment matrix method for agricultural machinery allocation based on expert opinions is combined with analytic hierarchy process and fuzzy evaluation [6]. The use of partitions to solve the optimization of agricultural machinery operation path and effectively improve computing efficiency Dimensionality reduction is combined with the minimum spanning tree method [7], which has also been applied to cross-regional allocation of agricultural machinery. In recent years, a new particle encoding and decoding scheme has shown certain effects in solving the path-planning problem of sugarcane harvesting machinery [8], with the goal of minimizing the total driving distance of all agricultural machinery. An improved immune-tabu search algorithm (ITSA) based on an immune optimization algorithm also has a certain operability in solving the problem of agricultural machinery allocation [9]. However, the allocation of agricultural machinery is a systematic project. Due to the diversity of operation capabilities and operation sites, it is more complicated than the general vehicle allocation problem. Moreover, the current allocation methods of agricultural machinery are aimed at small agricultural machinery mostly, which is suitable for small rural areas. The planting scale and contiguous cultivating area of land transferred to rural areas tend to expand. The Heilongjiang Reclamation Area has a large scale of cultivated land, concentrated cultivated land, and the implementation of unified management of agricultural machinery allocation issues in the special production organization has a demonstrative and leading role. Therefore, it is necessary to adopt new methods for experiments and experiments continuously because of absorbing advanced methods of domestic and foreign agricultural machinery allocation research. It is extremely urgent to improve and establish an agricultural machinery allocation plan that meets the characteristics of agricultural production development in Heilongjiang Reclamation Area and even surrounding rural areas.

A UNIFIED ALLOCATION MODEL FOR AGRICULTURAL MACHINERY IN THE FARM AND CROSS-REGIONAL OPERATIONS 2.1 Problem Description
Farms in Heilongjiang Reclamation Area implement standardized management of agricultural machinery, and implement unified parking and storage, dispatching and commanding, maintenance and repair, oil supply, and fee settlement for agricultural machinery. Each management area in the farm (infield) is relatively independent, and the management area is responsible for the operation of agricultural machinery in the area. After the agricultural machinery in the farm completes the area of operation in this area as required, cross-region (outfield) operations can be carried out. From the perspective of production practice, the current agricultural machinery allocation method in Reclamation Area is mainly based on the agricultural production experience of farmers and agricultural machinery managers for many years, and the agricultural machinery allocation plan is relatively simple.
In this paper, a field survey of some farms in Heilongjiang Reclamation Area found that the farmers inside the farms are prepared to maximize income. A new type of agricultural machinery allocation model is emerging based on the original agricultural machinery allocation model that completes agricultural machinery operations on the farm and then cross-regional operations, that is, the implementation of the unified allocation of agricultural machinery on the farm plots and the crossregional plots outside the farm. In this way, the working area of agricultural machinery can be maximized, the problem of saturation of the number of locomotives in the farm and insufficient workload can be alleviated, and the maximum income of agricultural machinery users can be realized.
This paper uses the data of soybean harvest in 2020 in the second management area of Jianshan Farm in Heilongjiang Reclamation Area to conduct research. There are 7 agricultural machines in this area, which are divided into two types according to their operation capacity, assuming that the daily operation time is 20 hours. The working time of the agricultural machinery is D, according to the actual working date of harvesting soybeans on the farm. It is assumed that D is 11 days, that is, the autumn harvest of soybeans will be completed within 11 days. The plots to operate are divided into on-site plots and crossregional plots. Among them, there are 11 plots in the site (divided according to the principle of proximity), and the total area of soybean harvest is 2464 hectares. There are 9 operational plots in the cross-regional plots, with a total area of 4560 hectares. According to theoretical calculations, there is a surplus of agricultural machinery operations in the farm. If all the operations on the plots in the farm are satisfied, the farmers can operate across regions. After investigation, it is known that the total income from farm machinery household operations and cross-regional income during the soybean harvest in 2020 is 1.99 million yuan.

Assignment of Operation Relations
Assignment of operation relations should ensure that all operations in the farm must be completed within the specified time, and as many agricultural machines as possible are sent to field operations to maximize the net income of the owner of the agricultural machinery. Among them, the cross-regional plots are only used as a means of increasing income. There is no requirement that all assignments must be completed.

Decision Variables
In Eq. (1), there is no working relationship between the agricultural machinery i and the plot j in the farm is represented by 0, and the working relationship is represented by 1.
There is no operational relationship between 0 agreecultural machinery and plot in the farm There is operational relationship between 1 agreecultural machinery and plot in the farm There is no operational relationship between 0 agreecultural machinery and cross-regional plot There is operational relationship between 1 agreecultural machinery and cross-regional plot In Eq. (2), no working relationship between agricultural machinery i and cross-regional plot j is represented by 0, and a working relationship is represented by 1.

Assumptions
(1) Assumption 1: In order to keep the workload of various agricultural machines allocated to the same plot as balanced as possible, it is assumed that the workload of various agricultural machines allocated to a plot adopts the principle of equal distribution in the time dimension. ZX is the workload matrix of each agricultural machine in the farm plot, and ZY is the workload matrix of each agricultural machine in the cross-region plot.
Among them: ZX ij is the operation volume (ha) of agricultural machinery i on plot j in the farm, ZY ij is the operation volume of agricultural machinery i in cross-regional plot j (ha), (2) Assumption 2: In order to facilitate the calculation of operation costs and the management of agricultural machinery, all agricultural machinery on the farm cannot complete all the operations on the inter-regional plots after completing all the operations on the farms. A certain cross-regional plot is only half of the operation and similar situations.

Constraints
The first principle of the allocation of agricultural machinery is to complete the required tasks within the optimal crop growth cycle. All plots in the farm must be completed within the total number of workable days.
The sum of the tasks assigned to each agricultural machine in the cross-regional operation is less than or equal to the area of the cross-regional plot.
The total work volume of a single agricultural machine in the assigned service relationship must be completed within the total workable days D. 1 1

Objective Function
The objective function is the maximum net income of farm machinery households, and the net income is the balance of on-site operation income and cross-region operation income after deducting transportation expenses. Among them, the operation income of the farm is the sum of the product of the agricultural machinery operation area and the agricultural machinery operation fee in the farm. Cross-regional income is the sum of the product of the agricultural machinery operation area of the cross-regional operation plot and the agricultural machinery operation fee. R is the agricultural machinery operation charge standard (yuan/ha), T is the unit distance transportation cost (yuan/km).
Calculated as follows: Income from operations on the farm: Cross-regional income: Transportation costs: Objective function:

Path Planning
After the distribution relationship is solved, the plots of agricultural machinery that need to be operated are also determined. In view of grabbing the farm, the agricultural machinery can directly go to the next plot after the completion of the work on one plot, and then return to the agricultural machinery centre after all the assigned plots are completed. At this time, the operation sequence of each agricultural machine needs to be renewed. The plan is to make the transportation path of each agricultural machine the shortest.

Decision Variables
A certain agricultural machine starts from the agricultural machinery centre and returns to the agricultural machinery centre after completing all the assignments of the plots. The agricultural machinery needs to traverse n locations in total. Let the decision variables be X and u i , where u i represents the serial number of the i th place, The agreecultural machinery does 0 not go from location to location The agreecultural machinery goes 1 to location after passing location 1, 2, ..., , 1, 2, ...,

Constraints
Start from all points once: All points are connected to form a ring, no sub-rings appear:

Objective Function
The Eq. (17) indicates that the agricultural machinery travel path target is the smallest, where c ij is the distance from location i to location j.

Augmented Objective Function
Agricultural machinery allocation problem is a kind of mathematical programming problem with strong constraints. In the process of iterative solution of this kind of problem using intelligent algorithm, the initial value cannot be set in the feasible region in advance. One of the difficulties when using the PSO algorithm to solve the constrained optimization problem is the treatment of the constrained conditions. The penalty function method is a classic method to solve the constrained optimization problem [13]. The penalty function includes an internal penalty function and an external penalty function. In order to facilitate the use of intelligent algorithms, this paper uses the external penalty function method to transform the optimization problem with constraints into optimization problems without constraints.
The external penalty function method, also known as the external point method, is a type of method aimed at "infeasible points". Its basic idea is as follows. When solving constrained optimization problems, penalties are imposed on infeasible iteration points and follow the iteration points. The progress of increasing the penalty amount forces the iteration point to approach the feasible region gradually.
This article defines penalty term of the following form: Among them, usually α = β = 2. Then the mathematical programming problem with constraints in the original problem can be transformed into a mathematical programming problem without constraints by means of the external penalty function: Among them, P(x, σ) is the penalty function or augmented objective function, and σ > 0 is the penalty factor. As the iteration proceeds, σ → +∞, so that the result converges and continuously approaches the optimal solution x * . When the external penalty function is used, this paper selects the value σ, which is too large, and will cause to converge too quickly to the local optimum. Therefore, the large-scale search cannot be performed on the global. This paper selects the value σ too small, which will cause the result to converge too slowly, generally σ = 0.1 × 2 k-1 , where k is the number of iterations.
The objective function in this paper has constraints, and the external penalty function method is used to transform the optimization problem with constraints into the optimization problem without constraints. Essentially, it is a method of converting constrained problems into unconstrained problems by penalizing infeasible solutions.

OVERVIEW OF PARTICLE SWARM OPTIMIZATION 3.1 Algorithm Description
Particle Swarm Optimization (PSO) is an optimization algorithm based on swarm intelligence proposed by Kennedy and Eberhart in 1995 [10]. It is developed by simulating the foraging behavior of a flock of birds and developed at random based on group collaboration. Particle swarm algorithm is characterized by simple and easy implementation, fast convergence speed, and few setting parameters. It has become a hot spot in the field of modern optimization methods. The current value of each optimization decision variable in PSO can be regarded as a bird in the search space, which we call a "particle". All particles have a fitness value determined by the optimized function (fitness function) to judge whether the current position is good or bad. Each particle must be endowed with a memory function to remember the best position found. Each particle also has a speed that determines the direction and distance they fly, and then the particles follow the current optimal particle to search in the solution space. Compared with other evolutionary calculation methods, the PSO algorithm has a global search strategy, which avoids complex genetic operations, and the best solution can be found in a limited number of iterations.
PSO is initialized as a group of random particles, and then the speed and position of the particles are updated through iteration until the convergence criterion (i.e. the maximum number of iterations) is met, and then the best particle found so far is used as the solution of the problem (or close to the optimal solution). In each iteration, the particle updates itself by tracking two "extreme values". The first is the optimal solution found by the particle itself. This solution is called the individual extreme value pbest, and the other extreme value is the maximum value found by the entire population. Excellent solution, this extremum is the global extremum gbest. When finding these two optimal values, the particle updates its speed and new position according to the following formula [11].
Among them, i  {1, 2, …, n}, n is the total number of particles in this group. v is the velocity of the particles, is a random number between (0, 1). ω is the inertia factor, which adjusts the solution space. The search range is between (0, 1). c 1 and c 2 are learning factors, also called acceleration constants, to adjust the maximum step length of learning, usually c 1 = c 2 = 2. x i is the position of the particle [12].

The Algorithm Workflow
(1) Initia: Initialize the particle population, including random position and velocity.
(2) Evaluation: According to the fitness function, evaluate the fitness of each particle.
(3) Find the pbest: For each particle, compare its current fitness value with the fitness value corresponding to its individual historical best position (pbest). If the current fitness value is higher, it will update the historical best Good location (pbest).
(4) Find the gbest: For each particle, compare its current fitness value with the fitness value corresponding to the global best position (gbest). If the current fitness value is higher, update the current particle's position to the global best Location (gbest).
(5) Update the Velocity: Update the velocity and position of each particle according to the announcement. (6) If the end condition is not met, then return to step (2), and the algorithm will stop when the overall planning algorithm reaches the maximum number of iterations or the increment of the best fitness value is less than a given threshold.

Algorithm Improvement Processing
Since PSO was proposed, it has shown good optimization performance when solving optimization problems, but when solving complex and high-dimensional optimization problems, PSO still has problems such as slow convergence speed and low optimization accuracy. The particle swarm algorithm was mainly used to solve continuous variable problems at the beginning of its creation. However, in some practical engineering applications, the variables to solve may not be continuous, which requires corresponding improvements to the basic particle swarm algorithm [14].
At present, the main idea to solve the discrete optimization problem is to transform the discrete optimization problem into a continuous optimization problem, which uses the continuous optimization method to solve the discrete optimization problem [15]. In the particle swarm algorithm, there are many ways to solve the problem of discrete variable optimization. After empirical exploration, innovative use of 0-1 mapping is applied to transform the discrete problem into a continuous problem for solution.
The specific methods are as follows: For the case that the decision variable is in the form of 0 -1, the decision variable can be in the form of a real number, which is randomly generated during initialization. The initialization formula is as follows: Then this article converts it to 0 or 1 in the calculation of the external penalty function and the objective function according to its sign. The formula is as follows.

TEST DATA PREPARATION
This study takes autumn soybeans harvested from Jianshan Farm in Heilongjiang Reclamation Area as the research object, and the data comes from actual farm research. Tab. 1 and Tab. 2 respectively describe the specific parameters of the infield plot information in the farm and the cross-regional plot information, indicating the actual area of crops in the plot under the condition of a certain longitude and a certain latitude.  Tab. 3 describes the relevant parameter information of agricultural machinery operations. Two types of John Deere S660 and S680 grain combine harvesters were used in the experiment, and their operation speeds were 4 hectares/hour and 6 hectares/hour, respectively. The maximum operation time per day is calculated as 20 hours, that is, the operation speed is 80 hectares and 120 hectares per day. Among them, agricultural machinery No. 1 -No. 5 is John Deere S660 model, and agricultural machinery No. [6][7] is John Deere S680 model. The operation time D for soybean harvest in 2020 is 11 days. The details are as follows.

RESULTS AND ANALYSIS 5.1 Calculation Results
Based on the above algorithm and test data, Matlab2018a data analysis software is used to construct a simulation test of path planning optimization based on particle swarm algorithm. Take the number of particle swarms as 500, the maximum number of iterations is 2000, run 5 times, and the single run time is about 240 seconds. In order to ensure the balance of the local search ability of the particle population and the global search ability, the learning factor c 1 is 2 and c 2 is 2. The inertia weight ω is 1, and the simulation results are shown in Tab. 4.

Example Result 5.2.1 Convergence of Objective Function
Run related programs in Matlab2018 are based on the particle swarm algorithm, and the solution results are shown in Fig. 2. It can be seen from Fig. 2 that the algorithm has a fast convergence speed. After 617 iterations, its total income has stabilized. At this time, the maximum total income is 2.05 million yuan. The total revenue increases with the growth of the number of iterations, and finally tends to be stable. Since the initial position of each iteration is random, it shows that the particle swarm optimization algorithm has a global optimal solution.    1  2  3  4  5  6  7  8  9  10  11  1#  0  13  0  0  54  125  34  0  0  23  0  2#  15  13  74  0  0  0  34  105  0  23  35  3#  15  0  74  0  54  0  0  0  84  0  35  4#  15  0  0  0  54  0  34  105  84  23  0  5#  0  13  0  0  54  0  34  105  84  0  0  6#  0  20  0  32  0  0  51  158  126  34  52  7#  23  0  111  32  81  188  51  0  0 34 52 In the unified allocation model for agricultural machinery in the farm and cross-regional, the particle swarm algorithm is used to optimize the distribution of agricultural machinery and land parcels in the farm, and the distribution of agricultural machinery and land parcels across regions. They are described by numbers 1-7, respectively, in Tab. 5 and Tab. 6. The detailed distribution of the optimal allocation of agricultural machinery in the farm plots and cross-regional plots. "1" means that there is agricultural machinery operation on this plot, and "0" means that there is no agricultural machinery operation on this plot. The details are as follows.
They respectively describe the distribution of the operation area of No. 1-No. 7 agricultural machinery in different plots and across different plots of the farm, as shown below in Tab.5 and Tab.8. Figure 3 1# -7#Agricultural machinery operation route and convergence track of PSO

Route Plan
The particle swarm algorithm is used to plan the path of different agricultural machinery in the farm and crossregional plots. The working path and shortest distance of each agricultural machine are as follows.
It can be seen from Fig. 3 that the total distance traveled and income of each agricultural machinery after assignment and route planning are as follows: 1# Agricultural Machinery departs from the Agricultural Machinery centre, passing through the infield 6 → 7, the outfield 6 → 8 → 9 → 4 → 1, the infield 10 → 2 → 5, and finally returns to the agricultural machinery centre with a total length of 511.78 km, income 268500 yuan.
5# Agricultural Machinery departs from the Agricultural Machinery centre, passing through the infield 7, the outfield 9 → 1 → 3 → 5, the infield 9 → 8 → 2 → 5, and finally returns to the agricultural machinery centre, with a total length of 296.55 km, income 220800 yuan.
7# Agricultural Machinery departs from the Agricultural Machinery centre, passing through the infield 11 → 6 → 7, the outfield 6, the infield 5 → 4 → 3 → 1, the outfield 5→1→4, the infield 10, and finally back The Agricultural Machinery centre has a total length of 482.29 km and a total length of 399000 yuan.

CONCLUSION
Constructing an optimization model with the goal of maximizing the net income of agricultural machinery households, this paper introduces a 0 -1 mapping relationship to carry out operation assignment and path planning step-by-step, so that the particle swarm algorithm can be realized on the discrete problem of agricultural machinery allocation. The particle swarm algorithm is used to solve the problem, which realizes the path allocation of agricultural machinery in the farm and cross-regional operations that complete the soybean harvesting operation within the specified time. This allocation mode searches for the optimal path of each agricultural machinery, which has a faster convergence speed. When the convergence speed is 617, the target stable value 205 is reached, the maximum value of the convergence target is obtained, the optimal path plan is realized, and a satisfactory operation relationship assignment and path planning results are obtained. From the perspective of income results, the total income after the unified allocation has increased by 60000 yuan compared with that before the unified allocation, the average income of a single agricultural machine has increased by 8600 yuan, and the income level of agricultural machinery households has increased through path allocation.