# Optimization Model of Logistics Task Allocation Based on Genetic Algorithm

Authors: Xueli Wang; Jingjuan Gao
Journal: Security and Communication Networks
 (2022)

---

## Abstract

In order to improve the efficiency of logistics task allocation, the rationality and algorithm of the logistics cloud task scheduling model based on genetic algorithm are proposed in this paper. Firstly, the basic principle of genetic algorithm is introduced, the logistics cooperative distribution model is constructed, and the judgment mathematical model of the transfer point of the logistics distribution demand point is constructed. Genetic algorithm is used to solve the logistics distribution path planning model, and the model is simplified. The complex multiobjective optimization problem is transformed into a single-objective optimization problem through preference vector. The genetic algorithm and open-source algorithm on Python are used to simulate the model proposed in this paper. From the change curve of the objective function, after 100 generations of iteration, the value of objective function increases rapidly from 30 to 130 and slowly from generation 5 to generations 40 to 130. Subsequently, the 40th generation to 60th generation were rapidly upgraded to 160. Finally, the 60th to 100th generations are basically stable at about 170. The cost in the scheduling process decreases gradually with the increase of the number of iterations of the algorithm, from the initial unit cost of nearly 200 to 120. Then it gradually decreases to about 80. Genetic algorithm shows the ability of efficient and accurate solution in this 100-generation iteration. The genetic algorithm is used to solve the problem. The algorithm parameters are as follows: population size pop size = 300, maximum number of iterations max gen = 200, crossover probability PC = 0.8, and mutation probability PM = 0.1. Using the data in this paper and substituting it into the model established in this paper, the following distribution scheme is obtained:p the minimum distribution cost is 601.58 yuan, the distribution vehicle is 5, and the total mileage is 477.41. After using the algorithm to optimize the path, the path interleaving is greatly reduced, and the vehicles do not take the repeated route, which can greatly save the cost. After calculation, the total mileage after optimization is 74.8% lower than that before optimization, and the cost is significantly reduced by 72.8%. To sum up, the last kilometer distribution algorithm proposed in this paper can greatly reduce the cost of logistics resource scheduling, which has obvious research significance.


---

## Body

## 1. Introduction

At present, with the rapid advancement of intelligent manufacturing in the automotive industry, especially under the background of China’s vigorous promotion of the Internet of things, big data, cloud computing, and intelligent equipment, the use of automatic logistics system in the process of intelligent manufacturing has become an important measure for the company to improve its comprehensive strength and plays an important role in the intelligent construction of production management process. How to effectively strengthen the application effect of automated logistics system has become one of the key issues of enterprise intelligent manufacturing [1]. Logistics plays a more and more important role in automobile production. Logistics cost is an important part of product cost, and it also affects product quality to a great extent. Therefore, the level of logistics planning and implementation directly affects the competitiveness of enterprises [2]. The requirements for logistics are higher in the whole vehicle production plant. Because the automobile is a highly integrated product, nearly 10000 parts of the whole vehicle are basically distributed to the final assembly line of the factory through logistics except the body of the vehicle [3]. With the increasingly fierce competition in the automotive industry and the increasing pressure on quality, cost, and efficiency, the logistics of the final assembly workshop has developed rapidly from rough logistics to lean logistics. In order to effectively improve the independent matching ability of the overall supply and demand data and realize the development and construction of the future logistics system, the informatization and networking of the logistics system have developed significantly. The continuous production of relevant automation software and website platform has effectively alleviated the conflict between supply and demand of contemporary logistics information, but there are still many defects: first, the sharing rate of logistics resources is very low, and many logistics resources have not been effectively used, resulting in the low utilization rate of logistics resources; the second is the lack of basic flexibility of logistics services (such as failure of service links and lack of replacement efficiency); third, users have relatively little access to logistics information, which makes it difficult for them to explore the most ideal logistics services; fourth, the current logistics information lacks basic transparency and fails to solve the personalized needs of users. If these problems continue to exist, they will directly or indirectly lead to the rise of logistics costs and the significant reduction of service quality [4]. Therefore, it is necessary to optimize the logistics allocation, as shown in Figure 1, the transportation management system of multitask scheduling. Based on the current research, this paper uses genetic algorithm to solve the logistics distribution path planning model, simplifies the model, and transforms the complex multiobjective optimization problem into a single-objective optimization problem through preference vector. Fitness function value of genetic algorithm. The genetic algorithm and open-source algorithm on Python are used to simulate the model proposed in this paper, referring to the model established in this paper, combined with the relevant genetic algorithm to realize the effective design and solution, and through the python software to realize the simulation, so as to verify the feasibility and effectiveness of the model and algorithm established in this paper.Figure 1
Transportation management system of multitask scheduling.


## 2. Literature Review

Aiming at this research problem, Lammie and others studied the influence of the redistribution of picking bits on the total picking time of the array automatic picking system in the serial merge picking mode [5]. Bu and others studied a location redistribution strategy that optimizes the location and picking path in two stages, constructed the total picking time model of stacker, studied the influence relationship between the path and the total picking time model, and solved it by heuristic algorithm [6]. Zhong and others proposed that order picking has periodicity. By studying the order characteristics of the distribution center, the order trend is mined and predicted, and based on this, the picking position allocation of goods is optimized [7]. Cao and others proposed comparing the space required to store a certain type of goods with the average outbound volume of the goods as an indicator of picking bit allocation [8]. Li and others analyzed that when manual picking and automatic picking systems are used for partition picking and parallel picking, the manual picking area or unallocated area will affect the picking path of operators and then affect the picking efficiency [9]. Martin and others studied the influence of location allocation on picking efficiency in this type of automatic three-dimensional warehouse with multiple lanes, selected several influencing parameters, i.e., cargo correlation and shipment volume, established the picking time model, and selected heuristic algorithm genetic algorithm to search the optimal solution [10]. Soleimanpour Moghadam and others compared the cost problem of manual picking and automatic picking and took a pharmaceutical distribution center as an example to find the optimal solution by using greedy algorithm [11]. Gao and others simulated the static and dynamic allocation model with the goal of minimizing the waiting time of ships and solved the model by Lagrange relaxation method [12]. Zhou and others used agent technology to simulate the ship transportation strategy of container port and compared and evaluated different strategies [13]. Reis and others transformed the NP berth allocation problem into a multistage decision-making program and proposed the improved directional search plan, two-stage node quality evaluation, and random node selection criteria by using the random directional search algorithm [14]. Based on the current research, this paper uses genetic algorithm to solve the logistics distribution path planning model, simplifies the model, and transforms the complex multiobjective optimization problem into a single-objective optimization problem through preference vector. Fitness function value of genetic algorithm. The genetic algorithm and open-source algorithm on Python are used to simulate the model proposed in this paper, referring to the model established in this paper, combined with the relevant genetic algorithm to realize the effective design and solution, and through the python software to realize the simulation, so as to verify the feasibility and effectiveness of the model and algorithm established in this paper.


## 3. Method

### 3.1. Basic Principle of Genetic Algorithm

#### 3.1.1. Generation of Genetic Algorithm

Genetic algorithm (GA) is a randomized search method that simulates natural evolution. GA is the survival process of the fittest that represents the problem as a “chromosome.” Through the generation by generation evolution of the “chromosome” group, through operations such as replication, selection, crossover, and mutation, it finally converges to the individual “most suitable for the environment,” so as to obtain the optimal solution or approximate optimal solution of the problem [15, 16]. Because GA directly takes the objective function as the search information and does not need high value information such as gradient, at the same time, it adopts the adaptive random search technology (imitating the “survival of the fittest” law in the biological world) and uses the search information of multiple search points, so it has high flexibility, parallelism, and strong universality.


#### 3.1.2. Advantages of Genetic Algorithm

