Study on the Optimization of the Material Distribution Path in an Electronic Assembly Manufacturing Company Workshop Based on a Genetic Algorithm Considering Carbon Emissions

: AbstractIn order to solve the problems of high carbon emissions, low distribution efﬁciency and high costs related to the process of material distribution in manufacturing workshops, a multi-objective workshop material distribution path optimization problem model is established, and the model is solved using an improved genetic algorithm. The problem is processed using Gray code and crossover and variation operations with a genetic algorithm. To improve the search accuracy and convergence speed of the algorithm, an adaptive mutation method is proposed to enhance the diversity of the population and to achieve global optimal path objective ﬁnding. The improved algorithm is applied to workshop path multi-station logistics path planning, which effectively solves the transport path optimization and station solving problems in workshop logistics distribution, and the convergence speed and convergence accuracy of the algorithm are signiﬁcantly improved. Finally, a simulation analysis is carried out on the optimization of the production material distribution of a smart gas meter workshop owned by K Company, which is an electronic assembly manufacturing company. We used MATLAB software for the case company logistics distribution route model for data analysis and solving. Due to the consideration of carbon emissions, we did not consider two kinds of experiments, which were two different cases of the optimal path. The experimental results verify that the distribution optimization scheduling model can meet the demands for immediate material distribution in the production workshop, which is conducive to improving material distribution efﬁciency, reducing logistics costs and achieving the goal of lowering carbon emissions. This optimization model has a certain utility in that in the current context of aiming for carbon neutral and carbon peaking, early low carbon distribution layout can reduce the environmental cost of the enterprise, making material distribution a more environmental economic path.


