SciELO - Scientific Electronic Library Online

vol.36 número4Effect of composite edible coating from Amaranthus cruentus flour and stearic acid on refrigerated strawberry (Fragaria ananassa) qualityRisk analysis and safe distances calculation considering atmospheric parameters uncertainlty índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados



  • No hay articulos citadosCitado por SciELO

Links relacionados

  • No hay articulos similaresSimilares en SciELO


Latin American applied research

versión impresa ISSN 0327-0793

Lat. Am. appl. res. v.36 n.4 Bahía Blanca oct./dic. 2006


An MILP framework for dynamic vehicle routing problems with time windows

R. Dondo and J. Cerdá

INTEC (Universidad Nacional del Litoral - CONICET)
Address: Güemes 3450 - (3000) Santa Fe - Argentina. Tel. +54(342)4559174/77 Fax: +54(342)4550944

Abstract — A key issue in logistics is the efficient management of a vehicle fleet servicing a set of customers with known demands. Every vehicle route must start and finish at the assigned depot, each customer is to be visited by a single vehicle and vehicle capacities must not be exceeded. These are the constraints for the capacitated vehicle routing problem (VRP) whose objective is usually the minimization of the travel distance. When every customer has an associated time window, we are dealing with the vehicle routing problem with time windows (VRPTW), an NP-hard problem extensively studied. In the static VPRTW, all the problem data are given. A more challenging subject is the dynamic VRPTW (DRVPTW) where routes must be periodically updated because of new service requests. In DVRPTW, the information on the problem is time-dependent since the data are in part given a priori and in part dynamically updated. As a result, the best solution must be periodically revised. There are two classes of DVRPTW solution methodologies: the immediate assignment that updates vehicle routes as soon as a new service request is received, and the deferred assignment retaining the new service calls for a certain time period before dispatching them all at once. The latter type has been adopted in this paper. At the time of revising their routes, the vehicles are already on duty and some nodes have already been visited. The remaining old customers that have designated vehicles are either being serviced or awaiting service. The customers to be considered in the DVRPTW include not only old customers still to be serviced but also new visit requests. The DVRPTW is tackled by solving a series of static VRPTW problems, with each one being defined every time the input data is updated. The approach assumes that each vehicle will start its new route at the location where it is servicing or to which it is traveling.

Keywords — Dynamic Routing Problems. MILP Reactive Strategy. Deferred Assignment.


The dynamic vehicle routing problem with time windows (DVRPTW) represents an interesting research issue since it presents some distinctive features with regards to the static VRPTW. In addition to the routing issue, another major topic is the dynamic scenario within which decisions are to be taken. Repeated changes in vehicle routing and scheduling have to be made at different times over a rolling time-horizon that should account for new service calls but also for earlier routing decisions. Real-world experience indicates that dynamic routing problems must be studied because:

  1. The economic benefits of an efficient logistical system are very significant
  2. Distribution scenarios where the information is dynamically updated are more frequent.
  3. Real-time data processing is becoming a feasible option due to the dramatic advances in computation and communications technology.

In dynamic routing problems, when re-routing is executed, the vehicle fleet is already on duty and some nodes already serviced are no longer considered. The remaining "old" customers that have designated vehicles are either being serviced or waiting for the service. Therefore, the set of customers in the DVRPTW problem should include old nodes still to be serviced and new pickup requests. Since quick execution time is a pre-requisite for on-line solution of the DVRPTW, a good trade-off between the solution quality and the required computer time must be achieved. Most proposed solution algorithms for the DRPTW are heuristics/methaheuristics but little research has been focused on model-based reactive formulations. This work introduces a reactive solution strategy for the DVRPTW that is based on a novel mixed integer linear problem (MILP) formulation and accounts for heterogeneous fleets. Using both angular and Euclidean metrics to identify neighboring routes for a given node, a small set of candidate tours for the (re)insertion of old/new customers can be defined and embedded in the formulation. Each time the proposed MILP model is solved, multiple vehicle-to-node (re)assignment and reordering of nodes are simultaneously performed. The proposed mathematical model has been derived by reformulating the reactive approach of Dondo and Cerdá (2005). The new methodology applies an "insertion & local search" strategy each time the vehicle routes & schedules are updated. By using such a two-step search strategy, the new customers are first assigned to vehicles while allowing a partial reassignment of old nodes (the insertion step), and subsequently the nodes on a given route visited by the same vehicle are optimally reordered (the local search step). The approach can be regarded as a deferred assignment methodology that retains the new service calls for a certain period of time before dispatching them all at once. The method was applied to a DVRPTW example that involves 50 nodes and 8 vehicles yielding satisfactory results at low CPU time.


