Optimization of the supply chain network planning problem using an improved genetic algorithm

. The planning problem of supply chain network is highly related to logistics cost and product quality. In this paper, for the optimization of supply chain network planning problem, an agricultural product supply chain network under the direct docking model between farmers and supermarkets was taken as an example to establish an agricultural product supply chain network planning model with the lowest cost as the objective. Then, an improved genetic algorithm (GA) was designed to solve the model. The analysis of the arithmetic example showed that compared with the traditional GA, the total cost obtained by the improved GA was lower, at 39,004.48 $, which was 6.5% less than that of the traditional GA; the solution result of the improved GA was also superior to that of other heuristic algorithms, such as particle swarm optimization and ant colony optimization. The experimental results demonstrate the optimization effectiveness of the improved GA for the supply chain network planning problem, and it can be applied in practice.


Introduction
Under the influence of market development and changes, the supply chain network is becoming more and more complex [1], and the requirements for the supply chain network are becoming higher and higher.Supply chain network refers to the structure of the net chain formed by various members involved in the product/service circulation process, including the producer, the distributor, and the consumer.In order to ensure the quality of products and at the same time reduce the cost of each link in the supply chain network as much as possible [2], the supply chain network planning problem has become a problem of increasing interest.The optimization of supply chain network planning problem refers to the appropriate design and adjustment of the network structure in order to obtain the best benefits [3].Under the influence of product characteristics, market demand, and transportation methods [4], different supply chain networks have different characteristics, so there are nonlinear problems.With the advancement of technology, more and more methods have been applied to solve this optimization problem [5].Quddus et al. [6] proposed a two-stage chance-constrained stochastic programming model for biofuel supply chain networks and then used a combined sample-average approximation algorithm to solve it.Computational experiments were conducted to verify the effectiveness of the method using Mississippi as an example.Agac et al. [7] designed a new blood supply chain network model using mixed-integer nonlinear programming and used a variational genetic algorithm (GA) to solve the problem.They demonstrated the usefulness of the model using the Eastern Black Sea region of the Turkish Red Crescent as an example.Baghizadeh et al. [8] studied a sustainable supply chain for strawberries and designed a multi-objective, multi-cycle, multi-product mathematical model.They transformed the model into a single-objective model by the e-constraint method and solved it by the Lagrangian relaxation method.The model was found to be useful for decision making through a case study in Iran.Setiyawan et al. [9] designed a supply chain network to achieve the objective of reducing the total annual cost of a cement manufacturer.After modeling, the optimal solution was obtained using mixed integer linear programming, which provided some suggestions for the subsequent market allocation of this manufacturer.The study conducted by Tikito et al. [10] focused on a multi-level, multi-product supply chain and used dynamic programming to solve the stochastic model predictive control problem in order to determine the optimal strategy for minimizing transportation and warehousing costs.Gonzalez et al. [11] discussed the multimodal transportation problem aiming at finding out which is most cost-effective distribution route for cast iron ductile piping.They analyzed three different types of transportation, including highways, railways, and maritime shipping, and employed evolutionary algorithms to minimize the overall computational cost.This paper mainly studied the optimization problem of an agricultural supply chain network in a region with the lowest cost as the objective, and used an improved GA to solve it, in order to understand the optimization effect of the method for the supply chain network planning problem.This work provides theoretical support for solving the supply chain network planning problem in practice.

Supply chain network planning problems and modeling
The freshness of agricultural products is very important, which has a great relationship with the circulation time.In the process of transportation, agricultural products will inevitably appear loss, resulting in quality decline.In order to attract customers, supermarkets must strive to obtain fresher and better quality agricultural products for sale, which has put forward high requirements on the transportation and storage capacity of supermarkets.In recent years, the supermarket consumption mode has been combined with online and offline forms, the sales space of agricultural products has been further expanded, and the cold chain logistics has also been rapidly developed.As a result, a new form of direct docking between farmers and supermarkets has emerged, i.e., supermarkets trade directly with farmers, eliminating the intermediary distribution link.This new form is conducive to supermarkets to reduce procurement costs and improve the quality of agricultural products, and can also help farmers to increase their income more directly and effectively.It can also help consumers to obtain inexpensive and high-quality agricultural products.Therefore, this mode has great practical value.
Under the mode of direct farmer and supermarket docking, the supply chain network of agricultural products is shown in Figure 1.
As shown in Figure 1, after the cold chain vehicle departs from the distribution center, it reaches the location of the production base of the agricultural products/ farmers, picks up the agricultural products, and distributes them directly to each supermarket.It is assumed that: -The cold chain vehicles are of the same type and have a known load.-The vehicle transportation process does not consider congestion, breakdown, etc., and the speed of the vehicle is known.-The vehicle departs from the distribution center and eventually returns to the distribution center.
-The loading and unloading time is fixed at 5 min.
-The purchase price of agricultural products is the lowest by default.-Any one vehicle can meet the needs of any supermarket.
-There is only one distribution center, and the locations of the distribution center, the farmer, and the supermarket are known.-The only factor affecting the loss of agricultural goods is time.
Let the set of farmers in this supply chain network be M , the set of supermarkets be N, and the vehicles be K. Taking the lowest cost as the objective, the optimization model of supply chain network planning is established, and the parameters involved are shown in Table 1.
The cost of agricultural products consists of transportation cost and damage cost.First, the transportation cost includes the vehicle maintenance cost, driver cost, etc., and the corresponding expression is:.
The cost of goods damage is:  The transportation cost c 2 The cost of goods damage x ijk The k th vehicle transports from node i to node j, yes = 1, no = 0 ca 11 The fixed cost of cold chain vehicles ca 12 Cold chain vehicle transportation cost per distance d ij Distance from node i to node j d 0i Vehicles going from the distribution center to the distribution node d j0 Vehicles return to the distribution center from any node v Produce freshness e Perishability of agricultural products t j (transport time + loading and unloading time) j

