1 Introduction

Last-mile delivery in the urban area has been a challenging logistics task for many logistic service providers (LSP) due to the vast majority of e-commerce deliveries concentrated in urban cities, especially during the COVID-19 era (Srinivas & Marathe, 2021). Facing the complexity of the last-mile delivery problem in city logistics, the LSP commonly divide their routing scheme into a multi-echelon, mostly two-echelon routing model (Zhou et al., 2018). The system utilizes two types of vehicle: city truck (CT) as the 1st echelon vehicle and city freighter (CF) as the 2nd echelon vehicle. Typically, CT is a large vehicle, such as a truck, because these types of vehicles usually can carry more cargo (efficient). Moreover, unlike CT, the CF vehicle is usually smaller and can only take a few parcels at once, such as a motorcycle and bike. The utilization of smaller vehicles as CF is because these vehicles have higher mobility than larger vehicles in facing traffic congestion in the city center. In a two-echelon routing model, the first echelon consists of the routing from the main depot (MD) to the intermediate depots, known as satellites. The satellites are typically fixed and used as the buffer warehouse. The second echelon covers the handling from the satellites to end customers (Barnhart & Laporte, 2006).

In the real-world last-mile delivery problem, the delivery points are frequently changing (Febransyah & Goni, 2020); thus, the fixed-location satellite in traditional 2E-LRP might not be optimal for achieving sustainable logistics costs. Considering the dynamics in last-mile deliveries where the delivery points are changed daily, the routing solution of 2E-LRP is a compromise based on the predetermined location of satellites. Setting up more satellites can reduce the routing cost, but the urban area’s high setup and operational costs are considerably high (Crainic et al., 2010).

This paper proposes 2E-LRP-MS to reduce the logistic costs of 2E-LRP by allowing the cargo transfer between CT and CF outside the fixed satellites by utilizing open spaces in the city center, named consolidation points (CP). The location for CP could be the public loading zone or paid parking lot at shopping malls, following traffic and safety regulations. The delivery scenario in 2E-LRP-MS can be described as the following. (1) CT starts its journey from MD to the garage of CF (CD). (2) initially, CT meets and replenishes CF at the CD. (3) CT and CF embark together, with CT heading to the following designated CP and CF heading to customers for parcel delivery. (4) once CF has finished delivering the parcels to the assigned customers, the next destination will be the following designated CP to meet with CT. (5) CT will replenish CF again. There will be a repetitive situation from scene #3) to scene #5) until all customers are served. Lastly, CT and CF return to the facilities where they initially started their journey, the MD for CT and CD for CF. Also, in 2E-LRP-MS, multiple CF can replenish their cargo from the same CT at any CP.

With this setting, 2E-LRP-MS exchanges the high setup and operational costs of satellites with the relatively low cost of parking expense at CP. Assume the widespread of public loading-unloading zones or parking lots in the city center; it also means 2E-LRP-MS has better adaptability to the traffic condition and the daily delivery points than 2E-LRP because, in 2E-LRP-MS, we can choose CP with less traffic or CP that is closer to where the customers are concentrated. With such an advantage, 2E-LRP-MS offers a higher possibility of achieving the delivery objectives, for example, lower routing costs or faster delivery time, under the real-world traffic in the city center. These delivery cost savings and flexibility in delivery highlight the advantage of 2E-LRP-MS. The proposed 2E-LRP-MS is also feasible for the more advanced urban area where carbon emission is the primary concern. As 2E-LRP-MS can reduce CF’s travel distance, it encourages human-powered transport, as in Fig. 1, or low-carbon emission vehicles, such as bicycles.

Fig. 1
figure 1

CT and CF performed a parcel transfer process at a CP in New York City. The author took the left photo at the intersection of 2nd Avenue and East 87 Street, New York City, the United States of America, on August 2, 2020. The right photo was taken from Google Map on the same spot

Figure 1 illustrates the cargo transfer at CP in New York City. In the figure, CT temporarily stops at the street, and the courier dispatches the parcels from CT to the sidewalk. In this situation, the delivery person acts as the CF, using the wheeled trolley or bicycle to deliver parcels to nearby customers. Considering urban cities with heavy traffic congestion, employing high-mobility CF, such as motorcycles, bicycles, or human-carry trailers, can improve the delivery punctuation because these CF can bypass the traffic through the small narrow roads or sidewalks.

In this paper, a mathematical formulation for the proposed 2E-LRP-MS is presented and validated by using CPLEX. Since 2E-LRP-MS is a more complex problem than the already complicated 2E-LRP problem, in this paper, we introduce a heuristic method named the clustering-based simultaneous neighborhood search (CSNS) to solve 2E-LRP-MS efficiently. Notably, our proposed CSNS has multiple uncommon yet innovative approaches for routing problems, such as the fitness proportionate selection (FPS) and k-means clustering algorithm for facility selection, such as CD and CP, and the proposed simultaneous neighborhood search to generate the routing solution. In the FPS procedure, cheaper facilities are given higher priority to be selected; however, the decision of keeping or changing the facilities depends on the summation of facility and routing costs. The k-means clustering algorithm was applied to find k optimum centroid points for connecting the last coordinate of vehicles before and after en-route replenishment. The SNS method searches two routing solutions simultaneously and connects the solutions as one single solution by appending the reversed routing order of the second solution to the first solution. Finally, we applied the widely used swapping and shifting local searches (Laporte & Nobert, 1988).

The dataset for evaluating the proposed CSNS method was created based on Prodhon’s 2E-LRP benchmark set (Prodhon, 2010). The solutions of the 2E-LRP and 2E-LRP-MS models were compared under the assumption of setup and operational cost. The tests on benchmark instances show that the proposed CSNS search is computationally efficient and has a relatively small performance gap to the optimal solution obtained from the CPLEX solver on instances with fewer delivery points. The proposed CSNS method still provided quality solutions for the instances with more delivery points, while CPLEX could not obtain the solution due to the complexity of the problem.

2 Literature review

The concept of the two-echelon problem was firstly introduced by Laporte and Nobert (1988). Since then, many variants of the two-echelon problem have been developed. However, in the literature, the 2E-LRP problem is less studied (Cuda et al., 2015) due to its higher complexity than the other two-echelon problem variants. Nowadays, with the availability of computational resources, more studies have been published regarding 2E-LRP in the literature. Demircan-Yildiz et al. (2016) investigated 2E-LRP with simultaneous pickup and delivery. In their study, CF is not used only for delivering parcels but also for picking up parcels from customers. Yang and Zeng (2018) studied 2E-LRP with time constraints. This time constraint issue is vital in implementing 2E-LRP, as several customers may need their parcels delivered in a specific time window. Another variant of 2E-LRP with an open routing mechanism, named 2E-OLRP, was proposed by Pichka et al. (2018). In 2E-OLRP, the vehicles do not necessarily start and end at the same point. This issue is critical when the LSP does not entirely manage the distribution system. For example, the last-mile delivery was performed by freelancer couriers, such as DiDi\(\circledR \) in China, Uber\(\circledR \) in North America, and Lalamove\(\circledR \) and Grab\(\circledR \) in South East Asia. Mirhedayatian et al. (2019) proposed a 2E-LRP with a synchronization problem. In 2E-LRP with a synchronization problem, the challenge is to synchronize the delivery schedule of CT and CF. The synchronization problem is considered an issue for implementing 2E-LRP, as CF cannot deliver the parcel to the customer if CT has not arrived on the satellite.

