# Optimization of Foreign Trade Service Logistics Warehousing System Based on Immune Genetic Algorithm and Wireless Network Technology

Authors: Na Li; Meng Li
Journal: Mobile Information Systems
 (2022)

---

## Abstract

In today’s rapid economic development, whether the factors of production can be reasonably allocated directly affects the utilization rate of resources. By further affecting the economic benefits, the importance of the logistics system in economic development can be clearly seen. However, with the deepening of economic development and the advantages of efficient and fast logistics, the proportion of production costs is increasing. The optimization of logistics scheduling problems is also on the agenda, but traditional scheduling optimization methods are not suitable for large scale complex problems, and interdisciplinary research provides new ideas for solving such problems. And by imitating the biological immune mechanism, the immune optimization algorithm has shown excellent performance in the research and application of each neighborhood. On this basis, this paper proposes an immune genetic algorithm to optimize the logistics scheduling problem, but the basic immune genetic algorithm has the problems of low local search ability and too fast algorithm speed. Based on the idea of clonal selection in biological immune system, a clonal immune genetic algorithm is proposed in this paper. Through simulation experiments on instances of different scales, the improved immune crown algorithm proposed in this paper can obtain the optimal solution of the problem within the same number of iterations, with an average solution probability of 30%. The quality and convergence speed are also significantly improved compared to the first two.


---

## Body

## 1. Introduction

With the socialization of production and the increasing size and complexity of production and material cycles, the problem of optimal scheduling permeates all areas of scientific research and engineering applications. With the growth of the economy in the market and the continuous increase in logistics technology expertise, the logistics and distribution industry has been developing rapidly. As one of the key points of the current economic development, logistics directly affects the social and economic benefits. It can be seen that the optimization of its scheduling is very necessary. However, the traditional scheduling optimization method has certain shortcomings; because of the influence of these disadvantages, it is not suitable for application in large scale and complex problems. In recent years, with the integration and development of disciplines, interdisciplinary research has provided new ideas for solving such problems. Among them, the artificial immune algorithm has achieved excellent results in the application of various neighborhoods. The algorithm handles optimization problems by imitating the immune mechanism of organisms. It introduces the concept of immune algorithm into genetic algorithm and generates immune genetic algorithm which belongs to the category of artificial immune optimization algorithm. The immune genetic algorithm can selectively use the feature information to encourage the population towards the optimization trend and reduce the degradation in the optimization process. Due to its shortcomings in convergence and adaptability, corresponding improvement ideas are proposed. A clonal immune genetic algorithm is constructed.In the development of modern economy, logistics can effectively reduce costs and improve production efficiency for the development of enterprises and play an important role in the development of society. It can be seen that the rationalization of the logistics system will produce huge economic benefits. Therefore, it is considered to be the “third source of profit” after sales expansion in the sales department and cost reduction in the production department. Today, logistics needs not only to reduce costs, but also to keep users happy. Its method of further reducing logistics costs while satisfying users has attracted the attention of many theoretical and applied researchers at home and abroad. With the rapid development of the national economy and the increasing integration into the world economic system, the new concept of logistics has also been referred to the strategic height of the development of the national transportation industry, and the research on logistics is therefore of extraordinary significance.In the scope of artificial immune algorithm, this paper optimizes logistics scheduling problem based on immune genetic algorithm. Immune genetic algorithm is a process of genetic evolution by introducing the concept of immunity. It can consciously utilize feature information to promote the development trend of optimization while suppressing the degradation in the optimization process. This paper summarizes the principles and characteristics of the basic algorithm of immune genetics and summarizes its shortcomings. Because the immune genetic algorithm is easy to fall into the local optimal state and other defects when it is applied, the cloning mechanism of biological immunity is introduced again in this paper. In this algorithm, the shortcoming of poor local search ability of basic immune genetic algorithm is improved by introducing clone operator, and the clonal immune genetic algorithm is proposed. In this paper, the convergence speed of the algorithm is tested, which shows the effectiveness of the algorithm. And this paper proves the stability of the improved algorithm through the simulation of the actual case. And it shows the practical value of the algorithm.


## 2. Related Work

In the logistics system, such as establishing an effective distribution system to reduce costs, it has become an urgent problem to be solved in logistics, and it is worth solving in depth and systematically. Among them, facing the problems of diversified commodity demand and large circulation, Peng studied the structure of logistics hypernetwork for multiple goods distribution. He established a sequential supply and demand cost function for logistics, which reflects the logistics costs of different commodities in different regions. Taking coal logistics supernetwork as an example, he used an improved projection algorithm to reveal availability by improving the matching of the network. With the original 81.3% which can be improved into 90.5%, influence of labor relations can be improved and the degree of matching into 90.1% [1]. Chang aimed to study the optimization and cost analysis of e-commerce logistics network based on EPC in the context of “One Belt, One Road.” And he built a two-stage model for B2C e-commerce logistics network optimization and determined the location of the B2C regional e-commerce logistics center connection plan. Taking a B2C e-commerce company for instance, experiment findings indicate that this model is valid [2]. Chen proposed an improved genetic algorithm based solution to the green location path optimization problem for cold chain logistics. He built a cold chain logistics model. Then, he improved the genetic algorithm in combination with the specific model of the optimization problem. The results show that, compared with other methods, this approach speeds up aggregation, lowers allocation costs, and achieves economies of low carbon [3]. Zhao optimized the accounting information system in the context of Internet logistics services and supply chains. In terms of accounting subsystem, its effectiveness as accounting information output will provide objective and reliable support for enterprise management decision-making. According to the characteristics of the accounting information system, he defined the credibility of the accounting information system. The results of the simulation show satisfactory results of the proposed method [4]. Hu proposes an optimization model for logistics and warehousing centers as well as accurate sales and marketing strategies on the basis of fuzzy methods as well as neural web models. He used MATLAB as well as the lingo only to check results as well as to explain digital examples. The results show that the multiobjective model has increased the cost of logistics and the efficiency of logistics cost and time allocation [5]. Most of the above researches on the optimization of the logistics warehousing system are from a theoretical point of view, and he analyzed the optimization scheme, lacking empirical verification.In this paper, the immune algorithm of biological immune system mechanism is combined with genetic algorithm to optimize the logistics scheduling problem, and the relevant collection of immune genetic algorithm is done. Among them, Zhang aims at the development of an Immunity Algorithm (IGA) to solve a simple assembly line balance problem type 1 (SALBP-1). Objective is to minimize the number of stations as well as the load on the workstations during a particular period of an installation line. A system is then proposed with a user defined functional called psi (center dot) that transforms all individuals during the IGA run to satisfy the priority relationship. Experiments show that the proposed method is effective [6]. Shi et al. developed a dynamic scheduling model for FJSP with fuzzy delivery times. The model has multiple objectives: minimizing energy consumption, maximizing production time, and eliminating consumer dissatisfaction. The model is then solved with an improved immunogenetics algorithm (IGA). The developed model and the improved IGA were tested in simulations and compared to a genetic algorithm (GA). The results of this study provide new ideas for FJSP in realistic scenarios [7]. The distribution center (DC) location problem is one of the most important decisions in the logistics system. Aiming at the fuzzy concepts that often appear in decision-making data, Xiao et al. proposed a new multicriteria-based decision-making model to solve the time-sensitive DC location problem in fuzzy environments. Finally, they gave a numerical example to illustrate the effectiveness of the proposed method [8]. They explained the application and improvement of the immune genetic algorithm; however, there is still a lack of relevant research on the optimization of logistics system, especially the optimization application in logistics scheduling, and most of them focus on research ideas.


