Adaptive granular local search heuristic for a dynamic vehicle routing problem

Adaptive granular local search heuristic for a dynamic vehicle routing problem

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

936KB Sizes 0 Downloads 131 Views

Computers & Operations Research 36 (2009) 2955 -- 2968

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

Adaptive granular local search heuristic for a dynamic vehicle routing problem Rodrigo Moretti Branchini a , Vinícius Amaral Armentano a,∗ , Arne LBkketangen b a b

Faculdade de Engenharia Elétrica e de Computação, Caixa Postal 6101, Universidade Estadual de Campinas-UNICAMP, 13083-970 Campinas, SP, Brazil Molde College, 6411 Molde, Norway

A R T I C L E

I N F O

Available online 8 February 2009 Keywords: Dynamic vehicle routing Adaptive local search Heuristics

A B S T R A C T

The advance of communication and information technologies based on satellite and wireless networks have allowed transportation companies to benefit from real-time information for dynamic vehicle routing with time windows. During daily operations, we consider the case in which customers can place requests such that their demand and location are stochastic variables. The time windows at customer locations can be violated although lateness costs are incurred. The objective is to define a set of vehicle routes which are dynamically updated to accommodate new customers in order to maximize the expected profit. This is the difference between the total revenue and the sum of lateness costs and costs associated with the total distance traveled. The solution approach makes use of a new constructive heuristic that scatters vehicles in the service area and an adaptive granular local search procedure. The strategies of letting a vehicle wait, positioning a vehicle in a region where customers are likely to appear, and diverting a vehicle away from its current destination are integrated within a granular local search heuristic. The performance of the proposed approach is assessed in test problems based on real-life Brazilian transportation companies. © 2009 Elsevier Ltd. All rights reserved.

1. Introduction Affordable operating costs of global positioning systems and the advance of satellite-based communications technologies, in particular cellular phone networks, are providing Brazilian transportation companies with the ability to dynamically serve customers in order to collect orders within a few hours, or minutes, after the request has been received. A field research with three of the most important transportation companies of the metropolitan area of São Paulo, with a fleet size ranging from 200 to 600 vehicles, revealed that: • All three companies have real-time information about vehicle position, for example, each employee of the Vehicle Tracking and Communication Department (VTCD) is able to monitor the positioning of about 50 vehicles with an error of less than 200 m. • The VTCD is able to rapidly communicate with drivers and to monitor and control vehicle operations such as text message and voice communication, door unlocking when the vehicle is near the destination, setting and unsetting of vehicle alarm, automatic

∗ Corresponding author. Tel.: +55 19 3521 3705; fax: +55 19 3521 3866. E-mail addresses: [email protected] (R. Moretti Branchini), [email protected] (V. Amaral Armentano), [email protected] (A. LBkketangen). 0305-0548/$ - see front matter © 2009 Elsevier Ltd. All rights reserved. doi:10.1016/j.cor.2009.01.014

notification of vehicle moving away from its route, alarm triggering if the driver door is opened within an unauthorized region, digital images of the driver cabin every 10 seconds and notification if the vehicle speed is higher than a predetermined speed. The first motivation to invest in this technology is to protect the driver and the company from robbery. The gains are higher rates of recovered goods and discounts on insurance policies. In addition, another benefit is the possibility to dynamically modify vehicle routes. Based on a real-world case of one of the companies, this paper considers a dynamic vehicle routing problem (DVRP), which is one of the many variations of the standard vehicle routing problem (see [27] for an overview). In a dynamic setting, customers can place orders at any time during the day and information needed to solve the problem is revealed concurrently with the execution of the solution, thus implying that parts of the problem must be solved and re-solved several times. Granular local search is a heuristic with a reduced neighborhood based on a candidate-list strategy that was proposed by Toth and Vigo [27] for solving the standard vehicle routing problem. We develop an adaptive granular local search heuristic that adjusts the size of the search space according to the short time that is available for the optimization method. In our problem, the number of new customers to be served early in the day by a transportation company is much greater than in the middle to late afternoon. Thus, it is desirable to have an optimization method that is able to produce a fast response when the rate of new requests is high, and that spends

2956

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

more time searching for high-quality solutions when this rate is low. We also consider the strategies of letting a vehicle wait at suitable waiting places, positioning a vehicle in a region where customers are likely to appear and diverting a vehicle away from its current destination in response to a new customer request. Such strategies are integrated with the adaptive granular local search in order to obtain better solutions. The proposed heuristic procedure is compared to the best insertion and nearest neighbor heuristics. We also suggest a new constructive heuristic with the aim of scattering a given number of vehicles at the beginning of the day. The remainder of the paper is organized as follows. Section 2 describes the problem, and a review of related work is presented in Section 3. The proposed constructive heuristic is detailed in Section 4. Section 5 presents the granular local search and how it was adapted and applied to the DVRP. The simulation of a real-time environment for the computational tests is explained in Section 6. Section 7 describes the waiting, positioning and diversion strategies that are combined with the granular local search heuristic and other heuristics. Computational tests are reported in Section 8, and conclusions and future work are presented in Section 9. 2. Problem description Initially, we describe the real-world setting and the way of operation of one of the three companies of the field research. A set of m vehicles owned by the company, each with capacity C, is located at a single depot and is available at 8 am for collecting goods from customers. Let N1 be the set of customers whose locations and demands are known before 8 am, which are those customers that placed an order on the previous day. Customers that belong to set N1 are also called priority customers, because they must be served in the current day. Let N2 be the set of customers whose locations and demands will be known at an order call time ai ∈ [8 am, 5 pm], i ∈ N2 . Each customer i has a demand qi < C and provides a revenue of ri monetary units, i ∈ N1 ∪ N2 . The travel time between customers i and j is denoted tij . The service time at customer i lasts si units of time and should begin at time bi within a time window defined by the earliest start time ei and the latest start time li . If the vehicle arrives at customer i before ei , then it is subject to a waiting time. The service may start after li , but a lateness penalty of pi units of cost per unit of late time is incurred. The transportation company puts an effort to serve all customers i ∈ N1 before noon. Thus, for all i ∈ N1 , ei = ai = 0 and li = 12 am. For customers i ∈ N2 , ei = ai , i.e., a service may begin as soon as the order has arrived. Also, there is a company policy that enforces that customers i ∈ N2 with ai  2 pm must be served in the same day. Therefore, these customers are also considered priority customers. Customers i ∈ N2 with ai > 2 pm are scheduled for the following day and are called non-priority customers. Eventually, non-priority customers may be served the same day, if feasible. The number m of available vehicles is determined from the historical daily average location and demand of customers. If during a period of days more than m vehicles are needed then the company hires additional vehicles from small companies. The dispatching of vehicles follows a simple policy. At the beginning of the day, the number of required vehicles and the routes are determined in order to serve the known customers that made a request in the previous day. As such customers should be served before noon, the designated vehicles are, in general, not able to serve new customers. In this case, the company dispatches a new vehicle to serve a new customer request. Additional vehicles are dispatched according to the routing and scheduling of the current planned routes. Another policy feature is that vehicles can be diverted from the planned routes. The diversion decision is sent via radio to the driver and 5 minutes are allowed to change the course and start the new route.

