https://doi.org/10.31449/inf.v47i5.4557 Informatica 47 (2023) 69–74 69 Optimal Path Planning of Logistics Distribution of Urban and Rural Agricultural Products From the Perspective of Supply Chain Xiumei Wang * 1 and Xiaoli Song 2 1 Business School, Nanfang College Guangzhou, Guangzhou, Guangdong 510970, China 2 School of Economics and Management, Beijing City University, Beijing 100083, China Email: 1 zuoxiu85467@126.com, 2 songxiaoli@bcu.edu.cn * Corresponding author Keywords: supply chain, agricultural product, logistics distribution, genetic algorithm Received: December 9, 2022 Logistics distribution is a crucial part of the supply chain of agricultural products. This paper optimized the distribution path of agricultural products between distribution centers and customers using the adaptive genetic algorithm and conducted a simulation comparison with greedy and traditional genetic algorithms. The results showed that although the greedy algorithm obtained the path planning scheme faster, the planning path obtained by the genetic algorithm was better, and the adaptive genetic algorithm obtained a shorter distribution path, lower transportation cost, and less computation time than the traditional genetic algorithm. Povzetek: Raziskava je primerjala adaptivni genetski algoritem z drugimi algoritmi na problemu distribucije kmetijskih proizvodov med centri in strankami. 1 Introduction Rapid economic development has improved people’s standard of living, which in turn has stimulated the desire to consume and driven economic growth [1]. At the same time, the improvement of the logistics level not only enables people to choose a wider variety of goods but also enables remote shopping, free from geographical restrictions on shopping. In addition to the improvement of shopping, the improvement of logistics is also beneficial to the development of the supply chain. The supply and demand sides of products in the supply chain are linked together through specific channels, and the supply side provides the related products according to the requirements of the demand side [2]. The supply side in the supply chain can have more than one demand side, and the demand side can have more than one supply side. The supply and demand sides in the supply chain together form a supply network. The supply side needs to plan a reasonable logistics distribution path when distributing products to multiple demand sides [3]. Related studies are as follows. Xiong et al. [4] proposed to optimize the logistics distribution path using the fish swarm algorithm and found through experiments that the algorithm quickly jumped out of the locally optimal solution and converged to the shortest path. Yu et al. [5] established a three- dimensional constraint model for the actual demand in e- commerce and used it to optimize the logistics distribution path algorithm. The experimental results showed that the optimized algorithm reduced the distribution mileage by more than 25% compared to the genetic algorithm, i.e., the comprehensive performance of the model was improved. Yang [6] established a hard time-window path optimization model for logistics distribution under a dynamic road network based on the distribution path optimization, considering the dynamic uncertainty of the urban road network and taking the minimum cost as the objective function. Table 1: A summary of this paper. The purpose of this study The objective of this paper is to optimize the logistics distribution path of agricultural products in the supply chain to improve the logistics distribution efficiency and reduce the distribution cost. The design of this study In this paper, after constructing the distribution model of agricultural logistics under the supply chain, the genetic algorithm was used to optimize the distribution path, and the fixed crossover and mutation probabilities in the genetic algorithm were improved to the adaptive probabilities. The results of this study The experimental results showed that the improved adaptive genetic algorithm obtained better logistics distribution paths and had higher planning efficiency than the traditional genetic algorithm and greedy algorithm. The contribution of this study This paper improved the crossover and mutation probabilities of the genetic algorithm to make adaptive adjustment according to the target in the process of optimization, so as to obtain a better distribution path. This work provides an 70 Informatica 47 (2023) 69–74 X. Wang et al. effective reference for agricultural logistics distribution path planning. The limitation of this study The shortcoming of this paper is that the constraints of the model were simplified for the convenience of calculation when constructing the distribution model of agricultural logistics under the supply chain, which makes the planning scheme deviate to a certain extent. Therefore, the future research direction is to make more specific provisions for the constraints of the distribution model. Figure 1: Basic structure of agricultural supply chain. 2 Agricultural products supply chain A supply chain is a customer or market demand-oriented channel relationship between supply and requisitioning parties. The demand side finds the supply side based on the demand for the product, and the supply side delivers the product to the location of the demand side through logistics. Agricultural products have higher time limit requirements than other types of products [7]. Users can get the agricultural products they need faster through the supply chain. The concept of customer demand as the business direction in the supply chain can, in turn, guide the production direction of agricultural products and reduce unnecessary losses for farmers. Figure 1 shows the basic structure of the agricultural products supply chain. Firstly, agricultural products customers will communicate their demand information for agricultural products to the agricultural products distribution center, and the agricultural products distribution center will summarize the demand information from different customers and then communicate the corresponding demand information to the suppliers of the agricultural products [8]. After receiving the demand information, the suppliers of the agricultural products deliver the corresponding agricultural products to the distribution center, and finally, the distribution center carries out the logistics distribution of agricultural products according to the customer’s demand information. The agricultural product supply chain structure diagram in Figure 1 is a simplified sequence diagram. In the actual supply chain, there are plural suppliers, distribution centers, and customers, but the distribution centers play the role of aggregation and distribution of agricultural products, so the number of distribution centers is smaller; therefore, the actual structure of the supply chain is more like a net than a chain. In addition, Figure 1 also shows that the types and number of agricultural products to be distributed by the distribution center depend on the information provided by the customer, and the types and number of agricultural products sent by the supplier to the distribution center depend on the information provided by the distribution center. It is further seen that in the supply chain model, agricultural product sales are guided by the market demand and are not decided by the suppliers, which promotes market development [9]. 3 Logistics distribution path optimization from a supply chain perspective 3.1 Logistics distribution path model This paper optimizes the efficiency and cost of supply chain operation by optimizing the logistics distribution path in the supply chain. Since the distribution center initiates the demand for agricultural products to the supplier, and then the supplier delivers the agricultural products to the distribution center, the path between the supplier and the distribution center is fixed and does not need optimization, so this paper only considers the path solution between the distribution center and every user when considering the logistics distribution path optimization. In the actual supply chain, every distribution center needs to distribute agricultural products to different customers, and every distribution center needs to take itself as the starting point to design the distribution path. Planning the distribution path between distribution centers and customers is considered a multi-point logistics distribution path planning problem [10]. Realistic distribution path planning is subject to many influencing factors and involves more complicated calculations as multiple vehicles are involved in distribution within a distribution center. Therefore, some assumptions are often made to facilitate computation when constructing the multi-point logistics distribution path model. The assumptions made in this paper are: (1) the quantity of agricultural products in the distribution center can meet the demand of all customers who have contact with the distribution center; (2) there are enough vehicles in the distribution center for agricultural products distribution, and the specification of every vehicle is consistent; (3) when one vehicle is responsible for the demand of one customer, other vehicles are not responsible for that customer; (4) vehicles in the distribution process ignore the impact of loading and unloading at the distribution point on the transportation time, and because the vehicle specification and transportation speed are consistent, the transportation cost of every distribution vehicle is only related to the path length; (5) additional assignments or additions of products will be allowed while the vehicle is following the planned route for delivery; (6) the geographical relationship between the distribution center and the customer is known, and the customer’s demand for agricultural products is also known. Optimal Path Planning of Logistics Distribution of Urban and Rural… Informatica 47 (2023) 69–74 71 The expression of the logistics distribution path model [11] is: j i x d C Z R i R j N k ijk ijk k    =    = = = 0 0 1 ) ( min . (1) The constraints are:                  =    = = =      = =    =      = = = = = 1 , , 3 , 2 , 1 1 0 ) ( 0 i point passes k le when vehic 1 0 j point to i point from drives k le when vehic 1 1 0 1 0 1 1 R i k i N k ik R i N k i ik k R i ijk ik ijk x R i i N y q y Q else x y else x  , (2) where Z is the total transportation cost of the distribution route, k is the distribution vehicle number (there are N vehicles), i and j are the customer node number (the number of the distribution center is 0, and the customer node number is 1, 2, 3 ......R), ijk x is the decision variable (its value is 1 when distribution vehicle k drives from node i to node j and 0 else), ik y is the decision variable (its value is 1 if the demand of node i is completed by distribution vehicle k and 0 else),    = = =  = R i i N y N k ik , , 3 , 2 , 1 1 0 1  represents other vehicles cannot be responsible for meeting the demand of a customer after one of them has been responsible for that customer, 1 1 0 =  = R i k i x represents that the distribution vehicle will return to the distribution center after completing the distribution task, k Q represents the maximum load of the distribution vehicle [12], i q represents the demand of customer node i for agricultural products, k C is the transportation cost per unit distance of the distribution vehicle, and ijk d is the transportation distance between nodes i and j . 3.2 Distribution path optimization based on the adaptive genetic algorithm A genetic algorithm is used to optimize the logistics distribution path from a supply chain perspective. The basic principle of the genetic algorithm for route optimization is to consider nodes as genes in a chromosome, i.e., the sequence of genes as the distribution path of vehicles. Figure 2: Distribution path optimization process based on the adaptive genetic algorithm. When using the genetic algorithm to optimize the logistics distribution path, the initial population is first randomly generated according to specific steps, and then the transportation cost is calculated for the distribution path scheme represented by every chromosome in the population using the formula of the distribution path model. The transportation cost is the adaptive value of the genetic algorithm. If the algorithm does not reach the termination condition, the iteration is repeated according to the preset crossover and mutation probabilities until the termination condition is satisfied. The traditional genetic algorithm keeps the good gene fragments under the guidance of the adaptive value, integrates them by crossover operation [13], and generates new gene fragments by mutation operation; eventually, the adaptive value of the population is converged. The key lies in the crossover and mutation operations in the genetic operation. The probabilities of the two operations will directly affect the convergence speed and quality of the algorithm, but the crossover and mutation probabilities in the traditional genetic algorithm are usually fixed parameters set empirically. Large probabilities may lead to difficulty in convergence or make the solution fall into locally optimal in the late iteration. Therefore, the genetic algorithm was optimized by adaptive crossover and mutation probabilities [14]. The optimized path optimization flow is shown in Figure 2. ① A customer node is randomly selected from the set of customer nodes that have not been assigned a distribution vehicle. ② A distribution vehicle is selected randomly from the set of distribution vehicles. ③ If the remaining load of the selected distribution vehicle can meet the demand quantity of the selected customer node, then the customer node is assigned to that distribution vehicle, and if it cannot meet, then it returns to step ②. ④ Whether all the customer nodes are allocated is determined. If not, it returns to step ①; if they are, the allocation scheme of customer nodes is encoded to generate chromosomes. The structure is shown in Figure 3. The large gene fragment in the chromosome is the distribution path scheme of a distribution vehicle. The number of distribution centers is at the beginning and the end, and the allocation order of customer nodes in the middle is the distribution order. 72 Informatica 47 (2023) 69–74 X. Wang et al. Figure 3: The coding structure of the distribution scheme. ⑤ The chromosomes are stored in the population to judge whether the number of chromosomes in the population reaches the preset value. If not, it returns to step ①; if it does, it goes to the next step. ⑥ The formula of the logistics distribution path model is used to calculate the transportation cost of the distribution path scheme corresponding to every chromosome, i.e., the adaptive value of the chromosome. ⑦ Whether the genetic algorithm reaches the termination condition is determined. If it does, the optimal chromosome distribution path scheme is output; if not, the crossover and mutation probabilities are adjusted according to the adaptive value of the chromosome. The adaptive adjustment formula is:                       −   −  − − =            −   −  − − = avg m avg avg m m m m avg c avg avg c c c c Z Z P Z Z Z Z Z Z P P P P Z Z P Z Z Z Z Z Z P P P P 1 m in m in 2 1 1 1 m in m in 2 1 1 ) )( ( ) )( ( , (3) where c P and m P are the crossover and variation probabilities after adaptive adjustment, 1 c P and 1 c P are the initial crossover probabilities, 1 m P and 2 m P are the initial mutation probabilities, Z ′ is the adaptive value of an individual, min ′ Z is the smallest adaptive value in the current population, Z ′ ′ is the smaller adaptive value of an individual where crossover or mutation occurs, and avg Z ′ is the average adaptive value of the current population. ⑧ Genetic operations are performed on the population chromosomes, including selection, crossover, and mutation. The selection operation is to keep the 10% of chromosomes with the lowest transportation cost in the population directly as the offspring chromosomes. The crossover operation is to exchange all distribution point genes within the daughter chromosomes with the same vehicle number in two chromosomes, delete duplicate genes, and supplement the missing distribution point genes to ensure complete and non-duplicate distribution points in the whole chromosome. The mutation operation is to exchange the distribution point gene to be mutated in the daughter chromosome with the distribution point gene at the same gene position in another daughter chromosome. A population composed of offspring chromosomes is obtained after selection, crossover, and mutation operations. Then, it returns to step ⑥. Table 2: Demand for agricultural products at nodes and the distance between nodes in the simulation experiment. Node number Demand for agricultural products/t Coordinates/km 0 / ) 5 . 3 , 0 . 3 ( 1 0.414 ) 5 . 5 , 0 . 2 ( 2 0.325 ) 0 . 7 , 0 . 1 ( 3 0.201 ) 5 . 6 , 0 . 6 ( 4 0.311 ) 5 . 5 , 0 . 4 ( 5 0.213 ) 0 . 4 , 5 . 5 ( 6 0.123 ) 0 . 3 , 5 . 6 ( 7 0.347 ) 5 . 2 , 5 . 1 ( 8 0.435 ) 0 . 2 , 0 . 5 ( 9 0.256 ) 0 . 1 , 0 . 2 ( 10 0.414 ) 0 . 1 , 0 . 6 ( 4 Simulation experiments 4.1 Experimental environment MATLAB software simulated the logistics distribution path optimization algorithm [15]. The experiment was conducted on a server in a lab. 4.2 Experimental setup To facilitate calculation, the agricultural products were considered as one kind, and the total weight was used as the demand of customer nodes. Among the node numbers, 0 was the distribution center, and 1~10 was the customer node numbers. The demand of the customer nodes for agricultural products and the distance between different nodes are shown in Table 2. In addition, the distribution center had four trucks with the same specifications, the maximum weight of the trucks was 1.5 tons, and the transportation cost was 15 yuan/km. In order to verify the effectiveness of the adaptive genetic algorithm, this paper also conducted simulation experiments on the traditional genetic and greedy algorithms for comparison. When the greedy algorithm planned the distribution path, it first scanned counterclockwise with the distribution center as the origin and assigned the customer nodes to the distribution vehicles from near to far. The vehicle was changed by another one when the remaining load of the vehicle was not able to bear the demand. After the customer nodes were assigned, every vehicle selected the nearest distribution node as the next node. The parameters of the traditional genetic algorithm for planning the distribution path are as follows. The population size was 30, c P was 0.07, m P was 0.01, and the maximum number of iterations was 1000. Optimal Path Planning of Logistics Distribution of Urban and Rural… Informatica 47 (2023) 69–74 73 The relevant parameters of the adaptive genetic algorithm for planning the distribution path are as follows. The population scale was 30, 1 c P was 0.07, 2 c P was 0.05, 1 m P was 0.01, 2 m P was 0.005, and the maximum number of iterations was 1000. 4.3 Experimental results Figure 4 shows the logistics distribution paths obtained using the greedy, traditional genetic, and adaptive genetic algorithms, respectively. Every color in Figure 4 represents the distribution path of one distribution vehicle. Since the specifications of the distribution vehicles were consistent, no additional path attribution was marked. It was seen from Figure 4 that the path scheme obtained by every algorithm required three distribution vehicles for distributing agricultural products. The distribution paths under the greedy algorithm were 0-7-1-2-4-0, 0-5-6-8-10- 9-0, and 0-3-0; the distribution paths under the traditional genetic algorithm were 0-4-1-2-3-5-0, 0-7-9-10-8-0, and 0-6-0; the distribution paths under the adaptive genetic algorithm were 0-1-2-3-4-0, 0-5-6-10-8-0, and 0-7-9-0. Figure 4: Logistics distribution paths under three distribution path planning algorithms. Table 3: The total length and transportation cost of the distribution paths under the three distribution path planning algorithms and the corresponding calculation time. Path length/km Transportat ion cost/yuan Calculation time consumed for the path scheme/s The greedy algorithm 34.57 518.55 13.56 The traditional 33.93 508.95 25.67 genetic algorithm The adaptive genetic algorithm 29.54 443.10 19.65 Table 3 shows the total transportation length and cost of the distribution paths under the three-logistics distribution path planning algorithms and the corresponding time consumed for calculating the three path schemes shown in Figure 4. The total length of the distribution path obtained by the greedy algorithm was 34.57 km, the total transportation cost was 518.55, and the time taken to calculate this path scheme was 13.56 s; the total length of the distribution path obtained by the traditional genetic algorithm was 33.93 km, the total transportation cost was 508.95, and the time taken to calculate this path scheme was 25.67 s; the distribution path obtained by the adaptive genetic algorithm was 29.54 km, the total transportation cost was 443.10, and the time taken to calculate this path scheme was 19.65 s. The comparison of the data in Table 2 showed that the greedy algorithm obtained the longest distribution path and the highest transportation cost, the traditional genetic algorithm obtained the second longest distribution path and the second lowest transportation cost, and the adaptive genetic algorithm obtained the shortest distribution path and the lowest transportation cost. The greedy algorithm spent the shortest time calculating the path scheme, while the traditional genetic algorithm spent the longest time. 5 Discussion The supply chain is a customer or market demand-oriented channel relationship between supply and demand. The demand side seeks out the supply side according to the demand for products, and the supply side delivers the products to the demand side through logistics according to the demand side’s product demand. With the supply chain, customers can get the goods they need more quickly. Especially for agricultural products with a short shelf life, the faster the transportation and delivery, the higher the sale value can be retained. In the process of logistics distribution of agricultural products supply chain, the planning of the distribution route is an important part. After constructing the logistics distribution model of agricultural products under the supply chain, this paper used the genetic algorithm to optimize the logistics distribution path plan. In order to improve the performance of the genetic algorithm, this paper improved the fixed crossover and mutation probabilities of the traditional genetic algorithm into probabilities that can be adjusted according to the adaptive value of the distribution plan. Finally, the improved genetic algorithm was compared with the traditional genetic algorithm and greedy algorithm in the simulation experiment. The final experimental results are shown in the previous section. The experimental results show that the proposed adaptive genetic algorithm yielded the best distribution path 74 Informatica 47 (2023) 69–74 X. Wang et al. solution and took the least amount of time to compute the distribution solution. The reason is as follows. The greedy algorithm only considered the nearest node, i.e., the locally shortest path, when selecting the next node, but the combination of the local shortest path might not be the globally shortest. Moreover, the assignment results of the scanning method adopted by the greedy algorithm were contingent, and the customer nodes assigned to the distribution vehicles also affected the subsequent path planning. The genetic algorithm randomly generated the chromosomes representing the path scheme, reducing the contingency of node assignment as much as possible. The adaptive values afterward guided the crossover and mutation from the global perspective; thus, its planning result was better than the greedy algorithm. In terms of computing time, the greedy algorithm selected the next node according to the principle of being closest to the current node, i.e., it only compared the path length. The genetic algorithm iterated the population repeatedly until the adaptive population value converged and stabilized, and the adaptive value of all chromosomes was calculated in every iteration. Therefore, the traditional genetic and adaptive genetic algorithms both took more time than the greedy algorithm. The adaptive genetic algorithm autonomously adjusted the crossover and mutation probabilities so that it did not fluctuate up and down around the optimal adaptive value after iteration due to excessively large probability but stably converged to the optimal solution, so it consumed the shortest time. 6 Conclusion This paper briefly introduced the basic structure of the agricultural product supply chain, used the adaptive genetic algorithm to optimize the logistics distribution path in the agricultural product supply chain, and finally compared it with greedy and traditional genetic algorithms in the simulation experiment. The obtained results are as follows. (1) The path schemes obtained by the three algorithms all needed three vehicles; the scheme of the greedy algorithm was 0-7-1-2-4-0, 0-5-6-8-10-9-0, and 0- 3-0, the scheme of the traditional genetic algorithm was 0- 4-1-2-3-5-0, 0-7-9-10-8-0, and 0-6-0, and the scheme of the adaptive genetic algorithm was 0-1-2-3-4-0, 0-5-6-10- 8-0, and 0-7-9-0. (2) The total length and transportation cost of the distribution path obtained by the greedy algorithm were 34.57 km and 518.55 yuan, those of the traditional genetic algorithm were 33.93 km and 508.95 yuan, and those of the adaptive genetic algorithm were 29.54 km and 443.10 yuan. (3) The time consumed by greedy, traditional genetic, and adaptive genetic algorithms to calculate the path scheme was 13.56 s, 25.67 s, and 19.65 s, respectively. References [1] Yao C (2020). Research on logistics distribution path analysis based on artificial intelligence algorithms. International Journal of Biometrics, 12, pp. 100-108. https://doi.org/10.1504/IJBM.2020.105625 [2] Zong L (2021). Smart Logistics and Distribution System Based on Laser and Vision Fused SLAM Algorithm. Modern Economics & Management Forum, 2, pp. 227-238. https://doi.org/10.32629/memf.v2i6.539 [3] Liu G, Hu J, Yang Y, Xia S, Lim MK (2020). Vehicle routing problem in cold Chain logistics: A joint distribution model with carbon trading mechanisms. Resources Conservation and Recycling, 156, pp. 104715. https://doi.org/10.1016/j.resconrec.2020.104715 [4] Xiong C, Xu Y (2021). Research on Logistics Distribution Path Planning Based on Fish Swarm Algorithm. Journal of Physics: Conference Series, 1883, pp. 1-6. https://doi.org/10.1088/1742-6596/1883/1/012040 [5] Yu F, Zhou Y (2021). Optimization of E-Commerce Logistics Distribution Path Algorithm under the Background of Big Data. Journal of Physics: Conference Series, 1744, pp. 1-7. https://doi.org/10.1088/1742- 6596/1744/4/042214 [6] Yang S (2020). Optimization of Urban Logistics Distribution path under dynamic Traffic Network. International Core Journal of Engineering, 6, pp. 243-248. https://doi.org/P20190813001-202001-201912170001- 201912170001-243-248 [7] Zou Y, Si W (2021). Research on Logistics Distribution in E-commerce Environment Based on Particle Swarm Optimization Algorithm. Journal of Physics: Conference Series, 1881, pp. 1-10. https://doi.org/10.1088/1742- 6596/1881/4/042059 [8] Fu M, Wang D (2020). Research on Optimization of cold chain logistics distribution path of fresh products based on Hybrid Genetic Algorithm. IOP Conference Series: Earth and Environmental Science, 585, pp. 1-5. https://doi.org/10.1088/1755-1315/585/1/012131 [9] Lu J C, Nie X Y (2019). Logistics distribution path optimization research based on adaptive chaotic disturbance flies optimization algorithm. IOP Conference Series Earth and Environmental Science, 237, pp. 1-8. https://doi.org/10.1088/1755-1315/237/5/052068 [10] Lu S, He T, Zhou Q, Wen J, Liu Y, Zhang M (2020). Research on a Distribution-Outlier Detection Algorithm Based on Logistics Distribution Data. Journal of Physics: Conference Series, 1624, pp. 1-6. https://doi.org/10.1088/1742-6596/1624/4/042002 [11] Chen J, Xu S, Chen H, Zhao C, Xue K (2020). Research on Optimization of Food Cold Chain Logistics Distribution Route Based on Internet of Things. Journal of Physics Conference Series, 1544, pp. 1-8. https://doi.org/10.1088/1742-6596/1544/1/012086 [12] Wang C L, Wang Y, Zeng Z Y, Lin CY, Yu QL (2021). Research on Logistics Distribution Vehicle Scheduling Based on Heuristic Genetic Algorithm. Complexity, 2021, pp. 1-8. https://doi.org/10.1155/2021/8275714 [13] Wang Y, Zhou H, Wang Y (2017). Research and application of genetic algorithm in path planning of logistics distribution vehicle. AIP Conference Proceedings, 1864, pp. 1-5. https://doi.org/10.1063/1.4992864 [14] Simic D, Kovaevi I, Svirevi V, Simic S (2015). Hybrid Firefly Model in Routing Heterogeneous Fleet of Vehicles in Logistics Distribution. Logic Journal of IGPL, 23, pp. 521-532. https://doi.org/10.1093/jigpal/jzv011 [15] Gu W, Liu Y, Wei L, Dong B (2015). A Hybrid Optimization Algorithm for Travelling Salesman Problem Based on Geographical Information System for Logistics Distribution. LISS, 8, pp. 1641-1646. https://doi.org/10.14257/ijgdc.2015.8.3.33