## 3. Logistics System Optimization Method

### 3.1. Overview of Logistics Distribution Business

Logistics, as the name suggests, refers to the flow of materials from suppliers to consumers. It includes information, transportation, storage, material handling, and packaging [9, 10]. Figure 1 illustrates the logistics process. Modern logistics is a strategic measure that integrates manufacturing, transportation, sales, and other market conditions to meet the needs of consumers. As an advanced organization method and management technology, modern logistics is widely regarded as an important source of profit for enterprises in addition to reducing material consumption and improving labor productivity.Figure 1
Schematic diagram of the logistics process.The tasks of the logistics system are measured in terms of total cost and logistics performance [11]. The measures of logistics performance are inventory visibility, operational capability, and work quality [12, 13]. The cost of logistics is directly related to the required high level of performance [14]. In general, the higher the expected performance, the higher the total logistics cost. To achieve effective logistics performance, a balance must be established between service performance and total cost [15].The significance of distribution to the entire logistics system is as follows:As an important part of logistics system, distribution is a special and comprehensive activity form in logistics. It links commercial and logistical flows. It is of great significance and role to do a good job in distribution work. It improves the overall level of transportation and logistics. Branch transportation has strong flexibility, adaptability, and service distribution links, which can unify branch transportation and small processing, thereby optimizing and improving the transportation process [16].It improves the economy of the final logistics. It realizes the distribution method of economical purchases. This improves the economic efficiency of logistics [17]. For example, distribution methods such as collectively delivering various goods to users or delivering a small amount of goods to a large number of users together can effectively improve economic efficiency.Zero inventory is achieved through centralized inventory management. Production companies can improve their financial position and reduce costs by releasing large reserves [18].It simplifies the program and makes it easier to use. While achieving the purpose of multiple purchases, a series of costs and expenses such as ordering can be reduced [19].Improving supply-guaranteed distribution can reduce the risk of out-of-stocks affecting user production [20].


### 3.2. Basic Idea of Immune Genetic Algorithm

The immune algorithm is inspired by the immune system of the organism, as shown in Figure2. The intelligent algorithm based on artificial immune algorithm of biological immune mechanism came into being. The processes of antigen recognition, antibody secretion, and antibody evolution in biological immune systems correspond to the principles of the search process for optimization problems. The corresponding immunological algorithms are listed in Table 1.Figure 2
Abstract biological immune mechanism model.Table 1
Relationship between immune system and immune algorithm.
Correspondence between biological immune system and immune algorithmCell activationImmune selectionCell differentiationIndividual cloneBiological immune systemImmune algorithmAffinity maturityMutationsAntigenOptimizationAffinityQuality of feasible solutionsAntibodyFeasible solutions to optimization problemsClone printingClonal suppressionImmune Genetic Algorithm (IGA) is developed by introducing immune mechanism on the basis of genetic algorithm. Immune algorithms are based on genetic algorithms that treat problems and constraints as antigens. It treats solutions as antibodies, which are actually equivalent to chromosomes in traditional genetic algorithms. Through a series of genetic manipulations and antibody affinity calculations, the solution to the problem is to find the antibody with the highest affinity for the antigen in the antibody population. It also maintains the diversity of antibodies. The alleles of an antibody population can be expressed as(1)Hni,e=Hn1,e,Hn2,e,…,Hni,e.In the formula,e represents the number of substitutions, i=1,2,…,I represents the number of the antibody, and the gene on the nth locus on the ith antibody of the eth time is represented as Hni,e.As shown in Figure3, suppose there is a population of M antibodies, each with C genes, each of which provides a character to choose from. H1,H2,…,Hn.n=10, for decimal integer encoding, characters from 0 to 9 are used, and the average information entropy is(2)SM=1C∑i=1cSiM.Figure 3
Schematic diagram of antibody coding.The information entropy of theith gene of M antibodies is expressed as(3)SiM=−∑i=1mQiHlogQiH.Among them, the probability that the characterH appears on the ith gene is expressed as QiH, which can also be said to be the total number of the character H and the entropy of M on the i locus. The higher the value of SiM, the greater the diversity of individual loci. In the immune algorithm, the population has rich information in the early stage of evolution, and the diversity decreases with the increase of evolutionary generation and the degree of adaptation. Diversity becomes zero when individuals within a population join together.The affinity expressions of individualsc and e are(4)HAjc,g,Aje,g=11+KAjc,g,Aje,g.The affinity of antigen and antibody can describe how close the feasible solution is to the optimal solution. The higher the affinity of the individual, the better the objective function value obtained.The affinity of antibodyHAjc,g to antigen is(5)HAjc,g=FAjc,g∑j=1MFAjc,g.F is the fitness value of the individual and M is the number of individuals in the population. The concentration of antibody refers to the proportion of people with similar antibodies in the whole population, so the expression of the concentration of an antibody Ajc,g is(6)NAjc,g=1M∑e=1MHAjc,g,Aje,g.This formula represents the proportion of the number of antibodies with greater affinity to antibodyAjc,g in the total number of antibodies, among them(7)HAjc,g,Aje,g=1,KAjc,g,Aje,g∈φ,ϕ0,KAjc,g,Aje,g∉φ,ϕ.In the formula,φ,ϕ are the selected threshold.The promotion and inhibition of antibodies is to adjust the antibodies in the population according to the affinity between the antibody and the antigen and the concentration of the antibody.The promotion and inhibition of the antibody is expressed by the expected value of the antibody;(8)GAjc,g=HAjc,gTAjc,g.The higher the expected value of the antibody, the greater the probability of selection, indicating that antibodies with high affinity and low concentrations for the antigen are promoted, and antibodies that do not are inhibited. This is expected to have the effect of inhibiting overproduction of the same antibodies suitable for this antigen.The flow of the immune algorithm is shown in Figure4.Figure 4
Flowchart of the immune algorithm.


