Keywords

1 Introduction

Vendor Managed Inventory (VMI) is a logistic system where the inventories of the clients are controlled by the supplier. The supplier is thus able to globally optimise the replenishment plan while the client does not need to dedicate specific resources for inventory management [1]. In this context, the Inventory Routing Problem (IRP) emerges. It integrates inventory management and routing problems in order to decide, over a time horizon, when, how much and following which route the clients are replenished.

The IRP has attracted a lot of scholars’ interests during the last decades. In order for the IRP to be representative of real-life situations, new variants are proposed in the literature, such as the IRP with time-windows, transshipment, travel-time constrained or the parameters are considered as uncertain, such as the clients’ demand or the travelling time. Other scholars focused on proposing new efficient solving approaches due to the NP-hardness of the problem [2]. A common point of all these works is that the travelling time between locations is always considered constant. However, in urban logistics and last mile distribution, the time it takes to travel from one location to another can vary a lot during the day due to traffic congestion. Thus, we identify the need of considering time-dependent data for the routing component.

Time-dependent routing problems consider that the travelling time from one location does not depend only on the destination but on the time of departure as well. The literature of time-dependent routing problems, such as Travelling Salesman Problem (TSP), Vehicle Routing Problem (VRP) or Arc Routing Problem (ARP), is quite rich [3]. However, from the literature and to the best of our knowledge, it has never been considered for the IRP although the inventory aspect can have an important impact on the structure of time-dependent IRP solutions.

In this article, we present a new variant of the IRP, the Time-Dependent Travel-Time Constrained IRP (TD-TC-IRP), where the travelling times are time-dependent and the total duration of the trips are constrained. The real-world discontinuous time-dependent data that we use will be modelled by a piece-wise linear continuous function. The mathematical formulation for the TD-TC-IRP that is proposed emulates this transformation. The numerical experiments are conducted on a new benchmark that combines two benchmarks of the IRP and TD-TSP literature, to investigate the advantages of considering time-dependent travelling time functions over basic ones.

The article is organised as follows: Sect. 2 presents a brief literature review of the IRP and time-dependent routing problems. Section 3 presents mathematical formulations of the IRP and TD-TC-IRP and discusses the differences between them; a discussion is proposed on the piece-wise continuity of the time-dependent function. Section 4 shows and discusses the results of the numerical experiments while Sect. 5 concludes and gives perspectives for future research.

2 Literature Review

The IRP is set in a network where a supplier delivers goods to its clients, over a time horizon. The objective of the IRP is to decide for each period, whether a client is served, with which quantity, and a route for the vehicles, while minimising the total cost (transportation and inventory costs). However, since the actors and parameters of the IRP are multiple, this definition is hardly representative of all real-life situations. Therefore, many variants of the IRP exist: most consider one vehicle only. Furthermore, the IRP is known to be an NP-hard problem [2]. Consequently, scholars dedicated their work to find the most suitable solution approaches for these variants. In the following, a collection of the most common variants of the IRP are presented. For a more detailed literature review, interested readers can refer to [4,5,6,7]

  • IRP with time-windows: Due to constraints related to urban deliveries such as rush hours or availability of parking slots, and to scheduling problems such as workers availability, the clients may require to be visited in a certain time interval. The IRP with time-windows is proposed in this context. A review of the IRP with time-windows literature is presented in [8].

  • IRP with transshipment: In order to design a network that is efficient in an economical sense, but also ecological, reducing the number of vehicles used to replenish the clients as well as reducing the total travelled distance is necessary. [9] introduced the IRP with transshipment in this context, where the replenishment is not only done from the supplier to a client but can also be done from a client to another client.

  • Cyclic IRP: The irregularities brought by scheduling on a large time horizon inspired the cyclic IRP. The scheduling is done in a smaller time interval and is reproduced over and over. A work in this context is presented in [10].

  • Multi-echelon IRP: For a globally optimised network, the IRP can be studied in a multi-echelon environment where multiple layers of the supply chain are included: a supplier, retailers and clients. [11] tackled this problem recently.

  • Travel-Time Constrained IRP Due to legal limitations of the work hours per day, or the perishability of the products, the travel-time constrained IRP emerges. [12] are the last to tackle this problem.