Introduction
With the accelerated development of global integration, the competition between assembly and manufacturing companies has become increasingly fierce, and higher operating costs have put the development of companies to the test.In discrete-oriented manufacturing companies, the auxiliary time in production logistics (storage and handling of materials, etc.) accounts for 90 to 95% of the total operation time [1], and so increasing the optimization of the logistics distribution path has become an effective way to reduce operating costs and improve economic efficiency [2].Therefore, optimizing the level of operation of production plant logistics plays a vital role in the survival and development of enterprises.Assembly and manufacturing enterprises are often faced with handling many types and models of materials, making it difficult to carry out sorting storage and distribution, and material distribution is the intermediate link between storage and production, playing an important connecting role in the whole system of production logistics, which will directly affect the production efficiency and delivery speed of products.At the same time, in the operational aspects of production logistics in contemporary assembly and manufacturing plants, problems such as high transport costs, low distribution efficiency, untimely distribution and poor service satisfaction at workstations are common [3].As the "third source of profit", logistics plays a vital role in reducing production costs, improving production efficiency and enhancing market competitiveness.With the continuous development of lean, intelligent, collaborative and green production, improving the transport efficiency of existing production logistics in assembly and manufacturing workshops, improving the satisfaction of workplace services and achieving green and low-carbon logistics have become some of the major challenges that assembly and manufacturing enterprises need to solve.
The development of intelligent green logistics in assembly manufacturing enterprises will be conducive to promoting the optimization of the production mode of enterprises, driving the manufacturing industry to achieve industrial structure upgrades, and is now becoming one of the important driving forces for the transformation of the manufacturing industry.In 2015, China released the "Made in China 2025" strategic plan, highlighting that its main goal of taking intelligent and green manufacturing is an important measure for China's manufacturing industry in order for it to shift from low-end manufacturing to high-end manufacturing, and complete the strategic goal of manufacturing power [4].There has been a long history of research on production logistics systems, but there is not much literature with a focus on intelligent manufacturing; no practical application models for intelligent production logistics systems have so far been proposed, and research on the vehicle routing problem (VRP) has focused on the design of optimization algorithms and their application in sales logistics.Therefore, this paper combines the production characteristics of K Company, a discrete assembly manufacturing company, and introduces the VRP to solve the problem of real-time material distribution in the production logistics process, to achieve intelligent and low-carbon logistics distribution and to lay the foundation for intelligent manufacturing in the workshop.
The workshop material distribution path optimization problem is essentially a vehiclerouting problem, and VRP was first proposed by Danting and Ramser in 1959 [5].The vehicle routing problem refers to a distribution routing solution with the goal of minimizing distribution costs under certain constraints.These constraints include, but are not limited to, the following: customer demand, customer demand time, vehicle capacity, etc.The sequence of distribution vehicles visiting customers needs to be reasonably planned so as to develop a vehicle distribution path scheme that maximizes the above objectives [6][7][8].However, the optimization of logistics distribution routes is a complex mathematical problem involving modern optimization algorithms, which are highly difficult to solve and computationally intensive.At the beginning of the research period, attempts to solve this type of problem are mainly focused on the shortest driving path, the lowest cost of consumption or the least time spent on single-objective optimization.With the development of technology, though, research hotspots gradually shift to multi-objective optimization, considering more diverse factors that are more in line with the actual process of shop material distribution.
At this stage of research on the shop floor material distribution problem in manufacturing enterprises, scholars have focused on two aspects of the vehicle path problem: model building and solution algorithms.In model building, the main focus is the transition from single-objective to multi-objective, from optimization objectives and constraints, etc., so as to improve the model, and the use of a variety of algorithms to solve the algorithmic synthesis.Based on the idea of two-layer planning, Lou Zhenkai established a multi-objective optimization model with fuzzy time windows, considering the number of vehicles used and the total transport mileage, and applied the simulated annealing algorithm to solve the multi-objective optimization problem for distribution [9].Muller decomposed the multi-objective optimization problem and solved it using a heuristic algorithm, taking into account the soft time window [10].Murao et al. investigated VRP using soft time window constraints, with fuzzy variables and penalty functions [11].Xia Y developed a bi-objective open vehicle routing problem (OVRP) model considering soft time windows and satisfaction rates, in which the OVRP was analyzed and an improved taboo search algorithm (ITSA) fusion algorithm with an adaptive penalty mechanism and multi-neighborhood structure was applied to solve the problem [12].Yan Zhengfeng et al. proposed a distribution path optimization method based on fuzzy soft time windows for complex mechanical assembly workshops in order to solve the problem of uncertain material demand time at work stations in the actual production process, established a material distribution path optimization model with fuzzy soft time windows with the objective of minimizing distribution costs, and used a hybrid algorithm combining a dynamic programming algorithm and a simulated annealing algorithm to solve the model [13].Li Siguo and Guo Yu et al. established a material distribution model in a real-time environment for a discrete manufacturing workshop with a complex environment and many external disturbing factors, combined with considerations of the material distribution time window requirement and the minimum material distribution cost as the optimization objective, and used an improved genetic algorithm to solve the model [14].Ferani et al. proposed a green vehicle path problem that optimizes the transportation costs, spoilage costs, and carbon emissions of perishable products with high transportation costs and serious air pollution issues, and solved it using a multi-objective gradient evolutionary algorithm [15].Asma et al. proposed a new hybrid vehicle path planning algorithm for the capacitated vehicle path problem to improve the solution quality and speed up convergence [16].After studying the two-stage vehicle route problem (2S-VRP) in logistics distribution, Zhong X et al. applied a hybrid algorithm combining an artificial bee colony and genetic algorithm (ABCGA) to solve it [17].In addition, some scholars have applied Flexsim, Arena, Witness and other types of system simulation software to model and simulate various aspects of production logistics in order to find the bottlenecks and optimize the system by adjusting parameters; in this way, they sought to achieve goals such as the highest efficiency, lowest cost and best service [18][19][20].To this day, the vehicle routing problem is a popular research topic not only in China but also abroad in the field of logistics research.The problem model is mainly studied in terms of three main pairs of considerations: vehicle capacity, time constraint and vehicle class.For the vehicle path problem with capacity constraints, Lee et al. (2010) combined the properties of the simulated annealing algorithm and designed an improved ant colony algorithm, which was experimentally shown to outperform both the original ant colony algorithm and the simulated annealing algorithm [21].Nishi and Izuno (2014) proposed a column generation-based heuristic algorithm to solve and compared the performance with branch delimitation algorithm and manual operator, and then verified the feasibility and effectiveness of the algorithm [22].Ahmed (2018) proposed an efficient particle swarm optimization algorithm based on two-layer local search and verified that the proposed algorithm outperforms other particle swarm optimization algorithms [23].Reihaneh and Ghoniem (2018) developed a branch-and-cut algorithm for solving [24].Ana Moura et al. (2023) proposed a commodity-flow model and a formulation of the Three-Dimensional Packing Problem to solve a distribution problem of a Portuguese company in the automotive industry as time windows and loading due to the limited capacity of the fleet in terms of weight and volume.[25].Smiti et al. (2020) addressed the cumulative capacity constrained vehicle path problem, a mathematical model with the shortest arrival time to the customer as the optimization objective was developed and two optimization models were proposed to solve it [26].
For the vehicle path problem with time windows, Vidal et al. (2013) proposed a hybrid genetic search algorithm that effectively solves a variety of large-scale vehicle path problems such as route duration constraints and those involving customer assignment to specific vehicle types [27].Nalepa and Blocho (2016) proposed an improved modal algorithm to solve an optimization model with the objective of using the minimum number of vehicles and the shortest vehicle travel distance, and verified its effectiveness through extensive experimental studies [28].Molina et al. (2020) proposed a hybrid ant colony algorithm with local search and verified experimentally that the method has good performance [29].Bogue et al. (2020) proposed a column generation algorithm and a post-optimization heuristic algorithm for solving [30].Jalilvand et al. (2021) developed a two-stage stochastic model and proposed a recursive hedging algorithm for a vehicle path problem with a two-level time window allocation and stochastic service times [31].Tilk et al. (2021) and designed a branch pricing-cut algorithm to solve the model [32].Hoogeboom et al. (2021) solved the model using a branch-and-cut approach with the objective of minimizing the travel time and the risk of violating the time window [33].
For the problem of multiple paths for pairs of vehicles, Pietrabissa (2016) developed an algorithm for the multi-model vehicle path problem without communication and showed through simulation experiments that the algorithm has better performance [34].Avci and Topaloglu (2016) studied the heterogeneous vehicle path problem with simultaneous pickup and delivery and proposed a hybrid local search algorithm for solving it [35].Gholami et al. (2019) used a genetic algorithm to solve a mixed integer nonlinear model with cost minimization as an objective when studying a multi-vehicle path problem considering product transfer between vehicles in a dynamic situation [36].Wang et al. (2019) developed a mathematical model with the optimization objective of minimizing total carbon emissions when considering an integrated single-vehicle scheduling and multi-vehicle path problem, and then proposed a forbidden search hybrid algorithm to solve it [37].Behnke et al. (2021) proposed a column generation method for solving the vehicle path problem with heterogeneous vehicles and heterogeneous roads [38].It is known from the research of foreign scholars that most of the current research in this field is based on vehicle path problems that consider both vehicle capacity and time window or vehicle path problems that consider both vehicle capacity and vehicle type, while relatively few studies consider vehicle capacity, service attitude, carbon emission, time window and vehicle type simultaneously.
How to reduce carbon emissions in the process of vehicle transportation has received the attention of domestic scholars, and a series of studies on low-carbon logistics has been launched.Montoya A et al. proposed a two-stage heuristic algorithm suitable for solving the green vehicle path problem (G-VRP), incorporating the case of a vehicle visiting a gas station on its way to distribution, and finally verified the effectiveness of the algorithm through experiments [39].Koc C et al. proposed a simulated annealing algorithm based on the branch-and-bound method to improve the efficiency of solving the G-VRP problem [40].Jabir E and Zhang S combined vehicle transportation paths and greening to construct a vehicle path optimization model incorporating carbon emission parameters, followed by an improved ant algorithm and a hybrid artificial bee colony algorithm [41,42].Niu Yunyun et al. designed a hybrid taboo search algorithm, which yielded a reduction in the total cost of the open route compared to the closed route, with a significant reduction in CO 2 emission cost and fuel consumption cost [43].Bektase et al. innovated the concept of low-carbon transport by including a fixed operating speed and load of the vehicle in the calculation of carbon emissions [44].Marcel also studied fixed vehicle speed, an important factor affecting the green vehicle path model, for energy consumption and carbon emissions at a fixed speed [45].Kwon Y et al. investigated the problem of optimizing heterogeneous vehicle paths considering carbon emissions and found that the implementation of carbon emissions trading can significantly reduce carbon emissions without increasing costs [46].
Although the above research has made some progress, there are still some problems, such as poor solution quality, ease of falling into the local optimum and the development of a logistics distribution path with little consideration of environmental factors.It can be found that scholars at home and abroad have made certain achievements in the research of discrete workshop workstation logistics distribution path optimization.Scholars at home and abroad have studied the two issues of low carbon logistics and workshop workstation logistics distribution path optimization separately, yet not many combine the two issues.
As national carbon emission governance is becoming more and more regulated, carbon tax policy implementation is coming closer and closer, and manufacturing enterprises must integrate the concept of low carbon into the internal logistics activities of the vehicle in the operation process to reduce the pressure brought by environmental costs.This paper proposes a study on the optimization of shop floor material distribution paths with multiple optimization objectives considering carbon emissions, aiming to help enterprises reduce carbon emission costs based on reducing distribution costs, and achieving customer satisfaction, and realizing the unity of economic benefits and environmental protection.In the analysis of existing workshop material distribution path optimization problems, it has been found that in some workshops, there is a high time penalty cost related to the fact that the distribution trolley cannot deliver the required materials within the time window specified by each workstation, resulting in low service satisfaction at the workstations.Furthermore, unreasonable route planning, which entails the use of more trolleys in the distribution process, increases the distribution distance and distribution costs, etc.Therefore, this paper establishes a multi-objective shop floor material distribution route optimization model based on the cost factors and carbon dioxide emissions generated during the distribution process, taking into account the demand for materials produced at each workstation.Based on this, the example of material distribution within a time window in a smart gas meter workshop owned by an electronic assembly manufacturing K enterprise is analyzed.The results show that the established model can enable the enterprise to more effectively control the carbon emissions and costs generated during development, as well as achieving improved service satisfaction at the workstation and shortening the distribution distance.
This article is structured as follows: Section 2 provides related work on the shop floor material distribution path optimization model.Section 3 presents the vehicle path optimization algorithms.Section 4 presents a discrete assembly manufacturing company workshop, which is taken as an example to verify the correctness of the proposed method.Lastly, the paper ends with Section 5, which concludes the research outcome with future work.