All vehicles must return to the depot before 5 pm, which represents a shift of 9 hours if starting at 8 am. Drivers are granted a 1 hour lunch break between 11 am and 2 pm. A vehicle has a fixed cost of f monetary units per day and a variable cost of c monetary units per kilometer traveled. The calculation of these figures is based on vehicle acquisition costs and depreciation, maintenance, insurance, driver's salary and other expenses. In this work we assume that the company is operating with less than the average number of requests and thus its fleet of m vehicles is sufficient, and no renting is considered. This assumption represents a low demand scenario and is only considered in this work to simplify the problem. For a complete simulation of the real problem, one should include the decision of renting additional vehicles when demand exceeds capacity. Given the following variables: R is the set of routes; S the set of served customers; bi the beginning service time at customer i; dj the total distance of route j. The DVRP then consists of determining |R| routes such that: (i) Each route starts and ends at the depot. (ii) Each customer is visited by a single vehicle. (iii) All priority customers from the set N1 ∪ { N2 : i ∈ N2 with ai  2 pm} are served. (iv) Customers i ∈ N2 with ai > 2 pm may be served the same day, if feasible and profitable. (v) The maximum delay in starting service to a customer i is limited to 2 hours after li . (vi) Vehicle capacity is not exceeded. (vii) Vehicles must return to depot before 5 pm. (viii) Drivers have a 1 hour lunch break between 11 am and 2 pm. (ix) The profit given by    ri − max(0, pi (bi − li )) − c dj − f |R| i∈S

i∈S

j∈R

is maximized. 3. Literature review In the following we review the literature on DVRPs. Psaraftis [21] defines that a vehicle routing problem is dynamic when some inputs to the problem are revealed during the execution of the algorithm. Thus, it is not possible to determine in advance a set of optimized routes in a dynamic problem. Problem solution evolves as inputs are revealed to the algorithm and to the decision maker. This definition is elaborated in Psaraftis [22], in which a problem is said to be dynamic when the output is not a set of routes, but rather a policy that prescribes how routes should evolve in time as a function of the inputs. Gendreau and Potvin [7] present a classification for dynamic routing and dispatching problems and discuss the problems of dial-a-ride, repair, courier and express mail delivery services. The importance of the diversion strategy is raised in this work. Gendreau et al. [8] apply a parallel tabu search with an adaptive memory suggested by Rochat and Taillard [23] and Taillard et al. [26] to a DVRP with soft time windows. An elaborate algorithm is applied to a new problem each time an input update occurs. This work was extended by the consideration of other neighborhood search heuristics [9]. Ichoua et al. [13] modify the parallel tabu search suggested by Gendreau et al. [8] to deal with a problem that is motivated from a courier service application, and also involves soft time windows. A new strategy for the dynamic assignment of new requests, which includes diversion as a special case, is proposed. The inclusion of such a strategy improves the approach performance when compared to that of Gendreau et al. [8] where the current destination of each vehicle is fixed.

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

Larsen et al. [16] develop the degree of dynamism for dynamic routing systems that represents the average, over all customer requests in a planning horizon, of how late the new requests are received compared to the latest time these requests could be received. For the partially dynamic traveling repairman salesman, four routing policies are applied to test problems with stochastic new requests with a planning horizon of 8 hours. Regardless of the degree of dynamism, the nearest neighbor policy yields best results. Mitrovic-Mini c et al. [18] address the dynamic pickup and deliv ery problem with time windows (DPDPTW), which is encountered by courier companies. In this problem, each customer request involves picking up a load at one location and delivering it at another location. The request must be served by one vehicle and the pickup location has to be served before its associated delivery location. Double-horizon based heuristics are proposed for vehicle routing and scheduling. The goal of the short-term horizon is to minimize the total distance traveled, while the goal of the long-term horizon is to minimize a linear combination of the total distance traveled and the decrease of the sum of the average slack time over all routes and requests. The slack time of a request is the difference between the total time available to meet the request and the direct travel time between its pickup and delivery locations, and thus a larger slack time increases the likelihood of serving future requests. Another way to increase the probability of servicing future unknown customers is to let vehicles waiting at suitable places, a strategy used by Mitrovic-Mini c and Laporte [19] and Branke et al. [3].  Mitrovic-Mini c and Laporte [19] develop a simplified version of  the tabu search procedure proposed by Gendreau et al. [9] and suggest four waiting strategies for the DPDPTW: • Drive-first: Also called by other authors as no-wait, this strategy implies that vehicles leave their current location as soon as possible. • Wait-first: Vehicles should leave current location at the latest possible departure time. • Dynamic waiting: Combination of the previous two strategies. A vehicle follows the drive-first strategy for a set of customers that are close to each other, called a service zone. After visiting such customers, the vehicle follows the wait-first strategy for the next zone. • Advanced dynamic waiting: Similar to dynamic waiting. The only difference is that the after-zone waiting time is proportional to the time span of the zone. Branke et al. [3] consider a DVRP where one additional customer arrives at an unknown location when the vehicles are under way. For the cases of one and two vehicles optimal strategies are derived for maximizing the probability of including the new customer into one of the tours without exceeding the maximum allowed tour duration. For the general case, they develop an evolutionary algorithm to search for good waiting strategies. A solution is represented by a string of real-values representing a fraction of the total route slack assigned to each customer, and to the depot at the beginning and at the end of route. Therefore, each individual from the population determines the amount of time a vehicle must wait at every location. Six other waiting strategies were compared: (i) no-wait, (ii) wait at the depot as long as possible, (iii) wait at the customer located farthest from the depot, (iv) wait the same time at each customer, (v) wait at each customer a time proportional to the distance from the previous customer and (vi) a combination of (i) and distribution of waiting time proportional to the remaining driving distance. The last strategy generated the best results, performing better than the evolutionary algorithm. Yang et al. [28] introduce a generic real-time multivehicle truckload pickup and delivery problem (TPDP). The TPDP captures most

2957

features of the operational problem of a real-world trucking fleet with customer requests that arrive continuously. Trucks can service only one pickup and delivery request at a time. When a request arrives, the company is given the pickup location, the delivery location, the earliest pickup time, and the latest delivery time. The objective is to find a good strategy for handling the sequence of future unknown requests to maximize the overall net revenue. The strategy needs to address the decisions of rejecting or accepting a request and the assignment of current accepted requests to trucks. Five rolling horizon strategies are proposed, such that two of them are based on a repeated re-optimization of various instances of the offline problem, while the others are local heuristic rules. There is also the research line of dynamic and stochastic vehicle routing problems that combines the main characteristic of the dynamic problem, in which routes evolve according to revealed information, and the stochastic problem, in which some elements such as demand and customer location are stochastic, i.e., the value of the element is known only by its probability distribution. In this case, the current information and probability of future events are used in the solution method. Larsen et al. [17] study the dynamic traveling salesman problem with time windows, such that during the day of operation a stochastic number of customers requests service. The requests arrive at zones according to a Poisson process, with an arrival rate of customers that depends on the zone. Four routing policies based on the strategies of waiting and vehicle positioning are proposed. The first strategy is the wait-first such that the vehicle waits at the current customer until it can travel to next one. The remaining three policies move a vehicle that has finished its service to one of the idle points, each one located in a separate zone. At the idle point the vehicle waits for a new request in the zone while there is enough time to travel to the next customer. Each policy is associated with the following types of idle points: (i) the nearest idle point, (ii) the idle point with the largest arrival rate and (iii) the idle point with the highest expected number of requests in a given time interval. Computational tests showed that the policies wait-first and move to the nearest idle point produced good results. Bent and Van Hentenryck [2] propose a scenario-based method, which generates new routing plans for scenarios that include existing requests and possible future requests, which are obtained by sampling their probability distribution. Computational tests show the method produces significant gains over a similar approach that does not use stochastic information. Ichoua et al. [14] partition the distribution area into zones and assume that customers occur within the zones according to independent Poisson processes, each with its own arrival rate that also depends on the period of time of the day. This information indicates if it might be better to require a vehicle to wait in its current zone instead of directing it towards its next planned destination located in another zone. A waiting time strategy is proposed and added to the parallel tabu search of Gendreau et al. [8]. The strategy determines the interval of time a vehicle should wait at the current position, however, waiting is only allowed if the probability of a new request during this interval is greater or equal than a given threshold. Computational tests show that the inclusion of the waiting strategy improves the tabu search performance. Hvattum et al. [11,12] deal with a problem of a leading distribution company in Norway, in which most of the daily requests are dynamic. Customer locations and demands are stochastic variables, revealed at the time of call-in. The time horizon is divided into periods and the problem is classified as a stochastic and dynamic problem with recourse. From historical data, probability distributions for the attributes of the unknown customers are generated and then sample scenarios are used to guide a heuristic method that builds a plan for each time interval. The aim is to solve each of the sample

