solving the lrptw based on tabu search algorithm - ASCE Library

3 downloads 0 Views 392KB Size Report
small-scaled problem using Lingo software. This paper designs a tabu search algorithm to solve LRPTW (Location Routing Problem with Time Windows) for.
ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

SOLVING THE LRPTW BASED ON TABU SEARCH ALGORITHM Lan ZHU1, Dawei HU2, Xiaoming WEI, and Xiqiong CHEN1 1

2

School of Automobile, Chang’an University, Shaanxi, China, PH (86)15249265492; email: [email protected] School of Automobile, Chang’an University, Shaanxi, China, PH (86) 029-82334745; FAX (86) 029-82334476; email: [email protected]

ABSTRACT The object of this paper is to research the multiple-depot location routing problem with time windows. This paper establishes a math model of the location routing problem with time-windows by adding the time constraint to the basic location routing problem, and validates checks the correctness of this math model in a small-scaled problem using Lingo software. This paper designs a tabu search algorithm to solve LRPTW (Location Routing Problem with Time Windows) for large-scaled problems, and uses data of different scales to test the designed algorithm. The results indicate that the proposed algorithm is valid and feasible, being able to solve the problem steadily with high speed. INTRODUCTION Nowadays, with the proposal of lean logistics as well as the idea of JIT (Just In Time), time factors become increasingly important in controlling logistics costs. We study the combinatorial optimization of logistics facility location and vehicle routing problems with the introduction of the time-windows (Location Routing Problem with Time Windows, LRPTW). The core contents include: constructing the mathematical model, and designing a tabu search algorithm for solving this type of model. CONSTRUCTION AND TEST OF THE LRPTW MODEL Construction of the LRPTW Model Study of the concept of LRP can be traced back to 1961, when (Von Boventer, 1961) considered the relationship between transportation cost and facility location cost. In 1980s, computer technology fostered the development of research for LRP. A typical example is the description of an exact algorithm for LRP by (Laporte, 1986). (Ma, 2006) studied the extended model of LRPTW. In this paper, a time window constraint is added on the basis of the standard multi-depot LRP model (Hu., 2008). The model constructed by (Ma, 2006) is improved. The decision variables and parameters of the mathematical model are defined as follows: Define binary variables xijk =1 if i is served before j on route k; yi =1 if depot

904

ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

905

i is opened; and zij =1 if depot i provides service for customer j. Let R and J be the set of potential depots and customers respectively, then S= R∪J. V is the set of vehicles. N is the number of customers. The cost between depot i and depot j is Cij. Each depot i has a fixed opening cost Gi and a capacity Vi. Ulk is an auxiliary variable. ai and bi is the earliest and the latest time for customer i to accept service respectively. wi: start time for vehicle to provide service which is required to lie in the interval [ai, bi]. si: the time required to fulfill the task at depot i. tij: the time for vehicle driving from customer j to customer j. The number of potential depots and customer demand qj is given. The total load of the vehicles cannot exceed their capacity. Demand and of each customer must be satisfied. The vehicles are identical with a fixed using cost Fk and a known capacity Qk which cannot be exceed. Each customer must be served exactly once by each customer are known. The mathematical formulation is as follows: Min

 G y   C x r

rR

r

iS jS kV

ij ijk

  Fk  xijk kV

(1)

iR jJ

s.t :

 x

 1,

ijk

kV iS

 q x

 Qk ,

 Q x

 Vr , r  R

j ijk

iS jJ

k rjk

kV jJ

x pS

ipk

  x pjk  0,

rlk

k  V , i, j  S , i  j

(3) (4) (5)

 1,

k V

(6)

 xljk )  1 zrj , r  R , j  S , k  V

(7)

x

(8)

rR jJ

lJ

k V , i  j

(2)