Constructing an Optimization Model
This paper constructs a logistics path optimization model for internal logistics distribution in the workshop of a discrete manufacturing enterprise, seeking the lowest total distribution cost and the highest service satisfaction at the workstations as the optimization objectives.The problem of logistics path optimization for the dispatching of material distribution vehicles to each workstation in the workshop of a discrete manufacturing enterprise can be formulated as follows.The mathematical model of the problem is established under the conditions that the model of material distribution of each workstation in the workshop is known and the number of vehicles is sufficient, and the number and demand of workstations in the workshop, the expected delivery time and the acceptable time interval of each workstation are also known.An optimization model is constructed to minimize costs and achieve a high level of service satisfaction at the workstations while providing the quantity demanded at each workstation.

Cost Components of Material Distribution for Discrete Manufacturing Companies
In order to closely represent the actual situation of material distribution on the shop floor of a discrete manufacturing enterprise, a cost analysis of the various factors affecting the distribution of intra-enterprise logistics is carried out.The distribution path cost model constructed in this paper consists of four cost components, as shown below.
(1) Fixed cost C 1 .The fixed cost of the vehicle includes the distribution vehicle consumption costs, vehicle maintenance costs, driver wages and other costs.Usually, the fixed cost of the vehicle in the transportation process is determined by the number k of task-execution vehicles distributed by the distribution center, so the fixed cost in this paper can be expressed according to the relationship between the fixed cost of the vehicle and the number of distribution vehicles as a positive proportional function, as shown in Equation (1): where f k is the fixed cost of using the k-th vehicle; s k = 1 or 0, with 1 indicating that the k-th vehicle participates in the distribution and 0 indicating that the k-th vehicle does not participate in the distribution.
(2) Vehicle transportation costs C 2 .The transportation costs are the distance-related costs incurred by the vehicle as it undertakes material distribution.Transport costs are proportional to the distance traveled by the vehicle, as shown in Equation (2): where c p is the transportation cost per unit distance per distribution vehicle; x k ij = 1 or 0, where 1 means the k-th vehicle participates in distribution and 0 means the k-th vehicle does not participate in distribution, while d ij is the distance from station i to station j.
(3) Penalty cost C 3 .The workshop logistics distribution is contained by a time window; distribution vehicles that deliver their materials outside the acceptable time window required by the work station will incur a set penalty cost.Untimely distribution will lead to production line stoppages, delay the completion of the production plan, affect the delivery time of the product and lead to customer dissatisfaction.The penalty cost p i (t i ) corresponding to workstation point i is linear as a function of vehicle arrival time t i , and is calculated as shown in Equation (3).
Therefore, the penalty cost C 3 is calculated as shown in Equation (4): where y k i indicates whether the k-th vehicle delivers material to station i, and it takes the value 0 or 1, where 1 means delivery and 0 means no delivery; p 1 is the unit price; q i is the material demand at station i; t k i is the actual delivery process time for the k-th vehicle to arrive at station i; µ 1 and µ 2 are pre-set penalty factors; M denotes an extreme value; [et i , lt i ] is a mandatory hard time interval; [e i , l i ] is an acceptable late time interval.
(4) Carbon emission cost C 4 .In order to calculate the carbon emission cost, the carbon dioxide emissions generated by the distribution vehicle during the distribution journey must first be accurately calculated.The carbon dioxide emissions produced by vehicles on the way to distribution are mainly carbon emissions generated by the burning of natural energy sources, such as by fuel consumption during the vehicle's journey.The fuel consumption of the vehicle is determined by the load and distance; for the fuel consumption ρ(x) of a vehicle with load x over a fixed distance, the calculation formula is shown in Equation ( 5).E 1 indicates the carbon emissions generated by the distribution vehicle's material distribution process; the calculation formula is shown in Equation (6).Carbon emission cost C 4 is calculated as shown in Equation (7).
p e e o ρ(x)x k ij d ij (7) Here, the load of the material distribution vehicle is represented by x; ρ o is the fuel consumption of the material distribution vehicle when it is not loaded; ρ * is the fuel consumption of the material distribution vehicle when it is fully loaded; Q is the rated load; e o is the CO 2 emission factor of the fuel; the distance traveled by the material distribution vehicle is represented by d, and p e represents the carbon tax price on the carbon emissions trading market.