V k
The maximum loading capacity of the k th vehicle Q a Daily demand of agricultural products 2 L. Zhao and J. Xie: Int.J. Simul.Multidisci.Des.Optim.14, 9 (2023) In summary, the total cost of agricultural products can be written as:.
The constraints of the model are shown in Table 2.

Model solving based on an improved genetic algorithm
For the established agricultural supply chain network model, a suitable algorithm needs to be adopted to solve it.The available algorithms can be divided into two categories.
-Exact algorithm: mathematical planning is used to obtain specific values of the results, such as linear programming, integer programming, etc. [12], which is suitable for small-scale and quantitative-simple models.
-Heuristic algorithm: it includes heritage algorithm and ant colony algorithm [13], which can find the optimal feasible solution, and has good performance in solving models with large range and high complexity.
The agricultural supply chain network model studied in this paper involves many parameters, and GA has the advantages of strong search ability and fast solution [14], which has applications in many problems such as engineering parameter optimization [15] and structural topology optimization [16].Therefore, GA is used to solve the model in this paper.The flow of traditional GA is shown in Figure 2.
As in Figure 2, GA first generates a certain number of individuals as the initial population and encodes them.The natural number encoding is used here, for example, (0, i 1 , i 2 ..., i s ..., 0) (0 is the distribution center), which means the vehicle starts from the distribution center, passes through node i 1 , i 2 ..., i s , and returns to the distribution center.
The fitness function is used to judge the merit of individuals and is closely related to the objective function.
Here, the reciprocal construction method is used: fit ¼ 1 minc , where minc is the objective function.Selection, crossover, and mutation are used to produce new offspring individuals.Individuals with high fitness values have a higher chance of being selected, thus obtaining better individuals; crossover and mutation are used to recombine and change the parent individuals according to a certain probability to achieve population diversity.In order to improve the effectiveness of GA in solving agricultural supply chain network models, an improved GA is designed by optimizing the genetic operation.
The roulette wheel algorithm [17] is used in the selection operation.Let the population size be N and the individual fitness be f i .Then, the probability of individual i being selected is: The flow of traditional GA.
Table 2. Constraints of the model.

Constraint condition Formula
The total loading capacity of all vehicles needs to meet the total demand for the produce The delivery volume of the supermarkets through which the vehicle passes cannot exceed the maximum loading capacity of the vehicle The total number of vehicles dispatched does not exceed the total number of vehicles in the distribution center x ijk K Each vehicle must pass a farmer x ijk ≥ 1 Every farmer must have a car passing through x ijk ≥ 1 Each supermarket can only accept one delivery x jik ¼ 1 L. Zhao and J. Xie: Int.J. Simul.Multidisci.Des.Optim.14, 9 (2023) Crossover and mutation depend mainly on crossover probability p c and mutation probability p m , which are fixed in conventional GA.This paper designs an adaptive method, i.e., make p c and p vary with the average individual fitness f avg , thus obtaining better solution results.The solution of the agricultural supply chain network model is a minimal value problem, so the reciprocal is calculated: Set the range of p c be [p c1, p c2 ] and the range of p m be [p m1, p m2 ].The formulas of adaptive p c and p m are: The flow of the improved GA is shown in Figure 3.To solve the agricultural supply chain network model, the natural number coding is first used.Then, the population is initialized, and the fitness value of each individual is calculated according to the objective function.Then, the population is continuously updated by genetic operation until the optimal individual is found.Finally, the result is output.

