An adaptive guidance approach for the heuristic solution of a minimum multiple trip vehicle routing problem

An adaptive guidance approach for the heuristic solution of a minimum multiple trip vehicle routing problem

Computers & Operations Research 36 (2009) 3041 -- 3050 Contents lists available at ScienceDirect Computers & Operations Research journal homepage: w...

414KB Sizes 1 Downloads 131 Views

Computers & Operations Research 36 (2009) 3041 -- 3050

Contents lists available at ScienceDirect

Computers & Operations Research journal homepage: w w w . e l s e v i e r . c o m / l o c a t e / c o r

An adaptive guidance approach for the heuristic solution of a minimum multiple trip vehicle routing problem M. Battarra a , M. Monaci b , D. Vigo a,∗ a b

DEIS, University Bologna, via Venezia 52, 47023 Cesena, Italy DEI, University of Padova, via Gradenigo 6/A, 35131 Padova, Italy

A R T I C L E

I N F O

Available online 25 February 2009 Keywords: Vehicle routing Multiple trip Time windows Heuristics

A B S T R A C T

One of the most important problems in combinatorial optimization is the well-known vehicle routing problem (VRP), which calls for the determination of the optimal routes to be performed by a fleet of vehicles to serve a given set of customers. Recently, there has been an increasing interest towards extensions of VRP arising from real-world applications. In this paper we consider a variant in which time windows for service at the customers are given, and vehicles may perform more than one route within a working shift. We call the resulting problem the minimum multiple trip VRP (MMTVRP), where a “multiple trip” is a sequence of routes corresponding to a working shift for a vehicle. The problem objective is to minimize the overall number of the multiple trips (hence the size of the required fleet), breaking ties in favor of the minimum routing cost. We propose an iterative solution approach based on the decomposition of the problem into simpler ones, each solved by specific heuristics that are suitably combined to produce feasible MMTVRP solutions. An adaptive guidance mechanism is used to guide the heuristics to possibly improve the current solution. Computational experiments have been performed on a set of real-world instances arising from a multiregional scale distribution problem. The obtained results show that the proposed adaptive guidance mechanism is considerably effective, being able to reduce the overall number of required vehicles within a limited computing time. © 2008 Elsevier Ltd. All rights reserved.

1. Introduction The vehicle routing problem (VRP) calls for the determination of the optimal routes to be performed by a fleet of vehicles to serve a given set of customers, and is one of the most important, and studied, combinatorial optimization problems. The interest on VRP is indeed motivated both by its practical relevance and by its considerable difficulty. During the last 40 years hundreds of papers have considered all the main variants of this problem for which both exact and heuristic approaches were proposed: the capacitated VRP, the VRP with time windows (VRPTW), the VRP with Backhauls and the pickup and delivery problem, just to mention the most important ones. A complete overview of the state-of-the-art on VRP is given in the book by Toth and Vigo [25], where exact and heuristic approaches for the main variants of VRP are examined, together with some relevant case studies from real-world applications. This survey was recently updated in [12,15]. ∗ Corresponding author. Tel.: +39 512 093029; fax: +39 547 339208. E-mail addresses: [email protected] (M. Battarra), [email protected] (M. Monaci), [email protected] (D. Vigo). 0305-0548/$ - see front matter © 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.cor.2009.02.008

In recent years, there has been an increasing interest towards socalled “rich” VRP models. These are extensions of VRP incorporating important issues arising in real-world applications and generating new and interesting families of optimization problems. A first survey summarizing several of these extensions is given by Bra¨ ysy et al. [8,9]. In several routing applications vehicles may perform more than one route during a given working shift. This may happen when either customer demands are relatively large with respect to vehicle capacity, hence few customers may be served in a single route, or when tight time windows or spread time constraints are imposed. In all these cases the same vehicle may be assigned to more than one route, hence reducing the overall number of required vehicles. In the route aggregation into multiple trips some additional operational constraints must be taken into account. Namely, (i) the routes must not overlap in time and be compatible in terms of vehicle requirements (e.g., capacity, loading equipment, etc.), (ii) there exists a sufficient time interval between consecutive routes so as to allow loading/unloading operations to be performed at the depot, and (iii) the overall spread time of the working shift (i.e., the time interval between the departure of the first scheduled route and the arrival at

3042

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

7 6 5

6

4

4

3

3

2

7 5

2

1

1 Fig. 1. Example of route aggregation into multiple trips.

the depot of the last one) does not exceed a given maximum length. This family of problems is generally known as that of multiple trip VRP (MTVRP). An illustrative example of route aggregation into multiple trips is given in Fig. 1 that shows in the left part the set of seven initial routes. The thick line below some of the routes indicates the associated working shift spread time. In the right part of the figure, two multiple trips are obtained by aggregating two routes into each of them. The most widely studied variant of MTVRP considers a fixed fleet made up of identical vehicles available at a central depot. A set of customers is given, each having a specific demand and service time. Each vehicle may perform more than one route during a working shift. The working shift has a standard duration, but in general overtime is permitted. The MTVRP goal is to define a set of multiple trips, (i.e., working shifts) servicing all the customers once, without violating the capacity constraint on each single route, and minimizing a suitable function of the routing cost and overtime. Note that this is a single day problem and not a periodic one, since all the shifts will be operated in the same calendar day. The MTVRP was introduced by Fleischmann [14], who used a savings based algorithm to construct the routes and a bin packing heuristic to combine them into working shifts. Taillard [24] generated a large set of routes through a tabu search algorithm for the VRP, followed by a bin packing heuristic for the working shift aggregation. Brandao and Mercer [7] defined a tabu search algorithm that starts from a solution built with a nearest neighbor insertion heuristic and uses insertion and swap moves. The tabu search considers variable-sized tabu lists, aspiration criteria and allows infeasible solutions with respect to the maximum permitted overtime. The same authors applied a similar approach to solve a real-world application with several additional constraints, see [6], whereas further realworld variants are considered by Avella et al. [2], Jeon et al. [16], and Cornillier et al. [13]. Petch and Salhi [22] considered an iterative approach, with initial solutions built through a savings algorithm followed by a packing heuristic. New routes are iteratively constructed through a route-first-cluster-second method and then again packed into working shifts. Recently the same authors also proposed a genetic algorithm, see [23]. An adaptive memory approach has been considered by [21] where the adaptive memory contains a large pool of routes. At each iteration a subset of these routes is chosen and improved through a tabu search procedure that also aggregates them. The resulting routes are returned into the adaptive memory and the process is iterated. We finally mention Alonso et al. [1] who used tabu search to solve a more general class of periodic problems that has MTVRP as a special case, and Azi et al. [3] who developed an exact column generation approach for the solution of small sized instances of the variant including time windows and a single vehicle. In this paper we consider a variant of MTVRP arising from a realworld problem concerning the strategic fleet sizing in the distribution of goods to supermarkets on a multi-regional scale territory. As other MTVRPs from the literature this is a single day problem and not a periodic one, since the reassignment of deliveries to different days is not admitted. The main differences between our problem