Workstation Service Satisfaction Model
With the development and progress of science and technology, and an increasingly competitive social environment, slogans such as "service quality" and "service level" can be seen everywhere in major workshops, and these have obviously become important factors as enterprises seek to improve their competitiveness, production efficiency and service quality.However, in the process of material distribution in discrete manufacturing workshops, various uncertainties can lead to fluctuations in the production pace of the workstations, resulting in changes in the material demand time of each workstation.Therefore, in this paper, the satisfaction of service workstations is one of the optimization objectives.Here, the satisfaction of each workstation i can be expressed using the fuzzy affiliation function SA(t), as shown in Equation (8).
2.1.3.Mathematical Modeling In the above multi-objective optimization model, i, j = 0 denotes the starting and ending points of the distribution trolley, and d ij denotes the distance between station i and station j.Equation (9) indicates that the objective function of the model is the lowest total distribution cost; Equation (10) indicates that the distance traveled by the distribution trolley is the smallest; Equation (11) indicates that the service satisfaction of the workstation is the largest; Equation (12) represents that when the distribution center assigns the distribution task to the kth vehicle, the total amount to be transported cannot exceed the maximum load weight of the distribution vehicle; Equation (13) indicates that the number of vehicles carrying out the distribution operation cannot exceed the total number of vehicles at the distribution center's disposal; Equations ( 14) and (15) show that each station point can only dock one vehicle in order to obtain one distribution service; Equation (16) shows that each station point has one vehicle as the target of its distribution service; Equation (17) shows that the distribution vehicle carrying out the transportation task departs from the distribution center, and returns there after the distribution operation is completed; Equations ( 18)-( 20) establish the setting of decision variables.

