A Distributed Metaheuristic for Solving a Real-World ... - Springer Link

0 downloads 0 Views 232KB Size Report
and José Francisco Delgado Orta. Instituto Tecnológico de Ciudad Madero, México [email protected], [email protected],.
A Distributed Metaheuristic for Solving a Real-World Scheduling-Routing-Loading Problem Laura Cruz Reyes, Juan Javier Gonz´alez Barbosa, David Romero Vargas, Hector Joaquin Fraire Huacuja, Nelson Rangel Valdez, Juan Arturo Herrera Ortiz, B´ arbara Abigail Arra˜ naga Cruz, and Jos´e Francisco Delgado Orta Instituto Tecnol´ ogico de Ciudad Madero, M´exico [email protected], [email protected], [email protected], [email protected], {ia32 ,juanarturo ,aralia38,axl 136}@hotmail.com

Abstract. In this paper a real and complex transportation problem including routing, scheduling and loading tasks is presented. Most of the related works only involve the solution of routing and scheduling, as a combination of up to five different types of VRPs (Rich VRP), leaving away the loading task, which are not enough to define more complex real-world cases. We propose a solution methodology for transportation instances that involve six types of VRPs, a new constraint that limits the number of vehicles that can be attended simultaneously and the loading tasks. They are solved using an Ant Colony System algorithm, which is a distributed metaheuristic. Results from a computational test using real-world instances show that the proposed approach outperforms the transportation planning related to manual designs. Besides a well-known VRP benchmark was solved to validate the approach.

1

Introduction

A company that transports goods to supply customers usually needs to plan the routes that the fleet must follow, since the transportation means a high percentage of the value added to goods, 5% to 20% of the total cost [1], therefore it is necessary to find efficient ways to plan it. Nowadays, the solution of real-life world transportation problems requires the development of robust methods that support the hard inherited complexity of this kind of problems. A methodology to give solution was proposed, in an integrated way, to three tasks included in a generic transportation problem (RoSLoP): Routing, Scheduling and Loading. The routing task focused in is a generic VRP known as Rich VRP, and includes six important types of VRPs. To test the approach a Transportation System based on two heuristic algorithms (TSHA) was built. 

This research was supported in part by CONACYT and DGEST.

I. Stojmenovic et al. (Eds.): ISPA 2007, LNCS 4742, pp. 68–77, 2007. c Springer-Verlag Berlin Heidelberg 2007 

A Distributed Metaheuristic for Solving a Real-World RoSLoP

69

The paper is structured as follows: section two defines the vehicle routing problem and gives a short review of the related works. Section three describes the tasks of a real bottled products transportation problem. Section four describes the solution methodology using and Ant Colony System algorithm (ACS), which is a distributed metaheuristic that combines an adaptive memory with a local heuristic function to repeatedly construct solutions of hard combinatorial optimization problems, and the DiPro algorithm, a new heuristic that solves load distribution. Section five resumes the experimental results obtained. The last section shows the conclusions and future works.

2

Vehicle Routing Problem (VRP) and Related Works

The classical problem of VRP is defined on a graph with a differentiated vertex (depot) that has travel costs or times associated with each arc. A set of m vehicles routes starting and ending at the depot, with minimal total cost, have to be designed in such a way that each of the remaining vertices is visited by exactly one vehicle. The value of m can be part of the data or the decision variables. The types of VRPs are built by adding new restrictions such as capacity in the vehicles (CVRP, [2]), time windows for the customers and depots (VRPTW, [3]), several depots to supply the demands (MDVRP, [4]), split deliveries (SDVRP, [5],), multiple use of vehicles (VRPM, [6]), vehicles with a heterogeneous capacity (HVRP, [7]), and others. In the revised literature, most of scientific papers target a specific VRP problem. Only a few papers like [8] presents approaches to solve several types of VRPs. In order to overcome these limitations a methodology to solve several types of VRP problems that are involved in the definition of real-world transportations instances is proposed.

3

Scheduling-Routing-Loading Problem (RoSLoP)