2958

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

scenarios as static vehicle routing problems and then use common features from the solutions to build a good plan. Computational tests show that the proposed heuristic yield significant savings relative to a pure dynamic heuristic, which does not make use of historical information for the stochastic variables.

positioning of the vehicles that results from the application of the proposed heuristic. The routes were spatially distributed with an average of three customers per route. In this way, new customers can be more easily accommodated in a route and probably, the routes are shorter.

4. A constructive heuristic for an initial solution

4.1. A new constructive heuristic for the DVRP

At the beginning of the day, known customers must be assigned to vehicles, and therefore a constructive heuristic is needed to provide an initial solution for the DVRP. The first idea was to use the insertion heuristic I1 proposed by Solomon [25] for the VRPTW. Computational tests showed that the initial solutions generated by such heuristics tend to minimize the number of vehicles to serve the set of currently known customers. As a consequence these few vehicles have low capacity slack to accommodate dynamic requests, and later in the day new vehicles are dispatched from the deposit to serve new customers. As a result the capacity of the new vehicles is only partially used, and the new routes are unbalanced relative to the initial routes. For a given test problem A, involving 70 vehicles and 220 known customers and a total of 1100 customers in a given day, Fig. 1 shows that vehicles dispatched later in the day serve few customers, resulting in underutilization of resources. Of the 70 available vehicles, only 13 vehicles were assigned to the known customers. A better approach is to estimate the average daily number of vehicles to serve known and unknown customers, using historical data as in [11] and then dispatch all vehicles at the beginning of the day. In this way, the capacity of the vehicles is better utilized and more customers may be served. If, however, the estimated number of vehicles is not sufficient to serve a higher number of new customers, then additional vehicles can be dispatched later. In this study we assume that the estimated number of vehicles is sufficient to serve all the requests. The main objective of the constructive heuristic proposed in this paper is to distribute a pre-defined number of vehicles such that there is no concentration of vehicles in a small area and the route loads are balanced. For the same test problem, Fig. 2 shows the

The proposed heuristic for the DVRP constructs a set of routes for known customers by using the estimated number of vehicles. It is based on two principles: (i) vehicles should be scattered in the service region and (ii) customers with a low slack time should be routed first. A customer i has a low slack time if li is close to the earliest time to begin service at customer i. The heuristic always provides a feasible solution relative to the time windows of customers and the capacity of the vehicles, since the number of known customers is small with respect to the capacity of the m available vehicles. In order to distribute vehicles in the service region, disperse customers are selected as seed customers that will necessarily belong to different routes. Once the set Seeds of seed customers is created, one vehicle is assigned to each customer of this set. Four measures are used to create the set Seeds: incompatibility between two customers, waiting time, separation and dispersion. Incompatibility is a measure of lateness when one customer is served after another. The higher the incompatibility between two customers, the more likely these customers would belong to different routes. When incompatibility is greater than 2 hours (maximum lateness allowed), customers certainly belong to different routes. Balakrishnan [1], Kontoravdis and Bard [15] and Bra¨ ysy [4] have used similar measures in their heuristics. Incompatibility between two customers i and j is defined as follows: incompij : =ei + si + tij − lj Fig. 3 illustrates an example of positive incompatibility between two customers 1 and 2. In this example, it is impossible for a vehicle to arrive at customer 1 at the earliest possible time, serve this

20

15

10

5

0 8. 0 8. 0 00 8. 00 8. 00 8. 00 8. 00 8. 0 8. 0 03 8. 3 8. 4 44 8. 69 8. 78 9. 10 9. 26 9. 33 9. 58 9. 71 9. 9 10 5 .0 10 6 .4 10 9 .5 11 6 .0 11 0 .1 11 8 . 11 47 .9 12 1 . 12 29 .5 12 3 .7 13 8 .1 13 3 . 13 60 .9 14 4 . 14 09 .1 14 3 .2 14 3 .3 1

Number of customers served per vehicle

25

Time that each vehicle leaves the depot Fig. 1. Number of customers served per vehicle using Solomon [25] constructive heuristic.

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

Legend: * first customer of each vehicle

other known (a priori) customers

2959

depot

Fig. 2. Seed customers of each route for test problem A.

Service time of customer 1 (s1 = 1 hour): Travel time from customer 1 to 2 (t12 = 4 hours):

t12

s1 Customer 1 time window

8

e1

9

l1

10

e2

11

12

Customer 2 time window

l2

14

13

15

16

time (hours)

incomp12 = 9 + 1 + 4 –13 = 1 hour Since incomp12 > 0, lateness would occur if customers 1 and 2 are in the same route.

customer, travel to customer 2 and begin service at customer 2 without lateness. Waiting time follows a similar reasoning: if the vehicle waiting time is high when customer j is served immediately after customer i, then most likely fewer customers would be served. In this case, customers i and j should be assigned to different routes, and in case they belong to the same route, they should be apart from each other. Waiting time between two customers i and j is defined as waiting_timeij : = max(0, ej − (ei + si + tij )) Fig. 4 shows the relationship between incompatibility and waiting time. If the configuration of these measures for a pair of customers lies in the regions 1, 2 or 3 of the picture, these customers have a

Waiting timeij (hours)

Fig. 3. Example of incompatibility between two customers.

4

3) Could belong to same route with route positions 2) Lateness

apart from each other

1) Infeasible:

cost:

would never

should not

2

belong to

belong to 4) Could belong to same

same route

same route

route with route positions close to each other

0 -4

-2

0

2

4

incompatibilityij (hours) Fig. 4. Relationship between incompatibility and waiting time for a pair of customers.

2960

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

high chance of belonging to different routes and should be inserted into set Seeds. The higher the incompatibility and waiting time between two customers, the more likely they would be assigned to different routes. Separation between two customers is a measure that combines linearly incompatibility and waiting time values:

