1. Introduction
With the increasing consumption demand of residents, supermarket distribution becomes increasingly important. Supermarket distribution refers to the logistics activities in which the distribution center delivers the goods to the designated supermarkets. The characteristics of supermarket distribution contain three aspects. First, the locations of the supermarkets are geographically dispersed; second, goods demand varies greatly among different supermarkets; and third, the delivery service time is strict [
1]. As a result, the delivery cost is high, including a massive energy consumption, excessive carbon emissions, and other problems [
2,
3]. The Communist Party of China’s Central Committee and the State Council unveiled a guiding document on the country’s work to achieve carbon peaking and carbon neutrality goals in 2020. However, the carbon emissions of the logistics industry remain high.
Meanwhile, there are three main delivery modes, as follows: by suppliers, by supermarkets themselves, and by third-party logistics companies. The distribution efficiency of delivery by third-party logistics companies is high since the third-party logistics companies provide a joint delivery mode. The main advantage of joint delivery is that orders from different supermarkets can be delivered together. Third-party logistics companies adopt different processing strategies (i.e., splitting or merging orders) to complete delivery services. Thus, the third-party logistics delivery mode has rapidly developed in recent years [
4,
5]. However, the logistics companies not only need to consider reducing distribution costs, but also the impact of carbon emissions, in line with the global trend of reducing carbon emissions. It is imperative to control and reduce the carbon emissions of third-party logistics distribution under the double carbon target.
Thus, this paper proposes a grey wolf optimized genetic algorithm to plan the distribution routes between several supermarkets, from the view of the third-party logistics companies. The proposed algorithm aims to minimize the economic operating cost including the fixed cost, the driving cost, and carbon emission cost. As we know, carbon emission is high when the traffic is congested, while the traffic condition is time dependent. Thus, we further consider the correlation between the driving times, the driving velocity, and road segments. In addition, the constraint of a hard time window is also related to the requirements of strict service time. We conduct a series of experiments and analyze a real case to verify the effectiveness of the proposed model and the algorithm. Compared to the three classical genetic algorithms, our proposed grey wolf optimized genetic algorithm can reduce the economic operating cost, while considering the carbon emission cost. The convergence speed of the proposed method is faster, which can generate the high-quality supermarket distribution path plan more quickly. We also verify that the fluctuation of the carbon emission price has a great impact on the distribution scheme of supermarkets.
The rest of the paper is organized as follows:
Section 2 is the literature review. We define the problem in a mathematical form in
Section 3.
Section 4 illustrates our proposed algorithm, which is based on the genetic algorithm optimized by the grey wolf algorithm.
Section 5 is the case study. Finally, the paper is concluded in
Section 6.
3. Mathematical Model
3.1. Problem Description
The route planning of supermarket delivery through third-party logistics considering carbon emission is formalized as follows: given the supermarkets, including the number, locations, service demands, and service hours, and a distribution center of the third-party logistics enterprise, the distribution center dispatches different types of vehicles to complete the delivery service. We aim to minimize the economic operating cost, which is composed of the fixed cost for employing a vehicle, the driving cost, and the carbon emission cost.
In order to clarify the scope of the paper, we assume the following:
- (1)
We only consider the one-way goods delivery procedure, which is from the distribution center to supermarkets. The pick-up procedure is not involved [
18].
- (2)
The number of available vehicles is not limited.
- (3)
The demand of each supermarket does not exceed the maximum capacity of a vehicle.
- (4)
All requirements of the supermarkets are met and each supermarket is served by one vehicle once.
- (5)
All supermarkets’ windows of service hours are strict. That is, if the goods are not delivered to the supermarket within the specified service hours, the service will be refused.
- (6)
The vehicles are subject to local restrictions and traffic management measures, such as vehicle type restriction. (Vehicle number and the type of restriction are measures taken by the local government to alleviate traffic congestion, reduce vehicle exhaust emissions, and achieve air quality standards. For instance, vehicle type restriction means that vehicles with limited types cannot enter the corresponding area. Violators will be fined).
Table 1 shows the symbols used in this paper.
3.2. Mathematical Model
3.2.1. Objective Function
Our algorithm aims to generate a distribution plan where all requirements of the supermarkets are met, while the economic operation cost is minimized. The economic operation cost is composed of the fixed cost for employing vehicles, the driving cost, and the carbon emission cost. The objective function is shown in Equation (1).
where
Z represents the economic operation cost of the distribution plan.
The first term in Equation (1) is the fixed cost for employing vehicles, which depends on the number of vehicles used in the plan. The fixed cost is equal to the product of the number of vehicles and the fixed cost of a vehicle. The second term is the driving cost. The driving cost is the product of the petrol consumption of the vehicles and the fuel price. The third term is the cost for the carbon emission of the delivery vehicles. The carbon emission cost is the product of the carbon emissions and the carbon price. The second and third terms will be described in
Section 3.3 in detail.
3.2.2. Constraints
The constraints include three aspects in this paper; that is, from the view of vehicles’ operation, from the view of supermarkets’ requirements, and from the view of local restrictions and traffic management measures.
- (1)
From the view of vehicles’ operation
Equation (2) indicates that the total demand of the supermarkets served by each delivery vehicle cannot exceed the vehicle capacity. Equation (3) indicates that all delivery vehicles should depart from the distribution center and eventually return to the center. Equation (4) indicates that the timestamp when the vehicle leaves the supermarket i equals the time when the supermarket is served after the vehicle arrives. Equation (5) indicates that the time when the vehicle arrives at supermarket j is the time when the vehicle leaves supermarket i, as well as the driving times from i and j.
- (2)
From the view of supermarkets’ requirements
Equation (6) is a constrained condition, which means that the number of vehicles reaching the supermarket equals the number of vehicles leaving the supermarket, and the same can be said for the number of vehicles serving the supermarket. Equation (7) indicates a hard time window required by the supermarket. That is, the arrival time of the delivery vehicle at the supermarket must be within the range of the required earliest service time and the latest service time.
- (3)
From the view of the local restrictions traffic management measures
In this paper, we only consider type restriction. Equation (8) requires that only the vehicle whose maximum capacity is not larger than the allowed maximum capacity requirement inside the h-th loop of the city can serve the supermarket.
3.3. Fuel Consumption and Carbon Emission Evaluation
We employ the widely used CMEM (Comprehensive Modal Emission Model) [
19] to evaluate the fuel consumption and the carbon emissions caused by the supermarket distribution plan, which considers the effects of vehicle load, driving times, and speed. The evaluation equation is shown as follows:
where
β1,
β2, and
β3 are the predetermined parameters, which represent the vehicle engine coefficient, the speed coefficient, and the load coefficient, respectively; with reference to [
19], the three parameters are set as 0.22, 0.036, and 0.017, respectively.
It has been proven that vehicle carbon emissions and fuel consumption hold a linear relationship. Therefore, the carbon emission of the delivery vehicle driving from supermarket
i to
j is shown in Equation (10):
where
represents the fuel emission factor, which is set as 2.62 in this paper, as in Ref. [
13].
Most scholars assume that the first two items in Equation (9), driving times and the driving speed , are fixed. However, in fact, these are affected by external factors such as traffic light and road congestion in the urban traffic environment; the driving times and the driving speed of the delivery vehicles vary according to different timestamps. Therefore, in this paper, we calculate the fuel consumption and the carbon emissions of the vehicle based on the diverse driving times with respect to their different locations.
Ref. [
20] verifies the lognormal distribution to be the best to fit vehicle driving times within 24 h, using 36 measured data sets. Therefore, we divide every two hours in a day into a period. Assume that the driving times
, the
k-th vehicle of type
l from supermarket
i to
j, are subject to a lognormal distribution in each period. That is,
.
and
are the mean and the variance of the vehicle driving times, respectively.
We also use the case of Sinotrans Beijing Distribution Center, whose detailed information can be found in
Section 5, to test whether the driving times of delivery vehicles are subject to a lognormal distribution in each period using the K–S test. First, the driving times between the distribution center and the designated 20 supermarkets are retrieved every 15 min between 6:00 and 22:00 for 15 consecutive days using Baidu map API. The unit of driving time is minutes. Then, each day from 6:00 to 22:00 is divided into eight periods, every two hours. The retrieved driving times and driving speeds are split into each period. After that, the frequency distribution histogram of the logarithmic driving times of the vehicles is drawn. Taking the ordinary period (10:00~12:00) and the peak period (18:00~20:00) as examples, the histogram of vehicle driving times after taking logarithm are shown in
Figure 1. The K–S test results are shown in
Table 2.
According to the density curve of the frequency distribution histogram in
Figure 1, the logarithm of the driving times approximately and intuitively follows a normal distribution. In
Table 2, the
p-values of the two periods were 0.716 and 0.486, respectively. The null hypothesis is accepted. Therefore, the driving times of the vehicles in the two periods approximately followed the lognormal distribution. That is, during 10:00~12:00,
and during 18:00 to 20:00,
.
Table 3 shows the K–S test results of vehicle driving times’ distribution at different periods between two locations. We use the mean of the driving times to compute driving speed,
vijlk, as shown in Equation (11):
In Equation (11), is the road network distance between supermarket i and supermarket j, and is the average vehicle driving times between the two locations at different periods.
4. Grey Wolf Optimized Genetic Algorithm
As we know, the number of supermarkets served by third-party logistics enterprises is large. Their locations are sparse and their demands are quite diverse. Therefore, we propose a grey wolf optimized genetic algorithm to solve the supermarket distribution route plan problem of third-party logistics enterprises. The grey wolf optimized genetic algorithm is a hybrid heuristic algorithm combining the genetic algorithm and the grey wolf optimization idea. The genetic algorithm is simple and easy to combine with other algorithms. At the same time, the grey wolf optimization algorithm is less dependent on parameters and has a good optimization performance. Thus, we propose to integrate the social rank and hunting behavior in the grey wolf optimization algorithm into the selection operation of the genetic algorithm, which is suitable for solving complex distribution path problems. For ease of understanding,
Table 4 gives the common terms and the correspondence meanings in our proposed new algorithm.
Figure 2 shows the flow chart of the proposed algorithm. At the beginning of the algorithm, the distribution center and the supermarkets are coded based on the chromosome coding. As a result, the distribution centers and supermarkets are mapped to genes. This is the basis for the following steps. The chromosome, i.e., a grey Wolf, is a supermarket distribution path plan. The chromosome is composed of genes (which are the distribution center and supermarkets). This paper uses integer coding to encode genes in chromosomes, where “0” represents distribution centers and “1, 2, …,
N” are supermarkets. After encoding, the initial grey wolf population is generated. That is, several supermarket distribution path plans are generated randomly. The specific procedure will be described in detail in
Section 4.1.
Secondly, the fitness of each grey wolf in the population was calculated. Fitness is computed using the objective function; that is, the economic operating cost of the plan. The distribution route plans are checked based on the fitness, such that the social classifications of the grey wolves are classified. Then, the grey wolves start to hunt. In the first generation, all grey wolves (i.e., supermarket distribution path plans) regard the first three wolves with the highest social rank (i.e., the first three distribution route plans with the lowest economic operating cost) as the target to update locations. Through hunting behavior, it is possible to renew the location of the target for grey wolves. The two grey wolves closest to the target are found and the subsequent selection operations are conducted. The specific social hierarchy criteria and hunting behavior rules of the grey wolf will be described in detail in
Section 4.2.
After that, through the genetic operators such as selection, crossover, and mutation, the population are evolved. That is, a new supermarket distribution route plan is generated. In order to improve the local search ability, the genetic operator operation of the proposed algorithm is based on the hunting behavior rule of the grey wolf. The specific operation will be described in detail in
Section 4.3.
Finally, the termination condition is tested. The termination condition is the number of evolutionary generations (i.e., number of iterations). If the termination condition is not met, the above steps are repeated. Otherwise, the best individual in the last generation of the grey wolf population is output; that is, the best supermarket distribution route plan.
4.1. Population Generation Initialization
The initial population must meet the maximum vehicle capacity constraint and the service time window requirement of the supermarket.
First, supermarket visiting sequences are generated randomly. Then, the time of arrival and departure of delivery vehicles at each supermarket in the sequence and the load of delivery vehicles during the service procedure are calculated. After that, route segmentation is carried out for the supermarkets. The constraints of the route segmentation are the maximum capacity constraint of delivery vehicles and the service time window requirements of supermarkets. For each supermarket in the sequence, if the two conditions are met, the supermarket will be assigned a distribution vehicle. The route segmentation procedure is stopped until all supermarkets are served. The initial grey wolf population is obtained (i.e., sets of supermarket distribution route plans).
4.2. Grey Wolf Social Hierarchy and Hunting Behavior Rules
The social classification of grey wolves includes α, β, δ, and ω levels, according to the fitness. Each grey wolf is classified as one kind of wolf. There is only one α-wolf, one β-wolf, and one δ-wolf. The α-wolf, the β-wolf, and the δ-wolf correspond to the first, second, and third supermarket distribution route plans ranked by the fitness. ω-wolves correspond to the other supermarket distribution route plans.
The traditional hunting behavior of grey wolves includes surrounding, hunting, attacking, and searching. We adapt two activities, i.e., surrounding and hunting. The hunting behavior of the grey wolves depends on the social hierarchy. ω wolves take α, β, and δ wolves as targets to update locations. The specific behavior is as follows:
Surrounding is the way in which grey wolves approach their prey when the prey’s location is known. In our problem, surrounding means that in a generation population (i.e., sets of supermarket distribution route plans), a route plan is selected as the prey (i.e., the best supermarket distribution route plan) and other plans are adjusted as the best one. The adjustment method is as follows:
Z(
t) is fitness of the current grey wolf;
Zp(
t) is the fitness of the prey; and
t is the iteration number.
D is the fitness gap between grey wolves and their prey. Formula (13) is the fitness after updating locations, while 2
ar1 −
a and 2
r2 are the coefficient vectors. The coefficient vectors help to avoid falling into the local optimal solution [
21]. In Equation (13), a is the convergence factor, which decreases linearly from 2 to 0;
r1 and
r2 are random numbers between [0, 1].
- (2)
Hunting
We assume that
α,
β, and
δ wolves know more about their prey, and the
ω wolf pursues prey based on the fitness of these three wolves. The hunting method is as follows:
A1(C1), A2(C2), and A3(C3) are the coefficient vectors for α, β, and δ wolves, respectively. As in Equations (12) and (13), A = , and C = 2r2, as in Equation (13). In Equations (14)–(16), the current best top three supermarket distribution route plans are regarded as prey. The plan is adjusted according to the adjustment method in the surrounding. Equation (16) means that the average fitness value is taken as the adjustment target for the fitness of the remaining route plans.
4.3. Genetic Operator Operation
4.3.1. Selection
The purpose of selection is to select the distribution route plan with the highest fitness during each evolution, which is the basis for crossover and mutation. We selected the plan based on the social classification and hunting behavior rules of grey wolves. It mainly consists of two steps. First, the grey wolf, which pass down to the next generation (a supermarket distribution route plan) directly, is selected. Second, the grey wolves that are crossed and mutated are selected.
The specific steps are as follows: First, the α, β, and δ wolves are inherited by the next generation directly. That is, the top three route plans with the best fitness in the current generation are retained. Then, based on the fitness adjustment target of grey wolf hunting behaviors, the two grey wolves closest to the target fitness, i.e., the two supermarket distribution route plans with the closest economic cost, were selected for local adjustment.
4.3.2. Crossover
The aim of crossover is to generate a new supermarket distribution route plan. Typical crossover operators include partial matching crossover, sequential crossover, cyclic crossover, etc. This paper adopts a sequential crossover strategy to carry out crossover operations.
The basic steps are as follows: First, two grey wolves (i.e., supermarket distribution route plans) generated from the previous selection operation are chosen as parents. Then, several genes in one parent are left unchanged and the remaining genes are crossed with the genes in the other parent, in order. The filial generation is obtained. In other words, the service order of some supermarkets in a route plan are kept unchanged and the service order of other supermarkets changes according to the service order in another route plan. The process diagram of sequential crossing is shown in
Figure 3. Each crossover will produce two children (i.e., the new supermarket distribution route plans).
4.3.3. Mutation
Mutation generates new supermarket distribution route plans as well, whose function is to expand the search range and avoid falling into the local best solution. In a different manner to the traditional mutation only requiring one operator, we adopt a binary mutation strategy to carry out mutation operations. That is, we require two supermarket distribution route plans to participate.
The basic steps are as follows: First, two grey wolves generated from the previous selection operation are chosen as parents. Second, a different gene (i.e., a supermarket) from the two grey wolves was selected randomly. Then, the locations of the two selected genes exchange. That is, the service order of the different selected supermarkets is exchanged, such that two new supermarket distribution route plans are generated. The process of a mutation operation is shown in
Figure 4. Similarly to crossover, the process of each binary mutation will produce new supermarket distribution route plans.
6. Conclusions
Through analyzing the characteristics of the route planning of supermarket deliveries through third-party logistics, this paper proposes a grey wolf optimized genetic algorithm for supermarkets distribution route planning, considering carbon emission cost. The main conclusions are as follows:
- (1)
When building the supermarket distribution route planning model, carbon emissions are calculated based on dynamic driving times on the road networks. The route planning can reduce the fuel consumption and carbon emissions of the supermarket distribution service.
- (2)
Compared with the three classical genetic algorithms, the proposed grey wolf optimized genetic algorithm reduces the economic operating cost of CNY 98.4, CNY 32.4, and CNY 82.1, respectively. The convergence speed is faster, which can reach the high-quality supermarket distribution path plan more quickly.
- (3)
The fluctuation of carbon emission price has a great impact on the distribution scheme of supermarkets. Therefore, it is suggested that third-party logistics enterprises develop supermarket distribution route schemes applicable to different carbon emission prices, so as to reduce carbon emissions and improve profit margins.
This paper only considers the delivery problem with one single distribution center, without time constraints. In the future, we will expand the study on the distribution path of supermarkets with multiple distribution centers for simultaneous pickup and delivery with time constraints and the order of vehicles selection on the different route planning of supermarket delivery.