Compared with precise algorithms and relevant heuristic algorithms, relevant genetic algorithms have strong robustness when dealing with problems in a certain optimization space. The application program is relatively simple and convenient, and the scope of use is wider. Then, they can establish efficient interception with big data and carry out optimization and processing by integrating the functions of cloud computing. Its corresponding advantages are as follows: it has the corresponding self-organization and management ability and is outstanding in adaptability and intelligence. In dealing with related optimization problems, the first step of genetic algorithm needs to create corresponding coding scheme, matching function, crossover, and other parameters [17]. Then, carry out the links of gene variation and combination according to the fitness of different individuals and the similar conditions of organizational framework, so as to obtain another population. The objective function corresponding to the problem to be handled acts as the corresponding search task. For the previous algorithms, when dealing with and calculating problems, in addition to mastering the value of the objective function, they must also have a series of auxiliary information. It is generally required to expand the operation and derivation around the objective function [18]. However, in the new genetic algorithm, the target to be searched can be directly divided into the corresponding operation space with more ideal fitness value. On this basis, it can comprehensively improve the search ability of the overall search of the algorithm, speed up the operation efficiency of the algorithm, and compress the time required in the search link as much as possible. The operation object is directly related to the decision variables that complete the coding link. In the previous algorithms, for the problem processing in the combinatorial field, the solution and operation are usually carried out according to the real value corresponding to the decision variable of a specific object. However, in the new form of genetic algorithm, the corresponding coding task is carried out by using the coding mode matching with relevant variables. Under this arrangement, if there is no value in the follow-up, it can be processed efficiently. With hidden parallelism, it can be integrated with popular information technologies such as big data and cloud computing, which can greatly improve the efficiency of processing tasks. In previous search algorithms, the link of operation and solution generally starts from a single point, and the optimal answer is easy to be partial and one-sided. For genetic algorithm, it does not start from a single point, but search in a population of a certain size, and search in different directions at the same time [19]. The parallelism of this aspect is mainly reflected in the following: firstly, it can be fully integrated with big data and cloud computing, and then it has internal parallelism in computing information; in addition, searches are performed in different directions to satisfy a certain degree of parallelism, guiding the development of all search links according to their corresponding possibilities. In the previous algorithms, the search is generally carried out from a point part along a specific direction. In such a situation, it is likely that the best answer cannot be obtained. For heredity, it is not from a single point, but to search in a certain size of population, and search in different directions at the same time. According to the relevant fitness value and probability, the direction of search is clearer, which can avoid obtaining partial optimal solutions, and improve its global search performance to a great extent.


#### 3.1.3. Basic Principle and Program of Genetic Algorithm

Genetic algorithm is significantly different from previous search algorithms. For the former, the search is usually carried out in a series of randomly obtained preliminary solutions, and a group of solutions is generally called group. Because different individuals in the population are the corresponding solutions of related problems, they are generally called chromosomes. This kind of chromosome will be continuously adjusted and optimized in the subsequent iterative links, which is called genetic processing. Through the steps of crossover and mutation, the subsequent chromosomes are obtained, that is, offspring. For the quality of chromosomes, it is usually considered with the aid of the index of fitness. According to the scale of fitness, a corresponding number of individuals are selected from the previous generation and future generations, which play the role of the next generation group and then continue to develop and evolve. When the long actual development and change is completed, the algorithm will get the chromosome with the most ideal convergence effect. At this time, the chromosome obtained is the optimal solution or the second optimal solution [20]. In the aspect of genetic algorithm, the value of fitness is used to analyze the specific situation of the optimal solution that different individuals can obtain after the optimization link. The function that measures the fitness of different individuals is the fitness function. The definition of this function is usually related to the problems that need to be solved. Table 1 is the concept often involved in genetic algorithm.Table 1
Correspondence between the basic concepts of biological genetics and the role of genetic algorithm.
Meaning of biological heredityFunctions of genetic algorithmSurvival of the fittestAfter the algorithm is completed, the answer of the best target value is very likely to remainGroupA group of solutions selected (the number of solutions at this time represents the size of the population)MatingThose who obtain a new set of solutions with the help of the cross principle will not goPopulationA set of solutions obtained according to the value of fitness functionVariationA program in which a single component corresponding to the code changesChromosomeEncoding of solution (string and other related contents)GeneEigenvalue of single component in solutionThresholdSet the criteria for completing the searchAdaptabilityFitness function dataIndividualSolutionGenetic algorithm corresponds to four basic processing programs: coding, screening, crossover, and mutation.Coding: how to express the feasible explanation of relevant problems in the algorithm, that is, to transform the feasible solution of a specific problem into the search field that the algorithm can calculate and operate in the corresponding space. This transformation method and strategy is coding. The coding mode directly affects the comprehensive performance of the algorithm, as well as the initialization setting steps and the design of different operators.Selection: the key task of this part of work is to obtain the ideal individual from the current whole, so that it can continue to develop subsequent offspring as a parent generation. According to the fitness status of different individuals, in terms of population, select ideal individuals from the previous generation according to the corresponding principles and strategies, and then transfer them to the subsequent generation through genetic steps. The screening standard is to obtain individuals with stronger adaptability. In this way, we can make greater contributions in the subsequent reproduction and sending letters, and we are more likely to get more offspring. Such a procedure obviously embodies the concept of survival of the fittest, which is highly similar to the meaning of biology.Crossover: this work is the most critical operation in genetic algorithm. With the help of cross-processing, individuals in subsequent generations can be obtained, and these individuals obviously inherit a series of attribute characteristics of the previous generation. Cross-processing is to complete the corresponding matching operation for different individuals in the group. For different individuals, some chromosomes they have are exchanged and shared according to the corresponding probability. This part embodies the concept of information exchange.Mutation: mutation processing is to adjust some positions on different coding strings according to a very small possibility. For example, 0 in binary coding is adjusted to 1, so as to get a new individual. Although this kind of algorithm is only an auxiliary means to obtain new individuals, it is also a very key link, which is directly related to the search performance of genetic algorithm in local space. Crossover and mutation operators work together to complete the follow-up global search and local search. Like the biological field, the possibility of variation in GA is very low, and its corresponding value is generally only 0.001-0.01.


### 3.2. Construction of Logistics Cooperative Distribution Model

#### 3.2.1. Problem Description

Before the provider of logistics resources makes specific distribution, it is necessary to refer to the actual tasks and distribution needs to carry out planning for the relevant tasks of distribution, and it is necessary to calculate the spare space of relevant vehicles in the distribution link and publish the basic type, capacity, and cargo information of acceptable goods through the platform at the low price exceeding the cost price. The remaining providers further develop relatively low-cost solutions by effectively capturing and reading the platform data and select enterprises with stronger capabilities with reference to relevant needs to achieve effective cooperation between the two. On the basis of relevant cooperation, enterprise 1 has evolved from “enterprise” to “logistics service demander,” and enterprise 2 has further evolved from the initial “irrelevant enterprise” to “logistics resource provider.” In such cases, logistics companies may have dual roles. On the one hand, they may be the basic demander, but also the service provider. Based on the logistics cooperative distribution problem, the first is to carry out research on the relevant distribution demand points, so as to identify whether the relevant transshipment operations should be carried out. The focus of the judgment is that, for distribution demand points, when the cost of their own distribution activities exceeds the cost of other enterprises, or their own ability fails to solve the distribution demand, they can choose the transshipment scheme. At the same time, after determining the demand point and carrying out the transfer meeting, carry out the corresponding path planning for the overall logistics distribution. See the identification in Figure2 for the actual process.Figure 2
Flow chart of path planning algorithm.The first step is to carry out effective judgment on relevant demand points at the distribution planning level. Before carrying out relevant distribution business, the “provider” shall carry out planning for the distribution task with reference to the actual task and distribution demand and disclose the types, capacity, and relevant information of goods that can be handled through the platform at a relatively low price. The rest of the “demanders” rely on the platform to view and read information, further develop companies with lower transportation costs, and select reliable enterprises for cooperation with reference to actual needs. The “provider” in this stage belongs to the relevant cooperative distribution company. Its basic distribution demand point location belongs to the determined mode: carry out research on the distribution points of the relevant “demander,” and further explore the enterprises with relatively lower distribution cost to realize the corresponding cooperative distribution by comparing the cost differences between the “demander” and the “provider.”The second step is the route planning layer, so as to judge the most ideal distribution route. Referring to the judgment formed by the relevant distribution planning layer for the actual distribution point, this level will be started. According to the actual demand points, realize the supporting renumbering operation, carry out the basic path planning, and execute the relevant distribution operations at the same time. There are a large number of distribution companies in the platform. At the same time, each enterprise has I distribution tasks. Referring to the sharing and related predictability of the platform foundation, it is concluded from the relevant path planning for logistics distribution that the “provider” has significant fluctuations in the cost in a specific distribution area with the continuous increase of time and related logistics tasks. Relying on the comparison of task I cost, the “logistics service demander” further concludes that the distribution of the “provider” is helpful to control the overall cost, so the “provider” is responsible for the implementation of this logistics task. Then, the task at this stage belongs to the category of transshipment and distribution task. In the actual cooperative distribution system, the description adopted belongs to the specific location information of the known distribution center and logistics service demander, the basic data of relevant distribution centers and vehicles (load, limit distance, etc.), the demand information of the demander, and the unit cost of relevant nodes.