Model Conditional Assumptions
The problem studied in this paper concerns the optimization of the distribution path of K company as regards carbon emissions.In order to facilitate the construction of the model and the implementation of the algorithm that follows, the following assumptions are made: (1) There is only one material distribution center in the workshop, and the location of the distribution center is known.The material inventory of each workstation in the distribution center is sufficient to meet the demand of all workstations; (2) The material requirements of each workstation i are known, and the sum of the material requirements of each workstation on each distribution path cannot exceed the maximum capacity Q of the distribution trolley; (3) The distribution vehicles are of the same type.Each vehicle starts from the distribution center and travels at the same speed and uniformity, and all vehicles must return to the distribution center after completing the distribution task.Factors such as the stopping, starting, and loading and unloading times of the distribution trolley, and trolley failure, are ignored; (4) In the process of the vehicle carrying out the distribution task, its corresponding distribution service object remains unchanged-for example, the service customer information, the distribution order, etc., will not change.A delivery trolley can serve multiple workstations at the same time, but each workstation can only be served by one delivery trolley as it undertakes its material distribution activities; (5) All the information required for the distribution process is known, including all the details of the distribution center and each workstation, etc.; (6) Each workstation can only be provided with one delivery service by one vehicle.The materials of a workstation cannot be split during delivery, and the vehicle only performs delivery tasks during the delivery process, without pick-up tasks.There is a time window constraint for distribution.For each workstation i, the delivery trolley must perform the service within [ei, li].If the delivery trolley arrives earlier than ei, it must wait at the workstation, and if the delivery trolley arrives later than li, the delivery service will be delayed.

Algorithm Design Ideas
This paper studies the optimization of material distribution paths for discrete assembly manufacturing enterprises, considering the carbon emissions of shop floor workstations, which is an NP-hard problem with high complexity.Scholars at home and abroad have proposed a variety of algorithms to solve such problems, and the two main categories are exact algorithms and heuristic algorithms.The established exact algorithms are suitable for solving problems of small scale and low complexity, but for large-scale VRP problems, exact algorithms may not be able to obtain the optimal solution due to the complexity of the solution process, so scholars have proposed heuristic algorithms.Genetic algorithms and forbidden search algorithms are the most widely used types of heuristic algorithms.Genetic algorithms are more globally searchable and more computationally efficient than forbidden search algorithms.Genetic algorithms have strong applicability in solving vehicle path problems, and can solve complex VRP problems well; they are thus widely used by scholars at home and abroad due to their good performance.Table 1 shows a summary of the advantages, disadvantages and applicability of five common modern heuristic algorithms.Therefore, in this paper, taking the characteristics of the study case, the genetic algorithm is chosen to solve the model; the genetic algorithm flow chart is shown in Figure 1.While the traditional genetic algorithm can solve the problem proposed in this paper, there are many disadvantages of this algorithm, such as its slow convergence speed, low efficiency of optimization, and other problems.The vehicle path problem requires an algorithm with a strong global search capability in the early stage and a strong local search capability in the later stage.In order to solve the above problems, this paper makes improvements to the standard genetic algorithm.The improvements focus on two aspects: firstly, designing the operator so that the genetic algorithm has spiral characteristic; secondly, improving the crossover and variation probability such that they have adaptive characteristics.Therefore, in this paper, starting from the mutation operation of the genetic algorithm, we adopt the adaptive mutation method to enhance the variance difference [47,48], which can avoid falling into the local optimal solution; meanwhile, we introduce the Metropolis criterion of simulated annealing algorithm [49][50][51] to judge whether it accepts the individuals generated by the mutation, which can improve the convergence accuracy of the algorithm.In order to ensure that the value of the fitness function of the algorithm evolves in the best direction, a special combinatorial operator is first devised, using which the population can be kept in an ascending state.This paper involves the use of three combinations of operators: (1) Variation in the combinatorial operator.Two genes, a and b, are randomly selected from the parent.The genes are arranged in reverse order, and gene a is inserted in front In order to ensure that the value of the fitness function of the algorithm evolves in the best direction, a special combinatorial operator is first devised, using which the population can be kept in an ascending state.This paper involves the use of three combinations of operators: (1) Variation in the combinatorial operator.Two genes, a and b, are randomly selected from the parent.The genes are arranged in reverse order, and gene a is inserted in front of gene b.The fitness value is then observed to generate new offspring.If the fitness value becomes larger, the former reverses the order of the genes between a and b to generate offspring, and modifies the fitness value of S. The latter inserts a in front of b to generate offspring and modifies the fitness value of S. This combined arithmetic operation is completed, and if the fitness value of the offspring is not lower than that of the parent, an upward spiral is achieved.Otherwise, no change occurs; (2) Crossover operator.Assuming that the parents are SA and SB, first, a gene is randomly selected from either parent as the starting point.Then, a cyclic crossover is applied, and finally the resulting children, SA' and SB', are used to replace the parents SA and SB; (3) Variance operator.Two genes, c and d, in the parent are randomly selected, and then the positions of c and d are swapped and the fitness value of S is modified.
As regards populations, each individual has its own fitness, and the population also has an average fitness.The selection fitness function, adaptive crossover rate and variation rate formulae in this paper are shown below: where N is the number of individuals in the population; f denotes the fitness value of the variant individual; f denotes the relatively large fitness value of the two crossover individuals; f denotes the mean value of fitness in the population; f max denotes the highest value of fitness in the population; p c1 and p c2 denote the maximum and minimum crossover probabilities, respectively, and p m1 and p m2 denote the maximum and minimum variance probabilities, respectively.p c1 , p c2 , p m1 and p m2 are parameters between 0 and 1, set herein as p c1 = 0.85, p c2 = 0.65, p m1 = 0.15, and p m2 = 0.001.

