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

Authors: Bi Liang; Fengmao Lv
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

The chain supermarket has become a major part of China’s retail industry, and the optimization of chain supermarkets’ distribution route is an important issue that needs to be considered for the distribution center, because for a chain supermarket it affects the logistics cost and the competition in the market directly. In this paper, analyzing the current distribution situation of chain supermarkets both at home and abroad and studying the quantum-inspired evolutionary algorithm (QEA), we set up the mathematical model of chain supermarkets’ distribution route and solve the optimized distribution route throughout QEA. At last, we take Hongqi Chain Supermarket in Chengdu as an example to perform the experiment and compare QEA with the genetic algorithm (GA) in the fields of the convergence, the optimal solution, the search ability, and so on. The experiment results show that the distribution route optimized by QEA behaves better than that by GA, and QEA has stronger global search ability for both a small-scale chain supermarket and a large-scale chain supermarket. Moreover, the success rate of QEA in searching routes is higher than that of GA.


---

## Body

## 1. 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.


## 2. 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(1)Ψ=α0+β1,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(2)α2+β2=1.And, a Q-bit individual as a string ofm Q-bits is defined as (3)q=α1α2⋯αmβ1β2⋯βm,where ∂i2+βi2=1,i=1,2,…,m. If there is a system of m Q-bits, the system can represent 2m 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(4)UΔθi=cos⁡Δθi-sin⁡Δθisin⁡Δθicos⁡Δθi,and then (5)αit+1βit+1=Uθiαitβit=cos⁡θi-sin⁡θisin⁡θicos⁡θiαitβit,where Δθi,i=1,2,…,m is a rotation angle of each Q-bit toward either 0 or 1 state depending on its sign, and θi=s(αi,βi)Δθi. 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 f(·) is the profit, s(αi,βi) is the sign of θi, and bi and xi are the ith bits of the best solution b and the binary solution x, respectively. The value of Δθi has an effect on the speed of convergence, and the sign s(αi,βi) determines the direction of convergence to a global optimum [12].Table 1
The angle parameters used for the rotation gate.
x
i
b
i
f
(
x
)
≥
f
(
b
)
Δ
θ
i
s
(
α
i
,
β
i
)
(
α
i
,
β
i
)
>
0
(
α
i
,
β
i
)
<
0
α
i
=
0
β
i
=
0
0
0
False
0
0
0
0
0
0
0
True
0
0
0
0
0
0
1
False
0
0
0
0
0
0
1
True
0.05
π
−1
+1
±
1
0
1
0
False
0.01
π
−1
+1
±
1
0
1
0
True
0.025
π
+1
−1
0
±
1
1
1
False
0.005
π
+1
−1
0
±
1
1
1
True
0.025
π
+1
−1
0
±
1Figure 1
The polar plot of the rotation gate.


### 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].(
1
) To initialize population Q(t), set evolutionary generation t=0; the size of population is n, the number of Q-bits is m, and a population is Q(t)={q1,q2,…,qn} containing individual chromosomes, in which qj(j=1,2,…,n) is the j Q-bit individual in the population, and the value of αi,βi(i=1,2,…,m) in qj is initialized with 1/2.(
2
) To make P(t) by Q(t), according to the probability amplitudes of each Q-bit individual in Q(t) to construct the specific observation values P(t)={p1,p2,…,pn} of the quantum superposition state, pj(j=1,2,…,n) is the observation value of each Q-bit individual and is a binary string of length m.(
3
) To repair P(t), evaluate all Q-bit individual qj by the fitness function, store the best solutions among P(t) into B(t), and judge whether t meets the greatest evolutionary generation. If true, the algorithm terminates. If false, perform Step  (4).(
4
) To update Q(t), use Q-gate U(Δθi) to update the population Q(t) and determine Δθi with lookup Table 1.(
5
) To use t=t+1 to iterate the evolutionary generation t, the algorithm jumps to Step  (2) for execution until the termination condition is satisfied.(
6
) The last step is to output the optimal solution.


### 2.3. 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.