Among the mentioned variants of 2E-LRP, we consider the proposed 2E-LRP-MS is under the branch of the synchronization problem of 2E-LRP. In 2E-LRP-MS, CT and one or multiple CF should meet at a specific time at the same CP for parcel transfer. Additionally, the proposed 2E-LRP-MS can be considered a combination of 2E-LRP with the synchronization problem and the VRP with intermediate stops problem (VRPIS) (Schiffer et al., 2019). In VRPIS, the vehicle needs to stop at the intermediate stops for parcel replenishment (Cuda et al., 2015) or other activities, such as refueling or recharging (Schiffer et al., 2018). The routing problem for CF alone in 2E-LRP-MS is closer to the VRPIS problem because CF needs to stop at CP for the parcel replenishment. The synchronization issue in 2E-LRP-MS is mainly on meeting the requirement of CT and CF at CD or CP. In 2E-LRP-MS, a simultaneous routing solution for the delivering vehicles was proposed; thus, CF can replenish their parcels from mobile satellites en-route.

2.1 Moving facilities

In the literature, several studies were proposed to utilize mobile facilities for solving real-world problems. Pia and Filippi (2006) investigated the capacitated arc routing setting with the mobile depot (CARP-MD) to solve a real waste collection problem in Italy. The smaller vehicles collect wastes in the city and deliver them to the nearest larger vehicles outside the city. Appointments regarding the timing and locations are organized between smaller and larger vehicles. Hence, the larger vehicle is viewed as a moving depot that dumps its waste in the landfill. Another study regarding the moving depot is the capacitated arc routing problem with the refill point (CARP-RP) for the road network maintenance proposed by Amaya et al. (2007). The system of CARP-RP works with two types of vehicles: service vehicles and refill vehicles. The service vehicle is used for road surface construction, while the refill vehicle carries the needed materials. The refill replenishes the materials for the service vehicle one-on-one, and it returns to the depot after each rendezvous.

Although the proposed 2E-LRP-MS tries to attack the common issues in moving depot problems with CARP-MD and CARP-RP, our 2E-LRP-MS can be distinguished from the studies above under the following gaps. First, the objective of CARP-MD and CARP-RP is to minimize the routing costs, while the objective of 2E-LRP-MS is to reduce the total system cost, which includes the operating costs of facilities and vehicles and the traveling costs of the operated vehicles. Second, in CARP-MD and CARP-RP, the freight transferring process is based on a one-to-one pair configuration which means one \(1^{nd}\) echelon vehicle meets one \(2^{nd}\) echelon vehicle simultaneously. In comparison, 2E-LRP-MS aims to set up one \(1^{nd}\) echelon vehicle to simultaneously satisfy multiple \(2^{nd}\) echelon vehicles. Third, both CARP-MD and CARP-RP utilize larger vehicles in both echelons.

In contrast, 2E-LRP-MS utilizes small-capacity vehicles as the \(2^{nd}\) echelon vehicle, such as motorcycles or bicycles or wheeled trolley, which has higher mobility to adapt to the complicated city routing environment. Utilizing large vehicles as CF in the last-mile deliveries in a big city which is the main application of the proposed 2E-LRP-MS, is impractical because the larger CF lost its mobility when facing the traffic uncertainties and parking regulations in metropolises. Moreover, Yu et al. (2020) designed a two-echelon distribution considering third-party logistics and loading-unloading zones, 2E-OLRP. Although 2E-OLRP and the proposed 2E-LRP-MS shared a similar delivery system structure where no fixed satellite is needed, 2E-LRP-MS considers continual en-route routine trips of CF supported with replenishment by CT at multiple CP points. At the same time, CF of 2E-OLRP only takes one trip due to the task-based delivery by hiring third-party logistics.

2.2 Intra-route facility

In the literature, intermediate stop or moving and intra-route facilities are often ambiguously used. Schiffer et al. (2019) described an intermediate stop as an optional stop en-route to keep a vehicle operational and an intra-route facility as a facility planned at the same echelon as the customers, which is used to replenish specific resources to the operating vehicle. The moving facility study by Amaya et al. (2007) can also be seen as an intra-route problem, where the freight is conducted only between two different vehicles. Recently, Hof and Schneider (2021) investigated the intra-route resource replenishment with mobile depot under vehicle routing problem (VRPTWMD). Similar to the studies mentioned in this section, VRPTWMD uses the larger vehicle (TV) as the mobile depot to support the smaller vehicle (SV) for finishing delivery tasks. In VRPTWMD, TV is used for fueling or recharging and cargo loading for SV. The main differences in our work with VRPTWMD can be seen in the focus point of the study. The focus of VRPTWMD is the application of intra-route facilities, while in our work, the focus is on alternative facilities (CP) for cargo replenishing. Therefore when considering the objective, VRPTWMD is more focused on reducing the routing cost under time window constraints and the mobile depot concept. At the same time, our 2E-LRP-MS focuses on reducing the total cost occurring in the system, such as the cost of opening and maintaining facilities, the routing costs, and the cost of renting CP for cargo transferring.

It is worth mentioning that our work has a similar concept to the location routing problem with the intra-route facility (LRPIF) study (Schiffer & Walther, 2018). In LRPIF, the intra-route facilities are reserved for keeping the vehicle operational en-route. With this setting, LRPIF enables simultaneous decision-making on finding the optimum facility location for intra-route purposes and optimizing vehicle routing scenarios. In 2E-LRP-MS, the purpose of having CT as the mobile satellite can also be seen as the intra-route facility for keeping CF operational en-route. Indeed, we can spot multiple differences between our 2E-LRP-MS and LRPIF. In our case, 2E-LRP-MS maintains three primary nodes of 2E-LRP: MD, CD, and customers, plus one more node in the CD’s level, CP. Meanwhile, LRPIF is a one-echelon problem where it only contains two nodes: depot and customers. More on, in 2E-LRP-MS, it is most likely the cargo replenishment process happening at third-party CP; however, if the location of CD is more optimal than CP for the en-route cargo replenishment, in 2E-LRP-MS, it is also possible for CF to go back to CD for cargo replenishment. Compared to LRPIF, where the replenishment can only be performed at the intra-route facilities, 2E-LRP-MS has more flexibility in selecting capacities for cargo replenishment. Apart from the 2-echelon configuration, the flexibility advantage of 2E-LRP-MS over LRPIF also increases the problem complexity of 2E-LRP-MS itself.

2.3 Two-echelon routing problem with an unmanned aerial vehicle

