**3. Background**

In this section, we first provide a mathematical model to formally define the studied problem. Next, we describe the solution methods used in the analysis.

#### *3.1. Mathematical Model*

The double traveling salesman problem with multiple stacks was modelled for the first time by Petersen and Madsen [1]. Let *G*<sup>1</sup> = ( *V*1, *<sup>A</sup>*<sup>1</sup>), *G*<sup>2</sup> = ( *V*2, *A*<sup>2</sup>) be two complete graphs representing, respectively, the pickup and delivery networks of the problem. For every *ω* ∈ {1, <sup>2</sup>}, edge (*i*, *j*) ∈ *Aω* of *Gω* has a certain weight *cωij* , representing the travel cost between nodes *i* and *j*. Let *n* be the number of orders and the node sets *Vω* = {*v<sup>ω</sup>* 0 , *v<sup>ω</sup>* 1 , ··· , *v<sup>ω</sup> n* }, *ω* ∈ {1, <sup>2</sup>}, where *v<sup>ω</sup>* 0 is the depot and *v<sup>ω</sup>* 1 , ... , *v<sup>ω</sup> n* represent the *n* orders. The configuration of the container used for transportation is given by the number of available stacks, being denoted by *R*, and their maximum capacity, denoted by *L*.

In addition, we have set *Vω* ∗ = *<sup>V</sup><sup>ω</sup>*\{*v<sup>ω</sup>* 0 }, containing all nodes, but the depot in each graph *ω* ∈ {1, <sup>2</sup>}, and set *P* = {1, ··· , *<sup>R</sup>*}, representing the *R* available stacks. The set of orders is *D* = {1, ··· , *<sup>n</sup>*}, in a way that the item associated to each order *i* ∈ *D* must be picked up at *v*1 *i* ∈ *V*<sup>1</sup> ∗ of *G*1, loaded into a certain stack *p* ∈ *P*, and delivered at *v*2 *i*∈ *V*<sup>2</sup> ∗ of *G*2.

The problem is modelled as a binary program through three sets of binary variables. The routes of the solution are given by variables {*x<sup>ω</sup>ij* }, which determine directly the values of variables {*y<sup>ω</sup>ij* }, that indicate precedence between pickups and deliveries. The assignment of orders to stacks is given by variables {*zip*}. They are defined in what follows, where *ω* ∈ {1, <sup>2</sup>}.

$$\begin{array}{rcl} \mathfrak{x}\_{ij}^{\omega} &=& \begin{cases} 1 & \text{if } j \text{ is visited immediately after } i \text{ in network } \omega\\ 0 & \text{otherwise} \end{cases} \\\\ \mathfrak{y}\_{ij}^{\omega} &=& \begin{cases} 1 & \text{if } j \text{ is visited after } i \text{ in network } \omega\\ 0 & \text{otherwise} \end{cases} \end{array} \qquad \begin{array}{rcl} \forall i, j \in V^{\omega} &$$

$$z\_{ip} = \begin{cases} 1 & \text{if order } i \text{ is assigned to stack } p \\ 0 & \text{otherwise} \end{cases} \qquad \forall i \in D, \forall p \in P$$

The model is thus given by Equations (1)–(10).

$$\text{min}f = \sum\_{\substack{i,j \in V^{\omega} \\ \omega \in \{1, 2\}}} \epsilon\_{ij}^{\omega} \cdot \mathbf{x}\_{ij}^{\omega} \tag{1}$$

$$\sum\_{i \in V^{\omega}} \mathbf{x}\_{ij}^{\omega} = \mathbf{1} \qquad \qquad \forall j \in V^{\omega}, \forall \omega \tag{2}$$

$$\sum\_{j \in V^{\omega}} \mathbf{x}\_{ij}^{\omega} = 1 \qquad \qquad \forall i \in V^{\omega}{}\_{\prime} \forall \omega \tag{3}$$

$$\begin{aligned} y\_{ij}^{\omega} + y\_{ji}^{\omega} &= 1 & \forall i, j \in V\_{\*}^{\omega}, i \neq j, \forall \omega \\ y\_{ik}^{\omega} + y\_{ki}^{\omega} \le y\_{ji}^{\omega} + 1 & \forall i, j, k \in V\_{\*}^{\omega}, \forall \omega \end{aligned} \tag{4}$$

$$\begin{aligned} y\_{ik}^{\omega} + y\_{kj}^{\omega} \leq y\_{ij}^{\omega} + 1 & \quad \forall i, j, k \in V\_{\*}^{\omega}, \forall \omega \\ x\_{ij}^{\omega \prime} \leq y\_{ij}^{\omega \prime} & \quad \forall i, j \in V\_{\*}^{\omega \prime}, \forall \omega \end{aligned} \tag{6}$$

$$y\_{ij}^1 + z\_{ip} + z\_{jp} \le 3 - y\_{ij}^2 \tag{7} \qquad \qquad \forall i, j \in V\_{\*}^{\omega}, \forall p \in P \tag{7}$$

