A note on the hierarchical multi-switch multi-echelon vehicle routing problem

This paper introduces the Hierarchical Multi-Switch Multi-Echelon Vehicle Routing Problem, a new variant of the well-known Vehicle Routing Problem. It is a real-world problem originating from the policies of a Nordic distribution company. The problem includes a single depot, a non-predetermined hierarchy of intermediate facilities, and two different fleets, consisting of homogeneous original and homogeneous local vehicles, which are pulling swap-bodies. Original vehicles with attached swap-bodies depart from the central depot. They can either visit customers directly if only one swap-body is attached or visit one or two consecutive switch points in order to transfer one or two loaded swap-bodies to a corresponding number of local vehicles, which are subsequently routed to customers while the original vehicle itself proceeds to serve customers with the remaining loaded swap-body. A mixed-integer formulation of the problem is proposed. A short bibliographic review, relations, shared characteristics, and differences of the proposed variant and several known VRP variants are analyzed and discussed. The solution of an illustrative instance is presented in order to demonstrate the solution concept for the problem as well as to compare with solution concepts for previously stated VRP variants. Computational experiments on small instances that could be solved within one hour are also presented. The problem is computationally hard to solve. Thus, the development of heuristics and metaheuristics is an important future task in order to enable solution of real case instances or instances of realistic sizes.


Introduction
The vehicle routing problem (VRP) in its classical setting involves finding the optimal delivery routes originating from a central depot for a fleet of homogeneous vehicles, each of limited capacity, so as to minimize the total distance traveled. In this paper, a new version of the VRP, originating from the policies of a Nordic distribution company, is presented, its mathematical programming model is developed, and its relations to other, previously stated VRP variants are analyzed and illustrated. In the situation considered, in addition to the central depot, there is a non-predetermined hierarchy of intermediate facilities, called switch points, and instead of one fleet, fleets of vehicles consisting of two kinds of vehicles: original vehicles belonging to the central depot and local vehicles belonging to the switch points. Original vehicles have the capacity to carry up to three swap-bodies, while local vehicles have restricted capacity to one swap-body.
Original vehicles with loaded swap-bodies depart from the central depot and can -Either visit customers carrying just one loaded swap-body, or -Visit one or two consecutive switch points in order to transfer one or two loaded swap-bodies to the corresponding number of local vehicles which are subsequently routed to customers while itself may well proceed to serve customers with one loaded swap-body Every route servicing customers thus corresponds to one vehicle, be it local or original, with exactly one swap-body. In this setting, a hierarchical structure of central depot, switch points, and customers is imposed. All customers must be served, each by exactly one vehicle carrying exactly one swap-body. Each route terminates at its starting point, which may be the central depot, a switch point at the first level of the hierarchy, or a switch point at the second level of hierarchy. Since the supply network considered is also divided into echelons containing the central depot, the switch points, and the customers, we have chosen to address this new variant of VRP as the Hierarchical Multi-Switch Multi-Echelon Vehicle Routing Problem (HMSME-VRP). The described problem bears some resemblance and shares some characteristics with two other VRP variants, -The two-echelon VRP (2E-VRP), and -The truck and trailer routing problem (TTRP).
However, as far as we know, this is a new and different problem, distinct in several aspects: 1. The 2E-VRP does not allow upper-level vehicles to continue from an intermediate facility to serve customers at the lower level. 2. Unlike the 2E-VRP, customers can be served directly from the central depot. 3. The TTRP and its extensions include only one fleet of homogeneous vehicles, all originating from the central depot. In addition, swap-bodies cannot be transferred between vehicles.
The rest of the paper is organized as follows: Since there are no previous studies on HMSME-VRP, in Sect. 2, we briefly review the literature on the related problems of 2E-VRP and TTRP, further discussing shared and non-shared characteristics. In Sect. 3, the problem is stated formally, and a mixed integer programming model is developed and explained. In Sect. 4, an illustrative example is given to demonstrate the solution of the problem and discuss its relation to other, previously stated VRP variants. In Sect. 5, a set of small instances are solved to demonstrate the difficulties in solving the problem. Lastly, we conclude the paper in Sect. 6 and propose several directions for future research.