pS

 x

 (x

j  J ,i  j

jJ

rjk

rjk

 yr , k  K , r  R

ai  wi  bi , i  J

(9)

w j  max  wi  tij  si , a j  , i  J , j  J , k  K , i  j

(10)

xijk  wi  tij  si   w j  0, i  J , j  J , k  K , i  j

(11)

1,if vehicle k drives from depot i to j,i  S , k V , i  j xijk   0, otherwise 

(12)

ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

1,if the warehouse is built in potential depot r,r  R yr   0, otherwise  1,if depot r provides service for customer j,r  R zrj   0, otherwise 

Ulk  U jk  Nxljk  N  1 l, j  J , k V , , U lk  0, l  J , k  V ,

x kV

rlk

(13)

(14)

(15) (16)

 0 , k V

(17)

 zr  zl  2 , r  R , l  R ,

(18)

iS

x

906

iik

In the model above, the objective function (1) minimizes the total cost (including the cost of opening and operating the depots, the cost of transportation and vehicle using). Constraint (2) guarantees that each customer is served exactly once by a vehicle of a depot. Constraint (3) and (4) are capacity constraints of the vehicles and the depots respectively. Constraint (5) ensures the continuity of the routes. Constraint (6) reflects the routes of each vehicle being started from one single depot, and constraint (7) reflects customers being served only by the selected depots. Constraint (8) indicates that customers can be served by the vehicles only when the corresponding depot is selected. Constraints (9)-(11) enforce the time windows that can’t be violated. Binary definitions are shown by constraints (12)-(14). Constraint (15) (16) is the constraint of sub-tours and auxiliary variable respectively. Constraint (17) ensures the depots are not being distributed by themselves. Constraint (18) states there are no routes between any two depots. Test of the LRPTW Model The proposed model is tested on Lingo10.0 software (Jinxing X and Yi X., 2005) and we generated a set of data based on literature (Paolo Toth and Daniele Vigo, 2001): The number of vehicle is 3. The capacity of each vehicle is 10. The fixed cost of using a vehicle is 50. The capacity of each depot is 25. The fixed cost of opening and operating a depot is 150. The speed of vehicle is 50. In the calculation, assuming that transportation cost between depots equals to the distance between them. And the traveling time between them can be got by dividing the distance to the vehicle speed. Computational results of Lingo10.0 shows: Depot 1: no path, depot 2: path 0-3-1-2-0. Depot 3: path 1: 0-5-4-0 and path 2: 0-6-0.Where 0 represents a depot in paths above and other numbers represent the serial number of each customer. The computational time is 63 seconds. The optimal solution of the objective function is 1120 which presents the lowest total cost.

ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

DESIGN OF TABU SEARCH ALGORITHM The test instance used above is small-scaled, which contains only 3 depots and 6 customers. Because of the NP nature of the model, heuristic algorithms are often used to solve this kind of problems. In this paper, the tabu search algorithm is adopted to provide an effective solution to the model. Idea of the Algorithm The main idea is to generate an initial solution of LAP randomly firstly, then use tabu search algorithm to solve the LAP and VRPTW respectively and output the optimal solution until meets the terminal condition, as is shown in figure 1. Start Generate an initial solution of LAP randomly

Solve the LAP with tabu search algorithm

Solve the VRPTW with tabu search algorithm VRPTW

Is terminal criterion met?

End

Figure 1. The flow chart of solving LRPTW with abu search algorithm Solution Strategy ① Expression of the solutions. By arraying the depots and customers directly, we can get N arrangements of natural numbers between 1 and N. Arrange the depots and customers based on a certain rule to form a feasible solution, in which the depots are represented by d1,d2,…,dn and the customers are represented by c1,c2,…, cn. Then a solution of the problem can be presented as d1,c5,c4,c6,d1 or d2, c2,c3,c8,c7,d2, and be optimized continuously in the following processes. ② Generation of the initial solution. This paper generates the initial solution with stochastic method according to the vehicle and depot capacity constraints and the time windows constraints. ③ Determination of the candidate set. Construct a neighborhood solution based on the initial solution of LAP. The 2-swap method is adopted to exchange selected

907

ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

908

with unselected depots and exchange two customers. When solving the VRPTW, optimize the route with 2-swap method, 2-opt method and insertion method. ④ Evaluation of the solutions. Use the value of objective function as the evaluation index of the solutions. ⑤ Determination of the tabu objects. Put the final accepted solution of the each iteration into the tabu list as a tabu object. ⑥ Determination of the tabu length. Tabu length t is determined by the following formulation: t  n , n represents the number of the neighborhoods. ⑦ Aspiration criterion. An evaluation value based aspiration criterion is used. Namely, lift the best solution when all solutions in the candidate set are tabu solutions. ⑧ Termination criterion. Use the pre-specified iterations as termination criterion. TEST OF THE ALGORITHM In order to measure the accuracy and effectiveness of the proposed TS algorithm, we compare the results from TS with the results obtained by lingo 10 for the instance of 3 depots and 6 customers. The data is derived from the mathematical check of the LRPTW. Meanwhile, the result is compared with the reference (Xiaowei M. 2006) in the same case. The comparison result is shown in table 1, in which CPU represents the running time of the best solution; F is the frequency of getting an optimal solution and Val indicates the value of the objective function. It shows that the tabu search algorithm has faster speed, higher accuracy and better stability. Table 1 Comparison of the results obtained by the algorithm with lingo 10 Solving methods CPU F Val Lingo10.0

63 s

100%

1120

The proposed TS

859 ms

80%

1150

TEST ON BENCHMARK INSTANCES To test the performance of the proposed algorithm in solving large-scale LRPTW, this paper constructs three sets of test instance with 25 nodes, 50 nodes and 100 nodes for LRPTW from Solomon C1. The computation is carried out in the computer with AMD3000+ CPU and 1G memory. The computational results are shown in table 2. Table 2. The result of solving LRPTW by tabu search algorithm n N m SD RC CPU(ms) F 25 20 5 3 25 59843 80% 50 42 8 4 20 182515 80% 100 85 15 4 15 920875 80%

Val 913.342 1711.67 3703.91

ICLEM 2014: System Planning, Supply Chain Management, and Safety © ASCE 2014

The table shows the instances in which the number of the nodes is selected as 25, 50 and 100. Columns 1 to 3 in table 2 show the number of nodes n, the number of customers N and the number of potential depots m. Columns 4 to 8 present the detail information of the solutions of solving LRPTW by tabu search algorithm, including the number of selected depots SD, the running count RC and CPU, F, Val with the same format in Table 1. The results show that probability of obtaining an optimization solution reach 80% by the proposed algorithm, and the stability of the algorithm is good. A large-scaled instance with 100 nodes can be solved very fast in 16 minutes. Compared with the results from Lingo and literature Xiaowei M. (2006), the proposed algorithm is faster in speed, higher in accuracy and better in stability when solving the LRPTW model. CONCLUSIONS (1) A mathematical model of location routing problem with time windows is proposed in this paper. The accuracy of the model is verified by Lingo programming. (2) A tabu search algorithm is designed and implemented to solve the LRPTW. The experimental analysis and comparison with the results of corresponding literatures indicate the following advantages of the proposed algorithm: ① it has a great stability, ② the optimal solution is close to the best solution in a small-scaled case and the accuracy is high. ③ it is faster in speed when solving a large-scaled LRPTW problem. REFERENCES Dawei H. (2008). Study on the model and heuristic algorithm for a facility location and vehicle routing problem. Chang'an University. Xi’an. Jinxing X, Yi X. Optimization modeling and LINGO software. Tsinghua University Press, 2005. Laporte G, Nobert Y, Arpin D. (1986). An exact algorithm for solving a capacitated location-routing problem. Annals of Operational Research, 239:310 Paolo Toth, Daniele Vigo, (2001). The vehicle routing problem,Copyright ©2002 by Society for Industry and Applied Mathematics. Von Boventer. (1961). The relation between transportation costs and location rent in transportation problems. Journal of Regional Science, 3(2):27-40 Xiaowei M. (2006). A heuristic algorithm for location routing problem with time windows. Science & Technology Review, 25(5):72-75.

909