### 3.3. Characteristics of Immune Algorithms

Features of the immune algorithm include the following:Diversity: The cloning and mutation of antibodies can help generate new antibodies, thereby ensuring individual diversity during evolution, improving the global search ability of immune algorithms, and avoiding local optimization.Immunological memory function: After cellular immunization, antigens are destroyed and phagocytosed by antibodies secreted by immune cells. If a similar antigen is encountered in the future, these memory cells can immediately secrete a flood of antibodies to destroy the antigen, speeding up the search for the best solution.The immune system can self-regulate a certain amount of antibody production, and the local search ability of the immune algorithm can be changed by controlling the concentration of individuals.The convergence is guaranteed, and the convergence speed is very fast; that is, the time to generate the optimal solution that meets the requirements is very short.


## 3.1. Overview of Logistics Distribution Business

Logistics, as the name suggests, refers to the flow of materials from suppliers to consumers. It includes information, transportation, storage, material handling, and packaging [9, 10]. Figure 1 illustrates the logistics process. Modern logistics is a strategic measure that integrates manufacturing, transportation, sales, and other market conditions to meet the needs of consumers. As an advanced organization method and management technology, modern logistics is widely regarded as an important source of profit for enterprises in addition to reducing material consumption and improving labor productivity.Figure 1
Schematic diagram of the logistics process.The tasks of the logistics system are measured in terms of total cost and logistics performance [11]. The measures of logistics performance are inventory visibility, operational capability, and work quality [12, 13]. The cost of logistics is directly related to the required high level of performance [14]. In general, the higher the expected performance, the higher the total logistics cost. To achieve effective logistics performance, a balance must be established between service performance and total cost [15].The significance of distribution to the entire logistics system is as follows:As an important part of logistics system, distribution is a special and comprehensive activity form in logistics. It links commercial and logistical flows. It is of great significance and role to do a good job in distribution work. It improves the overall level of transportation and logistics. Branch transportation has strong flexibility, adaptability, and service distribution links, which can unify branch transportation and small processing, thereby optimizing and improving the transportation process [16].It improves the economy of the final logistics. It realizes the distribution method of economical purchases. This improves the economic efficiency of logistics [17]. For example, distribution methods such as collectively delivering various goods to users or delivering a small amount of goods to a large number of users together can effectively improve economic efficiency.Zero inventory is achieved through centralized inventory management. Production companies can improve their financial position and reduce costs by releasing large reserves [18].It simplifies the program and makes it easier to use. While achieving the purpose of multiple purchases, a series of costs and expenses such as ordering can be reduced [19].Improving supply-guaranteed distribution can reduce the risk of out-of-stocks affecting user production [20].


## 3.2. Basic Idea of Immune Genetic Algorithm