Step 1 of the procedure computes the earliest service beginning time for each non-seed customer and each route. In step 2, the slack time of each customer in every route is calculated and the route with the maximum slack time is identified in step 3. The customer with the least maximum slack time is selected in step 4 and it is inserted in the best feasible position of its designated route in step 5.

separationij : = incompij + (1 − ) waiting_timeij

5. Granular local search

in which   0 The parameter  and was tested in the interval [0,1] and best results were reached with  = 0.5. The separation of a customer i ∈/ Seeds to all customers in the set Seeds is given by the following average:  avg_separationi : =

j∈Seeds separationij

number_of _seeds

The measure of dispersion evaluates how equally separate a customer is from all other customers of set Seeds. It is desirable that the next customer to be included into set Seeds should not be too close to any other customer of the set. Thus, it is best to include a customer to set Seeds if it has a significantly high avg_separation (but not necessarily the highest) with low dispersion (balanced separation from all other customers of set Seeds). Dispersion of a customer i ∈/ Seeds relative to the customers of current set Seeds is defined as dispersioni   2   j∈Seeds (separationij − avg_separationi ) := number_of _seeds Now, all measures are consolidated into final_separation, which considers both avg_separation and dispersion. final_separationi : =avg_separationi − in which   1

dispersioni



The parameter  was tested in the interval [1,8], and computational tests showed that the value  = 4 yields better results. The set Seeds is then constructed in the following way. Start the set Seeds with the customer i which has the smallest li . Then, calculate final_separationi for all customers i ∈/ Seeds. Include into Seeds the customer with the highest final_separationi and repeat this process until |Seeds| equals the number of vehicles to be dispatched at the beginning of the day. After the set Seeds is created, the remaining known customers are assigned to routes of the seed customers such that the first customers to be routed are those that have low slack time. To identify which customers should be routed first, a five-step procedure is employed: 1. For each customer i and route j, calculate earliest_beginning timei, route j as the earliest feasible beginning time of serving customer i in route j, for all i ∈ N1 \ Seeds and j ∈ R. If it is not possible to serve customer i through route j, set earliest_start_timei, routej to ∞ . 2. Calculate slack_timei, routej as li –earliest_beginning_timei, route j , for all i ∈ N1 \ Seeds and j ∈ R. 3. Evaluate max_slack_timei as max(slack_timei, route j ), ∀ j ∈ R. Let j*(i) be the route associated with max_slack_timei . 4. The next customer i* to be inserted is that with the minimum max_slack_timei , ∀i ∈ N1 \ Seeds. 5. Insert customer i* into the position of the route j*(i*) that yields the least increase in route distance and that does not violate any time window.

Granular local search, embedded in a tabu search framework, was proposed by Toth and Vigo [27] for solving the static vehicle routing problem which is defined on a complete graph G=(V, A). The objective of the granular local search is to reduce the computational effort in each neighborhood by using a candidate list strategy [10] called granular neighborhood. Such a neighborhood discards “long” (high-cost) arcs due to the small probability of these being part of high quality solutions and concentrates on promising “short” arcs, being those arcs whose cost does not exceed a granularity threshold value , defined by

=

z n+m

Here, z is the value of a solution given by the heuristic of Clark and Wright [5], n is the number of customers and m is the number of vehicles. As a result, z /(n + m) is the average cost of an arc of the solution.  is a parameter that adjusts the size of the granular neighborhood, for example,  = 1 implies that only arcs whose cost is less or equal than average belong to the granular neighborhood. The granular neighborhood is associated with a sparse graph G = (V, A ) that contains “short” arcs, whose cost cij is not greater than the granularity threshold , and a set I of important arcs such as those incident to the depot or belonging to high quality solutions, that is: A = {(i, j) ∈ A : cij  } ∪ I The arcs of A are used to determine the other arcs involved in each type of move, such as the Or-opt [20] exchange. 5.1. Adaptive granular local search for the DVRP The adaptive granular local search for the DVRP is, essentially, a granular local search in which the cardinality of set A is modified to regulate the search effort to the available computation time for taking decisions in a dynamic setting. It uses real-time information to improve search performance. For example, it was found in the field research that about 52% of all dynamic customers arrive at the beginning of the shift, from 8 am to 11 am. Thus, in this time period, the algorithm has a short time to search for high quality solutions and a smaller set A is employed. Later in the day, the frequency of new customers is smaller and a more thorough search involving a larger set A may be conducted. Note that in the DVRP some customers, and consequently arcs, become known only during the execution time of the algorithm, which implies that the graph G=(V, A) is dynamic. As a consequence, the granularity threshold should also be dynamic and the above expression for the static case is not suitable. In our implementation we place the current arcs of the set A in a list L that is arranged in increasing order of the length of the arcs. From this list we then exclude the current set of arcs I that are incident to the depot, and define a set S as a percentage  of the remaining arcs in the list starting from the shortest one. Then the set of the arcs of the sparse dynamic graph is given by A = S ∪ I. The granular local search was tested on the 56 test problems of the static vehicle routing problem with time windows generated by Solomon [25] for different values of , and results have shown that

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

2961

100% 90% 80% 70%

η

60% 50% 40% 30% 20% 10%

17.0

16.9

16.8

16.7

16.5

16.6

16.4

16.3

16.1

16.2

16.0

15.9

15.8

15.7

15.6

15.4

15.2

15.3

15.0

14.9

14.6

14.7

14.4

14.2

14.0

13.8

13.0

13.6

9.8

11.4

8.9

8.0

0%

Time (hours) Fig. 5. Example of  behavior from 8 am to 5 pm.

 = 25% is a good trade-off between solution quality and computational time. Similar results were found by Toth and Vigo [27]. Thus, the initial value of  is set to 25% and this value is modified according to the amount of available time for the granular local search. If the search has reached a local optimum, probably there is enough time for a more extensive search and the neighborhood size may be increased. On the other hand, if the search has taken too long to return an optimized solution and, when it does, the solution cannot be implemented because the setting has changed (for example, the arrival of a new customer), the neighborhood size should be reduced to fit computational time to the time available for the search. Therefore, the value of  may change after each iteration of the search, i.e., a move execution, according to the following criteria: •  = min{100%, +1%} if the search has reached a local maximum. •  = max{0.5%, −1%} if three improved solutions have been found by the search, but none of them could be implemented due to the occurrence of any of the following events: arrival of new customers, customers involved in the moves of the improved solution have just been visited, status of the vehicles involved in the moves have been modified (see Section 6). In this case the current solution is locked. The parameter values 0.5% and 1% were defined after computational tests involving values in the interval [0.1%, 10%]. Fig. 5 shows how the value of  varies for a test problem from 8 am to 5 pm, according to the rules stated above. Note that  assumes lower values early in the day due to a high rate of new customers, and reaches 100% after 1 pm, when such a rate is low. The adaptive granular local search for the DVRP makes use of five types of moves at each iteration and the best move is executed. The moves and associated neighborhood are as follows. Intra-route neighborhoods: • Two-opt: A move proposed by Croes [6] that deletes two arcs from a route and adds two new ones to the same route.

