1 Introduction

The open vehicle routing problem (OVRP) differs from the well-known vehicle routing problem (VRP) (Dantzig and Ramser 1959) in that the vehicles are not required to return to the depot once they have delivered the goods to the customers. That is, the route of each vehicle starts at the depot and finishes at its last customer. The work by Schrage (1981) may be seen as the blueprint of this problem whereas the work by Sariklis and Powell (2000) can be considered as the first one to propose a solution approach for solving the OVRP without considering a maximum route length. After these works, several researchers have also tackled the OVRP. For instance, Brandão (2004) presented an effective tabu search approach for the OVRP that served as benchmark for various other approaches thereafter. An exact branch-and-cut algorithm can be found in Letchford et al. (2007). They also compare the difficulty of closed and open versions of the problem, indicating that the open version might be slightly easier. Russell et al. (2008) present an OVRP with time windows and zoning constraints to model the production and delivery of multi-product newspapers to bulk delivery locations. Pisinger and Ropke (2007) develop a general heuristic for solving variants of the VRP, including the OVRP. Repoussis et al. (2010) present a population-based hybrid metaheuristic for tackling the OVRP. A comprehensive review on the OVRP can be consulted in Li et al. (2007).

In real-world contexts, we can find a multitude of environments in which the vehicles may depart from different depots when starting their routes. This practical issue is addressed by the multi-depot vehicle routing problem (MDVRP). In this extension of the VRP, every customer is visited by exactly one vehicle, for which its route starts from one of the available depots. The natural translation to the OVRP is known as the multi-depot open vehicle routing problem (MDOVRP). In this problem, the vehicles depart from one of the available depots and finish their deliveries at their last customers visited. Figure 1 shows an example of a solution of the MDOVRP composed of 29 customers and 3 depots. In this solution, three vehicles depart from depot 1 and visit a total of 12 customers along their routes.

Fig. 1
figure 1

Example of a solution for the MDOVRP. This example is composed of 29 customers and 3 depots

The MDOVRP was firstly proposed by Tarantilis and Kiranoudis (2002) within the context of distribution of fresh meat in a real application. The authors solved the problem using a list-based threshold-accepting algorithm. Recently, Liu et al. (2014) proposed a mixed integer programming (MIP) formulation for the MDOVRP. Due to the extensive time and memory requirements when applying this formulation through a general-purpose solver such as CPLEX, the authors additionally proposed a hybrid genetic algorithm.

The goal of this paper is to provide a new mathematical formulation for the MDOVRP by proposing an enhancement of the subtour elimination constraints as well as new sets of constraints. The comparison with the unique MIP formulation given in the literature so far (see Liu et al. 2014) indicates that our model outperforms the previous one in terms of both solution quality and computational time.

The remainder of this paper is organized as follows. The proposed mathematical formulation for the MDOVRP is introduced in Sect. 2. The computational experience carried out in this work is presented in Sect. 3. Finally, some conclusions are drawn in Sect. 4.

2 Mathematical formulation

The MDOVRP can be defined as follows. Let \(G=(V,A)\) be a directed graph, where \(V = N \cup D\) is the vertex or node set and A is the arc set. Vertex set \(D = \{1,2,\dots ,m\}\) represents the set of uncapacitated depots, whereas vertex set \(N = \{m+1,m+2,\dots ,m+n\}\) represents the customers to be served. A travelling cost, \(c_{ij}>0\), is defined for each arc between each pair of vertices \((i,j), i,j \in V, i \ne j\). Without loss of generality, the travelling cost can represent, according to the application environment, the distance, time, fuel consumption, etc. between each pair of vertices. In this regard, as in the paper of Liu et al. (2014), \(c_{ij}=0\), \(\forall i \in N, j \in D\), that is, the travelling cost from each customer to each depot is set to zero. Moreover, each depot \(d \in D\) stores and supplies enough goods to serve all the customers. With this goal in mind, each depot has an unlimited fleet of identical vehicles with the same positive capacity, denoted as Q. Each customer \(i\in N\) has a certain demand of goods, denoted as \(q_i\), where \(0 < q_i \le Q\). The MDOVRP pursues to determine the routes of minimum travelling cost satisfying the following conditions:

  1. 1.

    Each customer must be visited on exactly one route.

  2. 2.

    Each customer has to be fully served when visited.

  3. 3.

    Each vehicle departs from one of the available depots and finishes at the last customer it serves.

  4. 4.

    The total demand of the customers on any route does not exceed the capacity of the vehicles, that is, Q.

  5. 5.

    The travelling cost of any vehicle route cannot exceed a preset value H.