The immune algorithm is inspired by the immune system of the organism, as shown in Figure2. The intelligent algorithm based on artificial immune algorithm of biological immune mechanism came into being. The processes of antigen recognition, antibody secretion, and antibody evolution in biological immune systems correspond to the principles of the search process for optimization problems. The corresponding immunological algorithms are listed in Table 1.Figure 2
Abstract biological immune mechanism model.Table 1
Relationship between immune system and immune algorithm.
Correspondence between biological immune system and immune algorithmCell activationImmune selectionCell differentiationIndividual cloneBiological immune systemImmune algorithmAffinity maturityMutationsAntigenOptimizationAffinityQuality of feasible solutionsAntibodyFeasible solutions to optimization problemsClone printingClonal suppressionImmune Genetic Algorithm (IGA) is developed by introducing immune mechanism on the basis of genetic algorithm. Immune algorithms are based on genetic algorithms that treat problems and constraints as antigens. It treats solutions as antibodies, which are actually equivalent to chromosomes in traditional genetic algorithms. Through a series of genetic manipulations and antibody affinity calculations, the solution to the problem is to find the antibody with the highest affinity for the antigen in the antibody population. It also maintains the diversity of antibodies. The alleles of an antibody population can be expressed as(1)Hni,e=Hn1,e,Hn2,e,…,Hni,e.In the formula,e represents the number of substitutions, i=1,2,…,I represents the number of the antibody, and the gene on the nth locus on the ith antibody of the eth time is represented as Hni,e.As shown in Figure3, suppose there is a population of M antibodies, each with C genes, each of which provides a character to choose from. H1,H2,…,Hn.n=10, for decimal integer encoding, characters from 0 to 9 are used, and the average information entropy is(2)SM=1C∑i=1cSiM.Figure 3
Schematic diagram of antibody coding.The information entropy of theith gene of M antibodies is expressed as(3)SiM=−∑i=1mQiHlogQiH.Among them, the probability that the characterH appears on the ith gene is expressed as QiH, which can also be said to be the total number of the character H and the entropy of M on the i locus. The higher the value of SiM, the greater the diversity of individual loci. In the immune algorithm, the population has rich information in the early stage of evolution, and the diversity decreases with the increase of evolutionary generation and the degree of adaptation. Diversity becomes zero when individuals within a population join together.The affinity expressions of individualsc and e are(4)HAjc,g,Aje,g=11+KAjc,g,Aje,g.The affinity of antigen and antibody can describe how close the feasible solution is to the optimal solution. The higher the affinity of the individual, the better the objective function value obtained.The affinity of antibodyHAjc,g to antigen is(5)HAjc,g=FAjc,g∑j=1MFAjc,g.F is the fitness value of the individual and M is the number of individuals in the population. The concentration of antibody refers to the proportion of people with similar antibodies in the whole population, so the expression of the concentration of an antibody Ajc,g is(6)NAjc,g=1M∑e=1MHAjc,g,Aje,g.This formula represents the proportion of the number of antibodies with greater affinity to antibodyAjc,g in the total number of antibodies, among them(7)HAjc,g,Aje,g=1,KAjc,g,Aje,g∈φ,ϕ0,KAjc,g,Aje,g∉φ,ϕ.In the formula,φ,ϕ are the selected threshold.The promotion and inhibition of antibodies is to adjust the antibodies in the population according to the affinity between the antibody and the antigen and the concentration of the antibody.The promotion and inhibition of the antibody is expressed by the expected value of the antibody;(8)GAjc,g=HAjc,gTAjc,g.The higher the expected value of the antibody, the greater the probability of selection, indicating that antibodies with high affinity and low concentrations for the antigen are promoted, and antibodies that do not are inhibited. This is expected to have the effect of inhibiting overproduction of the same antibodies suitable for this antigen.The flow of the immune algorithm is shown in Figure4.Figure 4
Flowchart of the immune algorithm.


## 3.3. Characteristics of Immune Algorithms

Features of the immune algorithm include the following:Diversity: The cloning and mutation of antibodies can help generate new antibodies, thereby ensuring individual diversity during evolution, improving the global search ability of immune algorithms, and avoiding local optimization.Immunological memory function: After cellular immunization, antigens are destroyed and phagocytosed by antibodies secreted by immune cells. If a similar antigen is encountered in the future, these memory cells can immediately secrete a flood of antibodies to destroy the antigen, speeding up the search for the best solution.The immune system can self-regulate a certain amount of antibody production, and the local search ability of the immune algorithm can be changed by controlling the concentration of individuals.The convergence is guaranteed, and the convergence speed is very fast; that is, the time to generate the optimal solution that meets the requirements is very short.


## 4. Optimization of Immune Genetic Algorithm

In the previous section, the article introduced the basic principles of immune genetic algorithm and the corresponding algorithm flow. The immune cloning algorithm is proposed in this chapter.


### 4.1. Inadequacies of Basic Immune Genetic Algorithms

Immune genetic algorithm is formed by the intersection of genetic algorithm and artificial immune algorithm. In short, it utilizes the idea of artificial immunity in the iterative structure of genetic evolutionary algorithms and uses prior knowledge and heuristic rules as vaccines. It improves the blind spot of genetic evolution algorithm to a certain extent. It speeds up the convergence and maturation of the solution to be solved and avoids the undesirable phenomenon of premature local maturation. It is an evolution. It is an improved version of the algorithm. Immune algorithms show better data retrieval results than genetic algorithms when solving complex optimization problems such as combinatorial optimization. But it still sees more obvious shortcomings in the development and integration of many advanced AI algorithms. Here, through the analysis of various angles, this paper summarizes the shortcomings of the immune genetic algorithm as follows.(1)
The immune genetic algorithm is an improved version of the genetic evolution algorithm, but it adheres to the random search strategy of the genetic evolution algorithm. It puts more emphasis on the intersection-oriented global search method and ignores the local search, especially when solving complex unsolved problems. The space is very large, and the optimal or suboptimal solution of the problem is often not obtained.(2)
The immune genetic algorithm can selectively find the optimal solution through two operations (two operations, namely, vaccination and immunization selection) when solving the problem, but simple vaccination may cause the population to evolve in one direction and reduce the diversity of the population.(3)
Basic immune genetic algorithms: When performing immune operations, this paper performs all three operations—selection, crossover, and mutation—on the macropopulation. In a long period of time, due to the constraints of various factors, such as growth, evolution, environment, primitive ancestry, and others, the population will gradually evolve to a state of relative dominance for certain characteristics, which will make the population fall into a local optimal state.(4)
The basic immune genetic algorithm adopts “haploid inheritance,” which means that some individuals with low affinity but also very useful gene blocks will be lost during evolution. It may end up with a low quality solution.(5)
The basic immune genetic algorithm adopts the iterative structure of genetic evolution algorithm and also uses crossover and mutation operations in the evolution process. Therefore, the control parameters are predetermined and fixed, which has some disadvantages, such as being prone to falling into local optimum and reducing population diversity during optimization.(6)
An important step of the immune genetic algorithm is to extract and inject vaccine, which plays a very important role in the overall performance of the algorithm. Vaccines in basic immune genetic algorithms are extracted and fixed based on prior knowledge, but these vaccines makes it difficult to achieve global effects and may stagnate in the later stages of evolution.This chapter proposes an improved algorithm based on clonal selection to address these shortcomings of immune genetic algorithms.


### 4.2. Immune Genetic Algorithm Based on Clonal Selection