• Or-opt: A move introduced by Or [20] that shifts a block of one or more consecutive customers to another position of the route. Inter-route neighborhoods: • Or-opt insertion: Insertion of one or more consecutive customers from one route into another. Based on Or [20]. • Or-opt exchange: Also based on Or [20], the Or-opt exchange neighborhood is the exchange of one or more consecutive customer from one route with one or more consecutive customers of another route. • Crossover: A move proposed by Savelsbergh [24], such that an arc of each route is deleted and two other arcs are inserted such that each resulting route has customers of both original routes. The implementation of the adaptive granular local search for the DVRP is linked to a MySQL database of a simulation environment, which is described in more detail in Section 6. This database stores all problem information, such as vehicle coordinates and capacity, customer positions and demands, routes, and is updated every 2 seconds by two other applications: one that updates vehicle coordinates emulating GPS systems, and another that inserts new orders from customers, similar to a centralized call center that receives calls from customers. A step by step explanation of the adaptive granular local search for the DVRP is given next. Let Current_Database denote the last update of the MySQL database. In addition, suppose that as soon as a new customer arrives it is inserted into the route that produces the maximum profit: (1) Set failure_attempts to 0. (2) Read all problem information from Current_Database and store it into Solution_before, containing vehicle positions and capacities, routes, known customers (visited and unvisited) and current clock time.

2962

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

(3) Project Solution_before 15 seconds into the future and store it into Projected_Solution. (4) Optimize Projected_Solution applying the adaptive granular local search using current set A1 and the five neighborhoods. It takes some time to optimize Projected_Solution (around 15 seconds). If it is possible to find a better solution, store it into Optimized_Solution. If not, set Optimized_Solution to NULL. (5) If Optimized_Solution is not NULL, attempt to implement Optimized_Solution in Current_Database: read all problem information from Current_Database and evaluate if Optimized_Solution is still feasible and if it yields the expected gain. If its implementation is possible, copy Optimized_Solution to Current_Database. If not, set failure_attempts: = failure_attempts+1. (6) If Optimized_Solution = NULL, then set  to Min{100%, +1%} and rebuild set A1 . Go back to step 2. (7) If failure_attempts = 3, then set  to Max {0.5%, −1%} and rebuild set A1 . Go back to step 1. (8) Stop the search when all vehicles have returned to the depot. In Step 3, Solution_before is projected 15 seconds into the future to compensate the average computational time of the optimization procedure, increasing the probability of success of step 5. If the solution is not projected, all optimization effort may be lost when a vehicle visits a customer or a driver starts a lunch break, as described next.

6. Solution control and simulation of a real-time environment The real-time resolution of the DVRP requires the continuous monitoring of the status of the vehicles. For example, a parked vehicle might immediately go to a new customer, whereas a vehicle that is serving a customer or is parked during lunch time can only move to a new customer after the time required to finish such activities. The control of the vehicle status is even more important for the optimization system. Suppose that this system reads the status of a vehicle at time t and suggests an optimized solution that modifies its route after a computational time of 5 seconds. However, the vehicle may have just parked for lunch at time t+1 second and thus it is available for the new route only after 60 minutes. As a result, the solution proposed at time t+5 seconds, may be no longer feasible or optimized at time t+60 minutes. In order to avoid such situations, a control scheme of the vehicle status was implemented, as shown in Fig. 6. Fig. 6 shows a graph where the nodes indicate the vehicle status and the arcs represent status transition. The vehicle status, such as the status of parked, moving or serving, are used to control transport and servicing operations The change of vehicle status may prevent the implementation of solutions found by the local search procedure into the simulation environment. In this case, the improved solution is discarded, the current solution is read by the optimization system and the local search is restarted. The following section describes the integration of the local search procedure to the simulation environment. 6.1. Simulation environment The granular local search for the DVRP is inserted into an environment that emulates a real-time process found in the transportation companies. Each complete run of the simulation environment requires about 9 hours, which represents the total duration of the drivers shift. Also, once a new customer is revealed, the algorithm has about 20 seconds to respond if this customer can be accepted. This situation corresponds to the call center process, in which the attendant must answer the customer when service will occur.

3 1 2 0 5

4

0

Status: 0: parked (depot, customer or strategic waiting place) 1: moving toward a customer or depot 2: serving a customer 3: parked at the depot (end of shift) 4: lunch break 5: moving toward a strategic waiting place

Fig. 6. Possible vehicle status.

First, the simulation environment routes known customers, those that belong to set N1. These customers are assigned to vehicles through a constructive heuristic, described in Section 4. The resulting solution, Current_Solution, is stored in a MySQL database. Once the shift begins, vehicles start their routes as in Current_Solution. Then, four parallel modules control the arrival and acceptance of new customers, vehicle routes, positions and status, management of waiting, positioning and diversion strategies and route optimization: (1) Arrival of new customers: This module reads the test problem and checks at every 2 seconds if a new customer has arrived. If a new customer has arrived, its order information is inserted in the MySQL database, simulating the typing process of the call center attendant. The order is marked as pendent. (2) Quick optimization: It reads the list of pending customers and in a short time of at most 20 seconds responds if the order will be served in the same day or in the following day. This procedure simulates the answer the call center attendant would give to the customer. The decision to accept a customer for same day service is based on a best insertion procedure that maximizes the profit. If it is possible to insert the new customer in any vehicle route, then the customer is accepted for same day service and Current_Solution is updated and marked as locked. Otherwise, the customer is scheduled for the next day. (3) Long optimization (granular local search): This procedure reads Current_Solution and applies the granular local search to it. If it finds an Optimized_Solution better than Current_Solution and Current_Solution is not locked, Optimized_Solution overwrites Current_Solution in the MySQL database. (4) Vehicle control: Updates the coordinates and traveled distance of the vehicles emulating a GPS system. It also manages the next driver action according to the vehicle status and scheduled lunch breaks. Moreover, this procedure coordinates the available capacity and the waiting, positioning and diversion strategies described in Section 7. 7. Strategies for routing and scheduling Mitrovic-Mini c and Laporte [19] point out that in a dynamic en vironment, the routing and scheduling decisions are intertwined. Diversion, waiting and positioning of vehicles are strategies to deal with such decisions. Diversion is a routing decision, which allows a vehicle to be diverted away from its current destination to serve a request that occurred at time t in the vicinity of its current position. The vehicle proceeds to its current destination in the interval [t, t+t] so that an optimization procedure decides if the vehicle should be diverted to the new customer or not. The motivation of waiting strategies is to postpone the decision of which customers will be served next, and is related to the scheduling aspect. It is expected that using information of the near future, such as location and demand of new customers, better decisions may be taken. In this paper, the wait-first strategy suggested by Mitrovic-Mini c and Laporte [19] is implemented. 

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

2963

150

100

50

0 0

50

100

150

Fig. 7. Strategic waiting places for a transportation company test problem.