In the following, we introduce a new mathematical formulation for solving the MDOVRP. The following are the decision variables:

\(x_{ijk}\) :

1 if a vehicle starting from depot \(k \in D\) travels directly from node \(i \in V\) to node \(j \in V\), 0 otherwise.

\(y_i\) :

1 if the minimum travelling cost to visit a customer \(i \in N\) is from a depot, 0 otherwise.

\(u_i\) :

Upper bound on the load already distributed by a vehicle upon leaving node \(i \in V\).

\(h_i\) :

Upper bound on the travelling cost of a vehicle upon leaving node \(i \in V\).

The following additional parameters are used:

\(\overline{q_{i}}\) :

For each customer \(i \in N\), maximum value of \(q_j\), \(\forall j \in N, i \ne j\), i.e., \(\max (q_j)_{j \in N, j\ne i}\).

\(d_{i}\) :

Minimum travelling cost from any depot \(k \in D\) to customer \(i \in V\), i.e., \(\min (c_{ji})_{j \in D}\). Note that \(d_k = 0, k \in D\).

\(r_{i}\) :

Minimum travelling cost from any customer \(j \in N\) to customer \(i \in N\), \(i \ne j\), i.e., \(\min (c_{ji})_{j \in N, j \ne i}\).

\(g_{i}\) :

Maximum travelling cost from customer \(i \in N\) to any other customer \( j \in N\), \(i \ne j\), i.e., \(\max (c_{ij})_{j \in N, j \ne i}\).

The mathematical model we propose is defined as follows:

$$\begin{aligned} \text{ minimize } \sum _{i \in V} \sum _{j \in V} \sum _{k \in D} c_{ij}x_{ijk} \end{aligned}$$
(1)

subject to:

$$\begin{aligned}&\sum _{i \in V} \sum _{k \in D} x_{ijk}=1,\quad \forall j \in N\end{aligned}$$
(2)
$$\begin{aligned}&\sum _{i \in V} x_{ijk} = \sum _{i \in V} x_{jik} ,\quad \forall j \in V, \forall k \in \end{aligned}$$
(3)
$$\begin{aligned}&u_i - u_j + Q \sum _{k \in D} x_{ijk} + (Q - q_i - q_j) \sum _{k \in D} x_{jik} \le Q - q_j, \quad \forall i,j \in N, i \ne j \quad \end{aligned}$$
(4)
$$\begin{aligned}&u_i \ge q_i + \sum _{j \in N, i \ne j} \sum _{k \in D} q_j x_{jik} ,\quad \forall i \in N\end{aligned}$$
(5)
$$\begin{aligned}&u_i \le Q - (Q-q_i-\overline{q_i}) \sum _{k \in D} x_{kik} - \sum _{j \in N, i \ne j} \sum _{k \in D} q_j x_{ijk} , \quad \forall i \in N\end{aligned}$$
(6)
$$\begin{aligned}&u_k = 0, \quad \forall k \in D\end{aligned}$$
(7)
$$\begin{aligned}&h_i - h_j + M \sum _{k \in D} x_{ijk} + (M - c_{ij} - c_{ji}) \sum _{k \in D} x_{jik} \le M - c_{ij},\nonumber \\&\quad \forall i, j \in N, i \ne j (\mathrm{with}\; M \ge H - d_j + c_{ij} )\end{aligned}$$
(8)
$$\begin{aligned}&h_i \ge d_i + \sum _{j \in V, i \ne j} \sum _{k \in D} (d_j - d_i +c_{ji})x_{jik}, \quad \forall i \in N \quad \end{aligned}$$
(9)
$$\begin{aligned}&h_i \le H - \sum _{j \in N, i \ne j} \sum _{k \in D} c_{ij} x_{ijk} - (H - g_i) \sum _{k \in D} x_{kik} + \sum _{k \in D} c_{ki} x_{kik} , \quad \forall i \in N\end{aligned}$$
(10)
$$\begin{aligned}&h_k = 0, \quad \forall k \in D\end{aligned}$$
(11)
$$\begin{aligned}&d_i + M y_i \ge r_i, \quad \forall i \in N\end{aligned}$$
(12)
$$\begin{aligned}&x_{k'ik'} \ge y_i,\quad \forall i \in N, k'=\mathrm{argmin}(c_{ki})_{k \in D}\end{aligned}$$
(13)
$$\begin{aligned}&\sum _{i \in N} \sum _{k \in D} x_{kik} \ge \frac{\sum _{i \in N} q_i}{Q}\end{aligned}$$
(14)
$$\begin{aligned}&x_{ijk} \in \{0,1\},\quad \forall i, j \in V, k \in D\end{aligned}$$
(15)
$$\begin{aligned}&y_i \in \{0,1\}, \quad \forall i \in N\end{aligned}$$
(16)
$$\begin{aligned}&h_i \ge 0, \quad \forall i \in N \end{aligned}$$
(17)