#### 3.2.2. Model Assumptions

Referring to the basic characteristics of relevant distribution point problems, this paper obtains the following basic assumptions: the goods distributed are the affordable category of time window; relevant distribution enterprises have redundant distribution capacity and can carry out cooperative distribution of logistics tasks; it is assumed that in the relevant transshipment procedures the management expenses due to the platform are not included.


#### 3.2.3. Variable Definition

Among them, Tables2 and 3 show variable lists, and Table 4 shows the alphabetic list.Table 2
Variable list 1.
VariableDescribeTypefObjective functionUnknownpqLogistics companyKnowncpjUnit cost from logistics companyP to logistics task JKnowndpjDistance from logistics companyP to task JKnowncjpPrice from logistics companyP to task JKnownyjpIs the taskj the responsibility of the logistics company P0-1 variableTable 3
List of variables 2.
VariableDescribeTypedmnThe distance from distribution pointm to nKnowncmnUnit cost of transportation from distribution pointm to nKnownXmnkThe distribution demand of logistics distribution taskJKnownqjDistribution demand of taskJKnownHH vehicles availableKnownQMaximum carrying capacity of vehicleKnownqj.The distribution demand of transshipment logistics distribution taskJ has been determinedUnknownTable 4
Letters list.
IndexesMeaningRangeM, s, nNode1 toMjTask1 toNP, qCompany1 toGkType of shipping1 toK


### 3.3. Model Establishment

(1)
The mathematical model for judging the transfer point of logistics distribution demand point is as follows:Objective function:(1)maxf=∑p=1Gcpjdpj−∑q=1G∑p=1Gcpqdpq−∑q=1Gcjqj=1,2,...,N.Constraints:(2)cpq=0,p=q,(3)∑p=1Gyjp=1,(4)∑j=1Mqjyjp≤Q,(5)yjp=1,The distribution of logistics task J is completed by company P,0,other.Equation (1) is the objective function. The first item represents the cost of the logistics company to distribute a logistics task, the second item represents the cost of the logistics company to transport the logistics task to the cooperative distribution company, and the third item represents the distribution cost required by the cooperative distribution company. The objective function indicates that the points with F > 0 are selected, and the distribution points requiring transshipment are calculated; equation (2) indicates that the transfer point cannot transfer within the company; equation (3) indicates that only one company can be responsible for a demand task; equation (4) indicates that the distribution weight of the distribution company is not greater than the bearing weight of the company; equation (5) is an integer constraint.(2)
Establishment of path planning layer model:Combined with the characteristics of logistics cooperative distribution path optimization under the logistics cloud service platform, the distribution cost in the distribution process is set as the optimization goal, where distribution cost = fixed cost + variable cost + Transshipment cost.Objective function:(6)minf=∑n=1M∑k=1Kx0nkC+∑m=1M∑n=1M∑k=1Kxmnkcmndmn+∑p=1G∑q=1G∑k=1K∑j=1Nxpqkcpqdpq×intqjQ.Constraints:Distribution vehicle capacity constraints:(7)∑n=1M∑k=1Kx0k,k,(8)∑m=1M∑n=1M∑k=1Mxmnkqmk≤Q,k=1,2,…,K,Distribution vehicle routing constraints:(9)∑n=1Mx0nk=1,k=1,2,…,K,(10)∑m=1Mxm0d=1,k=1,2,…,K,(11)xmnkd=0,n=m;k=1,2,…,K,(12)∑m=1M∑k=1Kxmnk≤1,n=1,2,…,M,(13)∑n=1M∑m=1Mxmnk=1,k=1,2,…,K,(14)∑m=1Mxmsk−∑n=1Mxsnk=0,k=1,2,…,K,(15)xmnk=1,In distribution,the KTH car goes from node M to node N,0,In the distribution,the KTH car does not go from node M to node N.Among them, the objective function, namely, formula (6), represents the total cost of distribution activities, in which the first part represents the fixed transportation cost in logistics distribution activities, the second part represents the variable transportation cost after the logistics cloud service platform reprocesses and plans the distribution activities, and the third part represents the activity cost of distribution among different logistics enterprises. Int indicates rounding up, and intqj/Q indicates vehicle transportation times; equations (7) and (8) represent the constraints on the number of vehicles and carrying capacity; equations (9) and (10) indicate that each delivery vehicle starts from the distribution point and returns to the distribution point after completion; equation (11) indicates that the distribution vehicle cannot drive from one demand point to its own demand point in each distribution process; equation (12) indicates that only one vehicle can be responsible for the distribution of demand points in each distribution; equation (13) indicates that in distribution, when the demand point has distribution demand, the demand point must have vehicle distribution; equation (14) ensures the connectivity of the route of the vehicle; equation (15) represents integer constraint.


## 3.1. Basic Principle of Genetic Algorithm

### 3.1.1. Generation of Genetic Algorithm

Genetic algorithm (GA) is a randomized search method that simulates natural evolution. GA is the survival process of the fittest that represents the problem as a “chromosome.” Through the generation by generation evolution of the “chromosome” group, through operations such as replication, selection, crossover, and mutation, it finally converges to the individual “most suitable for the environment,” so as to obtain the optimal solution or approximate optimal solution of the problem [15, 16]. Because GA directly takes the objective function as the search information and does not need high value information such as gradient, at the same time, it adopts the adaptive random search technology (imitating the “survival of the fittest” law in the biological world) and uses the search information of multiple search points, so it has high flexibility, parallelism, and strong universality.


### 3.1.2. Advantages of Genetic Algorithm

Compared with precise algorithms and relevant heuristic algorithms, relevant genetic algorithms have strong robustness when dealing with problems in a certain optimization space. The application program is relatively simple and convenient, and the scope of use is wider. Then, they can establish efficient interception with big data and carry out optimization and processing by integrating the functions of cloud computing. Its corresponding advantages are as follows: it has the corresponding self-organization and management ability and is outstanding in adaptability and intelligence. In dealing with related optimization problems, the first step of genetic algorithm needs to create corresponding coding scheme, matching function, crossover, and other parameters [17]. Then, carry out the links of gene variation and combination according to the fitness of different individuals and the similar conditions of organizational framework, so as to obtain another population. The objective function corresponding to the problem to be handled acts as the corresponding search task. For the previous algorithms, when dealing with and calculating problems, in addition to mastering the value of the objective function, they must also have a series of auxiliary information. It is generally required to expand the operation and derivation around the objective function [18]. However, in the new genetic algorithm, the target to be searched can be directly divided into the corresponding operation space with more ideal fitness value. On this basis, it can comprehensively improve the search ability of the overall search of the algorithm, speed up the operation efficiency of the algorithm, and compress the time required in the search link as much as possible. The operation object is directly related to the decision variables that complete the coding link. In the previous algorithms, for the problem processing in the combinatorial field, the solution and operation are usually carried out according to the real value corresponding to the decision variable of a specific object. However, in the new form of genetic algorithm, the corresponding coding task is carried out by using the coding mode matching with relevant variables. Under this arrangement, if there is no value in the follow-up, it can be processed efficiently. With hidden parallelism, it can be integrated with popular information technologies such as big data and cloud computing, which can greatly improve the efficiency of processing tasks. In previous search algorithms, the link of operation and solution generally starts from a single point, and the optimal answer is easy to be partial and one-sided. For genetic algorithm, it does not start from a single point, but search in a population of a certain size, and search in different directions at the same time [19]. The parallelism of this aspect is mainly reflected in the following: firstly, it can be fully integrated with big data and cloud computing, and then it has internal parallelism in computing information; in addition, searches are performed in different directions to satisfy a certain degree of parallelism, guiding the development of all search links according to their corresponding possibilities. In the previous algorithms, the search is generally carried out from a point part along a specific direction. In such a situation, it is likely that the best answer cannot be obtained. For heredity, it is not from a single point, but to search in a certain size of population, and search in different directions at the same time. According to the relevant fitness value and probability, the direction of search is clearer, which can avoid obtaining partial optimal solutions, and improve its global search performance to a great extent.