Positioning determines where vehicles should wait, and is related to routing and scheduling decisions. It is better that vehicles wait at locations with higher probability of occurrence of new customers. Based on historical data from the transportation companies, four strategic waiting places were defined. Fig. 7 illustrates four strategic waiting places (stars), the depot (box) and customers (dots) of a test problem. When a vehicle is waiting (status 0 of Fig. 6), its next destination may be either a customer or the depot (end of route). If the next destination is a customer, the expectation is that waiting will permit the inclusion of another customer into the route and some traveled distance may be avoided. In this case, waiting is better than moving to a strategic waiting place because new customers may be served in the route. On the other hand, if the depot is the next destination, the vehicle may either wait at current location or receive an order to move to a strategic waiting place (status 5 of Fig. 6) and wait there. The order to move a vehicle to a strategic waiting place may be seen as a bet. If the vehicle waits at the current location, there is no additional travel cost, however, future customers located far away may not be served because there will not be enough time for the vehicle to reach them without violating the maximum delay in starting service. Alternatively, if the vehicle moves to a strategic waiting place and no nearby customer calls for service, the additional traveled distance becomes an unrecoverable cost. The following criteria were used regarding the decision to move a vehicle to a strategic waiting place: (1) Always send a vehicle to the strategic waiting place for which the least number of vehicles has been sent. (2) Always send the vehicle with the largest spare time, which is the amount of time for the vehicle to go to the strategic waiting place and then reach the depot before it closes. (3) Do not send vehicles to strategic waiting places if the spare time is less than 30 minutes. In this situation, the vehicle would almost certainly not be able to serve any customer and return to the depot in time. 8. Computational tests The proposed heuristic procedure was applied to test problems based on real-life information from transportation companies, such

Table 1 Probability of the occurrence of k new customers for 8–9 = 0.067. Number of new customers

Probability of occurrence

Cumulative probability

0 1 2 3

0.935507 0.062367 0.002079 4.62E-05

0.935507 0.997874 0.999953 0.999999

as service area (in km2 ), location of customers, customer arrival pattern (e.g., customer concentration early in the day), average service time, average number of customers served by each vehicle, average vehicle speeds, vehicle costs (drivers, fuel, maintenance, etc.) and penalties for deadline violation. A probabilistic test problem generator was implemented to create test problems from this information. The generator uses Poisson, normal and uniform distributions to define number, location, arrival time and demand of customers, revenues, penalties and service time. The number of customers that arrive at each time period t follows a Poisson process with rate t per second that depends on the period of the day. For example, suppose that from 8 am to 9 am the arrival rate of new customers is about 4 customers per minute, which represents 8–9 = 0.067 new customers per second. The probability of the occurrence of k new customers for each second between 8 am and 9 am is shown in Table 1. Next, a random number hai ∈ [0, 1] is drawn from a uniform distribution for each second ai ∈ [8:00:00,8:59:59]. For example, if hai  0, 935507, then no customers are created at time ai . If 0.935507 < hai  0.997874, then 1 customer is created, and so on. A time window is then associated to each created customer i. If customer i ∈ N1 , then ei = ai = 0 and li = 12am. If the customer i ∈ N2 , then ei = ai and li = ei +TimeWindowi, that is based on the probability distribution of the time window of customers of the transportation company, as shown in Table 2. In addition, a lateness penalty cost is applied to each TimeWindowi , as shown in Table 3. As mentioned in Section 2, lateness is limited to 2 hours, in order to ensure a minimum customer satisfaction level. Solutions with lateness above 2 hours are considered infeasible.

2964

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

Table 2 Probability distribution of TimeWindowLength. TimeWindow (hours)

Probability

Cumulative probability

1 2 3 4 5

0.1 0.2 0.4 0.2 0.1

0.1 0.3 0.7 0.9 1.0

Table 3 Lateness penalty cost per second. TimeWindow (hours)

Lateness penalty per second

1 2 3 4 5

0.055556 0.027778 0.018519 0.013889 0.011111

problems close to reality and the number of different heuristics tested, only three test problems were generated, as shown in Table 5. Test problem A is the most dynamic of all three because it has 60% of unknown priority customers. On the other hand, the difficulty of test problems B and C resides in the reality based distribution of customers' positions. Test problems are available at http://www.densis.fee.unicamp.br/∼vinicius/. Computational tests were conducted using a real-time simulator, which encompasses the four modules described in Section 6.1. All modules were implemented in ANSI C++. Each module may be executed on a different computer, since they communicate with each other through the MySQL Server shared by a Local Area Network. The tests were carried out using one AMD 1.4 GHz computer, which ran the MySQL Server, and two other Pentium IV 2.8 GHz, all with the Linux operating system. The first Pentium ran the constructive heuristic and the modules of arrival of new customers, quick optimization and vehicle control. The second computer ran the long optimization module. Running times for each test problem is about 9 hours, corresponding to a one-day shift. The long optimization module runs all the time trying to improve the solution stored at the database, although by the end of the simulation there is little or nothing to be optimized. Since there is no random decision in the heuristic procedure, a single run simulation was conducted to each test problem. In addition to the granular local search, two other heuristics were tested: • Nearest neighbor: After a vehicle has served a customer, the vehicle moves toward the nearest customer unattended. Note that routes are not previously defined or planned, since drivers only take knowledge of next destination after service is completed. • Best insertion: New customers are inserted in a route position that maximizes the profit without employing the long optimization module.

Fig. 8. Geographic zone 150×150 grid.

Table 4 Normal distributions for revenue, demand and service time for each client i. Information

Average

Standard deviation

Revenue (ri ) Demand (qi ) (units) Service time (si ) (minutes)

200 100 15

40 20 3

Customers are placed in the distribution area, which is partitioned into geographic zones that are arranged in a 150×150 grid coordinate system. Fig. 8 illustrates the geographic zones gzo , o ∈ [1,22500]. Each geographic zone gzo is associated to a probability Pgzj , j ∈ [1,5], of occurrence of a new customer. The values of Pgzj and the association of gzo to Pgzj are defined such that customer concentration areas are represented as close as possible to reality. If, for example, zones gz11174 and gz11175 belong to the city central area, with a greater customer concentration, then the probability of occurrence of a new customer in such zones is Pgz1 = 0.4, whereas zones located very far from the city center have a probability Pgz2 = 0.1. Finally, normal distributions in Table 4 were used to complete test problems information. Because of the high computational running time, each test takes about 9 hours to be completed, the complexity to create test

Also, the granular local search heuristic was applied to each test problem considering a hypothetical situation in which all customers were known beforehand. In other words, the arrival time of every customer was changed to the beginning of the day. The result of this test was used as an upper bound for the profit of each test problem. Table 6 summarizes the combination of heuristics and strategies that were tested. Tables 7–9 present the results for each test problem. The column profit shows the result, in Brazilian reais (R$), of the transportation daily profit if routes and decisions of each heuristic were implemented in real life. The next columns present the relative percentage deviation of the heuristic profit relative to the upper bound profit [(heuristic-strategy profit/upper bound profit)−1], percentage of priority and non-priority customers served, and percentage of rejected customers. Observing the results it is apparent that the waiting strategy is always beneficial. This demonstrates that there is almost nothing to lose when the decision to move to the next destination is postponed as late as possible. Positioning produces better results for best insertion and granular local search heuristics because these heuristics attempt to include every new customer, even those far away, into some route. Thus, a vehicle may move to a low customer concentration area to serve one or two far away customers. If there is no positioning strategy, the vehicle can stay at some region for the rest of the day. The positioning strategy corrects this situation and improves the profit and the total number of served customers. On the other hand, the nearest neighbor heuristic moves vehicles to regions with high customer concentration automatically, since this heuristic practically discards far away (priority or non-priority)

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

2965

Table 5 Basic information of test problems. Test problem B

C

1101 70 15.7 Uniform, with a concentration of customers in the center

1060 70 15.1 Reality-based

1080 70 15.4 Reality-based

Coordenada y

150 Coordenada y

125 100 75

Diversion

Nearest neighbor

Best insertion

Waiting

Positioning

√ √



√ √ √