## 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(1)Ψ=α0+β1,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(2)α2+β2=1.And, a Q-bit individual as a string ofm Q-bits is defined as (3)q=α1α2⋯αmβ1β2⋯βm,where ∂i2+βi2=1,i=1,2,…,m. If there is a system of m Q-bits, the system can represent 2m 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(4)UΔθi=cos⁡Δθi-sin⁡Δθisin⁡Δθicos⁡Δθi,and then (5)αit+1βit+1=Uθiαitβit=cos⁡θi-sin⁡θisin⁡θicos⁡θiαitβit,where Δθi,i=1,2,…,m is a rotation angle of each Q-bit toward either 0 or 1 state depending on its sign, and θi=s(αi,βi)Δθi. 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 f(·) is the profit, s(αi,βi) is the sign of θi, and bi and xi are the ith bits of the best solution b and the binary solution x, respectively. The value of Δθi has an effect on the speed of convergence, and the sign s(αi,βi) determines the direction of convergence to a global optimum [12].Table 1
The angle parameters used for the rotation gate.
x
i
b
i
f
(
x
)
≥
f
(
b
)
Δ
θ
i
s
(
α
i
,
β
i
)
(
α
i
,
β
i
)
>
0
(
α
i
,
β
i
)
<
0
α
i
=
0
β
i
=
0
0
0
False
0
0
0
0
0
0
0
True
0
0
0
0
0
0
1
False
0
0
0
0
0
0
1
True
0.05
π
−1
+1
±
1
0
1
0
False
0.01
π
−1
+1
±
1
0
1
0
True
0.025
π
+1
−1
0
±
1
1
1
False
0.005
π
+1
−1
0
±
1
1
1
True
0.025
π
+1
−1
0
±
1Figure 1
The polar plot of the rotation gate.


## 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].(
1
) To initialize population Q(t), set evolutionary generation t=0; the size of population is n, the number of Q-bits is m, and a population is Q(t)={q1,q2,…,qn} containing individual chromosomes, in which qj(j=1,2,…,n) is the j Q-bit individual in the population, and the value of αi,βi(i=1,2,…,m) in qj is initialized with 1/2.(
2
) To make P(t) by Q(t), according to the probability amplitudes of each Q-bit individual in Q(t) to construct the specific observation values P(t)={p1,p2,…,pn} of the quantum superposition state, pj(j=1,2,…,n) is the observation value of each Q-bit individual and is a binary string of length m.(
3
) To repair P(t), evaluate all Q-bit individual qj by the fitness function, store the best solutions among P(t) into B(t), and judge whether t meets the greatest evolutionary generation. If true, the algorithm terminates. If false, perform Step  (4).(
4
) To update Q(t), use Q-gate U(Δθi) to update the population Q(t) and determine Δθi with lookup Table 1.(
5
) To use t=t+1 to iterate the evolutionary generation t, the algorithm jumps to Step  (2) for execution until the termination condition is satisfied.(
6
) The last step is to output the optimal solution.


## 2.3. 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.


## 3. 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 mostR (r represents truck r, r=1,2,…,R) trucks to distribute goods for S (s represents chain store s, s=1,2,…,S) chain stores in a certain geographical area, where s=0 represents the warehouse of the distribution center, and the load capacity of each truck is cr(r=1,2,…,R), the demand for the goods of each chain store is ds(s=1,2,…,S), the shortest distance from the chain store s to the chain store k is lsk, the goal of optimization is to make all trucks transport goods with the shortest distance and spend least time.First define two variables:(6)xsr=1Thetruckrdistributesgoodsforthechainstores0Other,yskr=1Thetruckrtransportsgoodsfromthechainstorestothechainstorek0Other,and the range of each variable is(7)xsr=1or0∀s,r,yskr=1or0∀s,k,r.The designed model is as follows:the target function:(8)minZ=∑s=0S∑k=0S∑r=1Rlskyskr.Each truck’s load capability:(9)∑s=1Sdsxsr≤cr∀r.The truck must deliver goods for each chain store with orders.(10)∑r=1Rxsr=1∀s.The goods of each chain store with orders are delivered by only one truck.(11)∑s=1Syskr=xkr∀k,r,∑k=1Syskr=xsr∀s,r.To avoid the subloop of truck driving route,(12)∑s,k∈O×Oyskr≤O-1O⊂1,2,…,S,O≠Φ∀r.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–20]. (13)ps≤bs≤qs∀s,yskr=1⟹es+tsk≤bk∀s,k,r,where ps indicates the earliest beginning time that the chain store s allows, qs indicates the latest beginning time that the chain store s permits, bs represents the beginning time of the distribution task of the chain store s, and the chain store s requires that the distribution task be started in the range of [ps,qs]. es represents the end time of the distribution task of the chain store s, tsk represents the time it takes from the chain store s to the chain store k, and bk represents the beginning time of the distribution task of the chain store k.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).