where M is a sufficiently large constant defined for constraint set (8) in order not to eliminate feasible solutions when \(x_{ij}=0\) (see Desrochers and Laporte 1991).

The objective function (1) aims at minimizing the total travelling cost of the routes used to deliver the goods to the customers. Constraints (2) guarantee that each customer is visited exactly once. Constraints (3) impose the degree balance of each node, including both customers and depots. Constraints (4)–(7) eliminate the subtours in the solutions found by considering the capacity of the vehicles and ensure that their capacity is not exceeded. Analogously, constraints (8)–(11) eliminate subtours in the solution considering the travelling cost and ensure that the maximum travelling cost per vehicle is not exceeded. Constraints (12) and (13) establish that if the minimum travelling cost to visit a customer is from a depot, then a vehicle will visit the customer directly by departing from the depot requiring minimum travelling cost. Constraint (14) sets a lower bound over the number of vehicles required to serve the customers. Finally, constraints (15)–(17) are the integrality and non-negativity constraints for the different kinds of variables.

Note that one might but need not add a redundant constraint (18) which would explicitly rule out arcs connecting pairs of depots from the solutions.

$$\begin{aligned} \sum _{i \in D} \sum _{j \in D} \sum _{k \in D} x_{ijk} = 0. \end{aligned}$$
(18)

Constraints (4)–(6) and (8)–(10) in the above mathematical model replace those proposed in the work of Liu et al. (2014). In this case, we have considered the improvements and extensions of the Miller–Tucker–Zemlin subtour elimination constraints (see Miller et al. 1960) to the VRP proposed by Desrochers and Laporte (1991) and Kara et al. (2004). These improvements are based upon adapting and lifting the Miller–Tucker–Zemlin subtour elimination constraints. In this way, constraints (4) and (8) are the subtour elimination constraints adapted to hold capacities and distances, respectively. These constraints ensure the continuity of the route of a vehicle in terms of the demand and distance, respectively. Constraints (5)–(6) and (9)–(10) through lifting restrict the lower and upper bounds of the free variables \(u_i\) and \(h_i\), respectively.

Constraints (5) consider that at least the distributed load of a vehicle till node \(i \in N\) is the one required by that node, \(q_i\) and the quantity of its predecessor customer node, \(q_j\), if any. Constraints (6) establish the upper bound \(u_i\) of node i. In this case, if this node is the first of its route, then the upper bound of \(u_i\) is the quantity required by node, \(q_i\), plus the quantity of a node requiring the largest quantity, \(\overline{q_{i}}\). Namely, \(u_i \le q_i + \overline{q_{i}}\). In case node i has a successor \(j \in N\), the upper bound takes into account its requiring quantity, \(q_j\), by subtracting it, \(u_i \le q_i + \overline{q_{i}}-q_j\). In that case, node i is not the first node in its route, and has a successor j, then it can be easily checked that \(u_i\le Q-q_j\). Note that, if a node i is the last of its route, then \(u_i\le Q\).