Algorithm Flow
In this paper, based on the concept of the traditional algorithm, the genetic algorithm is improved to make it more applicable to the distribution path optimization problem constructed in this paper.This algorithm combines a genetic algorithm with other advanced algorithms [52][53][54][55].The improved algorithm flow is as follows: Step 1-Chromosome coding.In this paper, a natural number code is used, with the distribution center represented by 0, and K and n representing the number of vehicles and the number of workstations, respectively, which results in a chromosome code of k + n + 1.For example, if the chromosome "0, 8, 0, 5, 9, 4, 7, 0, 23, 13, 25, 0, 15, 6, 0" is used, this means that there are 10 workstations served by four vehicles, and the route of the four vehicles represented by this chromosome is shown in Figure 2.
As regards populations, each individual has its own fitness, and the population also has an average fitness.The selection fitness function, adaptive crossover rate and variation rate formulae in this paper are shown below: , , where N is the number of individuals in the population;  denotes the fitness value of the variant individual; ′ denotes the relatively large fitness value of the two crossover individuals; ̅ denotes the mean value of fitness in the population; max denotes the highest value of fitness in the population; pc1 and pc2 denote the maximum and minimum crossover probabilities, respectively, and pm1 and pm2 denote the maximum and minimum variance probabilities, respectively.pc1, pc2, pm1 and pm2 are parameters between 0 and 1, set herein as pc1 = 0.85, pc2 = 0.65, pm1 = 0.15, and pm2 = 0.001.

Algorithm Flow
In this paper, based on the concept of the traditional algorithm, the genetic algorithm is improved to make it more applicable to the distribution path optimization problem constructed in this paper.This algorithm combines a genetic algorithm with other advanced algorithms [52][53][54][55].The improved algorithm flow is as follows: Step 1-Chromosome coding.In this paper, a natural number code is used, with the distribution center represented by 0, and K and n representing the number of vehicles and the number of workstations, respectively, which results in a chromosome code of k + n + 1.For example, if the chromosome "0, 8, 0, 5, 9, 4, 7, 0, 23, 13, 25, 0, 15, 6, 0" is used, this means that there are 10 workstations served by four vehicles, and the route of the four vehicles represented by this chromosome is shown in Figure 2.  Step 2-Generate the initial population.The purpose of population initialization is to generate the number of feasible solutions in the feasible domain, i.e., determine the size of the population.This is usually carried out in a random way.However, the rate of survival of the populations generated in this way is relatively low, and it is difficult for them to adapt to the environment.Therefore, this paper adopts a greedy algorithm for the local optimization of initial population generation based on the original approach.The chromosome generation process is repeated according to the aforementioned coding method until an initial population size of N (N = 100 is set in this study) is randomly generated for the initial population; Step 3-Determine the fitness function.The path optimization problem studied in this paper uses the reciprocal of the minimum total cost of distribution as the fitness function, thereby ensuring that with a higher value of fitness, the cost will be lower.The fitness function is shown in Equation ( 24): where Fit l denotes the fitness value corresponding to the l-th chromosome, Z 1l denotes the distribution cost corresponding to the l-th chromosome, and N denotes the population size; Step 4-Selection.The most commonly used selection methods include the bidding tournament method, the roulette wheel method and the random traversal sampling method.
The roulette wheel method has good adaptability, so this paper uses it for the selection operation, i.e., the selection is made according to the proportion of individual fitness to the sum of individual fitnesses in the population.The selection probability formula is shown in Equation (25).
Step 5-Crossover.The adaptive crossover rate function used in this paper is shown in Equation ( 22); Step 6-Variability.The variability function used in this paper is shown in Equation ( 23); Step 7-Evolutionary reversal operation; Step 8-Update new populations; Step 9-Determine if the stopping condition is satisfied.If yes, output the optimal solution; otherwise, go to step 3.