### 3.2. 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–23]:(
1
)  t=0: randomly initialize a Q-bit population. For S(s=1,2,…,S) chain stores, this paper uses S×S×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 S×S 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 S×S 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 t meets the termination condition. If true, output the optimal solution. If false, perform Step  (6).(
6
) Judge whether t 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 U(Δθi) to update the Q-bit population and t=t+1 to iterate t, 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].Procedure Update(q)begin
i←0while(i<m) dobegini←i+1determineΔθi with the lookup Table 1obtainαit+1,βit+1 from the following:
if (q is located in the first or third quadrant)thenαit+1,βit+1T=U(Δθi)αit,βitTelseαit+1,βit+1T=U(-Δθi)αit,βitTendq←q′endAnd, the flow chart for solving optimization distribution route is shown in Figure2.Figure 2
The algorithm design flow chart by 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 mostR (r represents truck r, r=1,2,…,R) trucks to distribute goods for S (s represents chain store s, s=1,2,…,S) chain stores in a certain geographical area, where s=0 represents the warehouse of the distribution center, and the load capacity of each truck is cr(r=1,2,…,R), the demand for the goods of each chain store is ds(s=1,2,…,S), the shortest distance from the chain store s to the chain store k is lsk, the goal of optimization is to make all trucks transport goods with the shortest distance and spend least time.First define two variables:(6)xsr=1Thetruckrdistributesgoodsforthechainstores0Other,yskr=1Thetruckrtransportsgoodsfromthechainstorestothechainstorek0Other,and the range of each variable is(7)xsr=1or0∀s,r,yskr=1or0∀s,k,r.The designed model is as follows:the target function:(8)minZ=∑s=0S∑k=0S∑r=1Rlskyskr.Each truck’s load capability:(9)∑s=1Sdsxsr≤cr∀r.The truck must deliver goods for each chain store with orders.(10)∑r=1Rxsr=1∀s.The goods of each chain store with orders are delivered by only one truck.(11)∑s=1Syskr=xkr∀k,r,∑k=1Syskr=xsr∀s,r.To avoid the subloop of truck driving route,(12)∑s,k∈O×Oyskr≤O-1O⊂1,2,…,S,O≠Φ∀r.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–20]. (13)ps≤bs≤qs∀s,yskr=1⟹es+tsk≤bk∀s,k,r,where ps indicates the earliest beginning time that the chain store s allows, qs indicates the latest beginning time that the chain store s permits, bs represents the beginning time of the distribution task of the chain store s, and the chain store s requires that the distribution task be started in the range of [ps,qs]. es represents the end time of the distribution task of the chain store s, tsk represents the time it takes from the chain store s to the chain store k, and bk represents the beginning time of the distribution task of the chain store k.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).


## 3.2. 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–23]:(
1
)  t=0: randomly initialize a Q-bit population. For S(s=1,2,…,S) chain stores, this paper uses S×S×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 S×S 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 S×S 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 t meets the termination condition. If true, output the optimal solution. If false, perform Step  (6).(
6
) Judge whether t 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 U(Δθi) to update the Q-bit population and t=t+1 to iterate t, 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].Procedure Update(q)begin
i←0while(i<m) dobegini←i+1determineΔθi with the lookup Table 1obtainαit+1,βit+1 from the following:
if (q is located in the first or third quadrant)thenαit+1,βit+1T=U(Δθi)αit,βitTelseαit+1,βit+1T=U(-Δθi)αit,βitTendq←q′endAnd, the flow chart for solving optimization distribution route is shown in Figure2.Figure 2
The algorithm design flow chart by QEA.


## 4. 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 Section2, 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].Figure 3
The genetic algorithm procedure.


### 4.2. 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 e-commerce 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 isds, its service time is Ts, and its service time window is [ps,qs]. On one day, the demanding of every chain store and the service time constraint are shown in Table 2.Table 2
The demanding of every chain store and the service time constraint.
Chain stores
1
2
3
4
5
6
7
8
9
10
11
12
d
s (ton)
1.5
2.2
0.5
1.6
2.7
3.2
1.3
0.8
0.8
1.5
2.4
4.1
T
s (hour)
0.45
0.66
0.15
0.48
0.81
0.96
0.39
0.24
0.24
0.45
0.72
1.23
[
p
s
,
q
s
] (time)
[
7,10
]
[
6,9
]
[
6,7
]
[
7,9
]
[
7,9
]
[
7,11
]
[
6,10
]
[
6,9
]
[
6,8
]
[
6,9
]
[
7,11
]
[
8,12
]The distance between the distribution center and the chain store and the distance between one chain store and another chain store islsk, 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 tsk=lsk/50.Figure 4
The distance between distribution centers and chain stores and the distance between one chain store and another.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 isminZ=∑s=012∑k=012∑r=110lskyskr. 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 gateU(Δθi) of (4), and theith 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.Truck 1: the center→4→5→the centerTruck 2: the center→7→6→the centerTruck 3: the center→3→2→1→the centerTruck 4: the center→9→10→11→the centerTruck 5: the center→8→12→the center.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.Truck 1: the center→10→9→8→7→the centerTruck 2: the center→4→the center→11→the centerTruck 3: the center→3→the center→1→2→the centerTruck 4: the center→5→the centerTruck 5: the center→6→the centerTruck 6: the center→12→the centerThe 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 Figure5.Figure 5
The convergence effect diagram of algorithms.From Figure4, 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.Table 3
Comparison of small-scale case experimental results.
Algorithms
The best value
The worst value
The average value
The search success rate
The convergence generation
GA
168.2
175.5
170.9
20.8%
49.7
QEA
142.9
164.3
151.7
55.1%
36.2From Table3, 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 to0.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 Figures6 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.Figure 6
The optimal route of QEA.Figure 7
The optimal route of GA.Figure 8
The convergence of QEA.Figure 9
The convergence of GA.And, we get the results of the experiments as shown in Table4, where BE represents the best solution; DE indicates the error of the best solution and the known best solution.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.
Case
Known best solution
QEA
GA
BE
DE (%)
BE
DE (%)
(1)
662
671
1.36
674
1.81
(2)
695
704
1.29
708
1.87
(3)
778
785
0.90
814
4.63
(4)
786
786
0
820
4.33
(5)
830
846
1.93
871
4.94
(6)
924
952
3.03
969
4.87
(7)
933
971
4.07
985
5.57
(8)
1002
1028
2.59
1055
5.29
(9)
1353
1406
3.92
1419
4.88
(10)
1773
1862
5.02
1882
6.15From Table4, we can learn that QEA searches a better distribution route than GA, and DE is smaller.