All the variants presented above consider that the travelling time from one location to another is constant throughout the day. Since traffic volatility can be a concern in real-life instances, a time-dependent variant is needed to account for it. Given the fact that time-dependent IRP literature is nonexistent, we turn to pure routing problems to better understand how this parameter is included.

The objective of time-dependent routing problems is to design the best routes in a graph where the duration or cost of travelling an arc can vary according to the time it is travelled. Interest over this area has spiked during the last decades. In [3], the authors propose an extensive review of time-dependent routing problems in the literature. They show that the time-dependent aspect is only considered for pure transportation problems such as: Time-Dependent TSP (TD-TSP), Time-Dependent VRP (TD-VRP) and Time-Dependent ARP (TD-ARP). They also show that the time-dependent problems are hard to solve in comparison to their basic counterpart, thus the need for new efficient approaches to solve them. The study concludes by stating that although the literature for time-dependent routing problem is consequent, it is relatively recent and there is still room for improvements. Perspectives for future research are given. In the following, we cite a collection of works published after this review by [3].

In [13], the authors model the TD-TSP as a constraint programming (CP) problem and propose a new global constraint called the “Time-Dependent no-Overlap” that extends the no-Overlap constraint. The results show that including this new constraint outperforms the CP models of the literature. In [14], the TSP with time-dependent service times is presented. In this version, the service time depends on the time a node is visited. The authors of [15] tackle the problem of minimising the expected emissions of CO2 for a time-dependent vehicle routing problem. The emission function depends in this case not only on the travelling time between two nodes but on the load of the vehicle as well. The results show that the improvement on emissions are proportionally larger than the deterioration of the tour length. In [16], a new ILP formulation for the TD-TSP is presented. Two tailored branch-and-cut algorithms are proposed with pre-processing rules, initial heuristics and valid inequalities. The proposed approaches are able to prove the optimality of more than 300 new instances of the literature and improve the number of nodes explored and the computational times. The authors of [17] propose a partially time-expanded network formulation that, instead of generating a time-expanded network in a static, a priori, fashion, does so in a dynamic and iterative manner. They propose an algorithm based on the dynamic discretisation discovery framework. The results show that the algorithm outperforms those of the literature and that it is robust with respect to all instance parameters, particularly the degree of travel time variability. In [18], the authors manage real-time perturbations on time-dependent functions in the context of a vehicle routing problem with time-windows. When perturbations occur and the delivery route is no longer feasible, due to time-windows violations or the violation of the horizon length, the time-dependent functions are updated and a re-optimisation with new-objectives is conducted. Most recently, [19] propose a new real-life benchmark for routing problems based on the traffic conditions of the city of Lyon, using a dynamic microscopic simulator of traffic flow. The purpose of their study is to show the impact of space granularity, i.e. the number of sensors deployed to monitor the traffic flow, and time granularity, i.e. the number and length of time steps, on the quality of the solutions for pick-up and delivery optimal tours. They conclude that when there is a full space coverage, exploiting time-dependent travelling time functions leads to better tours and that the smaller the time step, the better the tour gets.

The literature of the time-dependent routing problems provides benchmarks and ideas on how to model and solve efficiently time-dependent problems that are exploited throughout this paper.

3 IRP vs. Time-Dependent IRP (TD-IRP)

In this section, we discuss the difference between the IRP and the TD-IRP. A mathematical formulation for the IRP is presented, a time-dependent travelling time function and its properties presented and discussed and a mathematical formulation for the TD-IRP proposed.

3.1 Mathematical Formulation of the IRP

Let \(\mathcal {G}=(\mathcal {V},\mathcal {A})\) be a graph where vertex \(0 \in \mathcal {V}\) represents the supplier, \(\mathcal {V^{\prime }}=\mathcal {V} \backslash \{0\}\) the set of clients and \(\mathcal {A}\) a set of arcs. \(\mathcal {H}=\{1,2,...,|\mathcal {H}|\}\) is the scheduling time horizon and \(\mathcal {H^{\prime }}=\{0\} \cup \mathcal {H}\) the horizon including the period 0 which represents the initial state. \(p \in \mathcal {H^{\prime }}\) represents the index of the period. Each client \(i \in \mathcal {V^{\prime }}\) has a demand \(D_{i}^{p}\) for period \(p \in \mathcal {H}\), an initial inventory \(I_{i}^{0}\) and a maximum inventory level \(I_{i}^{\max }\). The supplier has an unlimited inventory capacity, an initial inventory \(I_{0}^{0}\), \(R^{p}\) products available at each period \(p \in \mathcal {H}\) and a vehicle with a maximal capacity C. Keeping one item in inventory for a period incurs a holding cost \(h_i\) for each actor \(i \in \mathcal {V}\). Finally \(\tau _{ij}\) represents the duration of travel through arc \((i,j) \in \mathcal {A}\) and c is the cost of one unit of time travelled.