Comparative literature review
This section reviews the literature on problems that bring similarities to the HMSME-VRP, namely the 2E-VRP and the TTRP. The 2E-VRP is concerned with a situation in which goods are delivered to intermediate facilities, called satellites, stored or consolidated, and transferred to other vehicles before being shipped to their final destination [5]. The satellites may be limited by capacity, in which case the problem is known as 2E-CVRP [18]. Handling costs are incurred at the satellite for loading and unloading vehicles. A fleet of primary vehicles is located at a depot, while a set of secondary vehicles are shared by the satellites. The 2E-VRP aims to find the optimal set of primary and secondary vehicle routes while ensuring that customer demands are met. In this respect, there is a similarity to HMSME-VRP where, however, instead of intermediate facilities, there are switch points. Moreover, the primary vehicles, called original vehicles, in HMSME-VRP may serve the customers and may consecutively visit up to two switch points, imposing thus a hierarchy between them, where they transfer swapbodies to the local or secondary vehicles, that is, there are no loading and unloading operations at the switches.
A mixed-integer formulation of the 2E-CVRP was presented in Perboli and Tadei [17] and two families of valid inequalities were also introduced in order to strengthen the linear relaxation of the model. Crainic et al. [4] present a family of multi-start heuristics for the 2E-VRP while Grangier et al. [9] extend it to allow multiple trips, time windows, and synchronization constraints. In this formulation, the lower level vehicles are allowed multiple trips, and these do not have to originate from the same satellite. Dellaert et al. [6] presented path-based and arc-based formulations of the problem and derived specific solution methods for each formulation based on the branch-and-price framework. Wang et al. [24] studied stochastic demand in a 2E-VRP.
The TTRP introduced by Chao [3] do share certain characteristics with 2E-VRP and the HMSME-VRP. However, it is not based on a two-echelon supply chain.
Instead, it considers the situation in which vehicles are divided into trucks and trucks pulling a trailer, the latter being referred to as complete vehicles. Due to reallife constraints, such as limited maneuvering space, inaccessible locations, or regulations prohibiting large vehicles at the customer location, some customers can only be visited by trucks (truck customers). In contrast, others can be served by either a truck or a complete vehicle (vehicle customers). Consequently, a complete vehicle may need to temporarily detach its trailer at specific customers to be able to visit others. This results in that three different types of routes can form a feasible solution for the TTRP; pure truck routes, pure vehicle routes, and complete vehicle routes, respectively. The objective of TTRPs is to minimize costs incurred while determining the optimal set of routes that ensure that each customer is served by a suitable vehicle.
Comparing TTRP to HMSME-VRP, the situation considered by the latter is quite different; there are two fleets of vehicles, distinguished by capacity and location, all customers are visited by exactly one vehicle (of any type) pulling exactly one swapbody, and swap-bodies are transferred from high capacity trucks to lower capacity trucks at switch points.
For the TTRP, Chao [3] utilized tabu search to solve it while Scheuerer [19] further improved the tabu search approach. Lin et al. [14] introduced time windows to the problem and developed a simulated annealing approach. Mirmohammadsadeghi and Ahmed [16] developed a memetic algorithm in order to solve the problem with stochastic demand. Derigs et al. [7] study the TTRP both with and without load transfers and time windows. They apply a hybrid approach combining local search and large neighborhood search and develop problem-specific neighborhood structures. TTRP with transshipment points (that is, satellites) independent of customer locations en route are introduced by Villegas et al. [23] and Drexl et al. [8]. A further extension is introduced by Accorsi and Vigo [1] as they consider truck and vehicle customers with and without parking facilities and parking only locations.
A problem closely related to TTRP is the so-called Swap-Body VRP (SB-VRP). It considers trucks and trailers and the situation in which some customers can be served by truck only, while others can be served by a truck or a trailer, similar to the case in TTRP. However, some customer demands exceed the capacity of a single swap-body and must therefore be served by a trailer. In addition, swap locations are independent of customer locations, and no transshipments are allowed. As opposed to the TTRP, where only park and pick-up are allowed, the SB-VRP vehicles can, in addition, perform swaps and exchange operations.
Huber and Geiger [12] proposed an iterated Variable Neighborhood Search procedure with problem-specific neighborhood structures but only allowed each vehicle to approach one swap location. A Greedy Randomized Adaptive Search Procedure was proposed by Miranda-Bront et al. [15]. Toffolo et al. [21] presented a stochastic local search algorithm. They first formulate a naïve feasible solution, then improve it by a local search considering several neighborhood structures. To the best of our knowledge, the only extension of the SB-VRP is presented by Huber and Geiger [13], which studies a bi-objective swap-body inventory routing problem.
In HMSME-VRP, swap-bodies are also considered, and the switch points, similarly to the swap locations in SB-VRP, are independent of the customer locations.
However, each customer is served by a vehicle with a swap-body, there are two fleets of vehicles and a non-predetermined hierarchy of switch points. Table 1 further lists the essential differentiating characteristics between HMSME-VRP and the problems reviewed above.