Data Sources and Parameter Settings
This paper verifies the feasibility of the improved genetic algorithm via the optimization of the production material distribution vehicle path problem for two production lines in the smart gas meter and smart electric meter workshops of K Company.K Company is a large private enterprise producing energy-metering products in China, integrating R&D, production and sales, and a typical discrete assembly manufacturing enterprise.It mainly produces smart electricity meters, smart water meters, smart gas meters, ultrasonic heat meters and other metering instruments.The discrete manufacturing workshop has a material distribution center, 32 stations to be distributed to, and a number of distribution trolleys.In this paper, the vehicle distribution path is optimally designed to minimize the total distribution cost, minimize the distribution route and maximize customer satisfaction (aiming at a service satisfaction of no less than 85%), under the condition that the maximum load constraint and time window requirements of each vehicle are met, and the problem is solved using an improved genetic algorithm.The simulation was carried out using MATLABR2020 in the Windows 10 environment.The relevant parameters of the model are shown in Table 2, and the table of distribution tasks for each workstation is shown in Table 3.

MATLAB Software Solution
In this paper, a logistics distribution route optimization model for a discrete manufacturing enterprise workshop, focusing on carbon emissions, is established, with the lowest total cost of material distribution, the shortest route and the highest satisfaction as the model's optimization objectives.The MATLAB software is used to solve the model.The algorithm parameters are set as follows: the initial population size is 100 and the number of iterations is 3000.

Solving the Distribution Path Optimization Model without Considering Carbon Emissions
Among the Pareto solutions obtained without considering carbon emissions, the solution that best achieves customer satisfaction and minimizes cost is shown in Figure 3.Among the Pareto solutions obtained without considering carbon emissions, the solution that best achieves customer satisfaction and minimizes cost is shown in Figure 3.When not considering carbon emissions, the total cost composition only includes three parts: vehicle fixed cost, transportation cost and penalty cost.Here, under each constraint, the optimal distribution path is obtained, as shown in Table 4. Table 4 shows that, without considering carbon emissions, the distribution center needs to arrange seven material distribution vehicles to perform distribution for 32 discrete assembly workstations When not considering carbon emissions, the total cost composition only includes three parts: vehicle fixed cost, transportation cost and penalty cost.Here, under each constraint, the optimal distribution path is obtained, as shown in Table 4. Table 4 shows that, without considering carbon emissions, the distribution center needs to arrange seven material distribution vehicles to perform distribution for 32 discrete assembly workstations in the workshop.The total distance traveled during distribution is 26.5 km and the total cost of distribution is RMB 753, of which the fixed vehicle cost is RMB 700, the transportation cost is RMB 53 and the penalty cost is RMB 0. Among the Pareto solutions obtained when considering carbon emissions, the solution that best achieves customer satisfaction and minimizes costs is shown in Figure 4.Among the Pareto solutions obtained when considering carbon emissions, the solution that best achieves customer satisfaction and minimizes costs is shown in Figure 4.When considering carbon emissions, the total cost comprises carbon emission costs, fixed vehicle costs, transportation costs and penalty costs.Here, the optimal distribution path is obtained under each constraint, as shown in Table 5.According to Table 5, the distribution center needs to arrange seven refrigerated vehicles to achieve distribution for 32 shops under the condition of carbon emission.The total distance traveled for distribution is 24.8 km and the total cost of distribution is RMB 965.08, of which the fixed vehicle cost is RMB 700, the transportation cost is RMB 49.6, the penalty cost is RMB 0 and the carbon emission cost is RMB 216.08.When considering carbon emissions, the total cost comprises carbon emission costs, fixed vehicle costs, transportation costs and penalty costs.Here, the optimal distribution path is obtained under each constraint, as shown in Table 5.According to Table 5, the distribution center needs to arrange seven refrigerated vehicles to achieve distribution for 32 shops under the condition of carbon emission.The total distance traveled for distribution is 24.8 km and the total cost of distribution is RMB 965.08, of which the fixed vehicle cost is RMB 700, the transportation cost is RMB 49.6, the penalty cost is RMB 0 and the carbon emission cost is RMB 216.08.

Comparison of Data Results
A comparative analysis of the results obtained from multiple successive solutions for both cases, without and with carbon emissions, is shown in Table 6.