Results and analysis
In MATLAB2021 environment, the improved GA was used to solve the optimization problem of supply chain network planning for agricultural products.It was assumed that there is one distribution center, three agricultural product origins, and 15 fresh supermarkets in a 100 Â 100 km area.The location distribution is shown in Figure 4.
In Figure 4, black represents the fresh food supermarket, green represents the production base, and red is the distribution center.The coordinates of the nodes and the demand of each fresh food supermarket for agricultural products are shown in Table 3.
The remaining parameters to be used in the optimization model for the agricultural supply chain network planning are shown in Table 4.
Firstly, the impact of different values of crossover and mutation probabilities in the traditional GA on the solution results was analyzed using a standard test function called De Jong Function N.5 as an example.The crossover and mutation probabilities of the improved GA were adaptive.The population size was set to 100, and the maximum number of iterations was set to 100.The formula for De Jong Function N.5 is written as follows: ; where a ¼ À32 À16 0 16 32 À32 ⋯ 0 16 32 À32 À32 À32 À32 À32 À16 ⋯ 32 32 32 : The dimension of the function was 2. x i ∈ [À 65.536, 65.536], approximate maximum value f x = 0.110704.The comparison results of the solution results and iterative number are presented in Tables 5 and 6.By combining Tables 5 and 6, it can be observed that the improved GA significantly outperformed the traditional GA in terms of solution efficiency.While the traditional GA may fail to find the optimal solution, the improved GA effectively located it with fewer iterations required.This demonstrated the effectiveness of the GA improvement.
The performance improvement of GA was further determined by conducting verification on five standard test functions (Tab.7), with each function repeated 30 times.The results are presented in Table 8.
From Table 8, it can be observed that traditional GA performed poorly in optimization, while the improved GA showed significant improvement in optimization effectiveness.The improved GA achieved good results in Sphere, Sum squares, and Ackley functions and also demonstrated noticeable improvement compared to the traditional GA on Perm function.These results proved that the improved GA designed in this paper had a high search accuracy.
The optimal results obtained by solving this model using the traditional GA and improved GA are shown in Figures 5 and 6.
According to Figures 5 and 6, the path, load and minimum cost of every vehicle in the results obtained by the two methods are displayed in Table 9.
According to Table 9, in the solution result of the traditional GA, the distribution center dispatched three vehicles for transportation, the load of the vehicles was 9.1 tons, 5.6 tons, and 3.7 tons, respectively, and the lowest cost obtained from the solution was 41,714.68$; in the solution result of the improved GA, the distribution center also used three vehicles, and the load of the vehicles was 6.8   The maximum loading capacity of the k th vehicle/ton 10 Q a The daily demand of agricultural products/ton 18.4 Table 5.The solution efficiency when the mutation probability is 0.8.

Mutation probability
The traditional GA The improved GA   tons, 6.0 tons, and 5.6 tons, respectively.It can be found that compared with the traditional GA, the improved GA was more even in the distribution of vehicle loads, and the lowest cost obtained from the solution was 39,004.48$, which was 6.5% less than the traditional GA.It indicated that the improved GA obtained more optimal results and lower cost than the traditional GA in the optimization of supply chain network planning of agricultural products.
To further demonstrate the reliability of the improved GA, it was compared with other heuristic algorithms: -Particle swarm optimization (PSO) algorithm [18]: It finds the optimal solution by continuously updating particle positions.The population size was set at 30, the acceleration factor was set at 1.5, and the maximum number of iterations was 200.-Ant colony optimization (ACO) algorithm [19]: It finds the optimal path by observing the changes in pheromone concentration when ants search for food.The population size was set to 30, the initial pheromone level was set to 1, and the maximum number of iterations was 200.
-Artificial bee colony (ABC) algorithm [20]: It finds the optimal food source, which is the optimal solution, through the bees' cyclic search.The population size was set to 100, and the maximum number of iterations was 200.
The lowest cost obtained by solving the model by the above methods is shown in Figure 7.
As shown in Figure 7, among these algorithms, the PSO algorithm obtained the highest minimum cost, 41,733.04$, and the ACO algorithm was the second highest, 40,276.98$, which was 3.49% lower than the PSO algorithm; the lowest cost obtained by the ABC algorithm was 1.19% lower than the ACO algorithm.In comparison, the improved GA had the smallest minimum cost, which was 6.35% lower than the PSO algorithm, 2.97% lower than the ACO algorithm, and 1.8% lower than the ABC algorithm.The stability of swarm intelligence algorithms, such as the PSO and ACO algorithms, in solving problems was poor, which made it easy to get stuck in local optima and unable to guarantee finding the globally optimal solution.Consequently, it led to inferior results.In contrast, the improved GA designed had a  good solving performance.These results verified the reliability of the improved GA for optimizing supply chain network planning for agricultural products.

Conclusion
In this paper, after establishing the agricultural products supply chain network model, an improved GA is designed to solve it, and the method is analyzed on specific cases.The results show that the distribution path obtained by the improved GA is better and the lowest cost value is smaller compared with the traditional GA, which is reduced by 6.5% compared with the traditional GA, and the lowest cost value obtained by the improved GA solution is the smallest compared with the heuristic algorithms such as PSO and ACO The improved GA designed in this paper proves the optimization effect for agricultural supply chain network planning, and can be further applied in the actual agricultural supply chain network.

Fig. 3 .
Fig. 3.The flow of the improved GA.

Fig. 5 .
Fig. 5.The solution results of the traditional GA.

Fig. 6 .
Fig. 6.The solution results of the improved GA.

Fig. 7 .
Fig. 7. Comparison of the lowest cost obtained by different methods.

Table 9 .
Parameter settings of the solving algorithm.

Table 3 .
Location of nodes and the corresponding demand for agricultural products.

Table 6 .
The solution efficiency when the mutation probability is 0.004.

Table 7 .
Standard test function.

Table 8 .
Comparison results of average optimal values.