### 4.5. 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.


## 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 Section2, 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].Figure 3
The genetic algorithm procedure.


## 4.2. 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 e-commerce 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 isds, its service time is Ts, and its service time window is [ps,qs]. On one day, the demanding of every chain store and the service time constraint are shown in Table 2.Table 2
The demanding of every chain store and the service time constraint.
Chain stores
1
2
3
4
5
6
7
8
9
10
11
12
d
s (ton)
1.5
2.2
0.5
1.6
2.7
3.2
1.3
0.8
0.8
1.5
2.4
4.1
T
s (hour)
0.45
0.66
0.15
0.48
0.81
0.96
0.39
0.24
0.24
0.45
0.72
1.23
[
p
s
,
q
s
] (time)
[
7,10
]
[
6,9
]
[
6,7
]
[
7,9
]
[
7,9
]
[
7,11
]
[
6,10
]
[
6,9
]
[
6,8
]
[
6,9
]
[
7,11
]
[
8,12
]The distance between the distribution center and the chain store and the distance between one chain store and another chain store islsk, 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 tsk=lsk/50.Figure 4
The distance between distribution centers and chain stores and the distance between one chain store and another.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 isminZ=∑s=012∑k=012∑r=110lskyskr. 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 gateU(Δθi) of (4), and theith 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.Truck 1: the center→4→5→the centerTruck 2: the center→7→6→the centerTruck 3: the center→3→2→1→the centerTruck 4: the center→9→10→11→the centerTruck 5: the center→8→12→the center.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.Truck 1: the center→10→9→8→7→the centerTruck 2: the center→4→the center→11→the centerTruck 3: the center→3→the center→1→2→the centerTruck 4: the center→5→the centerTruck 5: the center→6→the centerTruck 6: the center→12→the centerThe 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 Figure5.Figure 5
The convergence effect diagram of algorithms.From Figure4, 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.Table 3
Comparison of small-scale case experimental results.
Algorithms
The best value
The worst value
The average value
The search success rate
The convergence generation
GA
168.2
175.5
170.9
20.8%
49.7
QEA
142.9
164.3
151.7
55.1%
36.2From Table3, 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 to0.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 Figures6 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.Figure 6
The optimal route of QEA.Figure 7
The optimal route of GA.Figure 8
The convergence of QEA.Figure 9
The convergence of GA.And, we get the results of the experiments as shown in Table4, where BE represents the best solution; DE indicates the error of the best solution and the known best solution.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.
Case
Known best solution
QEA
GA
BE
DE (%)
BE
DE (%)
(1)
662
671
1.36
674
1.81
(2)
695
704
1.29
708
1.87
(3)
778
785
0.90
814
4.63
(4)
786
786
0
820
4.33
(5)
830
846
1.93
871
4.94
(6)
924
952
3.03
969
4.87
(7)
933
971
4.07
985
5.57
(8)
1002
1028
2.59
1055
5.29
(9)
1353
1406
3.92
1419
4.88
(10)
1773
1862
5.02
1882
6.15From Table4, we can learn that QEA searches a better distribution route than GA, and DE is smaller.


## 4.5. 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.


## 5. 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 current road conditions as well as other constraint factors to achieve greater efficiency.



---

*Source: 7964545-2017-11-28.xml*