Conclusions
In the process of planning the distribution route for materials on the shop floor, if the carbon emission factor is taken into account, the optimal distribution route within a discrete manufacturing enterprise can not only reduce distribution costs, but also reduce carbon emissions, achieving a win-win situation in terms of economic benefits and environmental protection.As seen in Table 6, the numbers of vehicles used, the distances traveled, the average loading rates, the carbon emissions, and each associated cost corresponding to the optimal solution paths for both cases are compared and analyzed.In terms of the number of vehicles used, the average loading rate and the penalty cost, the route without carbon emissions and the one with carbon emissions both require seven distribution vehicles, and the penalty cost is 0. The average vehicle load factor without carbon emissions is 82.29%, the total distance traveled is 26.5 km, and the transport cost is RMB 53; the transport cost is 53% and the carbon emission is 145.19 kg.The average vehicle load factor when considering carbon emissions is 86%, the total distance traveled is 24.8 km, the transportation cost is RMB 49.6 and the carbon emission is 108.04 kg.Therefore, the optimal distribution route considering carbon emissions entails a 7.5% lower total distribution cost, 6.4% lower total distance traveled and 25.6% lower total carbon emission than the optimal route without considering carbon emissions.It can be seen that the optimal distribution path considering carbon emissions has more obvious advantages than the optimal distribution path without consideration of carbon emissions.The optimal distribution path considering carbon emissions not only reduces the pollution emitted into the environment, but also helps to reduce the distribution costs of enterprises and improves their market competitiveness.
By comparing and analyzing the results, it is concluded that the path that considers carbon emissions is better.The distribution path planning process should consider not only transportation costs and penalty costs, but also carbon emissions, such that the planned distribution path can be more economical and environmentally friendly.The optimization results can be applied to the actual distribution process of workshop material distribution so as to achieve the objectives of reducing distribution costs, improving service satisfaction, reducing carbon emissions, improving the distribution efficiency of workshop logistics and making the distribution vehicle paths more economical and scientifically defendable.
In this paper, we have used the data obtained from research to solve the distribution path optimization model using MATLAB programming, taking the material distribution in the workshop stations of a discrete assembly manufacturing K company as an example.The optimal distribution path obtained for this company, taking into account carbon emissions, not only reduces distribution costs, but also controls carbon emissions, which has certain relevance to discrete manufacturing enterprises.In reality, there are many factors to be considered in the optimization of the distribution path of the shop floor logistics of a discrete manufacturing enterprise, and this paper makes use of a simplified model, so there are some shortcomings.For example, the distribution vehicles set in this paper are of the same model and have a uniform loading capacity, but in reality, due to the different demands related to distribution, many different models of distribution vehicles with different loading capacities will be used, resulting in changes in fixed costs and transportation costs, which can be increased in subsequent studies of multi-model distribution; at the same time, the driving speed of the vehicle set in this paper is fixed, and only one distribution vehicle is set on each road.In reality, the driving speeds of distribution vehicles are usually directly related to the road conditions, and will not remain unchanged, and the resulting fuel consumption will also vary due to changes in speed.The research process can be further extended by using not only genetic algorithms but also other algorithms, such as ant algorithms and bee colony algorithms.In addition, to compensate for the limitations of various heuristics, a combination of multiple heuristics can be used, for example, a genetic algorithm with 3-OPT local search as a variational operator and a road slope factor can be introduced into the carbon emission model to reduce carbon emissions.The Firefly algorithm can also used in combination with two local search and genetic operators to solve the VRP problem limited by vehicle volume, and fusing a genetic algorithm and fireworks algorithm can design an improved fireworks genetic algorithm, etc.Finally, to compare the effects, multiple heuristic algorithms can be used simultaneously to study the same problem, and then the optimal solution among them can be selected.

Figure 2 .
Figure 2. The route of the four vehicles in a hypothetical scenario.Figure 2. The route of the four vehicles in a hypothetical scenario.

Figure 2 .
Figure 2. The route of the four vehicles in a hypothetical scenario.Figure 2. The route of the four vehicles in a hypothetical scenario.

Processes 2023 ,
11, x FOR PEER REVIEW 14 of 19 model's optimization objectives.The MATLAB software is used to solve the model.The algorithm parameters are set as follows: the initial population size is 100 and the number of iterations is 3000.4.2.1.Solving the Distribution Path Optimization Model without Considering Carbon Emissions

Figure 3 .
Figure 3. Cost iteration convergence graph without considering carbon emissions.

Figure 3 .
Figure 3. Cost iteration convergence graph without considering carbon emissions.

Table 1 .
Comparison of the characteristics of modern heuristics.
Test the

fitness value Satisfy iteration conditions? Crossover variation Yes No Selective genetics Output End T=t+1 Initialize the population Begin Figure
1. Genetic algorithm flowchart.

Table 3 .
Distribution tasks by workstation.

Table 4 .
Vehicle route planning results without considering carbon emissions.
4.2.2.Solving the Distribution Route Optimization Model Considering Carbon Emissions

Table 4 .
Vehicle route planning results without considering carbon emissions.
4.2.2.Solving the Distribution Route Optimization Model Considering Carbon Emissions

Table 5 .
Results of vehicle route planning considering carbon emissions.

Table 6 .
Comparison of the solution results for the two cases.