A Study on the Optimization of Chain Supermarkets’ Distribution Route Based on the Quantum-Inspired Evolutionary Algorithm

1School of Intelligent Manufacturing, Sichuan University of Arts and Science, No. 400, Nanba Road, Dachuan, Dazhou, Sichuan, China 2School of Computer Science, Beijing University of Posts and Telecommunications, No. 10, Xitucheng Road, Haidian, Beijing, China 3School of Computer Science and Engineering, University of Electronic Science and Technology of China, No. 2006, Xiyuan Road, Gaoxin, Chengdu, Sichuan, China


Introduction
The chain operation originates from the United States.But according to the record in "Encyclopedia Americana," in 200 BC (Before Christ), a Chinese businessman had many stores, which was to be called the earliest sprout of the chain operation [1].In 1859, the world's first chain store was born in the United States-the Great Atlantic and Pacific Tea Co.In 1969, the Wal-Mart supermarket, ranking first in the world's retail industry, built its first distribution center, which showed chain supermarkets began to pay attention to the management of logistics links [2].At present, the United States, Japan, Germany, and other developed countries have conducted a lot of studies on the distribution mode of chain supermarkets, and their theories and practices are more mature.For example, for wholesalers, retailers, warehouses, transportation, and other main subjects, the United States constructs different sorts of distribution centers for different subjects to expand distribution business.Its goal is to reduce the logistics cost and increase the efficiency of supermarket operation.Self-supporting distribution centers are built for large-scale chain supermarkets in Japan, and also distribution centers that can be used commonly are built for distribution business of small-scale retailers, which play an effective role in improving the distribution mode of chain supermarkets [3].
Compared with foreign countries, China's chain operation started later.In the late 1980s, the chain operation in our country just started quietly.In 1990s, the chain operation bloomed in medium or large cities as well as in coastal areas, such as Xifu in Beijing, Lianhua in Shanghai, Meijia in Dongguan, and Hongqi in Chengdu.In recent years, with the rapid development of the chain operation in China, our country's chain supermarkets have implemented the "unified procurement, unified accounting, unified distribution, centralized management" business model [4].Relying on the fine scale economy, low logistics cost, and other advantages, it has become the major retail format in current domestic circulation.The unified procurement and distribution of chain supermarkets are mainly achieved through the operation of distribution centers, and the speed of working efficiency directly reflects the core competitiveness of chain supermarkets.
However, the distribution system of chain supermarkets in our country is imperfect and there are still many problems, such as unreasonable transport phenomena (e.g., repeat transport, detour transport, convective transport, empty vehicles return, and backward transport), inappropriate truck arrangement and low distribution efficiency, and high transportation cost.The basic cause of these problems is unreasonable distribution routes.With the intensification of market competition, it is necessary that the chain supermarket operation should have a set of efficient logistics distribution system to carry out scientific and reasonable optimization design for distribution routes and transport the required distribution goods to the designated chain stores in the shortest time, at the fastest speed, and with the lowest cost.Therefore, the optimization design of distribution routes has been the focus of the distribution research of chain supermarkets.
At present, there are two kinds of algorithms for the optimization design of distribution routes, that is, the traditional heuristic algorithm and the modern heuristic algorithm [5].The traditional heuristic algorithms are mainly the saving mileage algorithm, the nearest neighbor algorithm, the nearest insertion algorithm, the scanning algorithm, and so on.The modern heuristic algorithms are mainly GA, the ant colony algorithm, the simulated annealing algorithm, the taboo search algorithm, the neural network algorithm, and so on.QEA is a modern heuristic algorithm, which is based on the concept of quantum computing and absorbs the characteristics of quantum superposition, quantum entanglement, and quantum coherence [6].Through the quantum bit encoding chromosome, it introduces the quantum rotation, the crossover, the mutation, and other operators to realize the evolution of the population.Meanwhile, it uses the latest information to update the quantum rotation gate in order to accelerate the convergence of the algorithm.
In recent years, QEA has attracted lots of attention.Han and Kim [7] carry out experiments on the knapsack problem, a classic combinatorial optimization problem, to demonstrate the effectiveness and the applicability of QEA.The results show that QEA performs well, even with a small population, without premature convergence as compared to the conventional GA.Feng et al. [8] solve the traveling salesman problem (TSP) based on QEA.It adopts quantum bit (Q-bit) individual to encode the visited sequence of the cities and employs the quantum rotation gate to adjust the population dynamically.The experiment results of 14 cities show that the proposed approach is feasible and effective for the small-scale TSP.Lau et al. [9] apply QEA to handle the unit-scheduling problem.Studies on the application demonstrate the superior performance and feasibility of QEA.
Unlike previous genetic algorithms based on crossovers, QEA adopts Q-bit representation to codify the solution.Using observations to generate new solutions instead of crossovers, QEA can avoid permutation problems.In addition, QEA decreases the risk of throwing away potential solutions since it just modifies the Q-bits rather than discarding the subsolutions when bad fitness values are found [10].Additionally, in terms of loss of diversity, scalability, solution quality, and robustness to fitness noise, QEA performs better when compared with other evolutionary algorithms.Presently, QEA, with the advantages of good robustness, parallel processing, and high efficiency, has been widely used in various fields, especially in the combinatorial optimization problem, and good results have been obtained, so in this paper the algorithm is adopted to optimize the distribution routes of chain supermarkets.