In this paper, an immune cloning algorithm (ICA) is constructed based on the clonal selection mechanism in the immune system. The clonal selection theory of antibodies states that when an antigen invades the human body, the immune system will select antibodies that recognize and destroy the corresponding antigen in the body. It also activates, differentiates, and reproduces these antibodies mainly by cloning, increasing their numbers, and finally triggering an immune response that eliminates the antigen. By amplifying the body’s defenses, it exerts a circulation and fate effect, which eliminates antigens where they enter or persist. The clonal immunization process is shown in Figure5.Figure 5
Immune response process.Considering an optimization problem withH=h1,h2,…,hi as a variable,(9)b:maxyc−1R:R∈F.In the formula, the antibody code of variable H is a stringR=r1,r2,…,rj with finite length, which is expressed as(10)R=cH.Among them,rj is regarded as a genetic gene, and H can be said to be the decoding of antibody R, which is expressed as(11)H=c−1R.In the above formula, the data setF is called the antibody space, and y represents the positive real-valued function on F, which is the affinity function between the antibody and the antigen. Ordinary antibody bit strings are mostly divided into segments; each segment is Ln long:(12)L=∑n=1aLn.Each segment represents the variablehn∈pn,qnn=1,2,…,i separately. And the decoding method of the binary code used is as follows:(13)hn=pn+qn−pn2Ln−1∑j=1Lnrj2j−1.The clone operator consists of three steps: clone proliferation, clone mutation, and clone selection.Under the premise that the antibody groupB=B1,B2,Bi is the i-tuple of the antibody B, the specific description of the cloning operator is as follows.As part of population evolution operations, the number of antibody clones to be propagated is determined by affinity size to ensure better individuals have room to live and improve the quality of the overall population. The expression of clone proliferationKzZ is(14)KzZB=KzZB1,KzZB2,…,KzZBiK.Among them(15)KzZBn=Ln×Bn,n=1,2,…,i.The clone sizeGn of the antibody is(16)Gn=dIz,yBn,θn,θn in the formula reflects the affinity between antibody n and other antibodies. The higher the affinity of the antibody, the greater the similarity of the reacting antibodies, and the stronger the inhibitory effect; generally take(17)Gn=intIz⋅yBn∑j=1iyBj⋅θn,n=1,2,…,i.Among them,Iz represents the total clone size of the antibody population, int⋅ represents the rounding-up function, and the cloned population becomes(18)H′=h,h′1,h′2,...,h′i.Not only are clonal mutations effectively explored in the field of parent antibodies, but also high frequency mutations make the antibody population jump out of the local optimum and obtain the global optimum solution. In this paper, the high frequency change operation is used and described mathematically as follows.By carrying out inversion operationDzC to any antibody Bil′ in the cloned antibody group, it selects two random in-position gene points X and V, and the length of X > V gene is 1, and the antibody is at this time(19)Bil′=bil1,bil2,…,bilx,…,bilv,..,bil1∈B1′.The inversion operation is expressed as(20)Bil′=DmCBil′bil1,bil2,…,bilx,bilx+1,…,bilv+1,bilv,..,bil1∈B1′.The population after high frequency mutation operation is(21)B″=B,B″1,B″2,..,B″i.Each clonal subgroupBn″n=1,2,..,i after high frequency mutation, if there is a mutated antibody:(22)Bn=Bil″maxyBil″l=1,2,..,Gn−1.It leads to(23)yBn<yKn,Bn∈B.In order to update the antibody population, this paper usesKn to replace the original antibody Bn to achieve information exchange; otherwise the original antibody is retained. The clone selection operator performs a global search by performing a local search in the vicinity of the candidate solution. The clone selection operator acts on both the parental and progeny populations and measures the survivability of individuals according to their affinity.


### 4.3. Implementation of Immune Cloning Algorithm

Based on the above clone selection operator, a new immune genetic algorithm is proposed in this paper. It introduces the clone operator in the immune genetic algorithm. It expands the search range and increases the diversity of the population. It improves the frequent phenomenon of low local search ability and slow evolution. This section introduces the flow and implementation steps of the improved immune cloning algorithm shown in Figure6.Figure 6
Basic flow of the immune cloning algorithm.


### 4.4. Algorithm Test Results

The search speed of the improved clone selection algorithm is shown in Figure7. It can be seen from the figure that the algorithm not only searches quickly, but also has good robustness.Figure 7
Schematic diagram of algorithm search speed.The core of the algorithm lies in the encoding method, the calculation of affinity, and the selection of mutation rules. The coding method used in this paper speeds up the search, and the definition of affinity and the selection of mutation rules enable the algorithm to quickly search for the optimal solution. It also maintains the diversity of the population through the step of inserting new individuals. An improved clone selection algorithm for solving the channel assignment problem has been shown to be not only feasible but also effective, with some results even surpassing many existing algorithms.


## 4.1. Inadequacies of Basic Immune Genetic Algorithms

Immune genetic algorithm is formed by the intersection of genetic algorithm and artificial immune algorithm. In short, it utilizes the idea of artificial immunity in the iterative structure of genetic evolutionary algorithms and uses prior knowledge and heuristic rules as vaccines. It improves the blind spot of genetic evolution algorithm to a certain extent. It speeds up the convergence and maturation of the solution to be solved and avoids the undesirable phenomenon of premature local maturation. It is an evolution. It is an improved version of the algorithm. Immune algorithms show better data retrieval results than genetic algorithms when solving complex optimization problems such as combinatorial optimization. But it still sees more obvious shortcomings in the development and integration of many advanced AI algorithms. Here, through the analysis of various angles, this paper summarizes the shortcomings of the immune genetic algorithm as follows.(1)
The immune genetic algorithm is an improved version of the genetic evolution algorithm, but it adheres to the random search strategy of the genetic evolution algorithm. It puts more emphasis on the intersection-oriented global search method and ignores the local search, especially when solving complex unsolved problems. The space is very large, and the optimal or suboptimal solution of the problem is often not obtained.(2)
The immune genetic algorithm can selectively find the optimal solution through two operations (two operations, namely, vaccination and immunization selection) when solving the problem, but simple vaccination may cause the population to evolve in one direction and reduce the diversity of the population.(3)
Basic immune genetic algorithms: When performing immune operations, this paper performs all three operations—selection, crossover, and mutation—on the macropopulation. In a long period of time, due to the constraints of various factors, such as growth, evolution, environment, primitive ancestry, and others, the population will gradually evolve to a state of relative dominance for certain characteristics, which will make the population fall into a local optimal state.(4)
The basic immune genetic algorithm adopts “haploid inheritance,” which means that some individuals with low affinity but also very useful gene blocks will be lost during evolution. It may end up with a low quality solution.(5)
The basic immune genetic algorithm adopts the iterative structure of genetic evolution algorithm and also uses crossover and mutation operations in the evolution process. Therefore, the control parameters are predetermined and fixed, which has some disadvantages, such as being prone to falling into local optimum and reducing population diversity during optimization.(6)
An important step of the immune genetic algorithm is to extract and inject vaccine, which plays a very important role in the overall performance of the algorithm. Vaccines in basic immune genetic algorithms are extracted and fixed based on prior knowledge, but these vaccines makes it difficult to achieve global effects and may stagnate in the later stages of evolution.This chapter proposes an improved algorithm based on clonal selection to address these shortcomings of immune genetic algorithms.