$$\sum z\_{ip} = 1 \qquad \forall i \in D \tag{8}$$

$$\sum\_{\substack{p \in P \\ i \in D}} \mathbf{\hat{z}}\_{ip} \le L \qquad \qquad \forall p \in P \tag{9}$$

$$x, y, z \in \{0, 1\} \tag{10}$$

The objective function (1), to be minimized, is the sum of all pickup and delivery costs. The flow conservation constraints are given in (2) and (3), while the right definition of {*y<sup>ω</sup>ij* } variables is ensured by constraints (4)–(6) and the LIFO order to be followed in each stack is imposed by Equation (7). Finally, constraints (8) indicate that each order must be assigned to one, and only one, stack and constraints (9) make sure that the maximum capacity of the stacks is not exceeded.

#### *3.2. Solution Method*

Metaheuristics are problem-independent algorithmic frameworks that describe strategies for developing powerful heuristic optimization methods [28]. Therefore, they can be applied to a wide range of problems, such as optimizing non-linear functions of continuous variables [29] or linear functions on binary variables [30]. For the double traveling salesman problem with multiple stacks, to analyze the choice of container types and packing patters, this paper uses a variable neighborhood search [3].

Variable neighborhood search was introduced by Mladenovi´c and Hansen [31]. It is based on the performance of several consecutive local search procedures by changing the neighborhood structure used to define neighbors every time that the search gets stuck in a local optimum. This is a simple idea that has produced very good results in a wide variety of hard optimization problems. The algorithm we use to solve the double traveling salesman problem with multiple stacks is based on an enhanced variable neighborhood search with some additional elements that are specifically adapted to the problem at hand [3]. Six different neighborhood structures or operators, each of which define a local search procedure, are used: Route Swap (swaps the positions of two consecutive orders in one of the routes of the solution), Complete Swap (swaps the stack positions of two orders that are assigned to different stacks), In-Stack Swap (swaps the stack positions of two orders that are assigned to the same stack), Reinsertion (moves one order to a different position in both routes of the solution and reassigns it to a different stack), *r*-Route Permutation (*r* orders that are assigned to different stacks and visited consecutively in one route are permuted), and *r*-Stack Permutation (*r* orders that are loaded consecutively into the same stack are permuted). The core of the solution method is a variable neighborhood descent (VND) algorithm in which several local search procedures using these neighborhood structures are concatenated. The VND takes as input an initial feasible solution *S* and the set Δ = {<sup>Δ</sup>*k*, *k* = 1, ··· , *<sup>n</sup>*Δ} of neighborhood structures to be used for the local search. A pseudocode of the VND algorithm is given in what follows.

	- • If *improve* do *k* = 1.
	- • Otherwise do *k* = *k* + 1.
	- • If *k* ≤ *n*Δ go back to step 2.
	- • If *k* > *n*Δ and *improve*, do *k* = 1 and go back to step 2. Otherwise, END: the best solution found is *S*.

VND outputs an improved solution which is a local optimum with respect to all neighborhood structures in Δ. Every time a VND execution finishes, a perturbation phase consisting in the performance of a certain number of random moves is applied, in order to escape from the current local optimum, and the VND is applied again to the perturbed solution. In addition to this, several enhancing features are introduced into this basic algorithm in order to improve its performance: more than one initial solution are generated and a different search is performed from each of them; an additional intensification phase is carried out, starting from the best improved initial solution; different orderings of the neighborhood structures used in the VND are considered, choosing randomly among them according to certain probabilities; if the current solution could not be improved after many iterations or it is too far from the best known solution, the search process is restarted; to avoid undoing perturbation moves, tabu lists for the different involved operators are used; the temporal relaxation of some precedence and capacity constraints, controlled through several infeasibility measures and correction procedures to ensure feasibility, is considered for diversification purposes.

The algorithm is fed initial solutions generated in two ways. The first one consists in solving the particular case with only one stack, whose solutions are always feasible for any loading plan with any container configuration. The advantage of this problem is that it reduces to a standard traveling salesman problem in a network whose arc weights are the sum of the weights of the two networks of the original problem. The second one is by using a simple randomized procedure, properly guided in order to ensure the feasibility of the obtained solutions. This second procedure is important to generate a wide variety of initial solutions.

In addition, the two traveling salesman problems induced by dropping all loading constraints on both the pickup and the delivery region of any instance are solved to optimality independently in order to obtain a lower bound: no container configuration or loading pattern can possibly improve the sum of the costs of the two optimal traveling salesman problem solutions. This has been done by using the TSP function of the optimizer OPTMODEL NETWORK from SAS software. This function implements a variant of the branch-and-cut algorithm by Applegate et al. [32], which is one of the most efficient exact methods available in the literature. Default parameters regarding the use of cutting planes, heuristics, node, and branching variable selection, identified as AUTOMATIC by SAS, were used.

#### **4. Computational Study**