The Background of QEA
2.1.Q-Bit and Q-Gate.QEA is a kind of new intelligent optimization algorithm, which is a combination of the quantum computing and the evolutionary algorithm.The smallest unit of information stored in a two-state quantum computer is called a quantum bit or Q-bit.A Q-bit may be in the "0" state, in the "1" state, or in any superposition of the two [11].The state of a Q-bit can be represented as where  and  are complex numbers that specify the probability amplitudes of the corresponding states.|| 2 gives the probability that the Q-bit will be found in the "0" state and || 2 gives the probability that the Q-bit will be found in the "1" state.Normalization of the state to unity guarantees And, a Q-bit individual as a string of  Q-bits is defined as where If there is a system of  Q-bits, the system can represent 2  states at the same time.However, in the act of observing a quantum state, it collapses to a single state.
The state of a Q-bit can be changed by the operation with a quantum rotation gate or Q-gate, and the following rotation gate is used as a basic Q-gate in QEA, such as and then  where Δ  ,  = 1, 2, . . .,  is a rotation angle of each Q-bit toward either 0 or 1 state depending on its sign, and   = (  ,   )Δ  .Figure 1 depicts the polar plot of the rotation gate for Q-bit individuals.At the same time, the angle parameters used for the rotation gate are shown in Table 1, where (⋅) is the profit, (  ,   ) is the sign of   , and   and   are the th bits of the best solution  and the binary solution , respectively.The value of Δ  has an effect on the speed of convergence, and the sign (  ,   ) determines the direction of convergence to a global optimum [12].

2.2.
The Procedure of QEA.QEA is a kind of evolutionary algorithm based on population, so it is similar to the traditional evolutionary algorithm.Its solution to the problem depends on the evolutionary population consisting of quantum chromosomes, mainly including population initialization, quantum chromosome observation, evaluation, update, and other operations.The basic procedure of QEA is described as follows [7,13].
(2) To make () by (), according to the probability amplitudes of each Q-bit individual in () to construct the specific observation values () = { 1 ,  2 , . . .,   } of the quantum superposition state,   ( = 1, 2, . . ., ) is the observation value of each Q-bit individual and is a binary string of length .
(3) To repair (), evaluate all Q-bit individual   by the fitness function, store the best solutions among () into (), and judge whether  meets the greatest evolutionary generation.If true, the algorithm terminates.If false, perform Step (4).
(5) To use  =  + 1 to iterate the evolutionary generation , the algorithm jumps to Step (2) for execution until the termination condition is satisfied.
(6) The last step is to output the optimal solution.