In a similar way, constraints (9) establish the lower bound of \(h_i\). Namely, at least the distance of a vehicle till node \(i \in N\) is the one required by that node either from the depot, \(d_i\), or from another node, \(d_j+c_{ji}\). On the other hand, constraints (10) establish the upper bound of \(h_i\) of node i. In this case, if this node is the first of its route, then the upper bound of \(h_i\) is the distance required to get that node from the corresponding assigned depot k, \(c_{ki}\), plus the distance to reach the farthest node, \(g_i\). Namely, \(h_i \le c_{ki} + g_i\). In case node i has a successor \(j \in N\), the upper bound takes into account the distance to reach it from node i, \(c_{ij}\). Thus, it is subtracted, \(h_i \le c_{ki} + g_i - c_{ij}\). In case, node i is not the first node in its route and has a successor j, then \(h_i\le H-c_{ij}\). In case, a node i is the last of its route, then \(h_i\le H\).

On the other hand, in this work, we also propose additional constraints, i.e., constraints (12)–(14) aimed at reducing and tightening the mathematical model.

Proposition 1

As a preprocessing option it is obvious that the constraints (12)–(13) are valid as long as the assumption of an unlimited vehicle fleet holds. Nevertheless, we propose the following proposition. Adding the constraint system composed of (12) and (13) to the MDOVRP formulation allows for an optimal solution of the MDOVRP with

$$\begin{aligned}&d_i + My_i \ge r_i, \quad \forall i \in N\\&x_{k'ik'} \ge y_i, \quad \forall i \in N, k'=\mathrm{argmin}(c_{ki})_{k \in D} \end{aligned}$$

where \(r_i=\min (c_{ji})_{j \in N, j \ne i}\) and \(d_i=\min (c_{ji})_{j \in D}\).

Proof

By contradiction. Let us consider the scenario composed of a set of depots \(D = \{v_1, v_2, \ldots , v_m\}\) and a set of customers \(N = \{v_{m+1}, v_{m+2},\dots ,v_{m+n}\}\) (note that subscripts are used for ease of exposition to easily distinguish between arcs and routes later on). Let us suppose that the optimal solution for that scenario \(s_\mathrm{opt}\) is composed by each customer (ranging unit-increasingly from \(v_{m+1}\) up to \(v_{m+n}\)) being directly visited by a vehicle departing from one of the depots due to constraints (12) and (13), such that \(y_{v_{m+1}}=y_{v_{m+2}}=\cdots =y_{v_{m+n}}=1\). Hence, we may have a solution composed of |N| routes, one for each customer \(v_i \in N\) and composed of the customer itself and that depot \(v_k \in D\) that allows the minimum travelling cost for it. That is, (\(v_{\mathrm{argmin}(c_{v_kv_{m+1}})_{v_k \in D}}, v_{m+1}\)),(\(v_{\mathrm{argmin}(c_{v_kv_{m+2}})_{v_k \in D}}, v_{m+2}), \ldots ,(v_{\mathrm{argmin}(c_{v_kv_{m+n}})_{v_k \in D}},\) \(v_{m+n}\)). The associated objective function value \(c_\mathrm{opt}=\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n}c_{v_iv_j}x_{v_iv_jv_i}\) (see (1)).

Suppose we have another solution termed s where \(s \ne s_\mathrm{opt}\) and such that its objective function value, \(c_{s}\), meets the following \(c_{s} < c_{s_\mathrm{opt}}\). Consequently, at least one of the customers is not directly visited from a depot. Consider the case of one customer, for example customer \(v_{m+n}\), is not directly visited from a depot such that its objective function value is the following \(c_s = (\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n-1}c_{v_iv_j}x_{v_iv_jv_i})+(\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n-1}c_{v_jv_{m+n}}x_{v_jv_{m+n}v_i})\). Since \(\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n-1}c_{v_jv_{m+n}}x_{v_jv_{m+n}v_i} \nless \min (c_{v_kv_{m+n}})_{v_k \in D}\), it indicates a contradiction \(c_{s} \nless c_{s_\mathrm{opt}}\).