### 3.1.3. Basic Principle and Program of Genetic Algorithm

Genetic algorithm is significantly different from previous search algorithms. For the former, the search is usually carried out in a series of randomly obtained preliminary solutions, and a group of solutions is generally called group. Because different individuals in the population are the corresponding solutions of related problems, they are generally called chromosomes. This kind of chromosome will be continuously adjusted and optimized in the subsequent iterative links, which is called genetic processing. Through the steps of crossover and mutation, the subsequent chromosomes are obtained, that is, offspring. For the quality of chromosomes, it is usually considered with the aid of the index of fitness. According to the scale of fitness, a corresponding number of individuals are selected from the previous generation and future generations, which play the role of the next generation group and then continue to develop and evolve. When the long actual development and change is completed, the algorithm will get the chromosome with the most ideal convergence effect. At this time, the chromosome obtained is the optimal solution or the second optimal solution [20]. In the aspect of genetic algorithm, the value of fitness is used to analyze the specific situation of the optimal solution that different individuals can obtain after the optimization link. The function that measures the fitness of different individuals is the fitness function. The definition of this function is usually related to the problems that need to be solved. Table 1 is the concept often involved in genetic algorithm.Table 1
Correspondence between the basic concepts of biological genetics and the role of genetic algorithm.
Meaning of biological heredityFunctions of genetic algorithmSurvival of the fittestAfter the algorithm is completed, the answer of the best target value is very likely to remainGroupA group of solutions selected (the number of solutions at this time represents the size of the population)MatingThose who obtain a new set of solutions with the help of the cross principle will not goPopulationA set of solutions obtained according to the value of fitness functionVariationA program in which a single component corresponding to the code changesChromosomeEncoding of solution (string and other related contents)GeneEigenvalue of single component in solutionThresholdSet the criteria for completing the searchAdaptabilityFitness function dataIndividualSolutionGenetic algorithm corresponds to four basic processing programs: coding, screening, crossover, and mutation.Coding: how to express the feasible explanation of relevant problems in the algorithm, that is, to transform the feasible solution of a specific problem into the search field that the algorithm can calculate and operate in the corresponding space. This transformation method and strategy is coding. The coding mode directly affects the comprehensive performance of the algorithm, as well as the initialization setting steps and the design of different operators.Selection: the key task of this part of work is to obtain the ideal individual from the current whole, so that it can continue to develop subsequent offspring as a parent generation. According to the fitness status of different individuals, in terms of population, select ideal individuals from the previous generation according to the corresponding principles and strategies, and then transfer them to the subsequent generation through genetic steps. The screening standard is to obtain individuals with stronger adaptability. In this way, we can make greater contributions in the subsequent reproduction and sending letters, and we are more likely to get more offspring. Such a procedure obviously embodies the concept of survival of the fittest, which is highly similar to the meaning of biology.Crossover: this work is the most critical operation in genetic algorithm. With the help of cross-processing, individuals in subsequent generations can be obtained, and these individuals obviously inherit a series of attribute characteristics of the previous generation. Cross-processing is to complete the corresponding matching operation for different individuals in the group. For different individuals, some chromosomes they have are exchanged and shared according to the corresponding probability. This part embodies the concept of information exchange.Mutation: mutation processing is to adjust some positions on different coding strings according to a very small possibility. For example, 0 in binary coding is adjusted to 1, so as to get a new individual. Although this kind of algorithm is only an auxiliary means to obtain new individuals, it is also a very key link, which is directly related to the search performance of genetic algorithm in local space. Crossover and mutation operators work together to complete the follow-up global search and local search. Like the biological field, the possibility of variation in GA is very low, and its corresponding value is generally only 0.001-0.01.


## 3.1.1. Generation of Genetic Algorithm

Genetic algorithm (GA) is a randomized search method that simulates natural evolution. GA is the survival process of the fittest that represents the problem as a “chromosome.” Through the generation by generation evolution of the “chromosome” group, through operations such as replication, selection, crossover, and mutation, it finally converges to the individual “most suitable for the environment,” so as to obtain the optimal solution or approximate optimal solution of the problem [15, 16]. Because GA directly takes the objective function as the search information and does not need high value information such as gradient, at the same time, it adopts the adaptive random search technology (imitating the “survival of the fittest” law in the biological world) and uses the search information of multiple search points, so it has high flexibility, parallelism, and strong universality.


## 3.1.2. Advantages of Genetic Algorithm

Compared with precise algorithms and relevant heuristic algorithms, relevant genetic algorithms have strong robustness when dealing with problems in a certain optimization space. The application program is relatively simple and convenient, and the scope of use is wider. Then, they can establish efficient interception with big data and carry out optimization and processing by integrating the functions of cloud computing. Its corresponding advantages are as follows: it has the corresponding self-organization and management ability and is outstanding in adaptability and intelligence. In dealing with related optimization problems, the first step of genetic algorithm needs to create corresponding coding scheme, matching function, crossover, and other parameters [17]. Then, carry out the links of gene variation and combination according to the fitness of different individuals and the similar conditions of organizational framework, so as to obtain another population. The objective function corresponding to the problem to be handled acts as the corresponding search task. For the previous algorithms, when dealing with and calculating problems, in addition to mastering the value of the objective function, they must also have a series of auxiliary information. It is generally required to expand the operation and derivation around the objective function [18]. However, in the new genetic algorithm, the target to be searched can be directly divided into the corresponding operation space with more ideal fitness value. On this basis, it can comprehensively improve the search ability of the overall search of the algorithm, speed up the operation efficiency of the algorithm, and compress the time required in the search link as much as possible. The operation object is directly related to the decision variables that complete the coding link. In the previous algorithms, for the problem processing in the combinatorial field, the solution and operation are usually carried out according to the real value corresponding to the decision variable of a specific object. However, in the new form of genetic algorithm, the corresponding coding task is carried out by using the coding mode matching with relevant variables. Under this arrangement, if there is no value in the follow-up, it can be processed efficiently. With hidden parallelism, it can be integrated with popular information technologies such as big data and cloud computing, which can greatly improve the efficiency of processing tasks. In previous search algorithms, the link of operation and solution generally starts from a single point, and the optimal answer is easy to be partial and one-sided. For genetic algorithm, it does not start from a single point, but search in a population of a certain size, and search in different directions at the same time [19]. The parallelism of this aspect is mainly reflected in the following: firstly, it can be fully integrated with big data and cloud computing, and then it has internal parallelism in computing information; in addition, searches are performed in different directions to satisfy a certain degree of parallelism, guiding the development of all search links according to their corresponding possibilities. In the previous algorithms, the search is generally carried out from a point part along a specific direction. In such a situation, it is likely that the best answer cannot be obtained. For heredity, it is not from a single point, but to search in a certain size of population, and search in different directions at the same time. According to the relevant fitness value and probability, the direction of search is clearer, which can avoid obtaining partial optimal solutions, and improve its global search performance to a great extent.


## 3.1.3. Basic Principle and Program of Genetic Algorithm