## 4.2. Immune Genetic Algorithm Based on Clonal Selection

In this paper, an immune cloning algorithm (ICA) is constructed based on the clonal selection mechanism in the immune system. The clonal selection theory of antibodies states that when an antigen invades the human body, the immune system will select antibodies that recognize and destroy the corresponding antigen in the body. It also activates, differentiates, and reproduces these antibodies mainly by cloning, increasing their numbers, and finally triggering an immune response that eliminates the antigen. By amplifying the body’s defenses, it exerts a circulation and fate effect, which eliminates antigens where they enter or persist. The clonal immunization process is shown in Figure5.Figure 5
Immune response process.Considering an optimization problem withH=h1,h2,…,hi as a variable,(9)b:maxyc−1R:R∈F.In the formula, the antibody code of variable H is a stringR=r1,r2,…,rj with finite length, which is expressed as(10)R=cH.Among them,rj is regarded as a genetic gene, and H can be said to be the decoding of antibody R, which is expressed as(11)H=c−1R.In the above formula, the data setF is called the antibody space, and y represents the positive real-valued function on F, which is the affinity function between the antibody and the antigen. Ordinary antibody bit strings are mostly divided into segments; each segment is Ln long:(12)L=∑n=1aLn.Each segment represents the variablehn∈pn,qnn=1,2,…,i separately. And the decoding method of the binary code used is as follows:(13)hn=pn+qn−pn2Ln−1∑j=1Lnrj2j−1.The clone operator consists of three steps: clone proliferation, clone mutation, and clone selection.Under the premise that the antibody groupB=B1,B2,Bi is the i-tuple of the antibody B, the specific description of the cloning operator is as follows.As part of population evolution operations, the number of antibody clones to be propagated is determined by affinity size to ensure better individuals have room to live and improve the quality of the overall population. The expression of clone proliferationKzZ is(14)KzZB=KzZB1,KzZB2,…,KzZBiK.Among them(15)KzZBn=Ln×Bn,n=1,2,…,i.The clone sizeGn of the antibody is(16)Gn=dIz,yBn,θn,θn in the formula reflects the affinity between antibody n and other antibodies. The higher the affinity of the antibody, the greater the similarity of the reacting antibodies, and the stronger the inhibitory effect; generally take(17)Gn=intIz⋅yBn∑j=1iyBj⋅θn,n=1,2,…,i.Among them,Iz represents the total clone size of the antibody population, int⋅ represents the rounding-up function, and the cloned population becomes(18)H′=h,h′1,h′2,...,h′i.Not only are clonal mutations effectively explored in the field of parent antibodies, but also high frequency mutations make the antibody population jump out of the local optimum and obtain the global optimum solution. In this paper, the high frequency change operation is used and described mathematically as follows.By carrying out inversion operationDzC to any antibody Bil′ in the cloned antibody group, it selects two random in-position gene points X and V, and the length of X > V gene is 1, and the antibody is at this time(19)Bil′=bil1,bil2,…,bilx,…,bilv,..,bil1∈B1′.The inversion operation is expressed as(20)Bil′=DmCBil′bil1,bil2,…,bilx,bilx+1,…,bilv+1,bilv,..,bil1∈B1′.The population after high frequency mutation operation is(21)B″=B,B″1,B″2,..,B″i.Each clonal subgroupBn″n=1,2,..,i after high frequency mutation, if there is a mutated antibody:(22)Bn=Bil″maxyBil″l=1,2,..,Gn−1.It leads to(23)yBn<yKn,Bn∈B.In order to update the antibody population, this paper usesKn to replace the original antibody Bn to achieve information exchange; otherwise the original antibody is retained. The clone selection operator performs a global search by performing a local search in the vicinity of the candidate solution. The clone selection operator acts on both the parental and progeny populations and measures the survivability of individuals according to their affinity.


## 4.3. Implementation of Immune Cloning Algorithm

Based on the above clone selection operator, a new immune genetic algorithm is proposed in this paper. It introduces the clone operator in the immune genetic algorithm. It expands the search range and increases the diversity of the population. It improves the frequent phenomenon of low local search ability and slow evolution. This section introduces the flow and implementation steps of the improved immune cloning algorithm shown in Figure6.Figure 6
Basic flow of the immune cloning algorithm.


## 4.4. Algorithm Test Results

The search speed of the improved clone selection algorithm is shown in Figure7. It can be seen from the figure that the algorithm not only searches quickly, but also has good robustness.Figure 7
Schematic diagram of algorithm search speed.The core of the algorithm lies in the encoding method, the calculation of affinity, and the selection of mutation rules. The coding method used in this paper speeds up the search, and the definition of affinity and the selection of mutation rules enable the algorithm to quickly search for the optimal solution. It also maintains the diversity of the population through the step of inserting new individuals. An improved clone selection algorithm for solving the channel assignment problem has been shown to be not only feasible but also effective, with some results even surpassing many existing algorithms.


## 5. Simulation Examples