The transportation of bottle products, described in this section, was specified by our industrial partner. This problem has three main sub-problems which are: Routing, Loading and Scheduling. The objective of the routing task is to assign routes to vehicles with the minimum total cost. The restrictions are based on six VRP variants (CVRP, VRPM, HVRP, VRPTW, sdVRP and SDVRP) and the new one CCVRP (Customer Capacity VRP) that limits the number of vehicles that can be in a location at the same time. In the Loading task, the distribution of the goods in the vehicles is planned by satisfying a set of restrictions that depend on the company conditions. This problem is known as Bin-Packing Problem (BPP) few BPP variants related to VRP have been studied. In the companies of our industrial partner, the manual procedure to distribute the load is threefold: first, the demand given by our customer is transformed into

70

L. Cruz Reyes et al.

Fig. 1. RoSLoP subproblems

product beds; second, the beds are used to build the platforms; and third, the platforms are assigned into the pallets of the vehicles. For the assignment, all sides of the vehicles must be balanced in weight. During the scheduling, programs containing the arrival time of each vehicle to the customers are elaborated. In order to generalize the transportation problem of this research, the RoutingScheduling-Loading Problem (RoSLoP) is formulated as follows: “Given a set of customers with a demand to be satisfied, a set of depots that are able to supply them and a set of BPP and VRP variants that restrict them, the Routing, Scheduling and Loading for vehicles needs to be designed such as: customer demands are completely satisfied; the total cost is minimized; and the constraints are satisfied”.

4

Methodology

The methodology of solution consists of two steps; the first solves the Routing and Loading tasks with the heuristics algorithms ACS and DiPro. The ACS algorithm uses DiPro to distribute the products in the vehicle during the construction of the routes. The second step solves the scheduling task. 4.1

Ant Colony System (ACS) Algorithm

The ACS algorithm designed to solve the Routing task is a distributed metaheuristic based on the approach shown in [3] and its goal is to find the minimum number of vehicles needed to satisfy all the customer demands in a RoSLoP instance.

A Distributed Metaheuristic for Solving a Real-World RoSLoP

71

In order to build a solution, the proposed ACS algorithm uses two measures known as closeness η and the pheromone trail τ . These measures can be associated with two customers (ηij ,τij ) or with a vehicle (ηc ,τc ). They are calculated according with [3] for customers, while for a vehicle the equations (1 to 3) are proposed in this paper. In the vehicle closeness, equation (1), three vehicle properties are combined: the truck size, velocity and remained time for service. The vehicle which has the better balanced between these properties will be the best. ηc =

1 nvc ∗ (T Mc + T Rc ) ∗

trc ttc

(1)

where ηc is the closeness of vehicle c; nvc are the trips needed by the vehicle c to supply all the demands; T Mc is the average load/unload time of a vehicle c; T Rc is the average travel time of a vehicle c; trc is the available service time of the vehicle c; and ttc is the total service time of the vehicle c. The pheromone trail τ measures how attractiveness is to include a certain element into a solution. This value is modified by the ants during the construction of the solutions. The global updating of the pheromone trail for vehicles is shown in the equation (2) while the local updating is in the equation (3). τc = (1 − ρ) ∗ τc +

ρ Jψgb

τc = (1 − ρ) ∗ τc + ρ ∗ τ0

(2) (3)

where ρ ∈ [0, 1] is a pheromone evaporation parameter and Jψgb is the length of the best global known solution ψ gb achieved by the ACS algorithm at the moment of the updating; τ0 is the initial value of the trail. The ACS algorithm shown in Figure 2 is mainly regulated by three parameters: ρ, β (relative importance of the closeness η); and q0 (probability of chose among exploitation and exploration). In the algorithm, an initial feasible solution is created using a Nearest Neighborhood algorithm (line 1). After that it creates an ant colony whose purpose is to minimize the number of vehicles used (lines 4 to 18). In this process, a improved global solution is searched building a fixed number of ants per colony and updating the pheromone trail for vehicles and customers locally and globally (lines 13-14 and 16-17 respectively). When a local solution has been improved (line 9), the current colony ends (line 12), the local solution is compared with respect to the best global solution (line 19) and the updates have done (line 20-21), to continue with the execution of the algorithm. The stop conditions of lines 18 and 22 are specified with respect to the number of iterations and time of execution respectively. In the ACS algorithm the functions #active vehicles and #visited customers determine the number of vehicles used in a solution and the number of customers visited in the solution, respectively. The function #depot tells which depot is the owner of a specific vehicle. The integer vector INj stores the number of times a customer j hasn’t been inserted in a solution. IN is used by the construction