The Application of QEA in the Problem of Distribution Route.
According to literatures, QEA, apart from its application to the knapsack problem, the traveling salesman problem, the flow shop scheduling problem, and other ordering problems [14], is also used to solve the vehicle routing problem (i.e., the problem of distribution route) [15].Hu and Wu [16] present a novel QEA with computing the rotation gate using elite mean values based on chaos theory for the vehicle routing problem with simultaneous delivery and pickup.They develop a grey binary scheme for individual representation and propose an efficient population initialization based on nearest insertion algorithm (NIA) and chaos function to generate an initial population.At last, they apply a local search strategy based on the NIA and Or-Opt et al. to the solution.Simulation results demonstrate the effectiveness of the QEA.Cui et al. [17] propose a new improved quantum evolution algorithm (IQEA) with a mixed local search procedure for solving the capacitated vehicle routing problem (CVRP).First, they construct an IQEA with a double chain quantum chromosome, new quantum rotation schemes, and self-adaptive quantum NOT gate to initialize and generate feasible solutions.Then, they adopt three local search procedures 1-1 exchange, 1-0 exchange, and 2-OPT to further strengthen IQEA's searching ability.The experiment results demonstrate the superiorities of the IQEA over the PSO, SR-1, and SR-2.
However, QEA is not applied to solve the chain supermarket distribution route optimization problem at present, whose general solutions are the Dynamic Planning Algorithm, the Saving Algorithm, the ant colony algorithm, and so on.Due to the fact that the chain supermarket distribution route optimization problem is similar to the vehicle routing problem, we take QEA in this paper to cope with it.

The Optimization of Distribution Routes
Based on QEA 3.1.Problem Description.This paper adopts QEA to optimize the distribution routes of chain supermarkets.Its mathematical model is described as follows: given that a distribution center of a supermarket chain uses at most  ( represents truck ,  = 1, 2, . . ., ) trucks to distribute goods for  ( represents chain store ,  = 1, 2, . . ., ) chain stores in a certain geographical area, where  = 0 represents the warehouse of the distribution center, and the load capacity of each truck is   ( = 1, 2, . . ., ), the demand for the goods of each chain store is   ( = 1, 2, . . ., ), the shortest distance from the chain store  to the chain store  is   , the goal of optimization is to make all trucks transport goods with the shortest distance and spend least time.
First define two variables: 1 The truck  distributes goods for the chain store  0 Other, 1 The truck  transports goods f rom the chain store  to the chain store  0 Other, (6) and the range of each variable is The designed model is as follows: the target function: Each truck's load capability: The truck must deliver goods for each chain store with orders.
The goods of each chain store with orders are delivered by only one truck.
To avoid the subloop of truck driving route, Moreover, the chain store has certain requirements on the departure and arrival time of the truck to transport goods, so the time constraints (that is time window) need to be added to the model.Its specific details are as follows [18][19][20].
where   indicates the earliest beginning time that the chain store  allows,   indicates the latest beginning time that the chain store  permits,   represents the beginning time of the distribution task of the chain store , and the chain store  requires that the distribution task be started in the range of [  ,   ].   represents the end time of the distribution task of the chain store ,   represents the time it takes from the chain store  to the chain store , and   represents the beginning time of the distribution task of the chain store .
The main parameters involved in the model and their meanings are listed in Parameters.
Only the weight of goods to be delivered is taken into account instead of their size and shapes, and they can be mixed up.Besides, traffic condition is good during the period of transporting goods (that is to say, there are no traffic jams, traffic accidents, or other undesirable conditions).