Consider a route-network represented by an undirected graph G{I, P, N} with I = {i1, i2, ..., in} denoting the set of nodes or customers, and P = {p1, p2, ..., pl} representing the set of depots. Nodes and depots are connected by a set of route segments N = {(i,j) / i,jIP}. For each customer iI, there is a known load li to be picked-up (delivered) within a time window [ai, bi], where ai is the earliest service time and bi is the latest service time. There is set of vehicles V = {v1, v2, ..., vm} that must transport the load from (to) nodes iI to (from) depots pP. In addition, vehicle-dependent unit costs C = {cijv}, vehicle-dependent travel times Γ = {tijv} and travel distances D = {dij} are given data for any route segment (i,j)N. The service time on node i is denoted stiv. To apply the proposed approach, the set I is split into a pair of non-intersecting subsets I = {IoldInew}, where Iold denotes the set of old nodes already scheduled o serviced and Inew stands for the new customers to be inserted on the vehicle routes. In turn, the set Iold comprises the nodes earlier serviced (I1old) and those still to be visited or being currently serviced (I2old) at the update time; i.e. Iold = { I1oldI2old}. Problem DVRPTW should only account for the nodes included in I2old and Inew. The sets Iold , Inew , I1old and I2old all change with the update time tn. Customers already visited are transferred from I2old to I1old . In the same way, the vehicle set V can be decomposed into the pair of non-intersecting sets {VoldVnew}, where Vold stands for the vehicle fleet on duty and Vnew represent stand-by vehicles that have not yet been used. Vehicles that have already completed their tours are ignored by deleting them from the set Vold. For the multi-depot case, only vehicles belonging to Vold have designated depots while the ones for stand-by vehicles will be chosen by the DVRPTW. The problem goal is to find the updated vehicle routes & schedules that minimize a combination of vehicle fixed costs, travel time, distance-based and inconvenience costs. The solution must satisfy the following constraints: (i) each vehicle route must end at the same depot from which it departures; (ii) though the vehicle assignment may change when updating the routes, each node must be visited by a single vehicle; (iii) the total amount of load assigned to vehicle v along the tour must never exceed its capacity qv ; (iv) the duration of the trip for any vehicle v should be shorter than a maximum allowed routing time tvvmax; (v) the service at node i should start within the time window [ai, bi]. The proposed approach assumes that each vehicle will start its updated route at the node to (at) which is traveling (servicing) at the update time. Vehicle assignments for such old nodes i ∈ (I2 old )FI2old that become the starting points of the updated routes are consequently frozen. If vehicle v is the designated vehicle for node i ∈ (I2 old )F at the update time tn, must still be visiting i at time tn+1. Therefore, the set (I2 old)F will contain as many elements as the cardinality of the set Vold, i.e. a single frozen node for every vehicle already on duty. Each element of (I2 old)F will be represented by ivstart with vVold being the vehicle allocated to node i at the previous routing revision. On the other hand, non-frozen old nodes i ∈ (I2 old)NF and new nodes iInew can be (re)assigned but to a small set of neighboring routes in order to reduce the DVRPTW problem size. In other words, any node i ∈ { (I2 old)NFInew} can be (re)allocated to a vehicle vVi ⊂ V, where Vi is the set of vehicles traveling along neighboring routes around node i. To define the notion of neighboring route, two different metrics are used. A metric based on angles is defined to measure the "distance" between a node i and a given route traveled by vehicle v. In addition, an Euclidean metric is defined to measure the distance between a node i and the starting location of vehicle v. If both the angle and the Euclidean distances are less than some specified values, the vth-route is regarded as a neighboring trip and the node i can be (re)assigned to vehicle v during the rerouting process. As already mentioned, the vehicle vVold starts its updated route provided by DVRPTW at node ivstart. Therefore, ivstart will precede any node j ∈ { (I2 old)NFInew} located on the same route and visited by vehicle vVj. If PRj stands for the set of nodes that should precede node j, then node ivstart will belong to PRj. Selected customer time windows often prescribe beforehand some precedence relationship between some pairs of nodes if a common vehicle visits them. Before solving the dynamic VRPTW problem, some TW-based rules are applied to identify such precedence relationships between nodes and subsequently include them into the set PRi for each node iI.