Variables: let \(x_{ij}^{p}\) be a binary variable that equals to 1 if arc \((i,j) \in \mathcal {A}\) is travelled in period p, 0 otherwise. \(y_{i}^{p}\) a binary variable that is equal to 1 if client \(i \in \mathcal {V^{\prime }}\) is visited in period p, 0 otherwise. \(I_{i}^{p} \in \mathbb {R}\) represents the inventory level of actor \(i \in \mathcal {V}\) at the end of period \(p \in \mathcal {H^{\prime }}\) and \(q_{i}^{p} \in \mathbb {R}\) the quantity sent from the supplier to client \(i \in \mathcal {V^{\prime }}\).

figure a

The objective computes the total holding cost for each client \(i \in \mathcal {V}\) and time period \(p \in \mathcal {H^{\prime }}\) and the total travelling cost for \(p \in \mathcal {H}\). Constraints (1) are flow conservation constraints that compute the inventory level of the supplier at each period \(p \in \mathcal {H}\) from its previous inventory level, the quantity produced at p and the quantities sent to the clients at p. Similarly, constraints (2) state the flow conservation constraints regarding the clients. They compute the inventory level of each client \(i \in \mathcal {V^{\prime }}\) for each period \(p \in \mathcal {H}\) from its previous inventory level, the quantity received from the supplier and its demand for period p. The inventory capacity is enforced through several constraints: Constraints (3) state that the inventory level of client \(i \in \mathcal {V^{\prime }}\) at any period \(p \in \mathcal {H}\) must be lower than \(I_{i}^{\max }\), and constraints (4) state that a replenishment of this client at period \(p \in \mathcal {H}\) cannot exceed its maximal inventory level. Constraints (5) link variables \(y_{i}^{p}\) with \(q_{i}^{p}\), stating that a client \(i \in \mathcal {V^{\prime }}\) which receives a quantity at period \(p \in \mathcal {H}\), is necessarily visited at p. \(I^{\max }\) is used here as an upper bound for \(q_{i}^{p}\). Constraints (6) works similarly for the supplier, stating that the quantity leaving supplier 0 at period \(p \in \mathcal {H}\) is limited by the vehicle capacity C. Constraints (7) and constraints (8) are flow conservation constraints for the routing component for each \(i \in \mathcal {V^{\prime }}\) and respectively state that if a client is visited, one arc arrives to it and another leaves from it. Constraints (9) eliminates sub-tours, where \(\mathscr {S}\) is a set of sub-tours. Finally, constraints (10) to (13) enforce integrality and non-negativity conditions on the variables.

3.2 Time-Dependent Travelling Time Function

The main difference between the IRP and the TD-IRP resides in its routing component. Let \(\mathcal {T}\) be the length of a period \(p \in \mathcal {H}\). \(t \in \mathcal {T}\) represent the granularity in time for a period \(p \in \mathcal {H}\). For example, \(\mathcal {H}\) can represent the days and \(\mathcal {T}\) the hours of the day. In IRP, for all \(t \in \mathcal {T}\), the travelling time between a location i and j is constant and is equal to \(\tau _{ij}\). However, for the TD-IRP, the travelling time \(\tau _{ij}^{t}\) is no longer constant but depends on the time t when the vehicle leaves from i.