72

L. Cruz Reyes et al.

ACS Algorithm (β, ρ, q0 ) 1. ψ gb ← Initial Solution /*initialize global best solution*/ /* number of vehicles for a new solution*/ 2. t ← #active vehicles(ψ gb ) – 1 3. repeat /* start ACS algorithm*/ 4. repeat /* start minimization of number of vehicle*/ /*initial local best solution*/ 5. ψ lb ← Initial Solution 6. for each ant k ∈ K /*start ant colony system optimization with k ants*/ /* new solution with t vehicles*/ 7. ψ k ← new ant solution (k, t, IN ) 8. ∀j ∈ψ / k : INj ← INj + 1 /* Customer has not been visited in IN times*/ 9. If #visited customers (ψ k ) > #visited customers(ψ lb ) then 10. ψ lb ← ψ k 11. ∀j : INj ← 0 /*colony ends if solution is improved */ 12. end repeat 13. ∀c ∈ ψ lb : τc = (1 − ρ) ∗ τc + Jρlb /*vehicle pheromone local update*/ ψ

14.

∀(i, j) ∈ ψ lb : τij = (1 − ρ) ∗ τij +

15. 16.

end for each ∀c ∈ ψ gb : τc = (1 − ρ) ∗ τc +

17.

∀(i, j) ∈ ψ

gb

ρ gb Jψ

: τij = (1 − ρ) ∗ τij +

ρ lb Jψ

/*customer pheromone local update*/ /* vehicle pheromone global update*/

ρ

gb



/*customer pheromone global update*/

18. until stop criterion is reached 19. if ψ lb is feasible and ψ lb improves ψ gb then 20. ψ gb ← ψ lb 21. t ← #active vehicles(ψ gb ) – 1 22. until stop criterion is reached

/* if global best is improved */

Fig. 2. ACS Algorithm used to solve RoSLop Instances

procedure to favor the customers that are less frequently included in a solution Ψ . The constructive procedure new ant solution builds the new solution with the ant k. It consists in building routes using t vehicles to satisfy customer demands. 4.2

DiPro Algorithm

Figure 3 shows a graphical description of DiPro Algorithm. In order to distribute a customer demand in a vehicle, the products are ordered by its supported weight. After that, the goods are organized in homogeneous beds and homogeneous platforms. Then, the remaining product boxes of each product are used to form heterogeneous beds with different products that have the same category and belong to the same area. The rest of homogeneous beds that could not form homogeneous platforms in the previous process are combined with heterogeneous beds to form heterogeneous platforms by area. The heterogeneous platforms are created by following the Round Robin mechanism used in processor scheduling. A round robin is an arrangement of choosing all elements in a group equally in some rational order, usually from the top to the bottom of a list and then starting again at the top of the list and so on. In DiPro, the arrangement is the remaining beds of products

A Distributed Metaheuristic for Solving a Real-World RoSLoP

73

Fig. 3. DiPro Algorithm

that could not be allocated in homogeneous platforms; the order is given by their supported weight. Once all the platforms have been built, all the created platforms are ordered by weight and then assigned to the pallets. It is necessary to take into account that the left and the right side of the vehicle must be weighed balanced and that the heaviest platforms go in the front and the lightest in the back.

5 5.1

Experimental Results Evaluation of a Basic ACS Algorithm

In this experiment, a version of the ACS Algorithm that solves VRPTW with other scientific community heuristics that solve the same variant was compared. During the experiment, 56 VRPTW instances of the Solomon’s benchmark were solved. The cases were composed by the six different problem types (which are R1, R2, C1, C2, RC1, and RC2). Each instance contains 100 locations. The basic algorithm was implemented in C#, and each instance was solved 30 times. The experiments were executed under the next conditions: Xeon Processor at 3.06 GHz, with 3.87 Gb of RAM Memory and Windows Server 2003 as Operative System. The values for the parameters of the ACS algorithm for VRPTW were: ants used = 10, colonies = 5; generations = 40; q0 = 0.9; β = 1; ρ = 0.1. Table 1 shows the comparison between the ACS Algorithm and four of the best known algorithms that have solved VRPTW. Columns two to six show the average number of vehicles used in the solutions by each kind of instance. The last column is the combination of the average number of vehicles shown in the results