Genetic algorithm is significantly different from previous search algorithms. For the former, the search is usually carried out in a series of randomly obtained preliminary solutions, and a group of solutions is generally called group. Because different individuals in the population are the corresponding solutions of related problems, they are generally called chromosomes. This kind of chromosome will be continuously adjusted and optimized in the subsequent iterative links, which is called genetic processing. Through the steps of crossover and mutation, the subsequent chromosomes are obtained, that is, offspring. For the quality of chromosomes, it is usually considered with the aid of the index of fitness. According to the scale of fitness, a corresponding number of individuals are selected from the previous generation and future generations, which play the role of the next generation group and then continue to develop and evolve. When the long actual development and change is completed, the algorithm will get the chromosome with the most ideal convergence effect. At this time, the chromosome obtained is the optimal solution or the second optimal solution [20]. In the aspect of genetic algorithm, the value of fitness is used to analyze the specific situation of the optimal solution that different individuals can obtain after the optimization link. The function that measures the fitness of different individuals is the fitness function. The definition of this function is usually related to the problems that need to be solved. Table 1 is the concept often involved in genetic algorithm.Table 1
Correspondence between the basic concepts of biological genetics and the role of genetic algorithm.
Meaning of biological heredityFunctions of genetic algorithmSurvival of the fittestAfter the algorithm is completed, the answer of the best target value is very likely to remainGroupA group of solutions selected (the number of solutions at this time represents the size of the population)MatingThose who obtain a new set of solutions with the help of the cross principle will not goPopulationA set of solutions obtained according to the value of fitness functionVariationA program in which a single component corresponding to the code changesChromosomeEncoding of solution (string and other related contents)GeneEigenvalue of single component in solutionThresholdSet the criteria for completing the searchAdaptabilityFitness function dataIndividualSolutionGenetic algorithm corresponds to four basic processing programs: coding, screening, crossover, and mutation.Coding: how to express the feasible explanation of relevant problems in the algorithm, that is, to transform the feasible solution of a specific problem into the search field that the algorithm can calculate and operate in the corresponding space. This transformation method and strategy is coding. The coding mode directly affects the comprehensive performance of the algorithm, as well as the initialization setting steps and the design of different operators.Selection: the key task of this part of work is to obtain the ideal individual from the current whole, so that it can continue to develop subsequent offspring as a parent generation. According to the fitness status of different individuals, in terms of population, select ideal individuals from the previous generation according to the corresponding principles and strategies, and then transfer them to the subsequent generation through genetic steps. The screening standard is to obtain individuals with stronger adaptability. In this way, we can make greater contributions in the subsequent reproduction and sending letters, and we are more likely to get more offspring. Such a procedure obviously embodies the concept of survival of the fittest, which is highly similar to the meaning of biology.Crossover: this work is the most critical operation in genetic algorithm. With the help of cross-processing, individuals in subsequent generations can be obtained, and these individuals obviously inherit a series of attribute characteristics of the previous generation. Cross-processing is to complete the corresponding matching operation for different individuals in the group. For different individuals, some chromosomes they have are exchanged and shared according to the corresponding probability. This part embodies the concept of information exchange.Mutation: mutation processing is to adjust some positions on different coding strings according to a very small possibility. For example, 0 in binary coding is adjusted to 1, so as to get a new individual. Although this kind of algorithm is only an auxiliary means to obtain new individuals, it is also a very key link, which is directly related to the search performance of genetic algorithm in local space. Crossover and mutation operators work together to complete the follow-up global search and local search. Like the biological field, the possibility of variation in GA is very low, and its corresponding value is generally only 0.001-0.01.


## 3.2. Construction of Logistics Cooperative Distribution Model

### 3.2.1. Problem Description

Before the provider of logistics resources makes specific distribution, it is necessary to refer to the actual tasks and distribution needs to carry out planning for the relevant tasks of distribution, and it is necessary to calculate the spare space of relevant vehicles in the distribution link and publish the basic type, capacity, and cargo information of acceptable goods through the platform at the low price exceeding the cost price. The remaining providers further develop relatively low-cost solutions by effectively capturing and reading the platform data and select enterprises with stronger capabilities with reference to relevant needs to achieve effective cooperation between the two. On the basis of relevant cooperation, enterprise 1 has evolved from “enterprise” to “logistics service demander,” and enterprise 2 has further evolved from the initial “irrelevant enterprise” to “logistics resource provider.” In such cases, logistics companies may have dual roles. On the one hand, they may be the basic demander, but also the service provider. Based on the logistics cooperative distribution problem, the first is to carry out research on the relevant distribution demand points, so as to identify whether the relevant transshipment operations should be carried out. The focus of the judgment is that, for distribution demand points, when the cost of their own distribution activities exceeds the cost of other enterprises, or their own ability fails to solve the distribution demand, they can choose the transshipment scheme. At the same time, after determining the demand point and carrying out the transfer meeting, carry out the corresponding path planning for the overall logistics distribution. See the identification in Figure2 for the actual process.Figure 2
Flow chart of path planning algorithm.The first step is to carry out effective judgment on relevant demand points at the distribution planning level. Before carrying out relevant distribution business, the “provider” shall carry out planning for the distribution task with reference to the actual task and distribution demand and disclose the types, capacity, and relevant information of goods that can be handled through the platform at a relatively low price. The rest of the “demanders” rely on the platform to view and read information, further develop companies with lower transportation costs, and select reliable enterprises for cooperation with reference to actual needs. The “provider” in this stage belongs to the relevant cooperative distribution company. Its basic distribution demand point location belongs to the determined mode: carry out research on the distribution points of the relevant “demander,” and further explore the enterprises with relatively lower distribution cost to realize the corresponding cooperative distribution by comparing the cost differences between the “demander” and the “provider.”The second step is the route planning layer, so as to judge the most ideal distribution route. Referring to the judgment formed by the relevant distribution planning layer for the actual distribution point, this level will be started. According to the actual demand points, realize the supporting renumbering operation, carry out the basic path planning, and execute the relevant distribution operations at the same time. There are a large number of distribution companies in the platform. At the same time, each enterprise has I distribution tasks. Referring to the sharing and related predictability of the platform foundation, it is concluded from the relevant path planning for logistics distribution that the “provider” has significant fluctuations in the cost in a specific distribution area with the continuous increase of time and related logistics tasks. Relying on the comparison of task I cost, the “logistics service demander” further concludes that the distribution of the “provider” is helpful to control the overall cost, so the “provider” is responsible for the implementation of this logistics task. Then, the task at this stage belongs to the category of transshipment and distribution task. In the actual cooperative distribution system, the description adopted belongs to the specific location information of the known distribution center and logistics service demander, the basic data of relevant distribution centers and vehicles (load, limit distance, etc.), the demand information of the demander, and the unit cost of relevant nodes.


### 3.2.2. Model Assumptions

Referring to the basic characteristics of relevant distribution point problems, this paper obtains the following basic assumptions: the goods distributed are the affordable category of time window; relevant distribution enterprises have redundant distribution capacity and can carry out cooperative distribution of logistics tasks; it is assumed that in the relevant transshipment procedures the management expenses due to the platform are not included.


### 3.2.3. Variable Definition

Among them, Tables2 and 3 show variable lists, and Table 4 shows the alphabetic list.Table 2
Variable list 1.
VariableDescribeTypefObjective functionUnknownpqLogistics companyKnowncpjUnit cost from logistics companyP to logistics task JKnowndpjDistance from logistics companyP to task JKnowncjpPrice from logistics companyP to task JKnownyjpIs the taskj the responsibility of the logistics company P0-1 variableTable 3
List of variables 2.
VariableDescribeTypedmnThe distance from distribution pointm to nKnowncmnUnit cost of transportation from distribution pointm to nKnownXmnkThe distribution demand of logistics distribution taskJKnownqjDistribution demand of taskJKnownHH vehicles availableKnownQMaximum carrying capacity of vehicleKnownqj.The distribution demand of transshipment logistics distribution taskJ has been determinedUnknownTable 4
Letters list.
IndexesMeaningRangeM, s, nNode1 toMjTask1 toNP, qCompany1 toGkType of shipping1 toK


## 3.2.1. Problem Description