and previously studied variants of MTVRP are (i) the presence of time window constraints, (ii) the impossibility of overtime, (iii) the goods belong to multiple commodities that cannot be transported together on the same vehicle, and (iv) the strategic requirement of minimizing the overall number of used vehicles. This latter issue has indeed a huge practical relevance, being related to the minimization of fixed and investment costs, but it has received relatively little attention in the literature in which the emphasis is mainly devoted to the operational context, i.e., to the minimization of variable routing costs, including overtime. We call the resulting problem minimum multiple trip VRP (MMTVRP) and to the best of our knowledge, no specific solution approach for it has been presented so far. We propose a general iterative algorithm that makes use of existing heuristics developed for related problems and guides them towards the construction of good overall solutions. This approach is strongly related with hyperheuristics (see [10]), where different heuristics are combined into an overall algorithm through a coordinating metaheuristic as well as with self-adaptive guidance strategies developed within evolutionary algorithms (see [18]) and reactive search (see [5]). The main component of our algorithm is a two-phase heuristic that defines a feasible MMTVRP solution by decomposing the problem into two subproblems. In the first one, a set of routes is determined by means of a VRPTW heuristic, while in the second step the resulting routes are aggregated into multiple trips through a greedy approach. This heuristic is the building block of an overall iterative process. At each iteration, critical time intervals are detected through the computation of a lower bound on the number of multiple trips required to aggregate the current set of routes. Then, a penalty mechanism is used to discourage the VRPTW heuristic in creating routes that cross the critical time intervals. A further feedback mechanism forces the VRPTW heuristic to generate some routes having a delayed starting time or a shortened spread time. The resulting routes are more likely to be combined into a smaller number of multiple trips. This iterative approach was used to solve the realworld MMTVRP involving three commodities with different service requirements and several hundreds of customers at a multi-regional scale. In a few iterations the algorithm proved able to produce substantial improvement with respect to the initial solution, reducing on average by about 5% the total number of required vehicles. This overall guidance scheme is fairly general and of some use for practitioners. It may be easily adapted to other contexts in which one has simple heuristics at hand and wants to use them for the solution of a more general problem that has a different objective function. The rest of the paper is organized as follows. The next section discusses in detail the MMTVRP and introduces the necessary notation. Section 3 describes the basic heuristic and the adaptive guidance framework. The result of the testing on real-world MMTVRP instances is given in Section 4, and Section 5 draws some conclusions. 2. Problem description and notation The specific problem we address in this paper originates from a real-world application concerning the distribution of goods to

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

supermarkets and hypermarkets from a centralized depot that serves a multi-regional territory. More precisely, we are given a daily problem, in which a set of commodities C has to be distributed to a set of customers J. We denote as ¯J = J ∪ {0}, where 0 is the index associated with the depot. For each such commodity c ∈ C, customer j ∈ J is associated with a non-negative demand qjc , a time window [ajc , bjc ], and a service time pjc . We assume that both time windows and service times are expressed in minutes. In our case, three commodities are considered: vegetables (V), fresh products, as milk and meat (F), and non-perishable items (N). These commodities are incompatible with each other, i.e., they may not be transported together in a vehicle. A homogeneous fleet of vehicles is available at the depot. For each commodity c, all vehicles have a given loading capacity Qc , a time window and a service time at the depot, indicated as [a0c , b0c ], and p0c , respectively. Vehicles are also associated with a spread time D, corresponding to the maximum multiple trip duration such as the difference between the end time of the last route and the start time of the first route in the multiple trip. For each commodity c, vehicles have a specific maximum spread time Dc to be used for route creation. In addition, vehicles have a routing cost, rc , per km traveled while transporting commodity c. The time required at the depot to load a vehicle is composed by a fixed maneuver time V and a unit loading time Uc for each unit of commodity c. Finally, for each pair (i, j) of points i, j ∈ ¯J, the shortest traveling distance on the road network fij , and the corresponding traveling time in minutes gij , are given. The time horizon for the optimization is denoted by T and is a given interval of the working shift measured in minutes, i.e., T ⊆ [0, 1440]. A route is a cycle starting and ending at the depot and serving a given subset of customers such that (i) a single commodity is delivered along the route, (ii) the total quantity of commodity delivered to the visited customers does not exceed the associated vehicle capacity, (iii) both the loading at the depot and the unloading at each customer start within the corresponding time window, possibly waiting if the vehicle arrives too early, and (iv) the route duration, defined as the difference between the arrival time instant at the depot and the instant in which loading operation started, does not exceed the specific spread time, Dc  D. Note that a route is uniquely defined by a sequence of customers to be visited (i.e., the routing component) and by the time instant in which service is started at the depot and at the customers (i.e., the scheduling component). Moreover, it should be observed that the scheduling component of a route may be modified so as to obtain a family of feasible ones. For example, one is allowed to delay the service instant at the first customer so as to delay the departure time of the vehicle from the depot. Both the new and the original routes have the same routing component, hence they are equivalent for what concerns load feasibility, which only depends on the served customers, and routing cost, which only depends on the km traveled. However, they have different scheduling components, and this can be extremely important when routes have to be combined. The duration of a route, defined above as the difference between the arrival time instant at the depot and the instant in which loading operation started, clearly depends on the current scheduling component. The length of a route is the total distance traveled, and the routing cost is proportional to its length. Given a route and a time instant t ∈ T, we say that the route is active in t if this time instant lays between the starting and the ending time of the route. In addition, given the routing component a route is strongly active in a time instant if the route is active for all possible schedulings. A multiple trip is a daily assignment for a vehicle made up by one or more routes, such that (i) the routes do not overlap in time, (ii) the appropriate loading time between two consecutive routes is present and (iii) the spread time of the multiple trip does not exceed D. The problem calls for the determination of a minimum cardinality set of