On the opposite case, let us consider the scenario with the following optimal solution composed of a unique route \(s_\mathrm{opt}=(v_1,v_{m+1},v_{m+2},\ldots ,v_{m+n})\) where \(v_1\) is the starting depot and the sequence of customers, sorted by visiting order, starting from \(v_{m+1}\) and finishing at customer \(v_{m+n}\). The travelling cost associated to this solution is \(c_{s_\mathrm{opt}}=\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n}c_{v_iv_j}x_{v_iv_jv_i}\). Let us consider that the minimum travelling cost to visit customer \(v_{m+n}\) is from the depot \(v_1\) such that \(\mathrm{min}(c_{v_1v_{m+n}}) < \min (c_{v_jv_{m+n}})_{v_j \in V, v_j \ne v_1}\), accomplished solely for this customer \(m+n\). Then according to these constraints we may have a solution \(s^*\) composed of two routes, \((v_{1},v_{m+1},v_{m+2},\ldots ,v_{m+n-1})\) and \((v_1, v_{m+n})\). Consider the objective function value related to \(s^*\) as \(c^*=\sum _{i=1}^{i=m}\sum _{j=m+1}^{j=m+n-1}c_{v_iv_j}x_{v_iv_jv_i}\)+ \(c_{v_{1}v_{m+n}}\). Since \(c_{v_{1}v_{m+n}}< c_{v_{m+n-1}v_{m+n}}\), \(c^*<c_{s_\mathrm{opt}}\), and, thus, \(s_\mathrm{opt}\) is not the optimal solution. \(\square \)

Obviously, constraint (14) is valid for the MDOVRP. The model proposed by Liu et al. (2014) has been strengthened by improving some of the related subtour elimination constraints and adding some additional ones (12)–(14). As indicated in the proposition above, these latter constraints are valid inequalities and the model can still be solved without them. Hence, below we discuss the contribution of these new constraints in terms of quality of the solutions.

3 Computational results

This section is devoted to present the computational experiments carried out for assessing the performance of the mathematical model proposed in this work (see Sect. 2). With this goal in mind, we compare its performance with that of the mathematical model proposed by Liu et al. (2014).

The computational experiments related to our mathematical model were conducted on a computer equipped with an Intel Dual Core 3.5 GHz and 4 GB of RAM. The model was implemented in a general-purpose solver, CPLEX version 12.3, with a maximum computational time of 2 h (7200 s). Concerning the computational results reported by the mathematical model proposed by Liu et al. (2014), as reflected in that work, they were carried out on a computer equipped with a processor 3.2 GHz Dual Core and 4 GB of RAM. In their case, they implemented their mathematical model on CPLEX version 12.2 with a maximum computational time of 12 h (43,200 s).

The problem instances used in this work are those proposed by Cordeau et al. (1997) and also used by Liu et al. (2014). It is worth mentioning that, due to the fact that for these problem instances there is not a maximum travelling cost for the routes (parameter H), as done by Liu et al. (2014), we relax the constraints related to the route length, in order to report a fair comparison.

The computational results obtained by the mathematical model proposed by Liu et al. (2014) and the one proposed in this paper are depicted in Table 1. In this case, the first column, divided into four subcolumns, shows the identifier of each problem instance to solve, id, the number of customers, n, the number of depots, m, and the capacity of each vehicle, Q. The next columns show the results obtained by the model of Liu et al. (2014) (Liu et al. Model), our proposed model without constraints (12)–(14) (Proposed model without constraints (12)–(14)), and our model with constraints (12)–(14) (Proposed model). In each case, columns UB and LB present the upper and lower bounds reported by CPLEX within the time limit set by default, respectively. Columns Gap (%) report the relative error of the bounds, whereas columns t(s) show the required computational time measured in seconds to solve the problem instance at hand. Finally, the last row, Average, summarises the average values.