Before the provider of logistics resources makes specific distribution, it is necessary to refer to the actual tasks and distribution needs to carry out planning for the relevant tasks of distribution, and it is necessary to calculate the spare space of relevant vehicles in the distribution link and publish the basic type, capacity, and cargo information of acceptable goods through the platform at the low price exceeding the cost price. The remaining providers further develop relatively low-cost solutions by effectively capturing and reading the platform data and select enterprises with stronger capabilities with reference to relevant needs to achieve effective cooperation between the two. On the basis of relevant cooperation, enterprise 1 has evolved from “enterprise” to “logistics service demander,” and enterprise 2 has further evolved from the initial “irrelevant enterprise” to “logistics resource provider.” In such cases, logistics companies may have dual roles. On the one hand, they may be the basic demander, but also the service provider. Based on the logistics cooperative distribution problem, the first is to carry out research on the relevant distribution demand points, so as to identify whether the relevant transshipment operations should be carried out. The focus of the judgment is that, for distribution demand points, when the cost of their own distribution activities exceeds the cost of other enterprises, or their own ability fails to solve the distribution demand, they can choose the transshipment scheme. At the same time, after determining the demand point and carrying out the transfer meeting, carry out the corresponding path planning for the overall logistics distribution. See the identification in Figure2 for the actual process.Figure 2
Flow chart of path planning algorithm.The first step is to carry out effective judgment on relevant demand points at the distribution planning level. Before carrying out relevant distribution business, the “provider” shall carry out planning for the distribution task with reference to the actual task and distribution demand and disclose the types, capacity, and relevant information of goods that can be handled through the platform at a relatively low price. The rest of the “demanders” rely on the platform to view and read information, further develop companies with lower transportation costs, and select reliable enterprises for cooperation with reference to actual needs. The “provider” in this stage belongs to the relevant cooperative distribution company. Its basic distribution demand point location belongs to the determined mode: carry out research on the distribution points of the relevant “demander,” and further explore the enterprises with relatively lower distribution cost to realize the corresponding cooperative distribution by comparing the cost differences between the “demander” and the “provider.”The second step is the route planning layer, so as to judge the most ideal distribution route. Referring to the judgment formed by the relevant distribution planning layer for the actual distribution point, this level will be started. According to the actual demand points, realize the supporting renumbering operation, carry out the basic path planning, and execute the relevant distribution operations at the same time. There are a large number of distribution companies in the platform. At the same time, each enterprise has I distribution tasks. Referring to the sharing and related predictability of the platform foundation, it is concluded from the relevant path planning for logistics distribution that the “provider” has significant fluctuations in the cost in a specific distribution area with the continuous increase of time and related logistics tasks. Relying on the comparison of task I cost, the “logistics service demander” further concludes that the distribution of the “provider” is helpful to control the overall cost, so the “provider” is responsible for the implementation of this logistics task. Then, the task at this stage belongs to the category of transshipment and distribution task. In the actual cooperative distribution system, the description adopted belongs to the specific location information of the known distribution center and logistics service demander, the basic data of relevant distribution centers and vehicles (load, limit distance, etc.), the demand information of the demander, and the unit cost of relevant nodes.


## 3.2.2. Model Assumptions

Referring to the basic characteristics of relevant distribution point problems, this paper obtains the following basic assumptions: the goods distributed are the affordable category of time window; relevant distribution enterprises have redundant distribution capacity and can carry out cooperative distribution of logistics tasks; it is assumed that in the relevant transshipment procedures the management expenses due to the platform are not included.


## 3.2.3. Variable Definition

Among them, Tables2 and 3 show variable lists, and Table 4 shows the alphabetic list.Table 2
Variable list 1.
VariableDescribeTypefObjective functionUnknownpqLogistics companyKnowncpjUnit cost from logistics companyP to logistics task JKnowndpjDistance from logistics companyP to task JKnowncjpPrice from logistics companyP to task JKnownyjpIs the taskj the responsibility of the logistics company P0-1 variableTable 3
List of variables 2.
VariableDescribeTypedmnThe distance from distribution pointm to nKnowncmnUnit cost of transportation from distribution pointm to nKnownXmnkThe distribution demand of logistics distribution taskJKnownqjDistribution demand of taskJKnownHH vehicles availableKnownQMaximum carrying capacity of vehicleKnownqj.The distribution demand of transshipment logistics distribution taskJ has been determinedUnknownTable 4
Letters list.
IndexesMeaningRangeM, s, nNode1 toMjTask1 toNP, qCompany1 toGkType of shipping1 toK


## 3.3. Model Establishment

(1)
The mathematical model for judging the transfer point of logistics distribution demand point is as follows:Objective function:(1)maxf=∑p=1Gcpjdpj−∑q=1G∑p=1Gcpqdpq−∑q=1Gcjqj=1,2,...,N.Constraints:(2)cpq=0,p=q,(3)∑p=1Gyjp=1,(4)∑j=1Mqjyjp≤Q,(5)yjp=1,The distribution of logistics task J is completed by company P,0,other.Equation (1) is the objective function. The first item represents the cost of the logistics company to distribute a logistics task, the second item represents the cost of the logistics company to transport the logistics task to the cooperative distribution company, and the third item represents the distribution cost required by the cooperative distribution company. The objective function indicates that the points with F > 0 are selected, and the distribution points requiring transshipment are calculated; equation (2) indicates that the transfer point cannot transfer within the company; equation (3) indicates that only one company can be responsible for a demand task; equation (4) indicates that the distribution weight of the distribution company is not greater than the bearing weight of the company; equation (5) is an integer constraint.(2)
Establishment of path planning layer model:Combined with the characteristics of logistics cooperative distribution path optimization under the logistics cloud service platform, the distribution cost in the distribution process is set as the optimization goal, where distribution cost = fixed cost + variable cost + Transshipment cost.Objective function:(6)minf=∑n=1M∑k=1Kx0nkC+∑m=1M∑n=1M∑k=1Kxmnkcmndmn+∑p=1G∑q=1G∑k=1K∑j=1Nxpqkcpqdpq×intqjQ.Constraints:Distribution vehicle capacity constraints:(7)∑n=1M∑k=1Kx0k,k,(8)∑m=1M∑n=1M∑k=1Mxmnkqmk≤Q,k=1,2,…,K,Distribution vehicle routing constraints:(9)∑n=1Mx0nk=1,k=1,2,…,K,(10)∑m=1Mxm0d=1,k=1,2,…,K,(11)xmnkd=0,n=m;k=1,2,…,K,(12)∑m=1M∑k=1Kxmnk≤1,n=1,2,…,M,(13)∑n=1M∑m=1Mxmnk=1,k=1,2,…,K,(14)∑m=1Mxmsk−∑n=1Mxsnk=0,k=1,2,…,K,(15)xmnk=1,In distribution,the KTH car goes from node M to node N,0,In the distribution,the KTH car does not go from node M to node N.Among them, the objective function, namely, formula (6), represents the total cost of distribution activities, in which the first part represents the fixed transportation cost in logistics distribution activities, the second part represents the variable transportation cost after the logistics cloud service platform reprocesses and plans the distribution activities, and the third part represents the activity cost of distribution among different logistics enterprises. Int indicates rounding up, and intqj/Q indicates vehicle transportation times; equations (7) and (8) represent the constraints on the number of vehicles and carrying capacity; equations (9) and (10) indicate that each delivery vehicle starts from the distribution point and returns to the distribution point after completion; equation (11) indicates that the distribution vehicle cannot drive from one demand point to its own demand point in each distribution process; equation (12) indicates that only one vehicle can be responsible for the distribution of demand points in each distribution; equation (13) indicates that in distribution, when the demand point has distribution demand, the demand point must have vehicle distribution; equation (14) ensures the connectivity of the route of the vehicle; equation (15) represents integer constraint.


## 4. Results and Analysis

### 4.1. Genetic Algorithm Design of Logistics Cooperative Distribution Model

In this paper, genetic algorithm is used to solve the logistics distribution path planning model. The detailed solution process is as follows.


#### 4.1.1. Code