3043

multiple trips that serves all the customers, breaking ties according to minimum total route length. An integer linear programming model of MMTVRP can be obtained by extending the set partitioning based model presented by Olivera and Viera [21] for MTVRP, including the specific characteristics of MMTVRP in the column definition. However, given the current state of the art on exact solution of VRPs (see, e.g. [4]) it is highly unlikely that exact algorithms based on this kind of formulations can solve even small sized instances of our problem. 3. The proposed heuristic algorithm As mentioned in the Introduction, our solution approach to MMTVRP is based on the decomposition of the problem into simpler ones, each solved by means of heuristics which are suitably combined and guided by a self-adaptive guidance strategy. In particular, at each iteration, we obtain a feasible solution to MMTVRP in two steps: we first generate a set of feasible routes, independently for each commodity (see Section 3.1), while in the second step we combine them by means of a packing heuristic (see Section 3.2). This approach is fairly common in the literature for this family of problems (see, e.g. [14]), but has the main disadvantage that in the route creation step no attention is paid at generating routes that can be easily aggregated in the subsequent step. To possibly overcome this drawback, we propose an adaptive guidance mechanism that encourages the creation of routes easier to be aggregated (see Section 3.3). 3.1. Vehicle routing heuristic The first step of our iterative algorithm generates a set of feasible routes (i.e., both their routing and scheduling components). Since we have different commodities, which cannot be delivered together into the same route, this phase is solved separately for each commodity, by means of a VRPTW heuristic. We considered an adaptation to VRPTW of the well-known twophase approach proposed by Christofides [11]. In this algorithm, an initial set of routes is created by using a sequential insertion heuristic. In the second phase, pivot customers are selected from the existing routes and used to initialize the new set of routes. These new routes are then completed by means of a parallel insertion heuristic. The insertion cost used in this algorithm takes into account, as usual, the extra mileage incurred. It may also include penalty factors, defined by the iterative guidance mechanism so as to discourage certain insertions, as will be described in Section 3.3. The resulting routes are further improved through a 2-opt local search procedure. As mentioned in Section 2, for a given sequence of customers several scheduling solutions may be compatible with time window constraints. To favor route aggregation, the scheduling of each route is defined so as to minimize its duration. In other words, starting from a classical schedule where each customer is served as early as possible we remove all the waiting time possibly present at the customers while keeping route feasibility. Fig. 2 provides an illustrative example by considering a small portion of a route. Fig. 2(a) is the initial route portion, whereas in Fig. 2(b) waiting time is eliminated. Once this route shrinking has been performed, we associate with each route a non-negative maximum shift of its starting time instant, compatible with the feasibility of the resulting schedule, as illustrated in Fig. 2(c), where h denotes such a shift. We observe that, whenever some waiting time is still present at a customer after the shrinking has been performed, there must exist a time window constraint at a customer served earlier in the route that prevents any forward shift of the route. Hence, routes with positive shift value cannot have positive waiting time at the customers and new schedules can be obtained by rigidly shifting forward in time

3044

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

h

Fig. 2. The shift applied to a time windows constrained problem: (a) is the initial route; (b) is the associated route where waiting times are possibly removed; and (c) shows the maximum rigid shift h of the route.

the original schedule until the maximum shift is reached (see again Fig. 2(c) for an illustration). Given a route k, we denote by sk and ek its starting and ending time instants, and by hk the associated maximum forward shift, respectively. According to the specific way in which scheduling component is defined by the VRPTW heuristic, route k is active in time interval [sk , ek ], whereas if (sk + hk ) < ek , it is strongly active in time interval [sk + hk , ek ]. We also note that, according to our definition, a route is strongly active only in those time instants in which it is performed for sure; applying a shift to a route can modify the actual time instants in which a given route is active. 3.2. Packing heuristic Once routes have been created by means of the heuristic of the previous section, a packing algorithm is executed so as to produce a minimum cardinality set of multiple trips. Note that in this phase routes associated with different commodities can be aggregated into the same multiple trip. This route aggregation problem is very similar to the well-known bin packing problem (BPP, see [19]), in which one is required to pack a given set of items, each with a positive weight, into the minimum number of identical bins with known capacity. In our case, items are associated with routes, whose weight is the corresponding route duration, and bins with working shifts, whose capacity is the spread duration. In addition, each route has a specific start time, and may be possibly shifted forward so as to favor a better aggregation. Finally, a minimum time interval at the depot between two consecutive routes has to be included, so as to allow for maneuvering and loading. For the solution of this problem simple heuristics based on the extension of approaches proposed for the BPP are generally adopted in the literature (see, e.g. [14] or [24]). The only exception is represented by Monaci and Vigo [20] who proposed a possibly better algorithm based on a truncated branch and bound (TBB) scheme. In