In 2013, Amazon initiated using unmanned aerial vehicles (UAV) for parcel delivery. Since then, researchers have tried to model the delivery problem with UAVs. Among these studies, several methods are highly correlated to the proposed 2E-LRP-MS. For example, Wang et al. (2019) proposed a collaborative truck and drone model for parcel delivery. The trucks are used not only for delivering parcels but also for the moving depot for the drone. The UAV drones are used to pick up the parcels on the truck and deliver them to end customers. Liu et al. (2020) formalized the mathematical problem proposed by Wang et al. (2019), which named a two-echelon routing problem for parcel delivery by cooperated truck and drone (2E-RP-T &D) with different objectives. Wang et al. (2019) focused on minimizing the operational time, while Liu et al. (2020) focused on minimizing the routing cost. Moreover, Kitjacharoenchai et al. (2020) proposed the two-echelon vehicle routing problem with drones (2E-VRPD), which focuses on developing a routing model that considers the synchronized truck and drone for parcel delivery. Similar to Wang et al. (2019), Kitjacharoenchai et al. (2020) also focused on minimizing operational time.

There are notable differences between 2E-LRP-MS and 2E-RP-T &D or 2E-VRPD, mainly in the mathematical formulation and the feasibility of the last-mile delivery big city. First, the objective of 2E-RP-T &D or 2E-VRPD, respectively, is to minimize the routing cost and the operational time. Meanwhile, the objective of 2E-LRP-MS is to minimize the summation of (1) operating costs of CD and CP, (2) usage costs of vehicles and (3) routing costs. Second, in 2E-RP-T &D and the 2E-VRPD, the drones are assigned to a specific truck which means taking parcels from other trucks is forbidden. However, in 2E-LRP-MS, CF can take parcels from any CT based on the dynamic considerations of the optimized routing. Third, 2E-RP-T &D was designed for pair-wise truck and drone collaboration, while 2E-LRP-MS was designed for the more flexible CT and CF pairing. Fourth, Liu et al.’s, Wang et al.’s, and Kitjacharoenchai et al.’s works assume that the drones can replenish only at the customer nodes, but this setting might not be suitable for cargo transfer on land. Especially in a big city, cargo transferring might only be allowed at the designated locations (CP), which are the primary consideration of the proposed 2E-LRP-MS.

Regarding the feasibility of last-mile delivery in a big city, 2E-LRP-MS aims to resolve the high cost of operating satellites and the uncertainty of traffic conditions in metropolises. The drone delivery system requires the customer to have a specific parking space for the drone to land. The space for drone landing limits the feasibility of drone delivery in urban areas where landing space in skyscrapers and buildings with multiple stairs is scarce. Therefore, the drone delivery system is more suitable for last-mile delivery in suburban regions or the countryside, where the customers might have spaces for the drone to land. Lastly, although being widely discussed after Amazon’s initiative in 2013, to the best of our knowledge regarding parcel delivery, UAVs are not yet commercialized due to multiple issues. The main issue of the drone system is air regulation (Jones, 2017). In this research, we propose 2E-LRP-MS, which is more feasible to be adopted in metropolises for solving the last-mile delivery problem.

3 Two-echelon location routing problem with mobile satellites (2E-LRP-MS)

3.1 Assumptions and mathematical formulation

In the proposed 2E-LRP-MS, three types of facilities (MD, CD, and CP) are used, and two types of vehicles (CT and CF). The functions of the facilities are as the following: (1) MD is used as the central warehouse located far from the city and as the garage for CT, (2) CD is used as the replenishment points and garage for CF, and (3) CP is used as the intermediate facilities for cargo replenishment. In terms of routing, both CD and CP can be seen as the delivery points for CT, and the customers are the delivery points for CF. Note that unlike in CF’s routing, where a customer must be only visited once, CD and CP might be visited several times, as long as the routing solution can reduce the overall occurred costs. The vehicles used for CT usually have a relatively large capacity and mobility to move in the city center, such as panel vans, box trucks, and vans. Vehicles with smaller capacities, such as motorcycles or bikes, are used as CF to be in charge of the last-mile delivery. The cost structure of 2E-LRP-MS can be categorized as the following. First is the operating cost for facilities, in which the summation of all costs occurs when a facility is operated, such as establishing, renting, maintenance, and operating costs. Second is the vehicle cost, applied for both CT and CF. The third is the routing costs, which also apply to CT and CF.

The 2E-LRP-MS problem maintains the assumptions of the fundamental 2E-LRP problem, with five additional assumptions on the cargo transferring process. First, CF should only reload their cargo from CT at CD or CP. Second, one CT can satisfy several CF at the same time. Third, CT and CF will leave CD and CP at the same time. Fourth, to simplify the complexity of the problem, in this research, the travel time between two locations is assumed to be equal to the distance, commonly used in the literature (Kitjacharoenchai et al., 2020; Liu et al., 2020). Fifth, CT and CF should wait for each other whenever one arrives at CD or CP earlier. In a real-world scenario, CT may arrive at CP sooner than CF because CT only travels between CD and CP, while CF needs to visit multiple customers before visiting CP for cargo replenishment. This paper focuses on the fundamental issue in 2E-LRP-MS, which is to eliminate the usage of the fixed-location satellite and trade the cost with utilizing CP. Therefore, other additional topics, such as the penalty for the waiting time and the time-window constraints for delivery, are excluded. The exclusion of many variants in routing problems, such as those mentioned above, can help simplify the mathematical formulation. The standard mathematical formulation presented in the subsection is already very complex and hard to solve. The experimental results are further elaborated in Sect. 4.

3.2 Mathematical formulation

Table 1 lists the notations used in the mathematical formulation, including the sets, parameters, and variables. Equation (1) states the objective function of 2E-LRP-MS, which is to minimize the total costs, including facility, vehicles, and routing costs mentioned in the previous subsection. Here, multiple constraints are needed for cost optimization. Equation (2) stated as a constraint (2), counts the number of CF used and forces the used CF w to start from a particular CD. Constraint (3) limits CF to depart exactly from the currently visited node. Constraint (4) prohibits CF from visiting the non-operated CD or CP. Constraint (5) ensures that each customer is served only once. Constraint (6) guarantees CF ends at a dummy CD. Constraints (7)–(9) are similar to Constraints (2)–(4), except they are imposed on CT in the first echelon.