Producing time-dependent functions for routing problems is a field that many scholars took interest in. A variety of functions exist in the literature for the Time-Dependent Travelling Salesman Problem (TD-TSP): some are artificial while others are based on real traffic data. Rather than reviewing the time-dependent functions in the literature, we refer to [19] who propose a compact review of the functions available in the literature and their limitations and present a new one based on the traffic conditions of the city of Lyon, using a dynamic microscopic simulator of traffic flow. It consists of constant piece-wise travelling time functions \(\tau \) for each couple of locations with a number of time steps \(|\mathcal {M}|=\{1,12,30,60,120\}\) and lengths (respectively) \(L=\{720,60,24,12,6\}\) minutes, where \(\mathcal {|T|}=|\mathcal {M}| \times L\). An example of a constant piece-wise travelling time function between two locations with \(|\mathcal {M}|=120\) time-steps and \(L=6\) minutes is presented in Fig. 1. In this case, the travelling time between any two locations and for each time-step is computed as the shortest path and is given in seconds. These travelling time functions will be used as the travelling time functions of the TD-IRP in the remaining of the paper.

Fig. 1.
figure 1

A travelling time function between two locations where \(\mathcal {M}=120\)

A problem is faced when handling constant piece-wise travelling time functions is that the First In First Out (FIFO) property is not always satisfied.

3.3 First in First Out (FIFO) Property

A travelling time function \(\tau \) that enforces the FIFO property is such that:

$$t^{\prime }+\tau _{ij}^{t^{\prime }} \ge t+\tau _{ij}^{t} \qquad \forall (i,j) \in \mathcal {A}, \forall t,t^{\prime } \in \mathcal {T} \text { where } t^{\prime } \ge t$$

In other words, a travelling time function that enforces the FIFO property ensures that if leaving i to j at t, it is impossible to arrive later than when leaving i to j at \(t^{\prime }\) when \(t^{\prime }\) is later than t. The advantage of a travelling time function that enforces the FIFO property is that it is more realistic than one that does not. However, for constant piece-wise functions, the FIFO property is not satisfied for all \(t \in \mathcal {T}\).