The proposed MILP formulation requires to define the following binary variables: (i) The assignment variable Yiv to allocate vehicle vV to customer i ∈ {(I2 old )NFInew} . (ii) The assignment variable Xvp to allocate vehicles vVnew to depots pPv. (iii) The sequencing variable Sij to denote that the customer site i ∈ { I2oldInew} is visited before (Sij =1) or after the node j (Sij = 0). A single Sij is required to define the precedence relationship for a pair of nodes (i,j). In the case node i belongs to PRj ⊆ { I2oldInew} and both nodes (i,j) are serviced by the same vehicle (Yiv = Yjv = 1), then Sij =1 and, consequently, such a sequencing variable can be deleted from the problem formulation.

Objective function: The goal is to find an updated set of routes & schedules for the vehicle fleet that accounts for the new service requests and the current state of the distribution in progress scenario and minimizes an appropriate combination of vehicles fixed costs (∑ vVpP cfv), distance costs (∑ vV CVv), travel time costs (∑ vV ρ tTVv) and inconvenience costs (∑ iIρ i (Δ ai + Δ bi) + ∑ vV ρ v Δ vv). Costs due to time windows violations (∑ iI ρ iai + Δ bi)) are also known as "customer dissatisfaction".



Assignment of vehicles to customers: Every node i ∈ { (I2 old )NFInew} must be assigned to a single vehicle vVi. The summation is extended over the subset of vehicles Vi that can be allocated to node i.


Forbidden vehicle assignments. If the pair of nodes (i,j) ∈ { I2 oldInew : i j} satisfies the following condition , then they are said to be incompatible nodes in the sense that they cannot be serviced by the same vehicle. Otherwise, at least one of the time window constraints would be violated. If the pair (i,j) are incompatible nodes, then the constraint (3.a) is to be incorporated in the problem formulation. If a particular node j ∈ { (I2 old )NFInew} is incompatible with the frozen old node ivstart , then Eq. (3.a) reduces to constraint (3.b), Yjv is made equal to 0 and deleted from the problem formulation.

{Yiv + Yjv ≤ 1} (3.a)
are incompatible
{Yjv = 0} (3.b)
j is ith incompatible

Assignment of vehicles to depots: A single depot pPv should be assigned, if used, to every vehicle vVnew where Pv is the set of feasible depots for v. In such a case, the summation on Eq. (4) will be equal one; otherwise it should be zero.


Vehicle capacity constraints: Equations (5) state that the overall cargo transported by vehicle v to the assigned depot, including those ones picked-up at nodes i ∈ (I1 old)v must never exceed its capacity qv. (I1 old)v stands for old nodes already serviced by vehicle v while (I2 old )v comprises the old nodes that can be visited by vehicle vVi, including ivstart. Eq. (5.a) is written for vehicles on duty (vVold) with known depots while Eq. (5.b) applies to stand-by vehicles vVnew that, if used, are housed at depots selected by the DVRPTW.