Table 1 Computational results obtained by the mathematical models proposed by Liu et al. (2014) and that proposed in this paper for the instances introduced by Cordeau et al. (1997)

As can be seen from the computational results shown in Table 1, our mathematical model, either with or without constraints (12)–(14), provides a better performance in terms of narrower linear bounds and computational times than the model of Liu et al. (2014). In this regard, both models improve or at least equal the quality of the linear bounds obtained by the model by Liu et al. (2014) in all cases. Specifically, with the model that considers constraints (12)–(14) we obtain a gap of only 7.77 % on average in comparison with the gap of 62.03 % on average reported by the model proposed by Liu et al. (2014). Additionally, our mathematical model (with and without constraints (12)–(14)) is able to provide new optimal solutions for the problem instances p03, p15, p18, and pr02. In the cases where both mathematical models, namely the one proposed by us and the one proposed by Liu et al. (2014), provide the optimal solution, our model requires considerably less computational time than the model by Liu et al. (2014). This is the case, e.g., for the problem instance p01, for which the model by Liu et al. (2014) requires more than 14,000 s, whereas our model requires less than 70 s when constraints (12)–(14) are considered. Furthermore, in those cases where the optimal solution is not achieved, our mathematical model enhances the quality of the bounds for all cases without running out of memory.

The comparison of our model when constraints (12)–(14) are not considered indicates the following.

  1. (a)

    Including the improved Miller–Tucker–Zemlin subtour elimination constraints (4)–(6) and (8)–(10) proposed in this work, which are related to restrict the bounds of the free variables and eliminate illegal subtours, improves the quality of the solutions in comparison to the one proposed by Liu et al. (2014). As can be seen the gap is reduced from 62.03 to 13.25 % within less computational time.

  2. (b)

    The contribution of the set of constraints (12)–(14) proposed in this work over the model with the improved constraints (4)–(6) and (8)–(10) shows that there is an enhancement in the quality of the majority of the bounds in terms of objective function value.

  3. (c)

    Both models, with and without constraints (12)–(14), exhibit a similar time performance in terms of computational time, on average, about 4524 s. In this regard, the proposed model reports a better gap with a difference of 5.48 % with respect to the proposed model without constraints (12)–(14).

Figures 2 and 3 show the structure of the mathematical models in terms of number of rows and binaries generated by CPLEX when solving the problem instances under analysis. As can be seen, in terms of number of rows, our mathematical model requires a lower number of rows than the model proposed by Liu et al. (2014) and a similar number of binaries. In this regard, as indicated by Hooker (2011), when a formulation is tightened in terms of constraints it may be solved faster by a general-purpose solver such as CPLEX due to the fact that it is able to explore a larger feasible region in shorter computational time. This makes sense if we take into account the improvement of the convergence by means of computational time over the already-known optimal solutions. It should be noted that this is just a comparison by means of the number of constraints; however, some constraints are different and restrict the feasible region in a different way.

Fig. 2
figure 2

Number of rows processed by CPLEX for solving each instance

Fig. 3
figure 3

Number of binaries processed by CPLEX for solving each instance

4 Conclusions and further research

In this work, we have presented an improved MIP formulation for the MDOVRP. The formulation provides better results in terms of solution quality and tighter linear bounds than the formulation reported in the literature for this optimization problem. The modification of the subtour elimination constraints as well as the additional constraints proposed in this work considerably improves the convergence speed over those problem instances where the optimal solution was already known. This is done by reducing the search space through the refinement of some constraints and by including some new constraints related to the minimum use of vehicles required and the first customer to visit. Therefore, the computational effort required is considerably reduced. On the other hand, the computational results showed that our mathematical model reduces the computational burden while achieving better solutions for those instances for which the optimal solution was not known previously. In this regard, it is able to provide new best values for all those problem instances as well as provide the optimal solutions for some instances that have not been reported so far.

While this formulation has been tested only for the MDOVRP, it can be further extended to other variants of the VRP, where similar results would be expected. This will be a topic for further research.