our case, due to the iterative nature of our overall solution approach, we preferred to keep small computing times for the packing step, and we therefore adopted a simple greedy algorithm. Routes are initially sorted according to non-decreasing starting time, breaking ties according to minimum route duration. The heuristic starts with an empty multiple trip solution and considers the routes in such order. At each iteration, a set of (partial) multiple trips is present, and the feasible insertion of the current route r at the end of each of the existing multiple trips is considered. Route r is added to the multiple trip which minimizes the duration of idle time between the current end of the multiple trip and the start of the loading operation for route r. If route r cannot be feasibly added to any existing multiple trip, a new one is initialized for it. The process is iterated until all routes have been assigned to multiple trips. Despite its simple structure, the proposed algorithm has computationally proved able to provide a very good compromise between solution quality and computing time, compared with more sophisticated approaches from the literature. In particular, we run our greedy approach and the TBB heuristic by Monaci and Vigo [20] on a relevant benchmark of route packing instances, derived from the real-world problems used in the computational testing described in Section 4. The greedy approach produced solutions that are less than 1% worse than those found by TBB. On the other hand, the greedy algorithm required computing times that are about two orders of magnitude smaller, i.e., on average less than 1 s compared to 135 s. 3.3. The adaptive guidance mechanism The adaptive guidance approach is based on the iterative execution of the constructive heuristics described in Sections 3.1 and 3.2. At each iteration, the critical features of the current solution are possibly detected so as to try and remove them in the subsequent iteration. To this end, we either define suitable penalties to be associated with some time intervals, or we modify some input parameters of the current instance. More precisely, the guidance mechanism concentrates on two aspects of the current set of multiple trips: (i) the reduction of the number of routes that are strongly active during a specific critical time interval and (ii) the change of the start time and the reduction of the spread time for routes belonging to critical commodities. At each iteration, we detect both critical time intervals and critical commodities and use them to influence the set of routes to be produced by the routing heuristic in the following iteration. These two mechanisms as well as the overall iterative algorithm are examined in detail in the following. 3.3.1. Critical time intervals The first guidance tool is based on the penalization of the critical time intervals, i.e., intervals in which a large number of routes are strongly active. The rationale underlying this choice comes from the observation that often the routes constructed tend to overlap heavily in certain time intervals. Clearly, this overlap greatly reduces the possibility of aggregating the routes into multiple trips and, although it cannot be completely avoided due to time windows and other constraints, some routes can be modified. A critical time interval is illustrated in Fig. 3, in which horizontal bars represent the routes at their minimum start time, vertical segments indicate the corresponding maximum end time, and the two thick dashed vertical lines enclose the critical time interval. To estimate the quality of the current solution we compute a simple lower bound on the minimum number of multiple trips required to aggregate the set of routes currently produced by the VRPTW heuristic. The lower bound is not valid for the original MMTVRP instance but is used to determine critical time intervals in which too many routes are strongly active in the current solution.

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

3045

Fig. 3. Critical time interval for a given set of routes.

As better described later, these intervals are associated with a set of penalties, which are used within the routing algorithm to modify the insertion costs, so that different (possibly easier to be aggregated) solutions are produced. For each time instant t ∈ T we compute the number of routes t that are strongly active. Hence, an immediate lower bound L on the minimum number of multiple trips in any feasible MMTVRP solution derived from the current set of routes is given by the maximum of the t values, t ∈ T. A critical time interval i is defined as a time interval [i , i ] in which t = L, for all t ∈ [i , i ]. Our approach is based on the definition of penalties associated with each critical time interval, so as to discourage the creation of routes that are strongly active during such intervals. All critical time intervals [i , i ] found during the execution of the iterative algorithm are stored into a pool data structure together with the associated penalty values, and are used within the routing construction heuristic in the following way. When evaluating the insertion within a route of a customer whose time windows does not span any critical time interval, we take into account the possibility that the resulting route overlaps a critical interval, as will be described in the following. If this happens, the insertion cost includes both the extra mileage incurred and the current penalty of the interval. In this way we can discourage such an insertion, while favoring routes that do not overlap critical intervals, if possible. We consider as overlapping the two types of insertion depicted in Fig. 4. More precisely, Fig. 4(a) gives an initial portion of a route in which two customers i and j are served within their time windows (indicated by round brackets). Service time is indicated by a thick horizontal line, and the critical time interval is delimited by the gray box. The following Figs. 4(b) and (c) illustrate the two cases in which penalty is applied, i.e., whenever the insertion occurs entirely before, as that of customer h shown in Fig. 4(b), or after the critical time interval, as that of customer h shown in Fig. 4(c), respectively. Observe that in both cases the penalty is applied because the time window of the inserted customer does not overlap the critical time interval. The rationale of our choice is that, whenever the time window of an inserted customer overlaps the critical interval, it is very likely that any route serving that customer overlaps the critical interval as well. In this case it is useless to penalize such an insertion, whereas our aim is to penalize routes that, to serve an additional customer, become active during a critical interval. The penalty-based approach detects critical intervals by analyzing the current solution and tries to discourage their use in the

i

j

i h j

i h j

Fig. 4. Examples of insertions in which the penalty associated with a critical time interval is applied.

following iterations by modifying the objective function for the VRP heuristic. This method shares some similarities with Lagrangian relaxation, in which Lagrangian penalties are defined so as to encourage feasibility of the current relaxed problem. Hence, we pushed this similarity forward by adopting a penalty definition and updating scheme that mimics the subgradient method commonly used to optimize Lagrangian penalties. Initially, no critical interval exists. At each iteration we construct a new set of routes through the VRPTW heuristic, we possibly detect new critical intervals and we associate each of them a penalty as follows. Let I be the index set of critical time intervals. As previously mentioned, each interval i ∈ I is defined by its start and end time h instants, denoted as i and i , respectively. In addition, let i be the penalty associated with interval i at iteration h.