74

L. Cruz Reyes et al.

Table 1. Four of the best known algorithms compared with ACS VRPTW with respect to vehicles Number of Vehicles needed Average R1 R2 C1 C2 RC1 RC2 [9] 11.92 2.73 10.00 3.00 11.50 3.25 7.06 [10] 11.92 2.73 10.00 3.00 11.50 3.25 7.06 [11] 11.92 2.73 10.00 3.00 11.63 3.25 7.08 [3] 12.00 2.73 10.00 3.00 11.63 3.25 7.10 ACS Algorithm 12.58 3.09 10.00 3.00 12.25 3.38 7.38 Algorithm

Table 2. Four of the best known algorithms compared with ACS VRPTW with respect to distance Total of Distance traveled R1 R2 C1 C2 RC1 RC2 ACS Algorithm 1221.9 954.6 828.7 594.1 1383 1128.8 [3] 1217.73 967.75 828.4 589.86 1382.4 1129.19 [9] 1222 975.12 828.4 589.86 1390 1128.38 [11] 1228.06 969.95 828.38 589.86 1392.6 1144.43 [10] 1251.4 1056.6 828.5 590.06 1414.9 1258.15 Algorithm

Average 1018.57 1019.225 1022.2933 1025.5417 1066.5933

of a whole set of instances. The considered algorithms were: Reactive Variable Neighborhood Search [9], Hybrid Genetic Algorithm [10], Genetic Algorithm [11], Multi-Objective Ant Colony System [3]. The results reported by the ACS algorithm in Table 1 and 2 are based on an average taken from cases that were runned 30 times, while the rest of the values shown by the other algorithms belong to the best results found in all their runnings. The other researchers experiments are different in some aspects like: the number of times that a case is runned, the running time, the equipment where the instances were executed and the way that the results are reported. The researchers report their results based in a sample which experimental designs do not show the real behavior of an algorithm [12]. Due to this, it is not possible to compare the actual results of the ACS algorithm; however, it could be appreciated that the implementation used in this research is efficient [13]. Due to this performance it was decided to implement the ACS algorithm in such a way that it could be used to solve more complex real-world instances, like the RoSLoP instances. 5.2

Solving Real-World RoSLoP Instances

Our industrial partner defines an efficient system as the one that can solve a real-world instance in 10 minutes or less, satisfying 100% of the demands and minimizing the number of vehicles used. The instances used in this experiment are real-world cases presented in a bottled product transportation company. Table 3 shows the description of such

A Distributed Metaheuristic for Solving a Real-World RoSLoP

75

Table 3. Real-world RoSLoP instance description Instance Case Case Case Case Case

01 02 03 04 05

Description of the real-world RoSLoP Instances Customers Vehicles Depots Arcs Customer Depot Customer capacity capacity demands 7 8 1 10 1 2 12681 6 8 1 10 1 2 10953 7 8 1 10 1 2 15040 7 8 1 10 1 2 12624 7 8 1 10 1 2 14262

Table 4. Experimental Results Metrics Supplied products Instances Vehicles used in the solution NNH TSHA1 TSHA2 Manual NNH TSHA1 TSHA2 Manual Case 01 8 7 7 7 11077 12681 12681 12681 Case 02 8 5 5 6 10953 10953 10953 10953 Case 03 8 7 6 6 8019 15040 15040 15040 Case 04 8 6 5 5 11302 12624 12624 12624 Case 05 8 8 7 7 11283 14262 14262 14262 1 2

Execution time of five seconds. Execution time of ten minutes.