Time windows and maximum service time constraints: Constraints (6) ensure that the updated schedule does not violate time windows and maximum service time hard constraints. If regarded as soft constraints, they can be violated at a penalty cost that is proportional to the violation size given by the terms Δ ai, Δ bi and Δ Tv, respectively. Timing constraints can be treated as hard constraints by driving Δ ai, Δ bi and Δ tv in Eqs. (6.a) and (6.b) to zero.


Node sequencing constraints: If a pair of nodes i,j ∈ { I2oldInew} are on the same tour and node i is visited before, then the pickup service at node j can never start at a time Tj earlier than the vehicle departure time from node i increased by the travel time tij. The departure time from node i is found by simply adding the service time sti to the time Ti at which the service begins. This conditional constraint given by Eqs. (7.a) should become active only if both requirements are satisfied: (i) both nodes have been assigned to the same vehicle (Yiv = Yjv, = 1, for some vehicle v) and (ii) node i is visited earlier (Sij = 1). If both are on the same tour but node j is first serviced (Sij = 0), then Eq. (7.b) will be binding and Eqs. (7.a) will become redundant. Otherwise, Yiv + Yjv 2 and constraints (7.a) and (7.b) both become redundant. Similar relationships between the distance-based traveling costs for any pair nodes (i,j) ∈ { I2oldInew} can also be written .


If iPRj, then every node j located on the same route will be preceded by node i. In such a case, Eqs. (7.a) and (7.b) reduce to constraints (7.c) that become active only if nodes i and j are visited by the same vehicle v (Yiv = Yjv = 1).


On the other hand, i = ivstart will be the starting point of the new route for vehicle v and, therefore, it will precede every node j located on the same route. In such a case, Yiv = 1 and Eq. (7.c) reduces to constraint (7.d).


Furthermore, the following condition must be satisfied for the initial node of a tour traveled by vehicle vVnew,


Since the initial node of the vth-tour is not known beforehand, the condition (7.e) is applied to any node i ∈ { I2oldInew} that can be (re)assigned to vehicle vVinew.

End tour conditions: Eqs. (8) state that both the total distance-based traveling cost (CVv) and the total travel time (TVv) associated to the vth-tour can be obtained from the travel cost/time (Ci/Ti) to spend up to the last node serviced by v, by simply adding to it the cost (cipv) /time (sti+tipv) required to return to the starting depot. Since the last node visited by vehicle v is not known beforehand, the constraints (8) are written for any node i ∈ { I2oldInew} . Constraints (8.a) apply to old vehicles vVold while constraints (8.b) are written for new vehicles.



The mathematical model introduced in the previous section has been embedded into an insertion & local search procedure that is summarized in Figure 1. The procedure parameters are the following: (1) φ1: maximum angular distance from node i to the currently assigned vth-route axis θv, below which node i must still be serviced by the same vehicle v in the next iteration. If node i is farther than φ1 , then it could be transferred to another tour. (2) φ0: maximum angular distance with respect to another vth-route axis θv below which node i can be serviced by vehicle vVi on the next iteration. (3) d1max: maximum Euclidean distance from node i to the Cartesian location of the currently assigned vehicle vVi , below which node i will be serviced by the same vehicle vVi on the next iteration. If node i is farther than d1max , then it could be transferred to a neighboring tour. (4) d0max: maximum Euclidean distance from node i to the Cartesian location of another vehicle v, below which node i can be serviced by vehicle v on the next iteration. These parameters govern the shapes and sizes of the operational zones for old vehicles vVold and determine the levels of zone overlapping. In the initial step of the procedure, parameters φ1, φ0, d1max, d0max are all tuned. In addition, the time step Δ t is adopted, the iteration number n is set equal 0 and the update time to is made equal to 0. Initially, Iold = I1old ∪ I2old is an empty set and Inew includes all service requests available at t= 0. Moreover, the sets (I2old)F & (I2old)NF are also empty sets and the available vehicles all belong to the set Vnew. In step 2, the resulting DVRPTW mathematical formulation is solved.