√ √ √ √

√ √

Granular local search √ √ √

√ √ √ √

√ √

125

100 75 50 25

25

0

25 50 75 100 125 150 Coordenada x

0

100 75 50 25 0

25 50 75 100 125 150 Coordenada x

80

66

66

20 60 20 15.0 3.2 87

33 33 33 14.9 3.4 85

33 33 33 15.1 3.3 85

Table 6 Heuristics and strategies tested. Heuristic

150

125

50

0 0

% Of total customers that must be served in the same day (priority) % Of known priority customers % Of unknown priority customers (arrival time < 2 pm) % Of unknown non-priority customers (arrival time  2 pm) Average service time (minutes) Average time window (hours) Total demand divided by total vehicle capacity (%)

150 Coordenada y

Number of customers Number of vehicles Customer per vehicle ratio Distribution of customers in service area ) and depot location (marked as

A

Heuristic-strategy NN NN_W NN_WP

BI BI_D BI_W BI_DW BI_WP BI_DWP

GLS_UB GLS GLS_D GLS_W GLS_DW GLS_WP GLS_DWP

D—diversion; W—waiting; P—positioning; and UB—upper bound profit.

customers in order to serve those nearby. This behavior also reflects on the low number of rejected customers. Since the heuristic favors nearby customers, it is able to serve more customers by the end of the shift. Another interesting effect of the nearest neighbor is the more frequent occurrence of time window violations. Since distance is the only criterion for the nearest neighbor heuristic to decide which customer to serve next, the overall lateness increases, and consequently an increased dissatisfaction to customers. For example, comparing the performance of NN_WP and GLS_DWP in test problem C, the profit of GLS_DWP is about R$5400 greater than that of the NN_WP, while NN_WP rejected fewer customers. The intriguing question is why the nearest neighbor heuristic serves more customers and yields a smaller profit? Fig. 9 explains that the difference is due to a higher lateness cost generated by NN_WP. Diversion reduces traveled distance and customer rejection for test problem A. However, gains are not very significant, especially for

0

25 50 75 100 125 150 Coordenada x

test problems B and C. The best insertion heuristic outperforms the nearest neighbor heuristic when waiting and positioning strategies are applied. The heuristic-strategy combinations GLS_WP and GLS_DWP performed best, with a maximum difference of 4% relative to the upper bound. The profits yielded by such heuristics are higher, all priority customers are served, lateness is close to zero, and the number of rejected customer is lower (except for test problem C, in which NN_WP rejected fewer customers). Finally, Table 10 shows some benefits of using an adaptive  for the heuristic-strategy combinations GLS_WP and GLS_DWP against combinations with fixed value of  at 25% (GLS_WP_25% and GLS_DWP_25%). The first column shows that the number of updates is always greater for combinations with an adaptive . The second column shows that the non-implemented rate, defined as the percentage of the number of non-implemented optimized solutions/number of attempts to implement optimized solutions, is smaller for combinations with an adaptive . A possible way to overcome the high figures of rejection rate is to use a parallel implementation of the granular local search, which partition the problem into subproblems with disjoint subsets of routes, as suggested by and Gendreau et al. [8]. The remaining columns show that the performance of combinations with an adaptive , in terms of profit, percentage of priority and non-priority customers that are served and percentage of rejected customers, is better or equal than that for combinations with  fixed at the value of 25%.

9. Conclusions and future work We have considered a DVRP that shows up in real-life Brazilian transportation companies. A new constructive heuristic was developed when the number of vehicles that leave the depot is pre-defined, reflecting the total required vehicle capacity during the day, and not only what is visible in the morning. This pre-defined number of trucks is based on historical data. The current plan is recalculated for every new call-in. This call-in might first be subjected to a feasibility/profitability check to decide if it should be serviced today or not. If the call-in is to be serviced today, the new plan is calculated by an adaptive granular local

2966

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

Table 7 Results for test problem A. Heuristic-strategy

Profit (R$)

Deviation % of heuristic profit

% Of priority customers served (arrival time  2 pm)

% Of non-priority customers served (arrival time > 2 pm)

% Of rejected customers

GLS_UB NN NN_W NN_WP BI BI_D BI_W BI_DW BI_WP BI_DWP GLS GLS_D GLS_W GLS_DW GLS_WP GLS_DWP

94,878 81,721 87,070 85,056 60,229 61,801 88,847 88,405 90,626 91,018 75,310 73,526 90,451 90,907 91,200 91,277

0 −13.9 −8.2 −10.4 −36.5 −34.9 −6.4 −6.8 −4.5 −4.1 −20.6 −22.5 −4.7% −4.2 −3.9 −3.8

100 99.3 99.2 99.3 91.7 93.2 100 100 100 100 98.0 95.8 100 100 100 100

86.2 53.0 82.9 81.1 3.2 3.2 69.6 67.7 80.2 81.6 1.8 1.8 69.1 70.5 80.2 81.6

2.7 9.8 4.0 4.3 25.7 24.5 6.0 6.4 3.9 3.6 21.0 22.7 6.0 5.8 3.9 3.6

Heuristic-strategy

Profit (R$)

Deviation % of heuristic profit

% Of priority customers served (arrival time  2 pm)

% Of non-priority customers served (arrival time > 2 pm)

% Of rejected customers

GLS_UB NN NN_W NN_WP BI BI_D BI_W BI_DW BI_WP BI_DWP GLS GLS_D GLS_W GLS_DW GLS_WP GLS_DWP

84,407 58,295 77,602 77,460 63,357 62,448 71,898 71,786 80,646 80,256 61,873 61,458 77,686 77,600 82,243 82,241

0 −30.9 −8.1 −8.2 −24.9 −26.0 −14.8 −15.0 −4.5 −4.9 −26.7 −27.2 −8.0 −8.1 −2.6 −2.6

100 99.4 99.6 99.4 100 100 100 100 100 100 100 100 100 100 100 100

78.3 17.3 76.1 76.9 18.4 15.6 44.7 44.7 70.3 69.5 8.9 6.9 56.2 55.9 73.5 73.8

7.1 27.5 8.1 7.9 26.7 27.6 18.1 18.1 9.7 10.0 29.8 30.5 14.3 14.4 8.7 8.6

Table 8 Results for test problem B.

Table 9 Results for test problem C100. Heuristic-strategy

Profit (R$)

Deviation % of heuristic profit

% Of priority customers served (arrival time  2 pm)

% Of non-priority customers served (arrival time > 2 pm)

% Of rejected customers

GLS_UB NN NN_W NN_WP BI BI_D BI_W BI_DW BI_WP BI_DWP GLS GLS_D GLS_W GLS_DW GLS_WP GLS_DWP

86,175 58,020 78,232 78,310 63,843 63,881 74,457 74,524 80,557 81,183 62,358 63,158 77,583 78,154 83,896 83,697

0 −32.7 −9.2 −9.1 −25.9 −25.9 −13.6 −13.5 −6.5 −5.8 −27.6 −26.7 −10.0 −9.3 −2.6 −2.9

100 99.9 99.9 99.7 100 100 100 100 100 100 100 100 100 100 100 100

74.1 13.9 71.6 72.4 16.1 16.1 46.2 46.4 64.5 65.8 8.5 11.5 51.6 53.0 71.0 71.0

8.8 29.3 9.7 9.5 28.4 28.4 18.2 18.1 12.0 11.6 32.9 30.0 16.4 15.9 9.8 9.8

search method. This method was developed so that the search effort adapts to the arrival rate of customers, and consequently on the time available for optimization. With a high frequency of call-in's, the method uses less time by using a more restricted neighborhood than when computation time is ample. This busy time is typically in the morning.

The important strategies of waiting, positioning and diversion were integrated with this local search method. This approach has yielded significant profit gains and a low number of customer rejections. There is potential for improving our local search methods. One way might be to include lateness as an additional criterion when

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

Cost

Lateness

2967

19,992

14,448

5.387

Total cost difference = 5,544

14 Fuel and maintenance

Drivers and insurance

4.665

4.494

9.940

9.940

NN_WP

GLS_DWP

Fig. 9. Cost details for heuristics NN_WP and GLS_DWP, test problem C100.

Table 10 Comparison between adaptive and fixed . Heuristic-strategy

Number of updates of the incumbent solution

% Non-implemented rate

Profit (R$)

% Of priority customers served (arrival time  2 pm)

% Of non-priority customers served (arrival time > 2 pm)

Test problem A GLS_WP GLS_WP_25% GLS_DWP GLS_DWP_25%

616 313 663 351

74 84 73 83

91,200 90,868 91,277 91,059

100 100 100 100

80.2 80.2 81.6 81.6

3.9 3.9 3.6 3.6

Test problem B GLS_WP GLS_WP_25% GLS_DWP GLS_DWP_25%

639 404 698 470

71 78 70 75

82,243 81,853 82,241 81,878

100 100 100 100

73.5 72.6 73.8 72.6

8.7 9.0 8.6 9.0

Test problem C GLS_WP GLS_WP_25% GLS_DWP GLS_DWP_25%

743 536 675 466

68 72 71 75

83,896 83,234 83,697 83,484

100 100 100 100

71.0 70.2 71.0 71.0

9.8 10.1 9.8 9.8

% Of rejected customers

D—diversion; W—waiting; and P—positioning.

deciding which customer to service next on a given route. One might also incorporate other (meta) heuristics, like e.g. Tabu Search or Genetic Algorithms in the overall search framework. The developed planning tool could also be used in a simulation setting, identifying the potential savings for the company if the customers called in earlier or had later deadlines. This would lead to less dynamism in the planning problem, with presumably better, or shorter, overall routes, or more customers being serviced with the same fleet. This potential profit might be reflected in various discount mechanisms for those customers that are able to identify their need for service earlier, and the size of these discounts might even be dynamic, reflecting the current situation. Finally, a problem extension would be to include the daily decision of renting extra (spot) vehicles to serve a higher than average demand. The challenge is to determine the best mix between the number of standard (cheaper) and extra (more expensive) vehicles. Acknowledgments This research was partially funded by the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) and the Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP).