Constrained logistics is a research topic that has received much attention at present. It is not only because of its practical significance, but also because of its theoretical value.The capacity-constrained logistics distribution problem (CVRP for short) is an NP problem academically. In general, the solution space of the problem is constrained, but the solution is very complex, especially with the expansion of the logistics scale, the computational complexity increases exponentially, and the solution becomes very complex and time-consuming. This chapter proposes an improved immune cloning algorithm (ICA) to solve the CVRP problem by introducing a clone selection operator to improve the mutation rate and population diversity.


### 5.1. Application of MATLAB to Realize Clonal Immune Genetic Algorithm

The main advantage of using MATLAB to implement clonal immune genetic algorithm lies in the powerful matrix processing capability of MATLAB. MATLAB is a mathematical software with complete graphics processing functions to realize the visualization of calculation results and programming. Figure8 is a flowchart for implementing the immunogenicity algorithm using MATLAB.Figure 8
Flowchart using MATLAB.


### 5.2. Example Simulation Environment

MATLAB is used as the software simulation platform, and the benchmark (a benchmark test instance) recognized in the field of CVRP at home and abroad is used as the test case of the algorithm. To illustrate the effectiveness of the improved algorithm, the simulation results of the proposed algorithm are compared with, for example, the basic immunogenicity algorithm. The simulated hardware environment is shown in Table2.Table 2
Experimental simulation environment.
CPUIntel (R)Pentium (R) processor 1.86 GHzRAM512 MBOperating systemMicrosoft Windows XPSoftware simulation platformMATLAB


### 5.3. Small- and Medium-Scale Results

The distance between the distribution center and the demand point and the demand at each demand point are shown in Figure9.Figure 9
Distance between demand points.In order to further prove the effectiveness of the algorithm after transformation, this paper uses various algorithms in immune genetic algorithm (IGA), immune clone genetic algorithm (ICA), and basic genetic algorithm (SGA) for iterative calculation. It also lists the results of 10 calculations and a statistical comparison of the data, as shown in Figure10.Figure 10
Path optimization results for different algorithms.Figure10 shows the 10-time path optimization results of the three algorithms of IGA, ICA, and SGA in small and medium scales. From the comparison of the data, the results of the two algorithms, IGA and SGA, are better than the path optimization results of the ICA algorithm. Although there are some differences in the optimization results of the three algorithms, the differences between the three algorithms are not obvious in the small- and medium-scale optimization results.The statistical results of the three algorithms in Table3 show that when solving the CVRP problem of small and medium benchmarks, the three algorithms have no difference in finding the optimal result. IGA and SGA are slightly higher than ICA in terms of solution quality and convergence speed, but they also require longer computation time, indicating that there is little difference in solution efficiency among the three. By adjusting the population size M and the maximum number of iterations MaxGen, both IGA and ICA can achieve 100% optimal solutions, but there are still oscillations in SGA.Table 3
Statistics of the calculation results of the three algorithms.
AlgorithmAverage valueOptimal solution ratio (%)Mean convergence algebraAverage computation timeSGA68.56046535IGA68.27039668ICA67.88037934Compared with simple genetic algorithm and general immune genetic algorithm, the improved immune clone algorithm does not show obvious advantages, because SGA and IGA are also very effective in solving small and medium benchmark CVRP problems.


### 5.4. Medium- and Large-Scale Results

In this paper, CVRP problems such as the CVRP problem with more than 30 customers ×4 cars are classified as medium and large benchmark problems. Here, different algorithms (SGA, IGA, and ICA) are used for 10 computations for each medium and large case, and the results and statistics are compared, as shown in Figure11 and Table 4.Figure 11
Path optimization results for different algorithms.Table 4
Statistics of the calculation results of the three algorithms.
AlgorithmAverage valueOptimal solution ratio (%)Mean convergence algebraAverage computation timeSGA9140>500535IGA8780476668ICA84330370934Figure11 shows the 10-time path optimization results of the three algorithms of IGA, ICA, and SGA under medium and large scale. From the data trend of the histogram, there are obvious differences in the optimization of the three algorithms. However, the comparison results are the same as the comparison results of small and medium scales; that is, the path optimization results of IGA and SGA algorithms are better than the path optimization results of ICA algorithm. The difference is that the path optimization result of the SGA algorithm is clearly prominent in the figure, showing its performance better than the IGA algorithm. However, with the increase of the number of delivery times, the difference between the optimization results of the two algorithms, IGA and SGA, is gradually equalized. The data fluctuation of the optimization result of the ICA algorithm is small, and the data fluctuation of the other two algorithms is relatively large.As shown in Table4, the results of solving the CVRP problem on the medium and large scale benchmark are shown. The results compare the basic immune genetic algorithm and genetic algorithm. From the data comparison results, in the medium and large scale optimization results, the results of the clonal immune genetic algorithm proposed in this paper and the other two algorithms are more obvious. And from the number of iterations, it can be seen that IGA is better than SGA in terms of solution quality and convergence. But neither can obtain the optimal solution of the problem within 500 generations, and the quality of the average solution is not high. In contrast, the improved immune cloning algorithm proposed in this paper can obtain the optimal solution with a probability of 30% in almost the same number of iterations, and its average solution quality and convergence speed are also significantly better than the former two. This is mainly due to the fact that the immune cloning algorithm rapidly improves the population fitness due to vaccination first and accelerates the global convergence. Secondly, using the concept of cloning, local search is performed in a large area due to high frequency changes. It avoids early local maturation due to the principle of concentration inhibition and optimizes search performance.


## 5.1. Application of MATLAB to Realize Clonal Immune Genetic Algorithm

The main advantage of using MATLAB to implement clonal immune genetic algorithm lies in the powerful matrix processing capability of MATLAB. MATLAB is a mathematical software with complete graphics processing functions to realize the visualization of calculation results and programming. Figure8 is a flowchart for implementing the immunogenicity algorithm using MATLAB.Figure 8
Flowchart using MATLAB.


## 5.2. Example Simulation Environment