Figure 1: The solution strategy

After finding the best routes for the used vehicles, values of the distances φ and d for every pair (i,v) are determined in order to find the set of neighboring tours for every non-frozen node at the next iteration (step 3). Moreover, scheduled & serviced nodes are transferred from Inew to I2old while used vehicles are moved from Vnew to Vold. In addition, n = n+1, tn+1 = tn + Δ t , the old nodes already visited are transferred from I2old to I1old and new service calls are incorporated in Inew. Furthermore, unused and new available vehicles are included in Vnew and the node ivstart on every route is identified to define the set (I2old)F = { ivstart , vVold} and, consequently, (I2old)NF = I2old - (I2old)F . Additionally, the precedence ordering of old nodes iI2old on the current routes are stored in the sets PRi. After that, the step 4 is executed and the DVRPTW model is solved again but this time in two steps to first find the nodes to be visited by each vehicle (the insertion step) and then the way they are sequenced on each route (the local search step). While making the insertion step, the ordering of old nodes located on the same route at the previous iteration, given by PRi, are preserved if they are still visited by a common vehicle on the next iteration. By doing that, a great deal of sequencing variables can be deleted from the problem formulation. Similarly, assignment variables Yiv and constraints (2)-(5) can be omitted during the local search step. After updating the routes, step 3 is repeated again and the procedure ends when either the last routing update has been executed (n > nmax ) or all customers have been serviced (I2old = Inew = ∅ ).


The proposed dynamic VRPTW framework has been tested by tackling a variant of the fifty-node Solomon benchmark problem R-110 (Solomon, 1987). Changes were introduced in problem R-110 to mimic a dynamic scenario. The example involves a central depot hosting an homogeneous fleet of 8 vehicles (V1-V8) all featuring a capacity qv = 200 and a maximum service time tvvmax = 230. Six of them, namely V1-V6, are ready to perform pickup tasks at t = 0. The other two vehicles V7-V8 will be held in reserve waiting for additional service calls that can hardly be satisfied by the vehicles on duty without violating time constraints (See Table 1). At t = 0, just 25 service requests represented by the first 25 nodes of the benchmark problem R-110 have been received. The selected objective function includes traveled distances and inconvenience costs (ρi = ρv = 1) but no fixed costs (cfv = 0). In addition, it was adopted ρt = 1.10-4 to also minimize both the overall idle time and the vehicle schedule makespan. Time window-based rules identifying incompatible nodes have been applied before tackling the formulation in order to initialize the sets PRi. The resulting VRPTW problem was solved to establish the optimal routes & schedules for the six vehicles V1-V6 on a 733 Mhz 256 MB RAM Pentium III PC using ILOG OPL Studio 3.7 with the CPLEX 9.0 solver. The optimal solution featuring just non-overlapping routes and no time window constraint violations has been found in 4.12 s and is shown in Table 2 and Fig 2. Nodes already serviced at the next update time are highlighted in this table. Vehicle tours are assumed to be periodically updated after some fixed period of time (Δ t = 40) to schedule additional pickup services. While the six vehicles are servicing customers, eight new requests have been accepted within the time interval [t = 0, t = 40] (see Table 1). Since Δ t = 40, the first update of vehicle routes and schedules is made at t = 40. At that time, services at nodes n2 and n5 have been completed while pickup tasks at nodes n12 and n21 by vehicles V3 and V6 are just being performed (see Table 2). Therefore, vehicles V3 and V6 will be ready to start the updated routes from such nodes after completing the ongoing services. In turn, vehicles V1 and V4 are moving along the route segments connecting the pairs of nodes (n2, n15) and (n5, n17), respectively. Therefore, vehicles V1 and V6 will still be allocated to nodes n15 and n17, respectively, from which they are going to start the updated routes. All other vehicle-node assignments can be redefined and the unused vehicles V7 and V8 are now feasible choices. As the scheduled vehicle V5 is still idle at t = 40, then every node previously assigned to V5, even the earliest visited n7, can be transferred to another route. In particular, n7 was reallocated to vehicle V2.