References [1] Balakrishnan N. Simple heuristics for the vehicle routing problem with soft time windows. Journal of the Operational Research Society 1993;44:279–87. [2] Bent R, Hentenryck P. Scenario-based planning for partially dynamic vehicle routing with stochastic customers. Operations Research 2004;52:977–87. [3] Branke J, Middendorf M, Noeth G, Dessouky M. Waiting strategies for dynamic vehicle routing. Transportation Science 2005;39:298–312. [4] Br¨aysy O. A reactive variable neighborhood search for the vehicle-routing problem with time windows. INFORMS Journal on Computing 2003;15:347–68. [5] Clarke G, Wright JV. Scheduling of vehicles from a central depot to a number of delivery points. Operations Research 1964;12:568–81. [6] Croes GA. A method for solving traveling-salesman problems. Operations Research 1958;6:791–912. [7] Gendreau M, Potvin Y. Dynamic vehicle routing and dispatching. In: Crainic TG, Laporte G, editors. Fleet management and logistics. Massachusetts: Kluwer; 1998. p. 115–26. [8] Gendreau M, Guertin F, Potvin JY. Parallel tabu search for real-time vehicle routing and dispatching. Transportation Science 1999;33:381–90. [9] Gendreau M, Guertin F, Potvin JY, Séguin R. Neighborhood search heuristics for a dynamic vehicle dispatching problems with pick-ups and deliveries. Transportation Research Part C 2006;14:157–74. [10] Glover F, Laguna M. Tabu search. Massachusetts: Kluwer; 1997. [11] Hvattum LM, LBkketangen A, Laporte G. Solving a dynamic and stochastic vehicle touting problem with a sample scenario hedging heuristic. Transportation Science 2006;40:421–38. [12] Hvattum LM, LBkketangen A, Laporte G. A branch-and-regret heuristic for stochastic and dynamic vehicle routing problems. Networks 2007;49:330–40.

2968

R. Moretti Branchini et al. / Computers & Operations Research 36 (2009) 2955 -- 2968

[13] Ichoua S, Gendreau M, Potvin JY. Diversion issues in real-time vehicle dispatching. Transportation Science 2000;34:426–38. [14] Ichoua S, Gendreau M, Potvin JY. Exploiting knowledge about future demands for real-time vehicle dispatching. Transportation Science 2006;40:211–25. [15] Kontoravdis G, Bard JF. A GRASP for the vehicle routing problem with time windows. ORSA Journal on Computing 1995;7:10–23. [16] Larsen A, Madsen O, Solomon M. Partially dynamic vehicle routing—models and algorithms. Journal of the Operational Research Society 2002;53:637–46. [17] Larsen A, Madsen O, Solomon M. The a priori dynamic traveling salesman problem with time windows. Transportation Science 2004;38:459–72. [18] Mitrovic-Mini c S, Krishnamurti R, Laporte G. Double-horizon based heuristics for  the dynamic pickup and delivery problem with time windows. Transportation Research Part B 2004;38:669–85. [19] Mitrovic-Mini c S, Laporte G. Waiting strategies for the dynamic pickup  and delivery problem with time windows. Transportation Research Part B 2004;38:635–55. [20] Or I. Traveling salesman-type combinatorial problems and their relation to the logistics of blood banking. PhD thesis, Northwestern University, USA, 1976.

[21] Psarafti HN. Dynamic vehicle routing problems. In: Golden BL, Assad AA, editors. Vehicle routing: methods and studies. Amsterdam: Elsevier, North-Holland; 1988. p. 223–48. [22] Psaraftis HN. Dynamic vehicle routing: status and prospects. Annals of Operations Research 1995;61:143–64. [23] Rochat Y, Taillard ED. Probabilistic diversification and intensification in local search for vehicle routing. Journal of Heuristics 1995;1:147–67. [24] Savelsbergh MWP. The vehicle routing problem with time windows: minimizing route duration. ORSA Journal on Computing 1992;4:146–54. [25] Solomon M. Algorithms for the vehicle routing and scheduling problems with time windows. Operations Research 1987;35:254–65. [26] Taillard ED, Badeau P, Gendreau M, Guertin F, Potvin JY. A tabu search for the vehicle routing problem with soft time windows. Transportation Science 1997;31:170–86. [27] Toth P, Vigo D. The granular tabu search and its application to the vehiclerouting problem. INFORMS Journal on Computing 2003;15:333–46. [28] Yang J, Jaillet P, Mahmassani H. Real-time multivehicle truckload pickup and delivery problems. Transportation Science 2004;38:135–48.