Problem description
The HMSME-VRP can be defined on a network graph G = ( All customer routes start and end at the same point which may be the depot or a switch point. All swap-bodies are returned to the central depot by the same original vehicle by which they left the depot in the first place. Original vehicles departing from the central depot and pulling only one swap-body visit customers directly, otherwise, if they pull two or three swap-bodies, they have to visit at least one switch point in order to transfer swap-bodies to local vehicles. In the case of three swapbodies, two can be transferred to two local vehicles either at one switch point or at two consecutive switch points.
The goal is to determine -Routes for original vehicles to directly serve customers, -And/or routes for original vehicles to transfer swap-bodies to local vehicles at switch points and subsequently serve customers, and -Routes for local vehicles after they have been attached swap-bodies transferred from original vehicles, and in the process -To identify the switch points actually needed, -To determine the number of vehicles needed at the depot and these switch points, while ensuring the satisfaction of customer demands without violating vehicle and swap-body capacities at a minimum total cost. We further make the following assumptions:

Mixed-integer formulation
The following notation will be used to describe the mixed-integer problem: Sets N : All nodes. Set of available local vehicles.
Objective function

3
A note on the hierarchical multi-switch multi-echelon vehicle… Equation (1) states the objective function to be minimized. It is the sum of total tour lengths and fixed and variable costs generated by original and local vehicles as well as swap-bodies. While Eqs.
(2)-(7) are flow constraints which guarantee connectivity of the solution and satisfaction of customer demands. Constraints (3) and (4) ensure that there is no flows from customers to switch points or to the central depot. Equations (5)-(7) ensure that flow on any arc with final destination any customer does not exceed that customer's demand. Equation (5) is stated for original and local vehicles on arcs between customers while (6) is stated for original vehicles on arcs between the central depot and customers or switch points. Finally, (7) is stated for both original and local vehicles on arcs between switch points and customers. Equations (8) and (9) are capacity constraints ensuring that the flow on any arc should not exceed the total capacity of the swap-bodies on the same arc. Equation (8) is stated for arcs used by both original and local vehicles, that is, for the lower level in the hierarchy, while Eq. (9) is stated for original vehicles serving both the upper and lower levels. Similarly, Eqs. (10) and (11) are degree constraints which ensure that exactly one vehicle with exactly one swap-body enters and leaves each customer.
Equations (12)-(26) are are concerned with constraints imposed on vehicles. Equation (12) states that if an original vehicle with at least one swap-body traverses an arc then a corresponding cost for traversing the arc incurs. Equation (12) ensures that a swap-body attached to an original vehicle must leave any customer it arrives to with the same original vehicle while (14) guarantees the same for local vehicles. Any original vehicle leaving the central depot or a switch point to visit a switch point must return to the previous destination carrying the same swap-body. This is ensured by constraint (15) while (16) is a balancing constraint ensuring that original vehicles entering any switch point also leave it.
Constraints (17) and (18) ensure that local and original vehicles return to the switch point from which they departed in order to serve customers. Equation (19) ensures that an original vehicle can visit at most one switch point or only one customer directly after departing from the central depot. Equations (20) and (21) ensure that any vehicle can perform at most one customer tour; where the first equation addresses original vehicles and the latter the local vehicles. Equation (22) ensures that a local vehicle cannot visit a switch point from any other switch point and (23) ensures that an original vehicle cannot leave a switch point to visit a customer unless it has previously arrived to that switch point.
If an original vehicle departs from a switch point to visit another switch point it has to carry two swap-bodies, and this is ensured by constraint (24). Furthermore, a vehicle cannot perform a customer visit from a switch point if it pulls more than one swap-body, and this is guaranteed by constraint (25). Constraint (26) ensures that any original vehicle arriving to a switch point also departs from it to either visit another switch point or to vist a customer.
Constraints (27)-(36) are swap-body constraints. Equation (27) is a balancing constraint which ensures that the number of swap-bodies arriving to a switch point must equal the number of swap-bodies leaving it, attached either to original vehicles and proceeding to a customer or a different switch point, or to local vehicles performing customer visits. A swap-body can depart from the central depot only once, to visit either a switch point or a customer directly. Equation (28) states this. Constraint (29) makes sure that an original vehicle can carry at most three swap-bodies between the central depot and any switch point, while constraints (30)-(32) ensure that each customer can be served by exactly one swap-body, either pulled by an original or a local vehicle.
Constraint (33) ensures that a swap-body either leaves a switch point to directly visit a customer or it proceeds to another switch point, while Eq. (34) prohibits a swap-body to leave a switch point towards any customer unless it has previously arrived to that switch point. Similarly, Eq. (35) ensures that a swap-body can only leave a switch point to proceed to another switch point if it has previously arrived to the first one either directly from the central depot or returning from a customer. Constraint (36) ensures that a swap-body can perform exactly one customer tour, while constraints (37)-(39) imply that costs incur by utilizing local and original vehicles as well as swap-bodies. Lastly, (40)-(45) specify the domains of the variables.

Illustrative example
For illustration purposes and comparison to related problems mentioned in Sect. 2 the solution of the U-n16-s3 instance (see Table 3) is depicted in Fig. 2. Table 2 summarizes the values for the instance parameters.
The solution depicted in Fig. 2 requires two original vehicles, two local vehicles, and four swap-bodies. The first original vehicle, OV 1 , leaves the central depot with three swap-bodies attached. It first visit switch point s 1 to drop of one swapbody and then continues to switch point s 2 to detach a second swap-body before serving customers c 8 , c 9 , and c 7 . When swap-bodies have been dropped of at s 1 and s 2 a local vehicle, LV 1 , departs from s 1 to serve customers c 6 , c 5 , and c 4 while local vehicle, LV 2 , departs from s 2 to serve customers c 10 , c 11 , and c 12 . When OV 1 has finished its customer tour, it returns to s 2 and then to s 1 to re-attach the previously detached swap-bodies before returning to the central depot. Meanwhile, an original vehicle, OV 2 , departs from the central depot with only one attached swap-body to directly serve customers c 3 , c 1 , and c 2 .
As previously stated, the HMSME-VRP shares similarities with the problem classes 2E-VRP, the TTRP, and their extensions. However, the solution depicted above also highlights some of the differences. The 2E-VRP does not allow customers to be served directly from the central depot. Therefore, in such a solution, customers c 1 , c 2 , and c 3 would need to first be assigned to a satellite before being served (see Fig. 3b). Compared to the TTRP and the SB-VRP, which explicitly consider swap-bodies, the HMSME-VRP allows swap-bodies to be transferred from one vehicle to another. Allowing customers to be served directly and swapbodies being transferred between vehicles enables the HMSME-VRP solution to cover all customers in a more time-efficient manner compared to the solution of the other two problem classes. As customers close to the central depot can be served directly, commodities do not have to be unloaded from upper-level vehicles and loaded into lower-level vehicles at the intermediate facilities. By transferring swap-bodies from original vehicles to local vehicles, a larger number of customers can be served within the same time interval.
However, in the case of the HMSME-VRP solution, more vehicles may be needed compared to TTRP. Although after transferring swap-bodies to local vehicles in the HMSME-VRP solution, original vehicles continue to serve customers,  which, compared to the case of 2E-VRP, may decrease the number of vehicles required. Figure 3 further illustrates the differences in solutions of the problems.

Computational experimentation
The VRP is known to be NP-hard [22], and the HMSME-VRP as an extension of the VRP adds further to the complexity, rendering it computationally hard to solve. Indeed, several instances were constructed to verify and test the solvability of the model, see Tadaros [20]. However, only very small instances could be solved within reasonable computational time. For demonstration purposes, we report here on instances where the number of customers spans from 9 to 18 and the number of switch points are 3 or 4, depending on the number of customers. Furthermore, the demand is either unitary, i.e., set to 1 for each customer, or randomly generated from a discrete uniform distribution with low numbers and either low or high variance. The average tour length was assumed to include three customer stops. Therefore, the swap body capacity was set to 3 for all instances with unitary demand distribution, while for instances with randomly generated demands it was determined by where c is the number of customers. Additionally, the cost of traversing an arc, c ij , corresponds to the euclidean distance between the nodes i and j while fixed costs for original vehicles, c 1 v , local vehicles, c 2 v , and swap-body, c 3 t , were set to 10, 5, and 1 respectively. Table 3 further describes the generated instances.    The model was implemented in Pyomo [2,11] and all instances were solved with the Gurobi 9.5 solver [10] on a laptop with a 2.3 GHz Quad-Core Intel Core i7 processor. We attempted to solve each instance within a time limit of one hour. The results of the tests are presented in Table 4.
The results show that the solver could solve optimally instances of up to 12 customers and 3 switch points within a time interval not exceeding the limitation of one hour. For the instances, including up to 12 customers, all but one could be solved optimally. On the other hand, none of the instances which included more than 12 customers could be solved within the time limit. It is also evident that both the number of nodes and the demand distribution have an impact on the solution time. Considering the same amount of nodes, instances with high variance in demand distribution tend to require more time. In addition, the problem does not scale well and requires significantly more time as the number of nodes increases. A test was also performed on an instance of 20 customers and 6 switch points with unitary demand distribution, the solver could not obtain an optimal solution after running for 498,000 seconds and a gap equal to 5.83% . Thus, development of heuristics and metaheuristics would then be required to solve real case instances or instances of realistic sizes.

Conclusions and further research
In this paper, we have introduced the HMSME-VRP, which originates from the policies of a real-world distribution company. While it shares certain similarities with previously well-studied problems, it differs from them in several important aspects, as we have demonstrated. A mixed-integer formulation of the problem is proposed, and small instances are solved to demonstrate the solution and verify the model.

3
A note on the hierarchical multi-switch multi-echelon vehicle… As the HMSME-VRP is computationally hard to solve, further research should be directed towards developing new solution methods able to solve larger and more realistic instances. Possible methods could for example be different metaheuristics such as Variable Neighborhood Search or Ant-Colony Optimization or decomposition based methods like column generation.
It is also worth mentioning that several extensions are possible; for instance, service times and time windows can be introduced, and the inclusion of location decisions for the switch points can elevate the model to a more strategic decision making level. Additionally, the model could be used in connection with sustainable routing policies by considering mixed fleets of conventional and alternative fuel vehicles. Such a formulation would enable the optimization of fleet composition and the use of different types of vehicles for various tours. The extension would enable inclusion of additional objectives to minimize the environmental impact. The authors are currently working on several of the proposed extensions and solution methods.