Test instances for the double traveling salesman problem with multiple stacks were introduced by Petersen and Madsen [1], consisting of twenty instances with 33 customers, and twenty instances with 66 customers. These instances are used in four different experiments to evaluate how the choice of containers and packing patterns influences the transportation costs. The experimental design is simply to solve each of the forty basic instances based on different container configurations and compare the results, rather than relying on more complex experimental designs [33]. The results are obtained by applying the heuristic described in Section 3.2.

The heuristic was run on an Intel Core i5-3210M CPU 2.50 GHz with 6 GB RAM, with a running time of 10 min. for the instances with 33 customers, and 30 min. for the instances with 66 customers. A lower bound for each instance has been calculated by solving separately the two independent traveling salesman problems that arise when dropping the precedence constraints that are associated with the last-in-first-out principle imposed on the loading of the container. These lower bounds, obtained by using the SAS software, represent the minimum costs that must be covered, even in the absence of loading constraints.

The first experiment considers a container loaded from the back with EUR-1 pallets. The standard packing pattern is *R* = 3 and *L* = 11, for a total capacity of 33 pallets. Assume that the company needs the full capacity to serve regular customers. Now, if the company has an extra demand for transportation of one pallet from the depot of the pickup region to the depot of the unloading region, one solution is to use a different packing pattern, such as *R* = 2 and *L* = 17, for a total capacity of 34 pallets.

Table 2 provides results showing how the total transportation cost changes for 20 standard test instances for selected packing patterns. The table shows, for each instance, the lower bound from solving traveling salesman problems of each region separately ("LB"), the transportation cost ("Cost"), and the relative deviation between the lower bound and the cost ("Dev"). For the first experiment, the average deviation from the lower bound increases from 14.1% to 28.4% when switching packing patterns to facilitate one extra pallet.

The second experiment tests the effect of introducing an open side container, instead of a container loaded from the back. Suitable open side containers may require additional customization, as compared to the more standard containers loaded from the back. To balance this, one would expect that the transportation costs can be reduced, as an alternative packing pattern with many short rows is possible, yielding much flexibility in the routing decisions. Table 2 shows the results for the most flexible alternative packing pattern with *R* = 17 and *L* = 2. For each of the 20 test instances, the heuristic is able to find a solution that matches the lower bound, providing a reduction in the transportation costs of 12% when compared to the use of a standard container loaded from the back ( *R* = 3, *L* = 11). In the case where an additional pallet is transported between the depots, the saving in transportation cost amounts to 22% when using *R* = 17 and *L* = 2 instead of *R* = 2 and *L* = 17.

In the third experiment, the transportation of EUR-6 pallets is considered. Assuming that 66 pallets are to be transported in a regular 45-foot pallet wide container, the standard packing pattern of the test instances could be used, with *R* = 3 and *L* = 22. However, for EUR-6 pallets, an alternative pattern is available, with *R* = 4 and *L* = 17, while using the same type of container. This is expected to lead to lower transportation costs, as the added row provides more flexibility. Table 3 confirms this, as the average deviations to the lower bound are 29.7% and 18.7% for *R* = 3 and *R* = 4, respectively.

The fourth experiment deals with vertically stacked EUR-1 pallets and a demand of 66 pallets to be transported. For a standard container, the standard packing pattern has *R* = 3 stacks with *L* = 22 pallets, where pallets in each row are placed in two layers on top of each other. If an open side container is available, however, a packing pattern with *R* = 11 stacks of length *L* = 6 can be used. Table 3 shows that the open side container again leads to significantly reduced transportation costs, saving almost 21% when compared to the container loaded from the back. However, for this setting, there is still a 2.8% gap from the solutions obtained to the lower bound, meaning that it is still important to consider loading decisions when optimizing the routes.


**Table 2.** Results for instances with 33 customers and three different container configurations, given as (*<sup>R</sup>*∗ *<sup>L</sup>*).

**Table 3.** Results for instances with 66 customers and three different container configurations, given as (*<sup>R</sup>*∗ *<sup>L</sup>*).


The experiments show that the choice of container configuration is important. Using a standard container loaded from the rear leads to transportation routes that are much longer and more expensive that what could be achieved with a container loaded from the side. It seems that existing heuristic solution methods can cope very well with the high number of stacks that result from an open side container. One might conjecture that certain exact methods, such as those developed by Lusby et al. [34], may benefit significantly when solving the problem with open side containers.

#### **5. Concluding Remarks**

The double traveling salesman problem with multiple stacks, introduced by Petersen and Madsen [1], has received substantial interest from researchers. The problem was based on real-world transportation requirements, which represented a novel challenge in the way that routing decisions were combined with packing decisions. As the problem provided ample venues for research on theoretical aspects of the problem, as well as on the development of efficient heuristic and exact solution methods, it might be valid to ask whether additional aspects of the real-world application may have been overlooked.

#### *5.1. Main Conclusions*

The implied choice of container technology in the double traveling salesman problem with multiple stacks was examined in this paper. Additional test instances can be derived, depending on the packing pattern used, and on whether the container is loaded from the back or from the side. It was demonstrated that the total transportation cost is highly dependent on the container choice, in some cases resulting in savings of more than 20% by allowing for the use of open side containers.