Table 1 Notation
$$\begin{aligned}{} & {} \hbox {min} \sum _{s \in S}H_{s}y_{s} + \sum _{p \in P}H_{p}y_{p} + \sum _{v \in V}H_{v}y_{v} + \sum _{w \in W}H_{w}y_{w} \nonumber \\{} & {} \quad + \sum _{(i,j)\in A^1}\sum _{v \in V}c_{ij}^1x_{ij}^v + \sum _{(i,j)\in A^2}\sum _{w \in W}c_{ij}^2x_{ij}^w \end{aligned}$$
(1)
$$\begin{aligned}{} & {} \sum _{i \in S}\sum _{j \in N^2}x_{ij}^w = y_{w} \quad \forall w \in W\end{aligned}$$
(2)
$$\begin{aligned}{} & {} \sum _{i \in N^2}x_{ij}^w = \sum _{k \in P \cup Z \cup S', k \ne i} x_{ki}^{w} \quad \forall j \in P \cup Z \quad \forall w \in W \end{aligned}$$
(3)
$$\begin{aligned}{} & {} \sum _{w \in W}\sum _{i \in N^2}x_{ij}^w \le y_{i} \quad \forall i \in S \cup P \end{aligned}$$
(4)
$$\begin{aligned}{} & {} \sum _{w \in W}\sum _{i \in N^2}x_{ij}^w = 1 \quad \forall j \in Z \end{aligned}$$
(5)
$$\begin{aligned}{} & {} \sum _{i \in S}\sum _{j \in P \cup Z}x_{ij}^w = \sum _{k \in P \cup Z}\sum _{l \in S'}x_{kl}^w \quad \forall w \in W \end{aligned}$$
(6)
$$\begin{aligned}{} & {} \sum _{i \in D}\sum _{j \in N^1}x_{ij}^v = y_{v} \quad v \in V \end{aligned}$$
(7)
$$\begin{aligned}{} & {} \sum _{j \in N^1, i \ne j} x_{ij}^v = \sum _{k \in N^1, k\ne i} x_{ki}^v \quad \forall i \in N^1 \quad v \in V \end{aligned}$$
(8)
$$\begin{aligned}{} & {} \sum _{i \in N^1}\sum _{v \in V}x_{ij}^v \le y_{i} \quad \forall i \in S \cup P \end{aligned}$$
(9)
$$\begin{aligned}{} & {} d_{i}x_{ij}^w - M(1-x_{ij}^w) \le f_{i}^w \quad \forall i \in Z \quad \forall j \in P \cup S' \quad \forall w \in W \end{aligned}$$
(10)
$$\begin{aligned}{} & {} f_{j}^w + d_{i}x_{ij}^w - M(1-x_{ij}^w) \le f_{i}^w \quad \forall i \in S \cup P \cup Z \quad \forall j \in Z \quad \forall w \in W \end{aligned}$$
(11)
$$\begin{aligned}{} & {} f_{j}^w + d_{i}x_{ij}^w - M(1-x_{ij}^w) \le K_{2} \quad \forall i \in S \cup P \cup Z \quad \forall j \in Z \quad \forall w \in W \end{aligned}$$
(12)
$$\begin{aligned}{} & {} \sum _{w \in W} f_{j}^w \le D_{j} \quad \forall j \in S \cup P \end{aligned}$$
(13)
$$\begin{aligned}{} & {} D_{j} \le K_{2} \quad \forall j \in S \cup P \end{aligned}$$
(14)
$$\begin{aligned}{} & {} D_{j} \le \sum _{i \in N^1}\sum _{v \in V} F_{ij}^v \quad \forall j \in S \cup P \end{aligned}$$
(15)
$$\begin{aligned}{} & {} F_{ij}^v \le M(x_{ij}^v) \quad \forall i,j \in N^1 \quad v \in V \quad i \ne j \end{aligned}$$
(16)
$$\begin{aligned}{} & {} \sum _{i \in N^1}\sum _{j \in N^1}F_{ij}^v \le K_{2} \quad \forall v \in V \end{aligned}$$
(17)

Constraint (10) states the total capacity left of CF after serving the last customer in the routing schedule. Constraint (10) also states the total capacity left of CF before reloading at CP if the customer is not the last-served customer. Constraint (11) calculates the total capacity left of CF after visiting every node, except the last customer before CP or dummy CD. Constraint (12) ensures that the total capacity left of each CF is lower than the capacity limit. Constraint (13) represents the total demand for all CD and CP. Constraint (14) guarantees that the total demand for each CD and CP is lower than the capacity limit. Constraint (15) forces the total load transferred by CT to CD or CP to be larger than the associated CD or CP demand. Constraint (16) ensures that the load transfer only occurs if the route is scheduled. In Constraint (17), the total load transferred to each CT cannot exceed the capacity limit of CT.

$$\begin{aligned}&t_{ij}^1x_{ij}^v + b_{i}^1 - M(1-x_{ij}^v) \le a_{j}^1 \quad \forall i \in N^1 \quad \forall j \in S \cup P \quad \forall v \in V \end{aligned}$$
(18)
$$\begin{aligned}&t_{ij}^2x_{ij}^w + b_{i}^2 - M(1-x_{ij}^w) \le a_{j}^2 \quad \forall i \in N^2 \quad \forall j \in P \cup Z \cup S' \quad \forall w \in W \end{aligned}$$
(19)
$$\begin{aligned}&a_{j}^2 \le b_{j}^1 \quad \forall j \in S \cup P \end{aligned}$$
(20)
$$\begin{aligned}&a_{j}^1 \le b_{j}^1 \quad \forall j \in N^1 \end{aligned}$$
(21)
$$\begin{aligned}&a_{j}^2 \le b_{j}^2 \quad \forall j \in N^2 \end{aligned}$$
(22)
$$\begin{aligned}&y_s = [0,1] \quad \forall s \in S \end{aligned}$$
(23)
$$\begin{aligned}&y_p = [0,1] \quad \forall p \in P \end{aligned}$$
(24)
$$\begin{aligned}&y_v = [0,1] \quad \forall v \in V \end{aligned}$$
(25)
$$\begin{aligned}&y_w = [0,1] \quad \forall w \in W \end{aligned}$$
(26)
$$\begin{aligned}&x_{ij}^v = [0,1] \quad \forall i \in N^1 \quad \forall v \in V \end{aligned}$$
(27)
$$\begin{aligned}&x_{ij}^w = [0,1] \quad \forall i \in N^2 \quad \forall w \in W \end{aligned}$$
(28)
$$\begin{aligned}&a_{i}^e, a_{i}^e \ge 0 \quad \forall i \in N^e \quad \forall e \in E \end{aligned}$$
(29)
$$\begin{aligned}&F_{ij}^v \ge 0 \quad \forall (i,j) \in N^1 \quad \forall v \in V \end{aligned}$$
(30)
$$\begin{aligned}&f_{i}^w \ge 0 \quad \forall i \in N^2 \quad \forall w \in W \end{aligned}$$
(31)
$$\begin{aligned}&D_{i} \ge 0 \quad i \in S \cup P \end{aligned}$$
(32)

Constraints (18) and (19) are the time calculation constraints in the second and first echelons. Constraint (20) ensures a CT can only leave a CD or CP after all the associated CF has arrived. Constraint (21) and Constraint (22) ensure that all arrival times at a particular node should be earlier than all CF and CT departure times, respectively. Constraints (23)–(32) are non-negative constraints for the involved variables.

3.3 Clustering-based neighborhood search

The typical 2E-LRP can be considered an NP-hard problem due to the complexity of its facility location and routing problems. The proposed 2E-LRP-MS, which integrates the synchronization (Mirhedayatian et al., 2019) and intermediate stops (Schneider et al., 2015) problems with the original 2E-LRP model, further escalates the complexity. Therefore, the proposed 2E-LRP-MS can be considered a more complex and challenging optimization problem than the typical 2E-LRP and VRP. In this work, we propose an efficient algorithm to solve 2E-LRP-MS, named CSNS.

In this paper, a mathematical formulation for the proposed 2E-LRP-MS is presented and validated by using CPLEX. Also, a heuristic method named the clustering-based and simultaneous neighborhood search (CSNS) is proposed to solve the 2E-LRP-MS efficiently. The CSNS method applies the FPS selection and k-means clustering method for selecting and optimizing the locations for the facilities, such as the satellites and CP. The simultaneous neighborhood search (SNS) procedure is utilized to generate the 1st and 2nd echelon routes. The SNS procedure generates a routing solution by initially performing two neighborhood searches simultaneously and then connecting the solutions into one by appending the reversed routing order of the second solution to the first solution. Finally in CSNS, the routing solutions are further optimized by applying four local search algorithms, named \(self_{insert}\), \(self_{swap}\), \(peer_{insert}\) and \(peer_{swap}\).

figure a

Algorithm 1 shows the pseudocode of our proposed CSNS method. As in Algorithm 1, the proposed CSNS method can be considered a two-stage search process. The first stage aims to initialize and optimize the locations of CD and 2nd echelon routes based on the costs of opening CD and operating CF. At every searching iteration, the steps of the proposed method can be seen summarized into four: #1) Select CD locations, #2) generate 2nd echelon routes based on the selected CD, #3) Select CP locations as the replenishment points, and #4) generate 1st echelon routes based on the selected CD and CP locations. Parameter \(h_{max}\) and \(g_{max}\) control the optimization process of the second echelon routes and CD location, and parameter \(it_{max}\) identifies how many times the searching need to be repeated from the beginning. The following paragraphs explain the detailed process of the four steps above.

3.3.1 FPS for CD selection

The initialization phase starts with setting up the routing of the second echelon (CF) because the daily delivery points of customers might change. As mentioned earlier, the second echelon consists of CD selection and route generation of the second echelon vehicles. Naively speaking, if calculating all possible routing costs once a location is assigned for a CD, then the selection process will be a deterministic problem. However, calculating all the possible routing sequences becomes very costly and impractical due to the dynamic of the system parameters, such as the associated number of CF assigned for the location of that particular CD. The distance from the potential customers to the selected location is complicated to be optimized (Crainic et al., 2010). Therefore, to resolve this issue, in the proposed CSNS method, the CD selection is designed as a probabilistic selection inspired by the FPS or roulette wheel selection in the Genetic Algorithm (Goldberg, 1988).

Let \(H_{s}\) and \(f_{s}\) be the fixed operation cost of CD and the fitness of selection of CD s, respectively, where \(f_{s}=1/H_{s}\). The reciprocal relationship between \(f_{s}\) and \(H_{s}\) means a CD with higher \(H_{s}\) has lower fitness \(f_{s}\). Then, the selection process can be performed through the following orders. #1) compute the probability of a location being selected for CD s, \(p_{s}=f_{s}/(\sum _{s \in S}f_{s}), s=1,\ldots ,S\), where S is the number of possible locations. #2) calculate the cumulative probability distribution over the list of potential locations using the \(p_{s}\). #3) generate a uniform random number that follows  U(0, 1). #4) select the corresponding location s to the generated random number as the CD location and opt for the selected location out from the potential CD locations. #5) redo the process from #1) to #4) until the required number of CD is reached.

The selection based on opening cost would favor the cheaper CD over the more expensive one. In CSNS, a more expensive CD can be selected over the cheaper one if it can cover the cost difference with higher savings on routing costs. For example, a more expensive CD close to delivery points might have a lower summation of opening and routing costs than a cheaper CD located far from delivery points. In Algorithm 1, the consideration of optimizing the CD locations is on line #13.

3.3.2 SNS for route generation

In the proposed CSNS method, the routes were generated using the SNS technique. Essentially, the SNS algorithm searches out the two closest destinations and assigns them for the head and tail of a route. The possible destinations are further selected according to the nearest neighborhood search algorithm, where the selection priority is given to the closest one. Figure 2 illustrates an example of the route generation in CSNS method.

Fig. 2
figure 2

Route generation in CSNS

In Fig. 2, the square and circles represent the satellite and customers, respectively. Assume that in this situation, we only have one CF. Then, the route generation starts with two neighborhood searches from the satellite to the closest two customers (left-hand side). Next, more customers are added to the routes based on the distances to the current delivery point. Since it is a neighborhood search, the closest customer will be assigned to the route until all customers are visited. Last, the generated routes are combined into one single route, where the sequence order of the second route is reversed (right-hand side figure). For example in Fig. 2, the search process generates two routes: \(s_{1}-c_{5}-c_{3}-c_{6}\) and \(s_{1}-c_{4}-c_{2}-c_{1}\) and finally, the two routes are linked to produce route \(s_{1}-c_{5}-c_{3}-c_{6}-c_{1}-c_{2}-c_{4}-s_{1}\).

Once the CP selection process is completed, then the route generation for CT can be performed. Essentially, the route generation is based on the visiting sequences of CF to the satellites and CP. Suppose a CF route is generated at stage 1 with the following sequence: \(s_{1}-c_{1}-c_{2}-p{1}-c_{3}-p_{2}-c_{4}-p_{3}-c_{5}-c_{6}-s_{1}\). It also means the route of CT is \(d_{1}-s_{1}-p_{1}-p_{2}-p_{3}-d_{1}\), assuming CT start from depot \(d_{1}\). This search process also considers the capacity constraint; therefore, CT ends its route if its remaining capacity is insufficient to serve the next CP. The search process ends after all operating satellites and CP are served.

3.3.3 Local search algorithms for route optimization

The application of the SNS technique in generating routes might give a relatively optimum solution compared to other common techniques. However, since the method does not scan the possible solutions exhaustively by the brute force approach, the provided solution might not be optimal. Therefore, optimizing the initial solution generated from the SNS technique is important. We applied the widely known local search algorithms (Cordeau et al., 2007) for the optimization. The four local search algorithms applied in CSNS are \(self_{insert}\), \(self_{swap}\), \(peer_{insert}\) and \(peer_{swap}\).

Fig. 3
figure 3

An illustration of the four heuristic methods

For a single solution of a route, Figure (a) shows “insert” operation where customer \(c_{5}\) is randomly selected and inserted back to the route in a different order, and Figure (b) shows “swap” operation where customer \(c_{3}\) and \(c_{1}\) are randomly selected and swapped. Figure (c) and Figure (d) shows \(peer_{insert}\) and \(peer_{swap}\) operations, respectively, when two solutions involved. In Figure (c), customer \(c_{5}\) is opted out in the first solution and is inserted into the second solution randomly. In Figure (d), customers \(c_{5}\) and \(c_{9}\) from two solutions are swapped. For all the procedures, if the modified solution(s) provides a lower total cost than the old solution(s), the old solution(s) will be replaced by the modified solution(s). Any iteration contains four procedures, and the solutions involved in the procedures are selected randomly.

3.3.4 k-means clustering algorithm for CP selection

The solution generation process for the second echelon mentioned above does not consider the vehicle capacity. Ideally, in 2E-LRP-MS, CF might need to stop by CP for replenishment before it can continue the delivery. Therefore, selecting CP locations is crucial to ensure the feasibility of the generated solutions. Technically, a long routing solution can be split into several sub-routing solutions by inserting CP as the cutting point. Inserting CP also means we want to ensure that the summation of the carried parcels in each sub-routine solution is within CF capacity. For this task, we apply the k-means clustering technique, where the instances are the last and feasible delivery points of multiple CF and the current CT locations, with k equal to nCT.

Fig. 4
figure 4

k-means clustering for selecting CP location

Figure 4 illustrates CP insertion procedure. Figure 4a shows four optimized CF routes (#1–#4) obtained from figure. Assuming that the number of items to deliver in each route exceeds the capacity limit, the generated routes might not be feasible due to capacity constraints. For example, CF in route #1 starts from \(s_{1}\), and its capacity can only be used for serving \(c_{3}\) and \(c_{6}\) in one trip. The same situation also happened in routes #2–#4. Let \(c_{6}\), \(c_{7}\), \(c_{12}\) and \(c_{15}\) be the last customers for route #1, #2, #3, #4, respectively, which are face-bolded in Fig. 4a. Assume that nCT for the example above is 2; we will perform k-means clustering with \(k=2\) to find the best location for CP. The objective of k-means clustering algorithm is to find the optimal k cluster centroids so that the distances between the cluster members and the centroids can be minimized. In our case, the cluster members are the last CF and CT coordinates, and the centroids will be the next CP location. Therefore, applying the k-means clustering algorithm can help find a better location for CP to reduce the travel distances of CT and CF. Note that the geometry location of two centroids might not be listed in the feasible locations for CP based on the city regulation. Therefore, two-nearest CP to the centroids will be assigned. Assume \(p_{1}\) and \(p_{2}\) are the two geometrically closest feasible CP location to the centroids, then \(p_{1}\) and \(p_{2}\) will be the next CP location, as indicated as \(p_{1}\) and \(p_{2}\) in Fig. 4b.

4 Numerical experiments and results

4.1 Setup

This section evaluates the proposed CSNS against CPLEX (version 12.8) and LNS-2E (Breunig et al., 2016) on our proposed instances based on Prodhon’s LRP-2E instances. We keep all the information in the dataset by adding locations for CP. We formulated the MILP formulation in AMPL and coded LNS-2E and the proposed CSNS in Python programming language. The experiments were conducted using a computer with a Hexa-core CPU of 3.20 GHz and 32 GB of RAM. We give each search a time limit of 8 h for each running. We assume that the 8 h limit is enough to justify the performance, as other researchers usually only allocated 4 h or less to run CPLEX in literature (Yu & Lin, 2015; Schneider et al., 2015; Wassan et al., 2017; Pichka et al., 2018).

We consider LNS-2E (Breunig et al., 2016) as the benchmarking model because of its simplicity and also its promising performances against more complex metaheuristic methods, such as hybrid greedy randomized adaptive search procedure (GRASP) and variable neighborhood descent (VND) (Zeng et al., 2014), adaptive large neighborhood search (ALNS) (Hemmelmayr et al., 2012), and variable neighborhood search for 2E-LRP (VNS-2E-LRP) (Schwengerer et al., 2012). LNS-2E is a relatively simple heuristic method consisting of neighborhood search and multiple destroy and repair procedures for optimizing the generated solution. In our experiments, we reconstruct LNS-2E to fit 2E-LRP-MS problem characteristics. We keep the flowchart, neighborhood search, and solution optimization of LNS-2E. For the procedures for opening and closing satellites, in our code, we expand the selection to not only covering CD but also CP. We assume our changes do not change the essence preserved in LNS-2E but, simultaneously, enable LNS-2E to solve 2E-LRP-MS.

4.2 Parameter configuration

In the proposed CSNS heuristic method, three initial parameters nCT, nCF, and I are required. In this research, a sequential optimization method (Grangier et al., 2016) was used to select the proper nCT and nCF parameters based on the total cost in Eq. 1. Suppose the current best solution is obtained by using \(n+1\) CT. If using n CT can lower the total cost, then the solution n CT replaces solution \(n+1\) CT as the current best. The searching process keeps iterating 30 times, and the final result will be used as the nCT. The next step is to perform the same searching procedure to find the best n for nCF. This searching process will result in a set of nCT and nCF that provide the lowest possible costs.

In this study, a simulation series was conducted for each experimental instance. No less than 30,000 simulations were run to find the best parameter configuration for nCT and nCF, which is exhaustive. For parameter I, multiple simulations were conducted according to the problem complexity based on the number of customers, from 20 to 200. Figure 5 shows the effect of increasing parameter I on the cost reduction and the computational time increment. Figure 5 shows four problem sizes from 20 to 200 customers indicated by four lines with different colors. Six dots for each line (customer size) represent the value of I starting from 10 to 60 with ten increments. The x-axis and y-axis in Fig. 5 are the total cost reduction and computational time increment in percentage, respectively.

Fig. 5
figure 5

The effect of increasing parameter I in multiple problem sizes

Generally, as shown in Fig. 5, increasing the parameter I can reduce the cost and increase the computational time for each case. However, the level of cost reduction with the larger I is insignificant. For example, in the 50-customer case (orange line), compared to the \(I=10\) case, the cost reduction was 2.14%, and the computational time increment was 240%. If parameter \(I=60\), the cost reduction was 3.24%, and the computational time increment was 732%. Setting the higher number for parameter I will reduce the cost; however, this case is not practical in computational time. In this research, the optimal number of I considering both the cost reduction and computational time increment was indicated as bold-face numbers in Fig. 5. This selected I effectively reduces cost without drastically increasing the computational time. Note that the exhaustive experiments above aim to find the best nCT and nCF for each problem instance. In reality, the logistic companies might have a set of fixed nCT and nCF. Therefore in the application, it is not necessary to simulate experiments to optimize nCT and nCF. The computational time required to run CSNS when nCT and nCF are fixed, is reported in Table 2.

4.3 Experimental results

The comprehensive results on the modified Prodhon’s benchmark instances are summarized in Table 2. For each instance, both LNS-2E and CSNS were run 30 times to ensure the reliability of the results. In Table 2, column “Instance” shows the instance name, where letters C, S, and P and the number associated with the letters afterward indicate the number of customers, CD, and CP, respectively. The last letter of instance represents problem variations. In the end, instances with the letter “b” have larger CF capacity than instances without the letter “b”. For example, C20-S5-P5-1b represents a problem with 20 customers, 5 CD, 5 CP, and larger vehicles for CF. Column of \(z_{min}\) shows the best solution obtained using each method. For LNS-2E and CSNS, columns \(z_{\mu }\) and \(t_{\mu }\) report the average results and computational time of 30 runs. Also, columns \(z_{sd}\), \(t_{sd}\), and \(gap (\%)\) in CSNS show the standard deviation of results and computational time to show the stability of CSNS, respectively, and the percentage of the relative gap of the best solution obtained by CPLEX and the proposed CSNS method. The gap is calculated as the differences of \(z_{min}\) results between CPLEX and CSNS divided over the \(z_{min}\) result of CSNS. The lower the gap, the closer the solutions from the CSNS method to the solutions obtained from CPLEX. Note that when the problem complexity escalates with the more significant problem, the CPLEX solver cannot obtain the result within 8 h, as denoted by the “N/A” result.

Table 2 Results on benchmark instances

In instances with 20 customers, the performance gaps between CPLEX and the proposed CSNS method are relatively small, between 0.00%, for C20-S5-P5-2 and 3.48% for C20-S5-P5-1b. For the instances with 50 customers, CPLEX failed to converge for the non “b” instances. For C50-S5-P10-1b and C50-S5-P10-2b, the performance gaps between CPLEX and CSNS are 3.11% and \(-0.04\)%, respectively. The negative gap means CSNS can find a better solution than CPLEX. Also, CPLEX cannot converge within 8 h of searching for instances with more delivery points. Our finding is consistent with the literature. In (Mirhedayatian et al., 2019), CPLEX could not solve 2E-LRP with synchronization problems with more than 40 customers. As noted in the literature review, the complication of 2E-LRP-MS is a combination of 2E-LRP with a synchronization problem (Mirhedayatian et al., 2019) and VRPIS (Schiffer et al., 2019), leads to the unsolvable for CPLEX. Meanwhile, the proposed CSNS method can obtain the solutions of all instances and perform fast searching. The longest average processing time is 73.39 s for C200-S10-P10-1.

Different from CPLEX, LNS-2E can find feasible solutions for the instances within the time limit. In terms of the solution quality, CSNS outperforms LNS-2E in both \(z_{\textrm{min}}\) and \(z_{\mu }\). The differences in smaller instances are relatively small, and the differences keep higher in larger instances. CSNS is also a faster heuristic method compared to LNS-2E. Similar to the gap in solution quality, the gap in computational time between LNS-2E and CSNS is relatively lower in smaller instances and higher in larger instances. For example, in instances C20-S5-P5-1, C50-S5-P10-1, C100-S5-P10-1, and C200-S10-P10-1, CSNS is 1.97, 2.93, 5.62, and 6.79 times faster than LNS-2E, respectively. With such a short computational time, the CSNS method can be considered for implementing a mobile system, where the routing model can be adjusted over time depending on the traffic condition. In general, according to the performance gap in searching quality and computational time against CPLEX and LNS-2E, the proposed CSNS method can be considered a promising method for solving 2E-LRP-MS.

4.4 Cost analysis of 2E-LRP-MS

This section compares the trade-off between facility operation cost (CO) and routing costs (CR) in 2E-LRP-MS. For each method and instance, the experiments were performed 30 times, and only the best solution is reported, and the summarized results can be found in Table 3. The column “Instance” indicates the instance name, columns “2E-LRP” and “2E-LRP-MS” represent the results of GRASP-LP and CSNS, respectively, and column “Gap” shows the cost gap between 2E-LRP-MS and 2E-LRP. The positive value in column “Gap” means the cost of 2E-LRP-MS is lower than the cost of 2E-LRP by the indicated percentage. Sub-columns “TC” presents the total cost; “CO” shows the summation of facility operation cost and the usage costs of vehicles; “CR” reports the summation of CT’s and CF’s routing costs. Also, note that “CO” in 2E-LRP only includes the operating cost of a fixed satellite.

The baseline model for cost analysis is the greedy randomized adaptive search procedure with a learning process (GRASP-LP) (Nguyen et al., 2012) on Prodhon’s 2E-LRP instances. Because both methods have different objective functions, a particular assumption should be made. For example, in 2E-LRP-MS, there is a cost structure of operating CP, while this cost structure is not presented in 2E-LRP.

Table 3 Cost analysis of 2E-LRP-MS relative to 2E-LRP

As shown in column “Gap” in Table 3, in general, the 2E-LRP-MS model has the lower total cost in all instances, varying from 0.6% in instance 50-5-1 and 50-5-1b, to 24.4% in instance 200-10-1b. It is also interesting to show that the TC of 2E-LRP-MS against 2E-LRP increases along with the problem complexity. The TC gap in small instances (20 and 50 customers) is between 0.6 and 10.1%, while in medium instances (100 customers), the CT gap is more extensive, ranging from 9.6 to 18.4%. Furthermore, for large instances (200 customers), the CT gap is even more significant, from 16.6 to 24.4%. Based on these results, it seems 2E-LRP-MS is more cost-efficient than 2E-LRP in large problems with numerous customers.

Fig. 6
figure 6

The percentage of saving on operating and routing cost of 2E-LRP-MS over 2E-LRP

Figure 6 further illustrates the gap of CO and CR between 2E-LRP-MS and 2E-LRP based on the selected instances listed in Table 3. The solid-blue and dashed-orange lines represent the CO and CR cost gap between 2E-LRP-MS and 2E-LRP, respectively. As shown in Fig. 6, the gap of CO is increased, while the gap of CR has an opposite trend along with larger problem complexity. For small instances, the gaps between CO and CR are from \(-10.7\) to 21.4%, and from 2.2 to 11.0%, respectively. It implies that 2E-LRP-MS outperforms 2E-LRP in terms of lower routing costs and maintains lower total costs.

When the problem enlarges, 2E-LRP-MS tends to save more on the operating cost by sacrificing the routing cost. For medium and large instances, the gap of CO increased from 14.8 to 40.9%, and 44.3 to 55.1%, respectively. Meanwhile, the gap of CR in medium and large instances decreased from 8.5 to \(-20.7\)% and from \(-1.5\) to \(-30.9\)%, respectively. It also implies that, under the superior total cost saving of 2E-LRP-MS, 2E-LRP-MS saves more operating costs to compensate for the needed routing cost when the number of customers increases. This performance characteristic of 2E-LRP-MS mainly benefits in the last-mile delivery of a large city where many customers generate a tremendous number of delivery points required to visit door by door. Escaping the high operating cost of establishing the satellites in a big city, 2E-LRP-MS can invest more in saving the routing cost by equipping the vehicles with better mobility and eco-friendly.

4.5 Sensitivity analysis

Sensitivity analyses were conducted to evaluate the impact of six procedures of the proposed CSNS method. The procedures are including FPS for selecting and optimizing CD, four heuristic route optimization procedures, \(self_{insert}\), \(self_{swap}\), \(peer_{insert}\) and \(peer_{swap}\), and k-means clustering for CP selection. Each of the six procedures of the CSNS method was disabled once a time. The cost gap of over 30 runs was reported for all instances. The results of the sensitivity analyses are summarized in Table 4. Column “Instance” lists the codes for the instances. Column “Base” shows the results of the CSNS method without disabling any procedure in solving 2E-LRP-MS instances. Column “Gap (%)” shows the cost increase in percentage if one mentioned procedure of the CSNS method is disabled.

Table 4 Sensitivity analysis and the contribution of individual components

As shown in Table 4, all of the six tested procedures contributed to reducing the total cost of the proposed CSNS method. Notably, the FPS procedure for the CD selection plays the most significant role in the CSNS method. When conducting “No FPS” experiments, all CDs were given the same weight for the selection, increasing the chance of selecting the more expensive CD. As a result, the total cost increased by 5.98% on average. Interestingly, the FPS procedure has a lower impact on the small instances than on the larger instances, by the cost gap of 0.23% to 5.44%. In large instances, the cost gaps of not using the FPS procedure were from 6.03 to 15.05%. This finding reveals that the FPS procedure works well in complex problems, which prevail in today’s last-mile industry.

The second most important procedure in CSNS is the k-means clustering method for CP selection. The k-means clustering method considered the current CT and CF locations in determining the best-fit CP locations. If we skip the k-means clustering, the solution quality deteriorates by 5.28% on average in all instances. Disabling the other four local search algorithms: \({\textit{self}}_{{\textit{insert}}}\), \({\textit{self}}_{{\textit{swap}}}\), \({\textit{peer}}_{{\textit{insert}}}\) and \({\textit{peer}}_{{\textit{swap}}}\) will result in an increase in total cost by 2.81%, 2.77%, 3.95% and 4.51% respectively. These findings show that optimizing the routes in the second echelon is important, as these routes affect the selection of the satellites, CP, and the routes in the first echelon.

The sensitivity analysis reveals the impact of each component in CSNS on the total cost. All six main components, FPS for CD selection, k-means clustering algorithm for CP selection, and four local search algorithms for optimizing the routing solution, are essential in reducing the total cost. First, in the FPS procedure of CSNS, cheaper facilities are given higher priority to be selected; however, the decision of keeping or changing the facilities depends on the summation of facility and routing costs. For example, a more expensive facility might be selected over the cheaper one if the selection can reduce the routing cost significantly. Therefore, compared to the equal selection probability, such as in LNS-2E, the FPS procedure can help find more optimum solutions. Second, the k-means clustering algorithm helps find a better CP location by minimizing the routing costs. In the literature, the typical main objective of most routing problems is to minimize the routing costs. When doing en-route logistics of multiple delivery vehicles, finding the optimum restocking point is essential so that the delivery vehicles do not need to travel far away.

In CSNS, we applied the k-means clustering algorithm to find k centroid points, connecting the last coordinate of vehicles before and after en-route replenishment. Following the k-means clustering algorithm objective, the centroid points are desired to have lower distances to their cluster members. Thus, the presence of a clustering algorithm is essential in CSNS to further lower the routing costs. As shown in Table 4, changing the k-means clustering algorithm with a random selection can reduce the solution’s quality by 5.28% on average. Last, the local search algorithms can further optimize the costs by improving the routing scenario obtained from the SNS method. Essentially, there are a lot of local search algorithms for route optimization; however, in this research, we consider four local search algorithms applied in the proposed CSNS due to the algorithm’s simplicity and proven performance in optimizing routing solutions generated from neighborhood search (Cordeau et al., 2007). In general, the presence of the three critical components discussed above is essential in CSNS to generate solutions with lower costs and computational time for solving 2E-LRP-MS.

4.6 Discussion

Figure 7 illustrates the different vehicle types, mobility, and associated capacity. Mobility and capacity are the trade-offs when selecting CF for city logistics. Facing traffic congestion in a big city, the logistic service providers often utilize high mobility vehicles, such as CF, to reach customers, such as motorcycles or cargo bikes, which have a low capacity for carrying goods (Melo & Baptista, 2017). During peak traffic hours, these vehicles have more mobility than cars or trucks because they can easily pass through the traffic, while a car or truck may get stuck. However, the consequence of utilizing a small-capacity vehicle is the higher frequency of cargo replenishing. Although CF needs frequent cargo replenishment due to its small capacity, the travel distance can be reduced by having more options for the replenishment point. In the proposed 2E-LRP-MS, numerous pay-per-use locations as replenishment points (CP) are introduced to reduce the routing cost of CF. With this advantage, CF can perform cargo replenishment at the nearest CP by paying fees for using the facility. The locations for CP can be adjusted according to the dynamic routing situation in the city. This improvement also contributes to reducing the routing cost in the proposed 2E-LRP-MS.

Fig. 7
figure 7

The relation of the capacity and the mobility of various city vehicles

Another potential cost-savings of switching the delivery model from 2E-LRP to 2E-LRP-MS is reducing satellite operating costs. Assuming that having fixed-location satellites in a large city is an expensive investment, 2E-LRP-MS proposed reducing operational costs by introducing the pay-per-use CP. Although two additional costs occurred in the 2E-LRP-MS model: (1) the pay-per-use cost of using CP, (2) the higher routing cost of CT, as CT needs to travel more replenishing CF, in general, the total cost saving can compensate for the occurred cost.

In many cities, how maintaining sustainable urban freight transport is an important issue. He and Haasis (2020) proposed a theoretical research framework for future sustainable urban freight transport for intelligent cities. They considered several distribution innovations such as electric vehicles, cargo-bike, and mobile depots in last-mile delivery were announced to improve sustainability in terms of air pollution or traffic congestion. Those innovations can be integrated with the design of 2E-LRP-MS to reduce the total cost with the environmental-friend CF routing. Although the regulation of loading and unloading is strict in the urban area, utilizing the temporary paid loading zone, the feasibility of 2E-LRP-MS is promising.

5 Conclusion

This paper proposed 2E-LRP-MS, a new variant of the 2E-LRP that considers CT as the mobile satellite to trade the cost of using fixed-location satellites with the more flexible third-party parking lots (CP). In 2E-LRP-MS, CT are allowed to stop by at multiple CP in the city to replenish CF en-route. The CT keep moving between CP to serve CF, while the CF deliver the parcels to the customers and replenish from CT at CP.

This paper formulate 2E-LRP-MS as an optimization problem, where the objective is to minimize the summation of facility and routing costs. The proposed mathematical formulation offers flexibility in the routing schemes by allowing CF to be replenished en-route by CT, and indeed, this flexibility also increases the complexity. Therefore, this paper proposes a new optimization method for solving the complex 2E-LRP-MS, named CSNS. Notably, our proposed CSNS has multiple uncommon yet innovative approaches for routing problems, such as the probabilistic mechanism and k-means clustering algorithm for facility selection and proposed simultaneous neighborhood search to generate the routing solution. The proposed CSNS was compared with the optimization solver CPLEX and the state-of-the-art method for solving the two-echelon routing problem, LNS-2E, on the proposed 2E-LRP-MS instances.

The results show that both LNS-2E and our CSNS can find feasible solutions, while CPLEX fails on larger instances. Notable, CPLEX cannot solve the large instances within 8 h, and the proposed CSNS method can still provide feasible solutions. More on, our CSNS is more efficient in larger instances than CPLEX and LNS-2E. The cost saving of CSNS compared to CPLEX and LNS-2E is small in smaller instances and large in larger instances. Regarding computation, our CSNS is significantly faster than both CPLEX and LNS-2E. The computational efficiency of the proposed CSNS is the main advantage when the cost gap compared with CPLEX and LNS-2E is limited.

The experimental results on the benchmark instances also showed that adopting 2E-LRP-MS over the 2E-LRP model for the last-mile delivery case can help reduce the total cost by 0.6–24.4%. Again, the cost reduction is limited on small instances (up to 50 customers) and large on large instances (200 customers). Considering the complexity of the last-mile industry in large cities, which usually have numerous customers to be served, the 2E-LRP-MS can be considered a promising alternative to the commonly used 2E-LRP for solving the last-mile problem.

There are several directions to pursue this topic further. First, we consider developing metaheuristic-based methods such as simulated annealing or tabu search to improve the solution quality. The second is to develop an extension model by considering the cost of waiting for both CT and CF at CP. Lastly, a multi-objective 2E-LRP-MS can be studied to investigate the impact of the number of CP locations involving third-party on-demand LSP.