MATLAB is used as the software simulation platform, and the benchmark (a benchmark test instance) recognized in the field of CVRP at home and abroad is used as the test case of the algorithm. To illustrate the effectiveness of the improved algorithm, the simulation results of the proposed algorithm are compared with, for example, the basic immunogenicity algorithm. The simulated hardware environment is shown in Table2.Table 2
Experimental simulation environment.
CPUIntel (R)Pentium (R) processor 1.86 GHzRAM512 MBOperating systemMicrosoft Windows XPSoftware simulation platformMATLAB


## 5.3. Small- and Medium-Scale Results

The distance between the distribution center and the demand point and the demand at each demand point are shown in Figure9.Figure 9
Distance between demand points.In order to further prove the effectiveness of the algorithm after transformation, this paper uses various algorithms in immune genetic algorithm (IGA), immune clone genetic algorithm (ICA), and basic genetic algorithm (SGA) for iterative calculation. It also lists the results of 10 calculations and a statistical comparison of the data, as shown in Figure10.Figure 10
Path optimization results for different algorithms.Figure10 shows the 10-time path optimization results of the three algorithms of IGA, ICA, and SGA in small and medium scales. From the comparison of the data, the results of the two algorithms, IGA and SGA, are better than the path optimization results of the ICA algorithm. Although there are some differences in the optimization results of the three algorithms, the differences between the three algorithms are not obvious in the small- and medium-scale optimization results.The statistical results of the three algorithms in Table3 show that when solving the CVRP problem of small and medium benchmarks, the three algorithms have no difference in finding the optimal result. IGA and SGA are slightly higher than ICA in terms of solution quality and convergence speed, but they also require longer computation time, indicating that there is little difference in solution efficiency among the three. By adjusting the population size M and the maximum number of iterations MaxGen, both IGA and ICA can achieve 100% optimal solutions, but there are still oscillations in SGA.Table 3
Statistics of the calculation results of the three algorithms.
AlgorithmAverage valueOptimal solution ratio (%)Mean convergence algebraAverage computation timeSGA68.56046535IGA68.27039668ICA67.88037934Compared with simple genetic algorithm and general immune genetic algorithm, the improved immune clone algorithm does not show obvious advantages, because SGA and IGA are also very effective in solving small and medium benchmark CVRP problems.


## 5.4. Medium- and Large-Scale Results

In this paper, CVRP problems such as the CVRP problem with more than 30 customers ×4 cars are classified as medium and large benchmark problems. Here, different algorithms (SGA, IGA, and ICA) are used for 10 computations for each medium and large case, and the results and statistics are compared, as shown in Figure11 and Table 4.Figure 11
Path optimization results for different algorithms.Table 4
Statistics of the calculation results of the three algorithms.
AlgorithmAverage valueOptimal solution ratio (%)Mean convergence algebraAverage computation timeSGA9140>500535IGA8780476668ICA84330370934Figure11 shows the 10-time path optimization results of the three algorithms of IGA, ICA, and SGA under medium and large scale. From the data trend of the histogram, there are obvious differences in the optimization of the three algorithms. However, the comparison results are the same as the comparison results of small and medium scales; that is, the path optimization results of IGA and SGA algorithms are better than the path optimization results of ICA algorithm. The difference is that the path optimization result of the SGA algorithm is clearly prominent in the figure, showing its performance better than the IGA algorithm. However, with the increase of the number of delivery times, the difference between the optimization results of the two algorithms, IGA and SGA, is gradually equalized. The data fluctuation of the optimization result of the ICA algorithm is small, and the data fluctuation of the other two algorithms is relatively large.As shown in Table4, the results of solving the CVRP problem on the medium and large scale benchmark are shown. The results compare the basic immune genetic algorithm and genetic algorithm. From the data comparison results, in the medium and large scale optimization results, the results of the clonal immune genetic algorithm proposed in this paper and the other two algorithms are more obvious. And from the number of iterations, it can be seen that IGA is better than SGA in terms of solution quality and convergence. But neither can obtain the optimal solution of the problem within 500 generations, and the quality of the average solution is not high. In contrast, the improved immune cloning algorithm proposed in this paper can obtain the optimal solution with a probability of 30% in almost the same number of iterations, and its average solution quality and convergence speed are also significantly better than the former two. This is mainly due to the fact that the immune cloning algorithm rapidly improves the population fitness due to vaccination first and accelerates the global convergence. Secondly, using the concept of cloning, local search is performed in a large area due to high frequency changes. It avoids early local maturation due to the principle of concentration inhibition and optimizes search performance.


## 6. Conclusion

Because traditional deterministic optimization methods have too many limitations, they cannot meet the needs of applications. Even basic intelligent algorithms are not enough to solve some large and complex problems. Based on the scheduling optimization problem of logistics, this paper proposes an optimization method incorporating biological immune mechanism and genetic algorithm. It is a powerful tool for solving complex optimization scheduling problems. And this paper introduces the principle and calculation process of the basic immune genetic algorithm, but the basic immune genetic algorithm is not enough to solve some large and complex problems. The immune algorithm is an intelligent hybrid algorithm. It uses the process of genetic evolution to simulate the immune system of organisms and shows great potential in the field of optimized computing. In view of this, this paper proposes the scheduling problem of optimizing logistics with immune genetic algorithm. However, the basic immune genetic algorithm has certain application deficiencies. In order to solve its shortcomings, this paper improves the shortcomings of basic immune genetic algorithm by using the concept of clone selection of biological immunity. It proposes a new immune genetic algorithm, clonal immune genetic algorithm. It further solves the problem of low local search ability and early maturity of basic immune genetic algorithm. And it tests the convergence speed of the proposed algorithm, which shows the effectiveness of the algorithm. To investigate the effectiveness and stability of this algorithm, we solve the CVRP problem by simulating two instances of different scales and compare it with other algorithms. The immune cloning algorithm (ICA) proposed in this paper is considered to have better stability and effectiveness.



---

*Source: 3150998-2022-08-02.xml*