Based on the research of the basic principle and main program of genetic algorithm, combined with the characteristics of vehicle routing problem, this paper uses the coding method of natural number coding to design genetic operation.When there are m logistics distribution points and the service vehicle isK, the chromosome structure can be expressed as(16)0−0−m11−m12−…−m1s−0−m21−m22−…−m2s−0−…−mk1−mk2…mks−0,where 0 means the distribution center, and each vehicle starts from the distribution center and needs to return to the distribution center, and mks means the k-th vehicle serves the s-th customer.


#### 4.1.2. Determine the Number of Vehicles

When planning the route, we need to choose the number of vehicles reasonably. This paper uses the following formula to determine the number of vehicles:(17)k=⌊∑j=1MqjQ⌋+1,where ⌊⌋ means rounding down.


#### 4.1.3. Fitness Function

The value of fitness function reflects the quality of individual performance. Properly convert the objective function formula (6) into formula (18), so as to calculate the value of fitness function.(18)Fx=1fx.According to the above formula, when the distribution cost of the vehicle is smaller, the fitness function of the individual is higher; when the distribution cost of the vehicle is greater, the fitness function of the individual is lower.


### 4.2. Logistics Task Allocation Simulation

In order to verify the rationality of the logistics cloud task scheduling model based on genetic algorithm and the effectiveness of the algorithm, we carry out simulation experiments. In order to implement the simulation, we simplify the model and transform the complex multiobjective optimization problem into a single-objective optimization problem through preference vector. Fitness function value of genetic algorithm. The genetic algorithm and open-source algorithm on Python are used to simulate the model proposed in this paper. Assuming that there are 10 LCSPS, the response time of service application is shown in Table5. The response time allocated to LCSPS is the fastest, so the response time allocated to LCSPS in different services is the shortest.Table 5
Response time of LCSP service application (m).
LCSP23456General service response time43756LCSP number7891011General service response time81014513At the same time, there are 100 LCSD, and the business completion time is shown in Table6. It can be seen that the completion time of these 100 tasks ranges from 6 minutes to 99 minutes, which means that once the allocation is improper, it will bring great time cost.Table 6
Completion time of LCSD business (m).
858310709345189735966588896160556138219729363673135688511004040991667145049519759297067575266507025867961347722426240829432133790125299761005864648060528782657382812499761723169722504798598169928871At the same time, the use cost of each server is shown in Table7.Table 7
Server usage cost.
LCSP1LCSP2LCSP3LCSP4LCSP5LCSP6LCSP7LCSP8LCSP9LCSP10Use cost0.80.61.31.211.31.41.60.71.1Set the maximum service time of each LSCP to 12 hours per day, and select the preference vector asλ = (0.4, 0.4, 0.2); that is, pay more attention to the scheduling time and resource utilization at this time. The optimal scheduling scheme is obtained through Python simulation, as shown in Table 8 and Figures 3–5.Table 8
Optimal dispatching scheme.
LCSP1LCSP2LCSP3LCSP4LCSP5LCSP6LCSP7LCSP8LCSP9LCSP10Number of tasks13141011129981311Resource utilization74.478.371.276.675.47373.972.277.172.8Completion time534548494541536528532520546522Figure 3
Number of LSCP scheduling tasks.Figure 4
LSCP scheduling resource utilization.Figure 5
LSCP scheduling time.Figure6 shows the change curve of the objective function. It can be seen from the figure that after 100 generations of iterations the object function value increases rapidly from 30 to 130 and slowly from generation 5 to generations 40 to 130. Subsequently, the 40th generation to 60th generation are rapidly upgraded to 160. Finally, the 60th to 100th generations are basically stable at about 170.Figure 6
Variation curve of objective function value.Figure7 shows the change of scheduling cost. It can be seen from the figure that the cost in the scheduling process gradually decreases with the increase of the number of algorithm iterations, from the initial unit cost of nearly 200 to 120. Then it gradually decreased to about 80. Genetic algorithm shows the ability of efficient and accurate solution in this 100-generation iteration.Figure 7
Change chart of dispatching cost.Figure8 shows the trend of total time change. It can be seen from the figure that the total time decreases rapidly with the number of iterations, from more than 1000 at the beginning to about 500 at last, and remains stable for a period of time, reducing by 50%. From the above simulation results, it can be seen that the fitness function value can converge after 100 generations of iterative calculation by using the genetic algorithm described in this paper. Our algorithm assigns 100 LCSD tasks to 10 LCSPS, and when the preference vector λ = (0.4, 0.4, 0.2), one of the optimal solutions is 176.4. In this case, the service cost is 80.0 yuan and the service time is 507.2 minutes.Figure 8
Total time variation trend.


### 4.3. Logistics Cooperative Distribution Simulation

Suppose that the distribution centerp of a logistics resource provider has a distribution area with 30 logistics distribution demand points at different locations, the weight of each task is no more than 2 kg, the maximum load weight of each distribution vehicle is 7 kg, the fixed cost of vehicles C is 2 yuan/vehicle, Cpj  = 1 yuan/m, Cpq  = 1 yuan/m, Cmn  = 1 yuan/m, the number of vehicles kp  = 6, and the location of distribution center p is (25, 25). The location of the distribution center q of another logistics resource provider is (50, 40). There are 12 logistics distribution demand points in different locations. The weight of each task is no more than 2. The maximum load capacity of each distribution vehicle is 70 kg. The fixed cost of vehicles C is 2 yuan/vehicle, the number of vehicles kp  = 7, Cpq  = 2 yuan/meter, Cpj  = 1 yuan/meter, and Cmn  = 1 yuan/meter. Lip represents the i-th distribution point of P company.The distribution route before optimization using the algorithm in this paper is shown in Figure9. At this time, the distribution cost is 2212.43 yuan, the distribution vehicles are 5, and the total mileage is 1894.46.Figure 9
Schematic diagram of path before optimization.The genetic algorithm is used to solve the problem. The algorithm parameters are as follows: population size pop size = 300, maximum number of iterations max gen = 200, crossover probability PC = 0.8, and mutation probability PM = 0.1. Using the data of this paper and substituting it into the model established in this paper, the following distribution scheme is obtained: the simulation results are shown in Figure10. It can be seen that the p minimum distribution cost is 601.58 yuan, the distribution vehicle is 5, and the total mileage is 477.41.Figure 10
Schematic diagram of optimized distribution path.It can be seen that, after using the algorithm to optimize the path, the path interleaving is greatly reduced, and the vehicles do not take the repeated route, which can greatly save the cost. After calculation, the total mileage after optimization is 74.8% lower than that before optimization, and the cost is significantly reduced by 72.8%. To sum up, the last kilometer distribution algorithm proposed in this paper can greatly reduce the cost of logistics resource scheduling, which has obvious research significance.


## 4.1. Genetic Algorithm Design of Logistics Cooperative Distribution Model

In this paper, genetic algorithm is used to solve the logistics distribution path planning model. The detailed solution process is as follows.


### 4.1.1. Code

Based on the research of the basic principle and main program of genetic algorithm, combined with the characteristics of vehicle routing problem, this paper uses the coding method of natural number coding to design genetic operation.When there are m logistics distribution points and the service vehicle isK, the chromosome structure can be expressed as(16)0−0−m11−m12−…−m1s−0−m21−m22−…−m2s−0−…−mk1−mk2…mks−0,where 0 means the distribution center, and each vehicle starts from the distribution center and needs to return to the distribution center, and mks means the k-th vehicle serves the s-th customer.


### 4.1.2. Determine the Number of Vehicles

When planning the route, we need to choose the number of vehicles reasonably. This paper uses the following formula to determine the number of vehicles:(17)k=⌊∑j=1MqjQ⌋+1,where ⌊⌋ means rounding down.


### 4.1.3. Fitness Function

The value of fitness function reflects the quality of individual performance. Properly convert the objective function formula (6) into formula (18), so as to calculate the value of fitness function.(18)Fx=1fx.According to the above formula, when the distribution cost of the vehicle is smaller, the fitness function of the individual is higher; when the distribution cost of the vehicle is greater, the fitness function of the individual is lower.


## 4.1.1. Code