Table 1: Services requested while the vehicles are on duty

Node locations are detailed in Solomon (1987)

Results for this routes & schedules adjust are summarized in Table 2 and depicted in Fig. 2. It can be noted that node n13 previously assigned to vehicle V1 was reallocated to V6. Similarly, old nodes n1, n6, n7, n9, n20 and n24 were inserted in other routes. The second routing update is performed at t = 80 to incorporate the service calls received within the time period [t = 40, t = 80] while permitting the use of the additional vehicle V8. Nonetheless, time window constraint violations cannot be avoided during the second update and their sizes are given by: Δ bn27 = 20.90, Δ bn43 = 3.30, Δ bn50 = 1.00. The last solution update was performed at t = 120 to meet service requests received during the period [t = 80, t = 120]. Several time window (Δ bn50 = 1.00, Δ bn27 = 20.90, Δ bn24= 27.30, Δ bn43 = 3.30, Δ tn42 = 8.40) and a maximum service time constraint (Δ tv7 = 27.30) violation arise. This indicates that at least one more vehicle is necessary to avoid customer's dissatisfactions. The final tours assigned to each vehicle are the following:

V1: D - n2 - n15 - n40 - n26 - n37 - n45 - D
V2: D - n31 - n7 - n18 - n8 - n46 - n36 - n48 - D
V3: D - n12 - n30 - n20 - n34 - n35 - n1 - D
V4: D - n5 - n17 - n16 - n44 - n6 - n33 - D
V5: D - n19 - n47 - n49 - n11 - n10 - n32 - D
V6: D - n21 - n4 - n25 - n23 - n22 - n41 - n39 - D
V7: D - n28 - n29 - n9 - n3 - n50 - n27 - n24 - D
V8: D - n14 - n38 - n43 - n42 - n13 - D

Computational data for successive solved problems are summarized in Table 3. This table also reports the customer-status at each update-time and problem-resolution-times (including both re-assignment and resequencing stages).

Table 2: Vehicle routing & schedules for the dynamic instance of problem R-110


In this work, a novel MILP model-based algorithmic procedure for solving the dynamic version of the VRPTW problem has been developed. The proposed DVRPTW approach is capable of handling multiple depots and heterogeneous vehicles fleets. The MILP problem representation was embedded into an insertion & local search solution strategy. In this way, each time the vehicle routes are updated, the DVRPTW formulation is tackled by using a two-step solution strategy. First, dynamically revealed service requests are inserted in the current routes while allowing some degree of reassignment of scheduled nodes. However, the precedence relationships among old nodes on every tour are preserved during Step 1. A better solution is subsequently found by swapping nodes of any given tour at Step 2. A relatively hard DVRPTW instance that initially involves 25 nodes and then gradually incorporates 25 further customers to service with a fleet of 8 vehicles was successfully solved. Vehicle routes have been updated three times while the vehicles were on duty. Efficient tours were obtained through solving MILP formulations with rather low requirement of binary variables. Therefore, the proposed approach seems to be very promising to utilize it in "real time" environments.

Figure 2: Geographical view of successive solution updates

Table 3: Computational results for successive solution updates

1. Dondo R. and J. Cerdá. (2005) "A reactive MILP approach to the Vehicle Routing Problem with Time Windows". Sixth International Conference on Industrial Logistics (ICIL 2005), 91-102. Montevideo February 14-18.         [ Links ]
2. ILOG OPL Studio 3.7. (2003) User's Manual. ILOG S.A. France.         [ Links ]
3. Solomon M. (1987). Algorithms for the vehicle routing and scheduling problem with time window constraints. Oper. Res. 32, 254-265.
        [ Links ]

Received: December 19, 2005.
Accepted for publication: July 12, 2006.
Recommended by Editor A. Bandoni.

Creative Commons License All the contents of this journal, except where otherwise noted, is licensed under a Creative Commons Attribution License