cases. The column five is the number of arcs in the connection matrix. Columns six and seven mean the number of vehicles that can be simultaneously loaded or unloaded in a location. The last column is the amount of product boxes demanded by the whole set of customers of a real-world RoSLoP instance. The VRP variants used to describe the routing task of the RoSLoP instances are: CVRP, VRPM, HVRP, VRPTW, VRPSD, VRPsd and CCVRP a new restriction in which the customer has a limited attention capacity for vehicles. The algorithm was implemented in C#. The conditions of this experiment given by our industrial partner were: AMD Athlon XP, 1.3 GHz, 192 Mb in RAM, Windows XP Operative System. The values for the parameters of the ACS algorithm for VRPTW were: ants used = 15, colonies = 5; q0 = 0.9; β = 2; ρ = 0.1. The results obtained were compared with a Nearest Neighborhood Heuristic (NNH) and with the manual solution given by the procedure used in the bottle product transportation company. In Table 4 the solutions gotten by our system TSHA are compared with the manual procedure and the NNH. It is important to say that the NNH gets a solution in one second and the manual procedure takes around sixteen hours. As it is shown in Table 4, the performance of TSHA in comparison with the manual procedure, improves the consumed time in all the cases. It also improves

76

L. Cruz Reyes et al.

the number of vehicles in 20% of the cases. In all cases, TSHA satisfies the demands and does it better than NNH algorithm which was the quickest.

6

Conclusions and Future Work

This paper shows the feasibility of solving real-world instances of the transportation problem named RoSLoP because it includes routing, scheduling and loading tasks. The proposed solution methodology is based on a distributed metaheuristic (ACS algorithm) and a deterministic heuristic (DiPro algorithm). In comparison with the manual procedure, Transportation System based on Heuristic algorithms (TSHA) reduced the time needed to find a solution from 16 hours to 10 minutes. It also reduced, in a 20% of the cases, the number of vehicles needed to supply the customer. In general, the solutions given by TSHA can be considered efficient solutions according with the standard given by our industrial partner. Besides, a well-known benchmark of the vehicle routing problem (VRP)was solved. For future works we are planning to manage more than six VRP variants and solve instances of very large scale. We also plan to solve the load distribution task by using a Bin-Packing approach.

References 1. Toth, P., Vigo, D.: The Vehicle Routing Problem. Monographs on Discrete Mathematics and Applications. SIAM, Philadelphia (2001) 2. Blasum, U., Hochst¨ atter, W.: Application of the Branch and Cut Method to the Vehicle Routing Problem. Universit¨ at zu K¨ oln, BTU Cotbus (May15, 2002) 3. Gambardella, L., Taillar, E., Agazzi, G.: MACS-VRPTW: A Multiple Ant Colony System for Vehicle Routing Problems with Time Windows. Technical Report IDSIA. IDSIA-06-99. Lugano, Switzerland (1999) 4. Mingozzi, A., Vallet, A.: An exact Algorithm for Period and Multi-Depot Vehicle Routing Problems. Department of Mathematics, University of Bologna, Bolonga, Italy (2003) 5. Archetti, C., Mansini, R., Speranza, M.: The Vehicle Routing Problem with capacity 2 and 3, General Distances and Multiple Customer visits. In: ORP 2001, Paris (September 26-29, 2001) 6. Taillard, E., Laport, G., Gendreau, M.: Vehicle Routing Problem with Multiple Use of Vehicles. Centre de Recherche sur les transports. Publicacin CRT-95-19 (March 1995) 7. Taillard, E.: A Heuristic Column Generation Method For the Heterogeneous Fleet VRP. Istituto Dalle Moli di Studi sull Inteligenza Artificiale, Switzerland. CRI-9603 (May 1996) 8. Psinger, D., Ropke, S.: A general Heuristic for Vehicle Routing Problems. DIKU, University of Copenhagen (February 25, 2005) 9. Br¨ aysy, O.: A Reactive Variable Neighborhood Search Algorithm for the Vehicle Routing Problem with Time Windows. Working paper, SINTEF Applied Mathematics, Department of Optimization, Norway (2001)

A Distributed Metaheuristic for Solving a Real-World RoSLoP

77

10. Berger, J., Barkaoui, M., Br¨ aysy, O.: A Parallel Hybrid Genetic Algorithm for the Vehicle Routing Problem with Time Windows. Working Paper, Defense Research Establishment Valcartier, Canada (2001) 11. Homberger, J., Gehring, H.: Two Evolutionary Meta-heuristics for the Vehicle Routing Problem with Time Windows. Infor. 37, 297–318 (1999)