Based on the research of the basic principle and main program of genetic algorithm, combined with the characteristics of vehicle routing problem, this paper uses the coding method of natural number coding to design genetic operation.When there are m logistics distribution points and the service vehicle isK, the chromosome structure can be expressed as(16)0−0−m11−m12−…−m1s−0−m21−m22−…−m2s−0−…−mk1−mk2…mks−0,where 0 means the distribution center, and each vehicle starts from the distribution center and needs to return to the distribution center, and mks means the k-th vehicle serves the s-th customer.


## 4.1.2. Determine the Number of Vehicles

When planning the route, we need to choose the number of vehicles reasonably. This paper uses the following formula to determine the number of vehicles:(17)k=⌊∑j=1MqjQ⌋+1,where ⌊⌋ means rounding down.


## 4.1.3. Fitness Function

The value of fitness function reflects the quality of individual performance. Properly convert the objective function formula (6) into formula (18), so as to calculate the value of fitness function.(18)Fx=1fx.According to the above formula, when the distribution cost of the vehicle is smaller, the fitness function of the individual is higher; when the distribution cost of the vehicle is greater, the fitness function of the individual is lower.


## 4.2. Logistics Task Allocation Simulation

In order to verify the rationality of the logistics cloud task scheduling model based on genetic algorithm and the effectiveness of the algorithm, we carry out simulation experiments. In order to implement the simulation, we simplify the model and transform the complex multiobjective optimization problem into a single-objective optimization problem through preference vector. Fitness function value of genetic algorithm. The genetic algorithm and open-source algorithm on Python are used to simulate the model proposed in this paper. Assuming that there are 10 LCSPS, the response time of service application is shown in Table5. The response time allocated to LCSPS is the fastest, so the response time allocated to LCSPS in different services is the shortest.Table 5
Response time of LCSP service application (m).
LCSP23456General service response time43756LCSP number7891011General service response time81014513At the same time, there are 100 LCSD, and the business completion time is shown in Table6. It can be seen that the completion time of these 100 tasks ranges from 6 minutes to 99 minutes, which means that once the allocation is improper, it will bring great time cost.Table 6
Completion time of LCSD business (m).
858310709345189735966588896160556138219729363673135688511004040991667145049519759297067575266507025867961347722426240829432133790125299761005864648060528782657382812499761723169722504798598169928871At the same time, the use cost of each server is shown in Table7.Table 7
Server usage cost.
LCSP1LCSP2LCSP3LCSP4LCSP5LCSP6LCSP7LCSP8LCSP9LCSP10Use cost0.80.61.31.211.31.41.60.71.1Set the maximum service time of each LSCP to 12 hours per day, and select the preference vector asλ = (0.4, 0.4, 0.2); that is, pay more attention to the scheduling time and resource utilization at this time. The optimal scheduling scheme is obtained through Python simulation, as shown in Table 8 and Figures 3–5.Table 8
Optimal dispatching scheme.
LCSP1LCSP2LCSP3LCSP4LCSP5LCSP6LCSP7LCSP8LCSP9LCSP10Number of tasks13141011129981311Resource utilization74.478.371.276.675.47373.972.277.172.8Completion time534548494541536528532520546522Figure 3
Number of LSCP scheduling tasks.Figure 4
LSCP scheduling resource utilization.Figure 5
LSCP scheduling time.Figure6 shows the change curve of the objective function. It can be seen from the figure that after 100 generations of iterations the object function value increases rapidly from 30 to 130 and slowly from generation 5 to generations 40 to 130. Subsequently, the 40th generation to 60th generation are rapidly upgraded to 160. Finally, the 60th to 100th generations are basically stable at about 170.Figure 6
Variation curve of objective function value.Figure7 shows the change of scheduling cost. It can be seen from the figure that the cost in the scheduling process gradually decreases with the increase of the number of algorithm iterations, from the initial unit cost of nearly 200 to 120. Then it gradually decreased to about 80. Genetic algorithm shows the ability of efficient and accurate solution in this 100-generation iteration.Figure 7
Change chart of dispatching cost.Figure8 shows the trend of total time change. It can be seen from the figure that the total time decreases rapidly with the number of iterations, from more than 1000 at the beginning to about 500 at last, and remains stable for a period of time, reducing by 50%. From the above simulation results, it can be seen that the fitness function value can converge after 100 generations of iterative calculation by using the genetic algorithm described in this paper. Our algorithm assigns 100 LCSD tasks to 10 LCSPS, and when the preference vector λ = (0.4, 0.4, 0.2), one of the optimal solutions is 176.4. In this case, the service cost is 80.0 yuan and the service time is 507.2 minutes.Figure 8
Total time variation trend.


## 4.3. Logistics Cooperative Distribution Simulation

Suppose that the distribution centerp of a logistics resource provider has a distribution area with 30 logistics distribution demand points at different locations, the weight of each task is no more than 2 kg, the maximum load weight of each distribution vehicle is 7 kg, the fixed cost of vehicles C is 2 yuan/vehicle, Cpj  = 1 yuan/m, Cpq  = 1 yuan/m, Cmn  = 1 yuan/m, the number of vehicles kp  = 6, and the location of distribution center p is (25, 25). The location of the distribution center q of another logistics resource provider is (50, 40). There are 12 logistics distribution demand points in different locations. The weight of each task is no more than 2. The maximum load capacity of each distribution vehicle is 70 kg. The fixed cost of vehicles C is 2 yuan/vehicle, the number of vehicles kp  = 7, Cpq  = 2 yuan/meter, Cpj  = 1 yuan/meter, and Cmn  = 1 yuan/meter. Lip represents the i-th distribution point of P company.The distribution route before optimization using the algorithm in this paper is shown in Figure9. At this time, the distribution cost is 2212.43 yuan, the distribution vehicles are 5, and the total mileage is 1894.46.Figure 9
Schematic diagram of path before optimization.The genetic algorithm is used to solve the problem. The algorithm parameters are as follows: population size pop size = 300, maximum number of iterations max gen = 200, crossover probability PC = 0.8, and mutation probability PM = 0.1. Using the data of this paper and substituting it into the model established in this paper, the following distribution scheme is obtained: the simulation results are shown in Figure10. It can be seen that the p minimum distribution cost is 601.58 yuan, the distribution vehicle is 5, and the total mileage is 477.41.Figure 10
Schematic diagram of optimized distribution path.It can be seen that, after using the algorithm to optimize the path, the path interleaving is greatly reduced, and the vehicles do not take the repeated route, which can greatly save the cost. After calculation, the total mileage after optimization is 74.8% lower than that before optimization, and the cost is significantly reduced by 72.8%. To sum up, the last kilometer distribution algorithm proposed in this paper can greatly reduce the cost of logistics resource scheduling, which has obvious research significance.


## 5. Conclusion

In this paper, a logistics task allocation optimization model based on genetic algorithm is proposed. According to the logistics resource scheduling process and characteristics, the logistics resource scheduling process is divided into cloud logistics demand task allocation and the last kilometer distribution process of logistics goods; comprehensively consider multiple objectives: resource utilization, scheduling time, and operation cost, establish the logistics task allocation model, give the relevant decision variables, objective functions, and constraints, analyze and model the last kilometer problem of logistics distribution, and give the relevant decision variables, objective functions, and constraints, referring to the model established in this paper, combined with the relevant genetic algorithm to realize the effective design and solution, and through the python software to realize the simulation, so as to verify the feasibility and effectiveness of the model and algorithm established in this paper. The factors selected in this paper exclude many complex unpredictable and difficult to quantify situations, and the impact of practical problems has not been studied in a deeper level, including insufficient analysis of weather, terrain, road conditions, and so on. In the follow-up research, these factors should be gradually added to the whole discussion system, to reduce the error between the model built in the paper and the actual situation as much as possible and achieve the ideal optimization effect. At the same time, the application of existing intelligent technology in cargo transportation is just beginning, and there may be more advanced experience in other applications for reference. If these successful examples are absorbed, the effect of cargo transportation management may be better improved.



---

*Source: 5950876-2022-05-02.xml*