In the case of a piece-wise function, the length of a period \(\mathcal {T}\) is split into \(\mathcal {|M|}\) discrete time steps of duration L (\(\mathcal {|T|}=|\mathcal {M}| \times L\)). Let \(m \in \mathcal {M}\) be the index of a time-step. Each time step \(m \in \mathcal {M}\) is identified in a time interval denoted by \(t_{m}\). Let \(t_{m}=[t_{m}^{\min };t_{m+1}^{\min }[\) where \(t_{m}^{\min }\) represents the beginning of interval \(t_{m}\). Finally, let \(\tau _{ij}^{m}\) be the travelling time of traversing arc \((i,j) \in \mathcal {A}\) when \(t \in t_{m}\). It is worth noting that in a constant piece-wise function, for all \(t \in t_{m}\): \(\tau _{ij}^{t}=\tau _{ij}^{m}\).

When there is an increasing discontinuity between time-step m and its successor \(m+1\), i.e. \(\tau _{ij}^{m} < \tau _{ij}^{m+1}\), the FIFO property is always satisfied in a piece-wise function since for all \(t^{\prime } \in t_{m+1}\) and \(t \in t_{m}\): \(t^{\prime }>t\) and \(\tau _{ij}^{m+1} > \tau _{ij}^{m}\). Therefore \(t^{\prime }+\tau _{ij}^{t^{\prime }} > t+\tau _{ij}^{t}\). However, when a decreasing discontinuity occurs, an interval exists in \(t_{m}\) for which the FIFO property is not satisfied. This non-FIFO interval is denoted by \(t_{m}^{\overline{FIFO}}\) where \(t_{m}^{\overline{FIFO}} \subseteq t_{m}\). We will demonstrate this through an example of a constant piece-wise travelling time function, where \(\mathcal {M}=3\) and \(L=5\), presented in Fig. 2. We also show how to define the interval \(t_{m}^{\overline{FIFO}}\) and transform the travelling time function \(\tau \), into one that enforces the FIFO property.

Following the non-FIFO travelling time function \(\tau \) presented in Fig. 2, if we leave i for j at \(t_\text {departure}=0\), we arrive to j at \(t_\text {arrival}=t_\text {departure}+\tau _{ij}^{m=1}=0+2=2\), whereas when we leave i at \(t^{\prime }_\text {departure}=4\), we arrive to j at \(t^{\prime }_\text {arrival}=t^{\prime }_\text {departure}+\tau _{ij}^{m=2}=4+7=11\). The FIFO property is satisfied in this case for all \(t \in t_{m=1}\) and \(t^{\prime } \in t_{m=2}\) since it is an increasing discontinuity. Now, if we leave i at \(t_\text {departure}=4\), we arrive to j at \(t_\text {arrival}=t_\text {departure}+\tau _{ij}^{m=2}=4+7=11\). Whereas if we leave i at \(t^{\prime }_\text {departure}=8\), we arrive to j at \(t^{\prime }_\text {arrival}=t^{\prime }_\text {departure}+\tau _{ij}^{m=3}=8+4=12\). The FIFO property is also satisfied. On the other hand, if we leave i at \(t_\text {departure}=6\), we arrive to j at \(t_\text {arrival}=t_\text {departure}+\tau _{ij}^{m=2}=6+7=13\) whereas if we leave i at \(t^{\prime }_\text {departure}=8\), we arrive to j at \(t^{\prime }_\text {arrival}=t^{\prime }_\text {departure}+\tau _{ij}^{m=3}=8+4=12\). In this case, the FIFO property is no longer satisfied since we arrive earlier by departing later. The interval \(t_{m}^{\overline{FIFO}}\) for which the function no longer satisfies the FIFO property is defined as \(t_{m}^{\overline{FIFO}}=\left]\max \left\{ t_{m}^{\min },t_{m+1}^{\min }-(\tau _{ij}^{m}-\tau _{ij}^{m+1})\right\} ;t_{m+1}^{\min }\right[\). In the case of the example, \(t_{2}^{\overline{FIFO}}=]\max \{4,8-(7-4)\};8[=]5;8[\).

Fig. 2.
figure 2

FIFO travelling function transformation procedure

Now that the interval \(t_{m}^{\overline{FIFO}}\) is identified, we need to transform this function into one that satisfies the FIFO property. Several ways to transform a non-FIFO function into a FIFO one exist; we use the one by [20] that simulates waiting times. Indeed, if for all \(t \in t_{m}^{\overline{FIFO}}\), instead of leaving right away we wait for the moment \(t_{m+1}^{\min }\), the FIFO property is always satisfied. In order to do this, the constant piece-wise function \(\tau \) is transformed into a linear piece-wise function such as

$$\tau _{ij}^{t}=\min \left\{ \tau _{ij}^{m=\lfloor \frac{t}{L} \rfloor },\min \limits _{f \in \mathcal {F}}f(t)\right\} \qquad \forall t \in \mathcal {T}, \forall (i,j) \in \mathcal {A}$$

\(\mathcal {F}\) is a set of linear functions f that are added for every decreasing discontinuity. The full procedure for the FIFO transformation is described in Algorithm 1.

figure b

3.4 Limits of the FIFO Travelling Time Function

Let \(x_{ijm}^{p}\) be a binary variable that is equal to 1 if the vehicle leaves \(i \in \mathcal {V}\) to \(j \in \mathcal {V}\) at time step \(m \in \mathcal {M}\) and 0 otherwise, when the travelling time function is constant piece-wise (non-FIFO). For an instance where \(|\mathcal {V}|=5\), \(|\mathcal {H}|=3\), \(|\mathcal {M}|=120\) and \(L=360\), the number of variables \(x_{ijm}^{p}\) denoted by \(\#x_{ijm}^{p}\) is equal to \(\#x_{ijm}^{p}=(|\mathcal {V}|-1)^2 \times |\mathcal {H}| \times |\mathcal {M}|= 4^{2} \times 3 \times 120=5,760\) variables.

Since the FIFO function is a linear step-wise function, knowing the time step in which location i is left is no longer sufficient. It is necessary to know the exact moment, in seconds. Therefore, discretising the length of the period into seconds is needed. Let \(x_{ijt}^{p}\) be a binary variable that is equal to 1 if the vehicle leaves \(i \in \mathcal {V}\) to \(j \in \mathcal {V}\) at second \(t \in \mathcal {T}\) and 0 otherwise, when the travelling time function is linear piece-wise (FIFO). The problem faced in this case is the number of the binary variables. Indeed, for the same instance, the number of variables \(x_{ijt}^{p}\) denoted by \(\#x_{ijt}^{p}\) is equal to \((|\mathcal {V}|-1)^2 \times |\mathcal {H}| \times |\mathcal {M}| \times L= 4^{2} \times 3 \times 120 \times 360=2,073,600\) variables. Optimising with such a number of variables, even though they can be reduced by cleaning the graph, is a tedious task. However, since the objective of our IRP is to minimise the cost of travelling but not the arrival time, and since the FIFO function simulates waiting at nodes, it is possible to produce solutions that satisfy the FIFO property with a non-FIFO function by allowing waiting at nodes. This prevents using a huge number of variables.

Let us consider an example presented in Fig. 3 where \(|\mathcal {V}|=3\), \(|\mathcal {M}|=3\) and \(L=5\) and for each arc (ij), a travelling time function is presented. Let us assume that an optimal solution is to visit locations 1, 2, 3 in the order \(1 \rightarrow 2 \rightarrow 3 \rightarrow 1\) and that the vehicle must leave location 1 at the beginning of the period, i.e. at \(t=0\). Therefore, we need to determine at what time the vehicle leaves 2 for 3 and at what time it leaves 3 for 1. Three cases are displayed: (i) non-FIFO travelling time function with no waiting allowed, (ii) FIFO travelling time function with no waiting allowed and (iii) non-FIFO travelling time function with waiting allowed. For (i) and (iii), the solution with minimum cost is to depart from 1 at \(m=1\), from 2 at \(m=1\) and from 3 at \(m=2\). For (ii) more than one optimal solution exist: leaving 1 at \(t=0\), leaving 2 at \(t \in \{0,1,2,3,4\}\) and leaving 3 at \(t \in \{5,6,7,8,9\}\). For (i) and (ii), these solutions are infeasible since no waiting at nodes is allowed. The optimal feasible solution is to leave 1 at \(m=1\), 2 at \(m=1\) and 3 at \(m=2\) for (i) and leave 1 at \(t=0\), 2 at \(t=1\) and 3 at \(t=2\) for (ii). The problem in this case is that although the vehicle leaves 3 at the same moment, it arrives later in the solution of (i) than in the solution of (ii). Therefore, the FIFO property is not satisfied. However, leaving 1 at \(m=1\), 2 at \(m=1\) and 3 at \(m=2\) is feasible for (iii). In this case, the arrival time in (ii) is equal to the arrival time in (iii), which means that the FIFO property is satisfied. We can conclude from this example that we are able to produce solutions that enforce the FIFO property while using a non-FIFO travelling time function by allowing waiting at nodes.

Fig. 3.
figure 3

Example 1: non-FIFO waiting not allowed vs. FIFO waiting not allowed vs. FIFO waiting allowed

3.5 Mathematical Formulation of the TD-IRP

Let us start by defining a time-dependent path, using the definition by [21].

Definition 1

Let \(P=<v_{1},...,v_{k-1},v_{k},v_{k+1},...,v_{n}>\) where \(v_{k} \in \mathcal {V}^{\prime }\) and \(v_{1}=v_{n}=0\) the supplier. Let \(T=<m_{1},...,m_{k-1},m_{k},m_{k+1},...,v_{n-1}>\) be a set of departure times. A time-dependent path [PT] is a combination of P and T where T represents the departure times of \(v_{k} \in P \backslash \{v_{n}\}\).

Let \(t_{v_{k}}\) and \(s_{v_{k}}\) be, respectively, the earliest departure time and the service time of location \(v_{k} \in P\) where:

  • \(t_{v_{k}}={\left\{ \begin{array}{ll} 0+s_{v_{k}} &{} v_{k}=0\\ \max \{ t_{v_{k-1}} + \tau _{v_{k-1},v_{k}}^{\lfloor \frac{t_{v_{k-1}}}{L} \rfloor } + s_{v_{k}}, \text { }t_{m_{k}}^{\min }\} &{} \forall k \in P \backslash \{v_{n}, v_{1}\} \end{array}\right. }\)

  • [PT] is infeasible \(\iff \exists v_{k} \in P: t_{v_{k}} \notin [t_{m_{k}}^{\min };t_{m_k+1}^{\min }[\)

Using this definition, infeasible paths can be detected and eliminated following the mathematical formulation presented below.

figure c
Fig. 4.
figure 4

Example 2: non-FIFO waiting not allowed vs. FIFO waiting not allowed vs. FIFO waiting allowed

The objective of the TD-IRP extends the objective of the IRP by incorporating the time dimension in the travelling cost. The model is extended with constraints (14) to (17). Constraints (14) link the variables \(x_{ijm}^{p}\) to variables \(x_{ij}^{p}\) stating that if an arc \((i.j) \in \mathcal {A}\), it is travelled in one time step only. Constraints (14) state that if a tour is scheduled, it starts from the supplier at the beginning of the period. Constraints (16) eliminate the infeasible time-dependent paths \(\overline{[P,T]}\). Finally, constraints (17) enforce the integrality of variables \(x_{ijm}^{p}\).

3.6 Time-Travel Constrained TD-IRP

Let us take a look at another example presented in Fig. 4, which is an alternative version of the example in Fig. 3. We reconsider the same three cases: (i) non-FIFO travelling time function with no waiting allowed, (ii) FIFO travelling time function with no waiting allowed and (iii) non-FIFO travelling time function with waiting allowed.

For (i) and (ii) the optimal feasible solutions are the same: departing from 1 at \(t=0\), from 2 at \(t=1\) and from 3 at \(t=2\). For (iii), an optimal solution is to depart from 1 at \(t=0\), from 2 at \(t=1\) and from 3 at \(t=10\). All these solutions enforce the FIFO property. However, the solution of (iii) does not only use waiting times to mimic the FIFO algorithm but uses it to improve the cost of solution by waiting even more. The problem with this kind of solutions is that they are not satisfactory in real life. Therefore, in order to avoid such solutions, it is necessary to constrain the total duration of travelling, hence the TD-TC-IRP.

Since in an IRP, the longest tour would visit all the clients of the network, we compute an upper bound of the solution of a TD-TSP for \(\mathcal {V}\) with the FIFO travelling time function. We refer to this upper bound as \(\mathcal {T}^{\text {new}}\) for the value in seconds and \(|\mathcal {M}^{\text {new}}|\) for the one in time steps. This upper bound will serve as a limit for the length of the tour. Therefore, \(\mathcal {T}=\max \{\mathcal {T},\mathcal {T}^{\text {new}}\}\) and \(|\mathcal {M}|=\max \{|\mathcal {M}|,|\mathcal {M}^{\text {new}}|\}\). Since the original length of the period \(\mathcal {T}\) is very large in comparison to the computed upper bounds of the TD-TSP, the TD-IRP becomes a TD-TC-IRP. Moreover, the model becomes smaller and easier to solve due to a smaller number of variables.

4 Results and Discussion

All experiments are conducted on a CPU Intel Xeon E5-1620 v3 @3.5 Ghz with 64 GB RAM using a branch-and-cut procedure with an execution time limit of 3600 s. The sub-tour elimination constraints as well as the time-dependent infeasible paths constraints are added dynamically using Gurobi 9.0.2 as a solver with the lazyConstraints parameter and the default number threads. As stated before, in order to make the TD-IRP a TD-TC-IRP, we compute upper bounds for the TD-TSP. To that purpose, a simple Iterated Local Search (ILS) algorithm is used. All algorithms are implemented with Java.

The benchmark used for these experiments is the result of a combination between the most commonly used benchmark of the IRP presented in [2] and the benchmark of the TD-TSP presented in [19] and discussed in Subsect. 3.2. The combination is made by replacing the euclidean coordinates in [2] with constant travel time functions between each 2 locations from [19]. We tested instances with a number of clients \(|\mathcal {V}| \in \{5,10,15,20,25,30\}\) and a number of periods \(|\mathcal {H}|=3\). For each value of \(|\mathcal {V}|\), 10 different instances are available. Each instance is combined with 6 different travelling time functions depending on the number of time steps \(|\mathcal {M}|=\{1,12,30,60,120\}\). The case \(|\mathcal {M}|=1\) is the basic IRP.

In order to see the impact of optimising with time-dependent travelling time functions, we solve the basic problem and the time-dependent problems. Moreover, we also solve the time-dependent problem using the partial solution given by the solution of the basic IRP. The partial solution here means that all the values of variables \(x_{ij}^{p}\), \(q_{i}^{p}\), \(y_{i}^{p}\) and \(I_{i}^{p}\) are fixed to the one found when solving the basic IRP, leaving variables \(x_{ijm}^{p}\) to be determined.

Table 1 presents the results of these experiments. Columns z, g and CPU(s) present, respectively, the objective value, the gap and the execution time, in average, of the basic IRP. Columns \(z_{\mathcal {M}}\), \(g_{\mathcal {M}}\) and \(CPU_{\mathcal {M}}(s)\) represent, respectively, the objective value, the gap and the execution time, in average, of the TD-IRP. Finally, column \(\overline{g}\) represents the gap between the solutions found using the basic solutions with time-dependent functions z to the time-dependent solutions \(z_{\mathcal {M}}\) where \(\overline{g}=\frac{z_{\mathcal {M}}-z}{z_{\mathcal {M}}}\)

Table 1. Results

We can see from Table 1 that the gaps \(\overline{g}\) between the basic solution when applied to a time-dependent travelling time-function and the time-dependent solution are fairly small, as the largest gap is \(5\%\) for \(|\mathcal {V}|=30\) and \(|\mathcal {M}|=120\). The reasons can be summarised in three points:

Departure Time From the Supplier: In this paper, we consider that the departure time from the supplier is always the beginning of the period, i.e. \(t=0\). Although for the constant case this parameter does not have an impact, since the travelling times are constant over the entire length of the period, it can have a big importance for the time-dependent case. The cost of the tour can heavily decrease if leaving later avoids travelling during time intervals where the traffic is congested.

Number of Clients: For \(|\mathcal {V}|=\{5,10,15,20\}\) the number of clients does not seem influential as the gaps \(\overline{g}\) are quite similar. This is due to the speed with which we can visit all the clients and get back to the supplier. As seen from Fig. 1, the travelling time function is not volatile in the first time-steps, and since it does not take a long time to visit up to 20 clients, all of the clients can be visited while avoiding congestion periods. However, for \(|\mathcal {V}|=\{25,30\}\) although the gaps does not show a big difference since the instances are not solved to optimality due to their hardness, we expect that the gaps will be bigger when optimality is achieved (Instances where \(|\mathcal {V}|=30\) and \(|\mathcal {M}|=120\) give a glimpse of this intuition). Indeed, when the number of clients is bigger, visiting all the clients requires more time and therefore it is not possible to entirely avoid congestion periods. This is where optimising with time-dependent travelling time functions becomes useful.

Structure of Time-Dependent Solutions: We observed that optimal time-dependent solutions are not very different from basic solutions, as the difference only resides in the values of variables \(x_{ij}^{p}\) and \(x_{ijm}^{p}\). This means that the same clients are visited for each period with the same quantities. The only difference is in the sequence in which the clients are visited. Therefore, since the gap in the cost is only seen in the transportation cost, its impact is not of a big importance as the inventory cost remains the same.

Note that the results presented in Table 1 can be heavily impacted by the upper-bounds of the TD-TSP. If the TD-TSP is solved to optimality, then the waiting times will be used only to mimic the FIFO transformation algorithm. However, since in our case the TD-TSP upper bounds are generated using an ILS algorithms, the performance of the algorithm has an impact on the TD-TC-IRP solutions. Indeed, the better the ILS performs, the shorter \(|\mathcal {T}|\) is, and vice-versa.

5 Conclusions and Perspectives

In this paper, we propose a new variant of the IRP, the TD-TC-IRP. In this variant, the travelling time between two locations is not constant throughout the day but depends on the time the arc is travelled and the length of a trip is constrained. A constant piece-wise time-dependent travelling time function of the TD-TSP literature is presented. We show that such functions do not necessarily satisfy the FIFO property and present a way on how to transform it to a linear piece-wise function that does. The limits of using a linear piece-wise function for optimisation purposes are discussed. To cater for this, a mathematical formulation for the TD-TC-IRP using a constant piece-wise function by allowing waiting at nodes, in order to always satisfy the FIFO property, is proposed. Numerical experiments are conducted on a new proposed benchmark where benchmarks from the literature of the IRP and the TD-TSP are combined using a branch-and-cut procedure. The results show that solving the TD-TC-IRP is harder than its basic counterpart. Moreover, it also shows that the solutions of the basic IRP performs almost as well as time-dependent solutions in a time-dependent environment. However, this last point can be the result of parameters such as the departure time from the supplier and the number of clients visited.

A future work would be to enhance the solving method by proposing new valid inequalities or new reformulations for the TD-IRP. Faster algorithms will help with two points: solving larger instances and considering the departure time from the supplier as a decision variable and no longer the beginning of the period. Another perspective is to consider a dynamic service time which will not be constant anymore but depends on the replenishment quantity.