3046

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

Whenever a new critical time interval i is detected, say during the h-th iteration, its initial penalty to be used in the following iteration h h+1 = ¯ , where is 

*

i

h

¯ =  · S¯ h (Lh − L∗ − 1).

(1)

In this equation, Lh and L∗ denote the values of the lower bound computed at the h-th iteration and that of the minimum lower bound computed so far, respectively. In addition, S¯ h is the maximum feasible insertion extra mileage computed by the route construction heuristic in the h-th iteration (i.e., without taking into account the contribution due to penalties). Finally,  is a scaling parameter determined through our computational testing, taking values in [0, 0.4]. The value of  is initially set to 0.4, and it is halved if the MMTVRP solution value was not improved during the last six iterations. In the subsequent iterations, penalty of interval i ∈ I to be used in iteration h + 1 is computed as   Mih ¯ h h+1 h i = i + 1 − h  , (2) L

Fig. 5. Example of multiple trips in which the route marked with ∗ starts too early and is not aggregated. The corresponding commodity is critical.

where Mih measures the average distance between the current lower bound value Lh and the number of strongly active routes in the h interval and ¯ is computed as in (1). More precisely, i Mih =

t=i (L

h

− t )

i − i + 1

.

(3) h

In Eq. (2) we assume that i = 0 if interval i is detected for the first time at iteration h. In this case, since Mih = 0, the penalty for

h the interval is initialized to ¯ . As previously observed, the updating mechanism we adopted is very similar to the subgradient method used in Lagrangian optimization. The underlying idea is that, for a given time interval, the associated penalty must be increased in a way proportional to the number of strongly active routes (normalized with respect to the value of the best lower bound found so far). In addition, the proposed scheme allows for a reduction of the penalty associated with a given interval if the current solution has reduced the average number of strongly active routes in that interval. During our preliminary computational testing we adopted other simpler penalty updating rules, but the above described mechanisms obtained far better results.

3.3.2. Critical commodities The second adaptive guidance mechanism we use is aimed at improving the routes of critical commodities, i.e., commodities whose routes are not well packed into multiple trips during the current iteration of the packing heuristic. This guidance mechanism is therefore based on the analysis of the multiple trips produced by the packing heuristic, whereas in the previous guidance mechanism critical time intervals were determined by simply analyzing the routes produced by the VRPTW algorithm and not the resulting multiple trips (see Section 3.3.1). In addition, this mechanism is implemented by changing some input parameters for the next execution of the VRPTW heuristic, in contrast with the other guidance mechanism that was handled through a penalty system. Identifying critical commodities is clearly a very difficult task, therefore we adopted the following simple definition. A commodity c is critical if its first route with respect to the starting time was not aggregated with other routes by the packing heuristic. This generally happens for two reasons: (i) a too long duration of routes or (ii) a too early start of routes. Intuitively, an example of case (i) may arise when customers requiring commodity c have relatively small demands and large time windows: route construction is therefore not tightly constrained, leading to routes that may include several

*

Fig. 6. Example of multiple trips in which the route marked with ∗ is too long and is not aggregated. The corresponding commodity is critical.

customers hence being quite long. In addition, these routes may also start early so as to accommodate many customers along them; their long duration may thus limit the possibility of shifting forward their start time. An alternative cause of early start of a route that cannot be shifted forward is represented by the presence of customers with a relatively narrow time window, early in the time horizon. In both such cases, the spread time constraint makes it difficult to aggregate these routes with other ones. Illustrative examples of these situations are depicted in Figs. 5 and 6, in which routes associated with the same commodity are given the same filling. In Fig. 5 the route marked with ∗ starts too early to be aggregated with any other, and it is the first one starting for the corresponding commodity: such a commodity is defined critical. Similarly, in Fig. 6 the route marked with ∗ is too long to be aggregated with any other, and it is the first route starting for the corresponding commodity: such a commodity is defined critical. We handle a critical commodity c by modifying some of the input data of the VRPTW heuristic, when applied to that commodity, in two ways related to the drawbacks mentioned above. First, we shift forward the start of the time window [a0c , b0c ] for the service at the depot, hence reducing its width. Second, we define a new value for the spread time of the routes specific to the commodity, Dc . In this way two effects are introduced on the routes of commodity c: (i)

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

routes are shifted forward in time and (ii) their duration is possibly reduced. The new value for the start instant of the service time window at the depot, hereafter called a0c , is defined as follows. Let R be the index set of customers in the first route of commodity c. We determine time instant t¯ as t¯ = min{bjc − g0j },

(4)

j∈R

which represents the maximum start time of a single-customer route that serves each customer j ∈ R. In addition, let s be the start time of the second route according to starting time order for the commodity. The new start time for the service at the depot for commodity c is then updated as a0c = min{t¯, s , c }, where c is a maximum starting time threshold that prevents the current time window at the depot to become too narrow or even infeasible. In our implementation we defined c as the minimum between a0c + 23 Dc , to guarantee 1 that the starting time is not too much delayed, and b0c − 10 Dc , to ensure a minimum width of the time window at the depot, equal to 1 10 Dc . The new spread time, called Dc , is randomly generated in the interval [ 23 Dc , Dc ]. The rationale of this choice is that excessively reducing the spread time favors route aggregation but may lead to the creation of a much larger set of routes with relatively few customers, thus increasing the total route length. Therefore, we imposed a quite large bound on the minimum value of Dc , equal to 23 Dc . According to our computational testing, given a critical commodity it is profitable to redefine simultaneously both the start time for the service at the depot and the spread time, rather than modifying just one of them per iteration. 3.3.3. Overall algorithm The overall structure of the proposed algorithm is as follows. We start with an empty set of critical time intervals and with no critical commodity (i.e., with the original depot time windows and spread time for each commodity). At each iteration, say h, of the adaptive guidance we: (i) Run the VRPTW heuristic, separately for each commodity c ∈ C, using the specific depot time window [a0c , b0c ], spread time h

