1. Introduction
Due to economic development and the improvement in the quality of life, the demands for the diversity, quality, nutrition, and freshness of foods have largely increased [
1]. Huajing Industry Research Institute indicated that the market penetration rate of Chinese online fresh foods had increased from 4.1% in 2017 to 14.6% in 2022, and would further increase. More agricultural products are increasingly transferred to e-commerce platforms, and e-retailers of fresh foods have become important retailers [
2]. The competition of fresh products has shifted from low price to high quality and good logistics services, thereby advancing the cold chain logistics industry [
3]. The advancement of cold chain logistics has accelerated economic growth, but it has also caused more environmental pollution [
4]. Compared with traditional logistics, cold chain logistics is heavily dependent on refrigeration equipment, which increases energy consumption and carbon emissions and thus intensifies the global greenhouse effect and air pollution. Carbon emissions from transportation sectors account for approximately 24.34% of global carbon emissions [
5]. Consequently, optimizing the location and distribution strategies of logistics is important for enhancing logistical efficiency and reducing carbon emissions. Recently, the problems of facility location and route optimization of cold chain logistics have been widely studied [
6,
7]. The continuous innovation of cold chain logistics has given birth to the novel business mode of front warehouses. This mode employs a two-echelon network structure based on a framework of urban central warehouses, front warehouses, and customers to ensure the timely delivery of goods. The mode increases logistical efficiency, reduces response time, and thereby boosts customer satisfaction [
8]. However, compared with other modes, the mode of front warehouses faces the challenge of higher cost, which limits its application scope. Therefore, it is necessary to develop appropriate models according to the actual situation [
9]. Especially, joint optimization strategies for location and routing problems should be designed based on low carbon emissions under front warehouses to achieve both economic and environmental benefits. Based on the consideration of operating cost, total fixed cost, refrigeration cost, total transportation cost, cargo damage cost, and comprehensive carbon emission cost, the location-routing model was proposed to minimize the total logistics cost and achieve low-carbon economy. The comprehensive carbon emission cost includes the direct carbon emission cost from fuel consumption and the indirect carbon emission from electric vehicles. The ant colony optimization (ACO) algorithm has been widely used due to its performance in solving complex optimization problems. However, original ACO often cannot yield the best global solution in complex cases. This study proposed a hybrid ant colony optimization (HACO) algorithm, which outperforms ACO in solution quality. HACO incorporates an adaptive hybrid probabilistic decision mechanism with revised pheromone update rules and can avoid early convergence by balancing exploration and exploitation. Despite heuristic limitations and parameter dependency, HACO demonstrated a robust performance and provided excellent approximate solutions with flexibility and scalability in this study.
This paper primarily investigated the front warehouse location-routing optimization problem in a two-echelon transportation network in cold chain logistics based on the consideration of carbon emissions and vehicle types. Related studies focused on location-routing optimization problem models [
10], green logistics considering carbon emissions [
11], and optimization algorithms [
12].
In 1973, Watson-Gandy & Dohrn [
13] proposed the joint location-routing problem (LRP) for the first time. LRP has gradually become a research hotspot in the field of logistics optimization. Numerous LRP variants have been proposed, such as dynamic LRP [
14], multi-cycle LRP [
15], and stochastic LRP [
16,
17]. Current studies on LRP have focused on the upstream and midstream of the supply chain [
18]. In contrast, the last-mile distribution has seldom been reported and has been mainly explored from the perspective of one-echelon LRP [
19]. In recent years, multi-echelon logistics networks in the supply chain have been explored. Sun et al. [
20] indicated that these networks had a complex dumbbell-shaped structure and were characterized by the cooperative and competitive relationships among echelons. Dai et al. [
21] investigated four types of LRP, from one-echelon LRP to four-echelon LRP. Especially, the two-echelon LRP has been the most extensively explored. Mirhedayatian et al. [
22] studied the two-echelon distribution system problem and Fazayeli et al. [
23] focused on multi-modal transportation logistics and constructed an integer linear planning model to optimize the two-echelon logistics process of supplier, distribution central, and retailer. Darvish et al. [
24] explored the flexible two-echelon location-routing problem.
The studies on two-echelon location-routing optimization have focused on the distribution centers as intermediate nodes, but related studies with front warehouses as intermediate nodes have seldom been reported. Along with the rise of e-commerce of fresh agricultural products, the business mode of front warehouses is increasingly integrated into logistics networks due to its advantages of short delivery time and high flexibility [
25]. Wu [
26] proposed a new front warehouse mode to optimize fresh e-commerce delivery and evaluated its strengths, weaknesses, opportunities, and threats with SWOT and analytic hierarchy process analysis. Zhu & Tian [
27] further investigated the value of high-quality distribution in the front warehouse mode and emphasized the importance of logistics satisfaction and delivery timeliness. Tang et al. [
28] developed an integrated optimization model to explore the application of front warehouses in e-commerce. Front warehouses were often located in the downstream of the supply chain. Li & Yang [
9] and W. Chen et al. [
29], respectively, studied the distribution of large household appliances and the optimization of vehicle routes under the front warehouse mode and constructed corresponding mixed-integer planning models.
In addressing the challenges of climate change and environmental pollution, the sustainable development of the logistics industry is significant. Many scholars investigated the concept and applications of green logistics from the perspective of environmental protection and explored key strategies such as eco-friendly packaging boxes [
30], green logistics performance [
31], and circular economy [
32]. Yao et al. [
33] indicated that, along with the concept of sustainable development, the carbon emissions from the logistics industry were increasingly a concern. Cold chain logistics, in particular, generally produces higher carbon emissions than ambient temperature logistics [
34]. Therefore, it is significant to develop effective location and routing strategies to reduce carbon emissions. Z. Wang et al. [
35] proposed a cold chain logistics location-route model considering fuel consumption, load capacity, and driving distance. Based on the comprehensive modal emission model (CMEM), Dukkanci et al. [
36] calculated fuel consumption and carbon costs with vehicle parameters such as friction coefficients, speed, and load. Similarly, with CMEM, C. Zhang et al. [
37] calculated fuel consumption and emissions and solved the time-dependent green location-routing problem with time windows (TDGLRP). Furthermore, Li et al. [
38] and S. Wang et al. [
39] examined transportation-related carbon costs based on the consideration of the policies of carbon tax and quota frameworks.
In the pursuit of low-carbon logistics, in addition to direct carbon emission factors, biofuels and transportation technologies are crucial for emission reduction [
40,
41]. Additionally, electric vehicles (EVs) are widely considered as they can reduce the dependence on fossil fuels and contribute to the low-carbon circular economy [
42,
43]. Nilsson & Nykvist [
44] analyzed the impact of EVs on low-carbon transportation. T. Wu et al. [
45] proposed a planning model for multistage low-carbon EV charging facilities considering carbon price and cruising range to optimize travel routes of EVs. Almouhanna et al. [
46] explored the feasibility of replacing fuel vehicles with EVs and solved vehicle routing problems with heuristic algorithms. Furthermore, in order to solve the problems of short range, long charging time, and insufficient charging infrastructure for EVs, Çatay & Sadati [
47] introduced an EV routing model and facilitated instant charging of EVs through battery swapping. The above studies provide the theoretical basis and guidance for the application of EVs in logistics and promote the low-carbon and sustainable development of the logistics industry.
Exact algorithms and heuristic algorithms have been employed to solve facility location and routing problems. Exact algorithms can give the optimal solutions to small-scale problems [
48], such as the branch-and-price algorithm [
49,
50], branch-and-bound algorithm [
51,
52,
53], and Lagrangian relaxation algorithm [
54]. Exact algorithms are not applicable to large-scale problems due to their high computational complexity, so heuristic algorithms, especially mixed ones with diverse strategies, are often used in order to overcome the limitations of single algorithms. Biuki et al. [
55] used a parallel hybrid of genetic and particle swarm algorithms to solve a multi-objective mixed-integer planning model, and found that the parallel algorithm outperformed serial algorithms.
ACO is a popular heuristic algorithm for complex optimization problems like TSP [
56,
57,
58] and VRP [
59,
60], and well known for its global search capability and robustness. Original ACO has been improved by the introduction of new pheromone update rules [
61,
62,
63,
64] and hybridization with other optimization algorithms [
65,
66,
67]. Various methods have been explored to prevent algorithms from converging to local optima [
68,
69,
70,
71]. He et al. [
72] developed an adaptive variable neighborhood search ACO and Liang et al. [
73] introduced the sub-path support degree to improve ACO performance. Improved ACO performs better in solving many problems. ACO has become a crucial tool for handling complex optimization issues. Although the improvement strategies have solved certain problems of ACO, it still requires to be further optimized.
In short, front warehouses in two-echelon logistics networks have seldom been explored, particularly the optimization of location and routing. Most studies have focused on direct fuel consumption-related carbon emissions. In this paper, a new method is proposed to calculate indirect carbon emissions of EVs for final-mile delivery and a 2ELC-LRP model considering the front warehouse structure is constructed. Additionally, an improved ant colony algorithm (HACO) based on an elbow rule, an improved probabilistic decision strategy, and a new pheromone update rule is proposed. Finally, a case study demonstrates the effectiveness of the proposed model and HACO algorithm.
3. Design of HACO Algorithm
Effective problem-solving methods are crucial for improving the overall efficiency and reducing the cost of NP-hard problems. In the study, the HACO algorithm, in which the elbow rule was integrated with IACO, was designed to solve the 2E-LCLRP. In the designed HACO algorithm, the clustering analysis of customer points is firstly performed according to the elbow rule to determine the optimal number of front warehouses. Then, customers are allocated according to distance. Finally, with IACO, the optimal route scheme and objective function are solved.
3.1. Elbow Rule
The key to the elbow rule lies in determining a reasonable number of clusters based on the trend of the sum of squared errors (
), where
represents the sum of the squared errors of the distances of each point away from its respective cluster central [
76]:
where
k represents the cluster count;
represents cluster
i;
p represents a sample point within a cluster; and
represents the mean of all data points within a cluster. With the gradual increase in clusters, the distribution characteristics of the data can be obtained with higher precision, thus leading to a decrease in
. When the number of clusters increases to a critical value, the decrease in
becomes less pronounced, so that the critical point is manifested as the “elbow” and indicates the optimal number of clusters [
77].
3.2. Improved Ant Colony Optimization Algorithm
The IACO algorithm is obtained based on the original ACO framework by adopting the adaptive probabilistic decision strategy and the pheromone update rule to solve the limitations of the original ACO algorithm, including convergence efficiency, local optimal solution, and stagnation.
3.2.1. Original Ant Colony Optimization Algorithm
ACO is a heuristic search algorithm inspired by the foraging behavior of ants in nature [
78]. Ants communicate by leaving pheromones along the way, which accumulate and are iteratively updated, so that the ant colony can identify the shortest path from the nest to a food source [
79]. The ACO algorithm has been widely applied in solving combinational optimization problems. However, it has a low iteration efficiency and a poor local search ability, which potentially lead to algorithmic stagnation [
80].
To refine the ACO algorithm, H. Wu et al. [
81] and Chen et al. [
82] optimized the probabilistic decision mechanism and pheromone update rules to balance the exploration and exploitation of the algorithm. This optimized approach mentioned only considered the immediate change of the best solution in a single iteration, thus affecting the stability and quality of the solution. In this paper, a dynamic adjustment mechanism is introduced to enhance the adaptive selection ability between random selection and deterministic selection, and the pheromone update rule is adjusted to take advantages of the optimal and sub-optimal paths.
3.2.2. Dynamic Adjustment Mechanism
In this paper, the optimal total cost at each iteration is used as a sequential variable dependent on the number of selected generations. According to Equation (
16), in a fixed-length sliding window, the average of the optimal cost is computed from the most recent iterations and compared with the optimal total cost computed from the previous iteration. Based on this comparison result, the dynamic adjustment of
is determined. If the average is less than the optimal cost of the previous iteration, it is suggested that a better solution has been found. In other words, it is proper to increase
to raise the proportion of deterministic selection. Otherwise, it is proper to decrease the value of
to increase the proportion of random selection. The adjusted value of
is between 0 and 1 to ensure stability. The enhanced dynamic adjustment method is expressed as:
3.2.3. Deterministic Selection
When the ant colony selects the next node, the maximum state transition probability among accessible nodes is determined with the pheromone concentration and heuristic function, as expressed in Equation (
19). A random parameter in the interval of
is generated and then compared with a selection threshold,
. If
, the ant selects the node with the maximum state transition probability as the next node to be visited. This selection strategy is a deterministic strategy as the ant always selects the node with the highest probability:
where
indicates the distance between node
i and node
j;
represents the heuristic function and is typically inversely proportional to the distance between nodes, as described in Equation (
18);
represents the pheromone concentration on the path between nodes;
indicates the set of nodes to be visited; and
and
are the parameters describing the important weights of pheromones and heuristic function factor in the travel route, respectively.
3.2.4. Random Selection
When
, with a roulette wheel selection method, the ant,
k, randomly chooses one of the accessible nodes as the next node to be visited, as expressed in Equation (
20). This method is a biased random selection method based on the pheromone concentration and the reciprocal of the path length [
83]. This biased selection mechanism is still widely utilized in ant colony algorithms, as it leads ants to prefer the paths that have historically performed better [
71]. Simultaneously, paths with lower probabilities retain a certain likelihood of being selected, thus maintaining diversity in the search process. Experiments conducted by Chen et al. [
82] experimentally validated the efficacy of this selection mechanism. The results indicate that the biased random selection can prevent the algorithm from premature convergence and enhance the quality of the final solution.
3.2.5. Pheromone Update Rule
In original ACO, ants continuously explore the optimal path in the iterative process, and each visited path undergoes a process of pheromone evaporation and deposition. However, the global pheromone update strategy also leads to resource waste on non-optimal paths and increases execution time. To overcome this limitation, a local pheromone update strategy [
84] was proposed to implement pheromone evaporation and enhancement on the optimal path and only enhancement on other paths. This strategy boosted its positive feedback effect, but it weakened its exploration capability. Moreover, the ant-circle model outperformed the ant-quantity and ant-density models in terms of global search efficiency.
Consequently, the pheromone update mechanism is refined by extending it to sub-optimal paths. In addition, the pheromone increment on the optimal path is larger than that on the sub-optimal path, thus maintaining the preference for the optimal solution:
where
is the pheromone concentration between node
i and node
j;
is pheromone evaporation coefficient;
Q is the pheromone constant;
and
, respectively, represent the paths taken by the optimal ant and the sub-optimal ant;
and
, respectively, represent the lengths of the optimal and sub-optimal paths; and
and
are the pheromone increments of optimal and sub-optimal paths, respectively.
3.3. Steps of IACO Algorithm
According to the framework of original ACO integrated with the adaptive probabilistic decision strategy and pheromone update rule, IACO is used to optimize the whole vehicle routes in global space [
85]. The steps of IACO algorithm are introduced below:
Step 1: parameter initialization. The number of the current iteration is set as =1, and . Then, the parameter initialization of m, , , Q, , , and is implemented.
Step 2: solution space construction. An empty is generated and all ants are randomly placed on candidate front warehouse nodes. Then, customer nodes are assigned to each front warehouse based on distance and capacity.
Step 3: node selection. The next node is determined based on the adaptive probabilistic decision strategy while ensuring that the cumulative customer demands are lower than vehicle capacity. Traversal routes are recorded and the next vehicle is assigned to explore the new route when the cumulative customer demands equal the capacity of the vehicle.
Step 4: is continuously updated and the process is repeated until all customer nodes are visited and vehicles return to front warehouses.
Step 5: recording the optimal solution. The current optimal total cost is compared with the historical optimal solution . If is less than , output ; otherwise, output .
Step 6: updating pheromone. After all nodes are visited, the total path length of each ant is calculated and pheromone concentrations for the optimal and sub-optimal paths are updated with Equation (
21) to reflect search performance.
Step 7: termination conditions. If the iteration limit is not reached, the current iteration number is increased by one and is emptied. Then, return to Step 2 to continue the iteration. Otherwise, the calculation is terminated and the optimal solution is output.
The above calculation process is illustrated in
Figure 2.
5. Discussion and Conclusions
In the context of the rising prevalence of fresh food e-commerce, there is a pressing need for strategies to promote the sustainability of logistics operations while meeting the service demands of fresh food products. Therefore, this study focused on the joint optimization of the location-routing problem in a two-echelon cold chain network for the purposes to improve logistics efficiency, cost reduction, and sustainable logistics development. Based on the characteristics of perishable cargo and the requirements of low-carbon green logistics, the 2E-LCLRP model, considering both direct and indirect carbon emission costs, operational cost, fixed cost, transportation cost, refrigeration cost, and cargo damage cost, was proposed. A HACO algorithm was developed for the NP-hard problem, utilizing an adaptive probabilistic decision strategy and pheromone update rules. This approach was then validated in a practical application in Nanjing.
The main conclusions drawn are as follows:
In this work, HACO successfully overcame the disadvantage that ACO would fall into the local optimal solution. During the mid-stage of the algorithm’s operation, ACO experienced stagnation for over 100 iterations. HACO used an adaptive hybrid selection strategy that effectively combined randomness with determinism, enhancing its search capabilities. This method enabled the algorithm to swiftly jump out of the local optimal and avoid stagnation;
In terms of convergence speed, HACO demonstrated a significant advantage, requiring only 20 iterations to reach the optimal solution of the objective function. Furthermore, the comparative analysis indicated that HACO achieved up to a 99.9% reduction in execution time. This advantage was primarily attributable to the local pheromone updating strategy of HACO, which mitigated the impact of non-optimal solutions and rendered the algorithm more effective than the global pheromone updating strategy in terms of resource allocation and convergence speed;
HACO outperformed in finding high-quality solutions by adapting its search strategy based on solution characteristics throughout the iteration process and applying the pheromone updating strategy. The balance between exploration and exploitation led to optimal outcomes, with a focus on discovering the best path planning solution;
The results of the case study revealed that HACO, when compared with ACO, reduced total logistics cost, carbon emission cost, and execution time by 0.41%, 1.78%, and 99.9%, respectively. This indicated that HACO significantly outperformed the original ACO in balancing the environmental benefits and the logistics cost, thereby validated the efficacy of both the algorithm and the model.
HACO’s flexibility and adaptability make it applicable to various logistics networks, including normal temperature logistics, pharmaceutical logistics, and multi-echelon logistics, as the networks encounter similar challenges in location-routing optimization. Consequently, this study could enhance the decision-making recommendations for enterprises in balancing economic and environmental costs. The result is conducive to the advancement of sustainable green logistics, facilitating enterprises in fulfilling their social responsibility and enhancing their brand image. The proposed model offers a novel research perspective for designing sustainable logistics networks, and the enhancement of HACO holds significant theoretical value for the resolution of complex optimization problems and the improvement of heuristic algorithms.
There are some limitations in this work. The proposed model does not consider the uncertainty for customer demand and instead relies on a number of simplistic assumptions, including fixed vehicle speeds. In view of this, future research should incorporate dynamic demand, seasonal factors, congestion indices, and real-time traffic data to improve the suitability for addressing complex optimization challenges. On the other hand, enhancing the algorithm’s adaptability and stability is crucial for addressing more complex optimization challenges. Therefore, it is recommended to consider the optimization of heuristic algorithms in future work.