Solving the Optimization Distribution Route by QEA.
According to the basic procedure of QEA, in this paper QEA is adopted to effectively solve the distribution route model of chain supermarkets and obtain the optimal distribution route.Before the optimization of distribution routes, there are several preconditions: (1) The location of the distribution center, the warehouse, and the chain store is determined.
(2) The number of trucks, the truck speed, and its load capacity in the distribution center are known.
(3) The demand for the goods of each chain store is known.
(4) The time window of each chain store is known.
(5) All distributed goods are shipped uniformly from the distribution center on time.
(6) All distributed goods can be mixed together in the same truck.
In the process of distribution route optimization, in order to avoid the local optimum of the classical QEA, this paper introduces the cataclysm operator and sets the evolutionary step "distance."If the generation of the continuous "distance" of the optimal value stays the same, the evolution falls into premature convergence.Then the current optimal individual needs to be stored, and other individuals are supposed to be reinitialized, so as to enter the next generation evolution as well as jump over the local optimum.The specific solution procedure is as follows [9,[21][22][23]: (1)  = 0: randomly initialize a Q-bit population.For  ( = 1, 2, . . ., ) chain stores, this paper uses  ×  × 2 three-dimensional Q-bit matrix to represent a quantum chromosome.
(2) Generate the order of the chain stores needing to distribute the goods and produce two-dimensional 0-1 observed population matrix  ×  by generating a random number between 0 and 1.In addition, the row coordinate containing 1 represents the order of trucks to deliver goods; column coordinate represents the chain store number and randomly adjusts the matrix  ×  to ensure that each row and column is only one number 1 [3].
(3) Use the greedy strategy to form the distribution route.When starting to use a truck every time, the truck distributes goods in turn according to the order of the chain store service.If the truck's load capacity is unable to meet the needs of the next chain store, another truck will be used.Besides, if the required number of trucks exceeds the total number of trucks in the distribution center, the route is not feasible.
(4) Evaluate each formed distribution route and save the current optimal individual.
(5) Judge whether  meets the termination condition.If true, output the optimal solution.If false, perform Step (6).
(6) Judge whether  meets the cataclysm condition.If true, save the current optimal individual and reinitialize a Q-bit population and enter the next generation evolution.If false, directly perform next step.
(7) Use Q-gate (Δ  ) to update the Q-bit population and  =  + 1 to iterate , and then jump to Step (2) for execution.
(8) Output the optimal solution that is the optimal distribution route of chain supermarkets.
In Step (7), the update procedure of the Q-bit population is presented in the following [24].

Experiments
4.1.Related Algorithms.This study adopts QEA and GA to make a comparative experiment for the same case (Hongqi Chain Supermarket in Chengdu).QEA is a kind of improved evolutionary algorithm, which has been mentioned in detail in Section 2, including some of its parameters.And GA is a kind of classical evolutionary algorithm, which mimics the natural biological evolution of species [25], for the purpose of solving high computational complexity problems such as VRP.Its main procedure for the distribution route optimization problem is presented in Figure 3 [26].And the initial population is created randomly.Fitness function represents the method for the evaluation of individuals, and the simplest way to calculate the fitness is to sum up the lengths of all routes.Selection phase is the process where the individuals are selected on the basis of their fitness to mate and produce offspring, while the most widely used selection method is the tournament method.Crossover is the process that mimics mating between two individuals with the goal of producing children, and route exchange crossover (REX) is a crossover operation.Mutation is an operator that serves as the mean to widen the search space for a small degree, and the simple method is the insertion mutation [27].

Experimental Case. Hongqi Chain Supermarket in
Chengdu was founded on June 22, 2000, which was renamed Chengdu Hongqi Chain Joint Stock Limited Company on June 9, 2010.At present, the company has developed into a largest commercial chain enterprise in the western region of China with chain operation, logistics distribution, and ecommerce as a whole.There are four logistics distribution centers and more than 8600 chain stores in Sichuan Province.It has established a good win-win business cooperation relationship with thousands of suppliers and has become a key connection enterprise for essential life necessities of Sichuan Province.In order to bring to consumers a more relaxing and convenient life and make them enjoy it, this enterprise makes full use of the company's huge market network and information technology resources and other advantages, following the "commodity + service" business strategy to be the pioneer in constructing a convenient and multifunctional service platform for the consumer.As a result the unanimous praise from consumers is won.

4.3.
A Small-Scale Case.We take Hongqi Chain Supermarket in a Town of Chengdu city as an example.There are 1 distribution center, 10 trucks (the load capacity of each truck is 5 t, the maximum travel distance is 150 km, and the average distribution speed is 50 km/h), and 12 chain stores.The average speed of loading or unloading is 0.3 h/t, the demanding for goods of every chain store is   , its service time is   , and its service time window is [  ,   ].On one day, the demanding of every chain store and the service time constraint are shown in Table 2.
The distance between the distribution center and the chain store and the distance between one chain store and another chain store is   , its unit is kilometer, and the detailed information is shown in Figure 4.So the distribution time between chain stores is calculated by the formula   =   /50.
According to the distribution route model of chain supermarkets constructed above, we take the corresponding data into the model and get the distribution route model of Hongqi Chain Supermarket in the Town; for example, the target function is min  = ∑ 12 =0 ∑ 12 =0 ∑ 10 =1     .Other formulas are introduced by analogy.Then we solve the optimization route of the small-scale Hongqi Chain Supermarket according to the above already designed solution procedure of distribution route optimization through QEA and make a comparison with that by GA to solve the optimization route.
The population size of QEA is equal to 10, a Q-bit chromosome is updated by the rotation gate (Δ  ) of (4), and the ith Q-bit value is updated as (5).The angle value is set to 0.005 * pi and the angle parameters used for the rotation gate are shown in Table 1.The convergence is fixed as 0.005, the global migration period in generation is 30, and the maximum number of generations is set to 100.The population size of GA is equal to 10, the probabilities of crossover and mutation are fixed as 0.01 and 0.01, and the generation is set to 100.The experiment results obtained are as follows.
Using QEA to solve the problem of route optimization requires at least 5 trucks, the shortest total distance for traveling is 142.9 kilometers, and the minimum total time is 2.86 hours.Its optimization routes are as follows.But using GA to solve the problem of route optimization requires at least 6 trucks, the shortest total distance for traveling is 168.2 kilometers, and the minimum total time is 3.37 hours.Its optimization routes are as follows.The results show that, in solving the optimization route of the small-scale Hongqi Chain Supermarket, the number of trucks taken by QEA is less than that of trucks taken by GA by one.Besides, the total traveling distance of QEA is 25.3 kilometers, less than that of GA.Moreover, the solution made by QEA helps to save the time of 0.50 hours when compared with that made by GA.And the convergence of two algorithms is shown in Figure 5.
From Figure 4, we can see that the convergence rate of QEA is faster than that of GA, so the optimal distribution route can be found quickly by QEA.And we compare the two algorithms on the best value, the worst value, the average value, the search success rate, and so on, as shown in Table 3.
From Table 3, we can see that the average value of QEA is smaller than GA, the success rate in searching is higher than that of GA, and the convergence generation of average successful search is smaller than that of GA, so the effect of the distribution route optimization through QEA is better than that through GA.

4.4.
A Large-Scale Case.We take Hongqi Supermarket Chain in Chengdu, China, as an example.There are 4 distribution centers, 684 trucks (most of the load capacity of trucks is 5 t), and 8607 chain stores.Other conditions are similar to  the small-scale Hongqi Chain Supermarket, and the data of distance among chain stores and that of demanding of every chain store come from the data management center of Hongqi Supermarket Chain.We still adopt QEA and GA to solve it and their parameters are defined like the small-scale case above.Among them, the population size of QEA is equal to 10; the angle value is set to 0.005 * pi.The convergence is set to 0.005, the global migration period is 30, and the maximum number of generations is 1000.The population size of GA is equal to 10, the probability of crossover is set to 0.01, the probability of mutation is set to 0.05, and the generation is 1000.At last, we obtain the optimal distribution route for a certain distribution center of Hongqi Supermarket Chain on the day as shown in Figures 6 and 7, as well as the convergence of two algorithms as shown in Figures 8 and 9.In addition, all results are averaged over 30 runs.
And, we get the results of the experiments as shown in Table 4, where BE represents the best solution; DE indicates the error of the best solution and the known best solution.
From Table 4, we can learn that QEA searches a better distribution route than GA, and DE is smaller.

The Analysis of the Experiment Results.
It can be seen from the distribution route optimization experimental results of the small-scale and the large-scale Hongqi Chain Supermarket in Chengdu, for small-scale chain supermarkets, QEA and GA are not caught in local convergence and the success rate of QEA search is higher than that of GA [28].Moreover, for large-scale chain supermarkets, the allowance between the optimal solution obtained by QEA and the known optimal solution remains rather less, and QEA has much stronger global optimization search ability than GA.This is mainly due to the fact that QEA uses a quantum bit coding, which has the character of superposition.And, as a result, a single code can represent the superposition of multiple individuals, which can make the search space larger in the process of evolution and maintain individual diversity, and it is not easy to fall into local optimum and so on [29].Thus, the global search capability of QEA is strong and its computation efficiency is high.But it needs much computation, its computation speed is slow, and its performance is not very good, which need improving in the future.

Conclusions
At present, the business competition of domestic chain supermarkets is further intensified, and the logistics distribution of chain supermarkets has become the focus of competition.Whether the distribution route is scientific or reasonable will directly affect the logistics cost and market competition of chain supermarkets.This paper takes Hongqi Chain Supermarket in Chengdu as an example and adopts QEA to optimize the distribution route of the chain supermarket.First of all, we set up a mathematical model of the distribution route of the chain supermarket.Then we design the process of solving the model according to QEA idea and adopt the 0-1 matrix encoding method and the decoding scheme in which we firstly arrange the route and then group the route.At the same time, we use the quantum rotation gate to realize the evolution and introduce the cataclysm operator to ensure the diversity of solution space.Finally, we compare QEA with GA in the fields of the convergence, the optimal solution, the search ability, and so on.
The experiment results show that the optimization distribution route of chain supermarkets by QEA is better than that of GA.It makes the number of trucks rather smaller and the total traveling distance of trucks much shorter.It not only shortens the time to transport the goods and decreases the cost of truck's transportation, but also effectively improves the economic benefits of chain supermarkets, enhances the quality of their service, strengthens the core competitive ability of the market, and boosts the healthy and stable development of chain supermarkets.However, in this paper, we do not take the uncertainty of parameters into consideration like the actual freight volume of every chain store, transport time, and so on caused by the economic fluctuations, holidays, traffic restrictions, competitors, and other uncertain factors.And these uncertainties also affect the distribution route optimization, which is the focus of upcoming research.
To sum up, the logistics distribution of chain supermarkets is a systematic project and the distribution route optimization needs combination of the distribution center location of chain supermarkets, the network layout of chain supermarkets, the reasonable scheduling of drivers, and the

Figure 1 :
Figure 1: The polar plot of the rotation gate.

Figure 2 :Figure 3 :
Figure 2: The algorithm design flow chart by QEA.

Figure 4 :
Figure 4: The distance between distribution centers and chain stores and the distance between one chain store and another.

Figure 5 :
Figure 5: The convergence effect diagram of algorithms.

Table 1 :
The angle parameters used for the rotation gate.

Table 2 :
The demanding of every chain store and the service time constraint.

Table 3 :
Comparison of small-scale case experimental results.

Table 4 :
The comparison of large-scale case experimental results: the number of chain stores is 8607, the maximum number of generations 1000, the population size 10, the evolutionary step "distance" 10, and the number of runs 30.