(ii) (iii)

(iv)

(v)

Dc , and current penalties i for the critical intervals [i , i ], i ∈ I, returning a set of routes, each associated with its possible forward shift. Given the overall set of routes determined for all commodities compute a lower bound on the total number of multiple trips. Possibly determine new critical intervals to be inserted into set I with a new penalty defined by (1), and update the penalties of all existing critical intervals according to (2). Run the packing algorithm on the overall set of routes determined for all commodities, returning the current set of multiple trips and possibly updating the best known solution. Examine the set of multiple trips to detect critical commodities and possibly update the depot time window and spread time for such commodities.

To avoid getting stuck, we restart our algorithm in case the same critical intervals are detected for three consecutive non-improving iterations. In this case, the original values of the parameters associated with the spread time and the time window at the depot are restored for each commodity. Critical time intervals are initialized so as to uniformly penalize the working shift horizon, possibly considering some new intervals. To this end, we randomly generate an integer number a ∈ {1, . . . , 3}, and divide the working shift horizon into a subintervals of equal length. Then, a critical interval is randomly generated within each such subinterval. Each interval gener-

3047

h ated in this way is assigned a constant penalty equal to ¯ /5, where h ¯ is the penalty computed at the last iteration, say h.

When additional computing time is available it may be worthwhile using a better packing heuristic to try and combine in a more effective way the routes into multiple trips. Since the TBB heuristic of Monaci and Vigo [20] may obtain slightly better solutions but requires a much larger computing time, we adopted the following strategy so as to possibly improve the overall result with a limited additional computational effort. We run for a given number of iterations the above described adaptive guidance heuristic with the greedy packing heuristic. During the execution we store the best MMTVRP solution found as well as all the routes found at each iteration together with the corresponding lower bound on the number of multiple trips. Then, we run the TBB packing heuristic, with a time limit of 150 s, on each set of routes whose corresponding lower bound is smaller than the number of multiple trips in the best known MMTVRP solution. As shown in Section 4, this refining approach allowed us to improve the obtained solutions while about halving the required computing time with respect to the option of using TBB as packing heuristic within the adaptive guidance mechanism. 4. Computational results The adaptive guidance mechanism and the inner heuristics for both the routing and the route packing were coded in C and used to solve a set of six real-world instances of MMTVRP concerning the distribution of goods to supermarkets on a multi-regional scale territory. Each instance represents the service to be performed on a different day of the week by a fleet of homogeneous vehicles located at a central depot. As far as we know the only test instances for MTVRP variants proposed in the literature do not include time windows. Therefore these instances cannot be used to evaluate the performance of our approach that is strongly dependant on the presence of time window constraints. The goods belong to three commodities: vegetables (V), fresh products (F), and non-perishable items (N), which are incompatible on board of the vehicles. Each commodity has different characteristics for what concerns both the distribution of the time windows and the usual amount of demand, expressed with a metric specific for that commodity. For example, vegetables and fresh products demands are generally small with respect to the vehicle capacity, and the time windows associated with vegetables occur in the morning. On the contrary, demands for non-perishable items are often quite large (and in some cases equal to a full truck) and the associated time windows are evenly distributed along the day. Table 1 summarizes the main characteristics of the instances. For each instance we give the total number of customers to be served (n), as well as, for each commodity: (i) the number of customers (denoted as nV , nF and nN ), (ii) the average ratio of the demand with respect to the corresponding vehicle capacity (q¯ V , q¯ F , q¯ N ), and (iii) the average start time (a¯ V , a¯ F , a¯ N ), the maximum end time (max{bV }, max{bF }, max{bN }) and average width of the associated ¯ V, w ¯ F, w ¯ N ). In the considered instances, the manoeutime window (w ver time V at the depot is 15 min, whereas the loading time Uc is equal to 1 min per unit for all commodities. Finally, the spread times D and Dc , for all commodities c, are equal to 840 min. Table 2 reports the results of the computational testing we performed and illustrates the impact of the adaptive guidance mechanism on the initial solution, within 25 iterations of the main loop. For each instance, the table gives the number of customers to be served (n) and an estimate on the minimum number of multiple trips, indicated as L. The value L is the minimum value of the lower bound on the number of multiple trips, computed over the 25 performed iterations. Note that this is not a valid lower bound for MMTVRP but, as far as we know, no valid bounding procedure has been presented

3048

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

Table 1 Overall characteristics of the test instances. n

Day

Vegetables (V)

Fresh food (F)

Non-perishable (N)

nV

q¯ V

a¯ V

max{bV }

¯V w

nF

q¯ F

a¯ F

max{bF }

¯F w

nN

q¯ N

a¯ N

max{bN }

¯N w

1 2 3 4 5 6

394 473 403 465 481 297

167 149 175 174 184 183

0.24 0.26 0.20 0.24 0.28 0.30

260.87 255.36 260.60 252.96 258.61 256.26

540 540 540 540 540 540

144.67 151.04 146.46 151.09 148.59 150.38

84 182 91 123 144 67

0.10 0.09 0.17 0.16 0.16 0.35

397.50 438.35 427.91 451.83 403.65 477.54

1080 1140 1140 960 1140 1140

108.93 289.85 232.91 233.90 218.54 328.88

143 142 137 168 153 47

0.64 0.66 0.65 0.61 0.45 0.35

614.06 585.63 607.23 599.11 591.96 617.23

1140 1140 1140 1140 1140 1110

127.76 138.80 142.55 137.86 135.88 102.77

Average

422

178

0.25

257.44

540

148.71

113

0.17

432.80

1100

235.50

132

0.56

602.54

1135

130.94

Table 2 Computational results. Day

1 2 3 4 5 6 Average

n

394 473 403 465 481 297

L

83 87 70 88 88 60

Initial solution

Total Time

Best Iter.

55 816 58 001 52 265 60 527 61 207 32 305

504 691 524 686 745 507

10 13 21 16 20 6

53 354

609

14

Best solution

#R

#MT

%err

Len.

Dur.

Time

#R

#MT

%err

Len.

Dur.

164 180 158 175 189 101

88 99 78 94 95 66

106.0 113.8 111.4 106.8 108.0 110.0

33 447 35 519 33 842 38 168 37 105 19 476

54 849 58 100 51 950 60 402 60 410 32 872

21 26 21 26 30 19

158 175 157 174 189 103

83 92 75 91 94 63

100.0 105.7 107.1 103.4 106.8 105.0

34 004 35 725 33 908 38 680 38 205 18 985

161

87

109.3

32 926

53 097

24

159

83

104.7

33 251

in the literature either for the problem under study or for related problems that may be used as valid relaxations. For both the initial and for the best solution found within the 25 performed iterations, the table reports the following information: • #R: total number of routes determined by the routing heuristic; • #MT: number of multiple trips determined by the packing heuristic; • %err: percentage ratio of the number of multiple trips with respect to L; • Len.: total length of the multiple trips (in km); • Dur.: total duration of the multiple trips (in min). In addition, we report the run time in seconds required for the first iteration (column Time), the total running time in seconds required for the 25 iterations (Total Time), and the iteration at which the best solution is attained (column Best Iter.). Note that almost all computing time is spent within the routing heuristic, the time for both the packing and the adaptive mechanism being negligible. The quality of the initial solutions reported in Table 2 is comparable to that of solutions produced by expert planners. Indeed, the planning process used at the company that provided us with the test instances was a two phase approach in which first the routes were built using a commercial VRPTW software and then manually aggregated into multiple trips. Moreover, the VRPTW software was based on the same routing heuristic as we used. Computational results clearly show that the adaptive guidance mechanism is able to improve the initial solution for all instances. The number of multiple trips decreases up to seven units per instance and the gap with respect to L is about halved and reduced on average to 104.7% within about 10 min of total computing time. The improvement on the number of multiple trips is achieved without compromising the overall quality of the routing, since in the best solutions both the total length and the duration of the multiple trips increase by less than 1%. Moreover, the vehicle productivity, defined as the percentage ratio of the average multiple trip duration over the spread time is also increased in the best solution, reaching about 75%. Finally, since our initial solutions are not worse than the man-

ual solutions produced by expert planners, the obtained improvement over practical solution is comparable with those mentioned in [17,26] for similar applications. To give a further illustration of the typical impact of the adaptive guidance mechanism over the overall solution structure, Fig. 7 reports the multiple trips of initial and best solution found for the instance of Day 3. The figures include a grid spaced with 1 h steps and at the bottom report a hatched bar whose length is equal to the spread time. It can be seen that in the best solution the overall structure of the routes has been substantially modified and that the distribution of the starting time of the multiple trips is much smoother. A typical evolution of the adaptive guidance algorithm is illustrated by Figs. 8 and 9, that report the number of multiple trips and the total route length, respectively, along the various iterations for the instance of Day 3. It can be seen that the best solution in terms of number of multiple trips is found quite early, namely at iteration 7. Later, new solutions are found with the same number of trips and possibly better total route length (see iterations 8, 10, 14, 19, 21, and 22). Among all the solutions with the minimum number of multiple trips (denoted with a black dot in Fig. 9), the one having minimum total route length is the one (circled in the figure) obtained at iteration 21. We finally observe that within 25 iterations, on average 1.5 new critical intervals are generated at each iteration. The time windows at the depot and the spread times for critical commodities are modified on average every four iterations. Finally, within the 25 iterations, the restart is performed at most twice. Better results can be obtained, at the expense of a larger computing time, by either performing a larger number of iterations of the adaptive guidance algorithm, or using the post-optimization step based on a better route packing heuristic described in Section 3.3.3. By increasing the number of iterations up to 100, the algorithm produced a slight improvement on the number of required multiple trips leading to an average percentage error equal to 104.3% with computing times that are roughly four times larger. In addition, with a larger number of iterations the restarting becomes more frequent, occurring on average every 15 iterations.

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

3049

Multiple Trips

Fig. 7. Effect of the adaptive guidance mechanism on the instance of Day 3. On the left, initial solution with 78 multiple trips and on the right the best solution with 75 multiple trips.

80 79 78 77 76 75 74 73 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Iterations

Total Route Length

Fig. 8. Number of multiple trips at each iteration for Day 3.

34400 34300 34200 34100 34000 33900 33800 33700 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Iterations

Fig. 9. Total route length at each iteration for Day 3. The solutions marked with a dot are those corresponding to the minimum number of multiple trips.

The post-optimization step of Section 3.3.3 improved half of the instances, obtaining an average percentage error equal to 103.7%. However, the associated average computing time was more than 1500 s since about half of the packing solutions were recomputed using the TBB heuristic.

5. Conclusions and future research In this paper we illustrated an adaptive mechanism that is used to guide simple heuristics in order to obtain good quality solutions of a complex VRP, called MMTVRP. This problem arises in a practical

3050

M. Battarra et al. / Computers & Operations Research 36 (2009) 3041 -- 3050

application concerning the distribution of goods from a central depot to supermarkets at a multi-regional scale. In this type of applications, the service may produce several short routes that have to be aggregated into complete working shifts so as to minimize the size of the required fleet. The solution method adopted in this paper decomposes the problem in two subproblems, as generally done in the literature for this type of problems (see, e.g. [24]): first, using a routing heuristic, a set of single routes is determined which, in the second step, are aggregated into multiple trips through a specific packing heuristic. Clearly this decomposition may produce rather poor results since the routes constructed in the first step do not take into account explicitly the aggregation to be done later. As a consequence, several routes are difficult to be aggregated being too long or too concentrated around particular time intervals. We proposed a method to improve such an initial solution that discourages the creation, in the first step, of routes that will turn out to be difficult to pack. More precisely we used two different guidance mechanisms. The first one associates penalties with the so-called critical time intervals, for which it is desirable to reduce the number of routes that span them. The penalties are updated in a Lagrangianlike fashion, by analyzing the solutions found along the various iterations. The second guidance mechanism modifies the route start time and spread time for critical commodities. The adaptive guidance mechanism improved the quality of the solution found within a limited number of iterations. The adaptive guidance mechanism is a fairly general and flexible guidance paradigm that can be used whenever a difficult problem is solved through the decomposition into a sequence of subproblems, each tackled by a specific simple heuristic that however has a myopic behavior. Further research will therefore be devoted to the extension of the guidance mechanism to other difficult variants of routing and scheduling problems. Acknowledgments Work partially supported by Ministero dell'Università e della Ricerca, Italy. The authors gratefully thank Salvatore Melluso of SCSconsulting for fruitful discussion about the real-world application as well as the Editor and two anonymous referees for their thorough comments that greatly improved this paper. References [1] Alonso F, Alvarez MJ, Beasley JE. A tabu search algorithm for the periodic vehicle routing problem with multiple vehicle trips and accessibility restrictions. Journal of the Operational Research Society 2008;178:963–76.

[2] Avella P, Boccia M, Sforza A. Solving a fuel delivery problem by heuristic and exact approaches. European Journal of Operational Research 2004;152:170–9. [3] Azi N, Gendreau M, Potvin J-Y. An exact algorithm for a single-vehicle routing problem with time windows and multiple routes. European Journal of Operational Research 2007;178:755–66. [4] Baldacci R, Toth P, Vigo D. Recent advances in vehicle routing exact algorithms. 4OR 2007;5:269–98. [5] Battiti R, Brunato M, Mascia F. Reactive search and intelligent optimization. Operations research/computer science interfaces, vol. 45. Berlin: Springer; 2008. [6] Brandao J, Mercer A. A tabu search algorithm for the multi-trip vehicle routing and scheduling problem. European Journal of Operational Research 1997;100:180–91. [7] Brandao J, Mercer A. The multi-trip vehicle routing problem. Journal of the Operational Research Society 1998;49:799–805. [8] Br¨aysy O, Gendreau M, Hasle G, Lokketangen A. A survey of heuristics for the vehicle routing problem, part I: basic problems and supply side extensions. Technical Report, SINTEF, Oslo, Norway; 2003. [9] Br¨aysy O, Gendreau M, Hasle G, Lokketangen A. A survey of heuristics for the vehicle routing problem, part II: demand side extensions. Technical Report, SINTEF, Oslo, Norway; 2003. [10] Burke E, Kendall G, Newall J, Hart E, Ross P, Schulenburg S. Hyper-heuristics: an emerging direction in modern search technology. In: Glover F, Kochenberger GA, editors. Handbook of metaheuristics. International series in operations research & management science, vol. 57. New York: Springer; 2003. p. 457–74. [11] Christofides N, Mingozzi A, Toth P. The vehicle routing problem. In: Christofides N, Mingozzi A, Toth P, Sandi C, editors. Combinatorial optimization. Chichester, UK: Wiley; 1979. p. 315–38. [12] Cordeau J-F, Laporte G, Savelsbergh MWP, Vigo D. Vehicle routing. In: Barnhart C, Laporte G, editors. Handbook in OR&MS, 2007. p. 367–428. [chapter 6]. [13] Cornillier F, Laporte G, Boctor FF, Renaud J. The petrol station replenishment problem with time windows. Computers & Operations Research 2009;36: 919–35. [14] Fleischmann B. The vehicle routing problem with multiple use of vehicles. Fachbereich Wirtschaftswissenschaften, Universit¨at Hamburg; 1990. [15] Golden B, Raghavan S, Wasil EA, editors. The vehicle routing problem: latest advances and new challenges. Berlin: Springer; 2008. [16] Jeon G, Leep HR, Shim JY. A vehicle routing problem solved by using a hybrid genetic algorithm. Computers & Industrial Engineering 2007;53:680–92. [17] Koskosidis YA, Powell WB. Application of optimization based models on vehicle routing and scheduling problems with time windows constraints. Journal of Business Logistics 1992;11(2):101–28. [18] Kramer O, editor. Self-adaptive heuristics for evolutionary computation. Berlin: Springer; 2008. [19] Martello S, Toth P. Knapsack problems: algorithms and computer implementations. Chichester: Wiley; 1990. [20] Monaci M, Vigo D. A heuristic algorithm for trip aggregation in vehicle routing applications. In: Proceedings Odysseus 2003, freight transportation and logistics. Palermo, Italy, 2003. [21] Olivera A, Viera O. Adaptive memory programming for the vehicle routing problem with multiple trips. Computers & Operations Research 2007;34:28–47. [22] Petch RJ, Salhi S. A multi-phase constructive heuristic for the vehicle routing problem with multiple trips. Discrete Applied Mathematics 2003;133:69–92. [23] Salhi S, Petch R. A GA based heuristic for the vehicle routing problem with multiple trips. Journal of Mathematical Modelling and Algorithms 2007;6: 591–613. [24] Taillard ED, Laporte G, Gendreau M. Vehicle routing with multiple use of vehicles. Journal of the Operational Research Society 1996;47:1065–70. [25] Toth P, Vigo D, editors. The vehicle routing problem. Philadelphia: SIAM; 2002. [26] Vliet A, Boender CGE, Rinnooy Kan AHG. Interactive optimization of bulk sugar deliveries. Interfaces 1992;22(3):4–14.