initialization methods for the tsp with time windows using variable neighborhood search

23
initialization methods for the tsp with time windows using variable neighborhood search 6 th International Conference on Information, Intelligence, Systems and Applications (IISA 2015) Christos Papalitsas*, Konstantinos Giannakis* , Dimitrios Theotokis*, Theodore Andronikos*, and Angelo Sifaleras** July 6, 2015 *Department of Informatics, Ionian University **Department of Applied Informatics, University of Macedonia 0

Upload: konstantinos-giannakis

Post on 08-Aug-2015

52 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Initialization methods for the tsp with time windows using variable neighborhood search

initialization methods for the tsp with timewindows using variable neighborhoodsearch6th International Conference on Information, Intelligence,Systems and Applications (IISA 2015)

Christos Papalitsas*, Konstantinos Giannakis*, Dimitrios Theotokis*, TheodoreAndronikos*, and Angelo Sifaleras**July 6, 2015

*Department of Informatics, Ionian University**Department of Applied Informatics, University of Macedonia

0

Page 2: Initialization methods for the tsp with time windows using variable neighborhood search

preview of our study

∙ Travelling Salesman Problem (TSP)

∙ TSP with Time Windows

∙ Meta-heuristic procedures

∙ Variable Neighborhood Search

∙ Experimental results

∙ Sorted initial conditions ≯ Random initial conditions

1

Page 3: Initialization methods for the tsp with time windows using variable neighborhood search

introduction

Page 4: Initialization methods for the tsp with time windows using variable neighborhood search

tsp

∙ Numerous applications in many different areas (ArtificialIntelligence, Machine Learning, Software Technology etc).

∙ Symmetric TSP, Asymmetric TSP, Multiple TSP

∙ TSP is the problem of finding the shortest Hamiltonian cycle.

∙ NP-hard

∙ Significant in various fields, such as operational research andtheoretical computer science.

3

Page 5: Initialization methods for the tsp with time windows using variable neighborhood search

tsp formulation

∙ An undirected graph G = (V, E), if symmetrical.∙ A directed graph G = (V, A), if asymmetric.∙ The set V = {1,2,3, ..., n} is the set of vertices.∙ E = {(i, j): i, j ∈V, i < j} is the set of the edges.∙ By n we denote a number of cities (nodes).∙ A cost matrix C = (ci,j) defined on E.∙ Vertices can be points Pi = (Xi, Yi) in a 2-d space, and ci,j =√

((Xi − Xi)2 + (Yi − Yj)2) is the Euclidean distance.∙ The total number of possible paths is equal to (n-1)!/2.

4

Page 6: Initialization methods for the tsp with time windows using variable neighborhood search

tsp-tw tsp with time-windows

∙ TSP-TW is a variant of the TSP∙ Cities (or customers) should be visited in a certain period (or“window”).

∙ It limits the search tree because all TSP solutions are notnecessarily TSP-TW solutions.

∙ In TSP, any permutation of cities is a feasible solution, in TSP-TWeven the search of feasible solutions is difficult.

∙ NP-hard

∙ Given a depot, a set of customers, the service time (i.e., the timethat should be spent on client) and a time window (i.e., the startand the expiration time), the TSP-TW problem refers to finding ashortest path, which starts and ends at a given depot.

∙ Each customer has been only visited once before its expiry date!

5

Page 7: Initialization methods for the tsp with time windows using variable neighborhood search

tsp-tw

∙ Agent is allowed to reach the customer before its ready time,but must wait.

∙ Feasible and infeasible paths.∙ The cost of a path is the total distance traveled.

∙ Given graph G = (V, A), wherein V = {1,2, ..., n}. Suppose 0 indicates adepot and A = (i, j): i, j ∈ V ∪ {0} is the set of arcs between clients.

∙ The traveling cost from i to j is represented by cij,∙ It includes both the customer service time i, and the time it takesto go from i to j.

∙ Each customer i is associated with a time window ai, bi (readinessand maturity time).

∙ TSP-TW can be formulated as a TSP, satisfying all timingconstraints and minimizing the total distance traveled.

6

Page 8: Initialization methods for the tsp with time windows using variable neighborhood search

tsp-tw an example

Figure: A simple graphical example of TSP-TW with 5 nodes.

7

Page 9: Initialization methods for the tsp with time windows using variable neighborhood search

literature indicative works

∙ Dynamic programming approaches.

∙ Hybrid approaches, based on programming with constraints andoptimization techniques.

∙ Tabu search heuristics.

∙ Compressed annealing, (relaxed constraints of time window).

∙ New heuristics.

∙ A two-stage heuristic, based on VNS.

8

Page 10: Initialization methods for the tsp with time windows using variable neighborhood search

meta-heuristic methods an overview

∙ A meta-heuristic is a high level heuristic, designed to find,create, or select a lower level heuristic.

∙ Ideal for problems with missing or incomplete information, or withlimited computing capacity.

∙ Meta-heuristic processes make assumptions about the problem.∙ They do not guarantee a global optimal solution for eachcategory of problems.

∙ Many of them apply stochastic optimization.∙ By searching in a large set of feasible solutions, themeta-heuristic procedures can often find good solutions withless computational effort

9

Page 11: Initialization methods for the tsp with time windows using variable neighborhood search

vns variable neighborhood search

∙ VNS is a meta-heuristic method for solving a set ofcombinatorial problems and global optimization problems.

∙ VNS manages a local search method, which is iteratively applied(iterated local search).

∙ This strategy is driven by three principles:1. a local minimum for a neighborhood structure cannot be a local

minimum to a different neighborhood structure2. a global minimum is a local minimum for all possible structures of

the neighborhood, and3. a local minimum is closely related to the total minimum for many

classes of problems.

∙ Meta-heuristic local search is performed by selecting an initialsolution x, finding a descent direction of x, in a neighborhoodN(x) and moving towards the minimum of f(x) in the N(x) in thesame direction. If there is no direction of the descent, then theheuristic stops; otherwise it is repeated.

10

Page 12: Initialization methods for the tsp with time windows using variable neighborhood search

our implementation

Page 13: Initialization methods for the tsp with time windows using variable neighborhood search

constructive phase of initial feasible solution

∙ Finding feasible solutions is hard.∙ The objective function used in this process is the sum of allpositive differences between the time it takes to reach eachcustomer and end time, i.e.

n∑i=1

max(0, vi − bi).

∙ The algorithm is executed iteratively until it finds a feasiblesolution (a solution with objective function equal to zero).

∙ The algorithm generates a random or sorted, possiblynon-feasible solution.

∙ A local search process is applied in 1-shift neighborhood.∙ Our implementation was coded in Java.∙ We tested our algorithm with various benchmark problems.

12

Page 14: Initialization methods for the tsp with time windows using variable neighborhood search

the vns we used

∙ Based on Da Silva et al. and Mladenovic et al.∙ Firstly, we constructed a feasibility distance matrix.∙ The process from line 2 to the end is repeated until a feasible solutionis found.

∙ In the third line a random or sorted solution is generated.∙ Level is used to determine the number of repetitions (maximum is 8 asproposed by the literature).

∙ Before entering the loop, we perform a first local search.

13

Page 15: Initialization methods for the tsp with time windows using variable neighborhood search

local search

∙ 1-shift procedure.

∙ A violated node is a node that has been visited after itsexpiration time.

∙ Two sets arise:∙ the violated nodes (nodes that were visited after their due time)and

∙ the non-violated nodes.

∙ We separate the main neighborhood in two newsub-neighborhoods.

∙ It is important to define the ordering.1. Move backwards violated nodes2. Move forward not violated nodes3. Move backwards not violated nodes4. Move forward violated nodes

14

Page 16: Initialization methods for the tsp with time windows using variable neighborhood search

our contribution

∙ If a new best solution is found ⇒ level=1.

∙ If not, we increase the value of level parameter and continue tothe next iteration.

∙ The best solution is the one with the fewest violated nodes.

∙ If two solutions have the same number of violated nodes, thenwe check for the cost.

∙ Contribution: the process of selecting an initial solution∙ Random initial solutions.∙ Sorted initial solutions (asc. based on the expiration time).

∙ In some cases it doesn’t work!

15

Page 17: Initialization methods for the tsp with time windows using variable neighborhood search

the meta-heuristic method we used example

(a) Pseudocode of the Meta-heuristic (b) Due timeexample-Accessibilitycondition

16

Page 18: Initialization methods for the tsp with time windows using variable neighborhood search

our results

Page 19: Initialization methods for the tsp with time windows using variable neighborhood search

random solution vs sorted solution

∙ Our tests showed that the sorting solution is not workingproperly, and in general, it does not work for all ranges of timewindows (for some benchmarks).

∙ We generated three different data sets (instances not includedin other benchmark sets).

∙ All nodes were set with due time equal to zero.∙ With due time equal to greater ready time plus one.∙ With the same ready time and due time.

∙ We found that for some cases, this heuristic cannot providefeasible solution if a sorted function is used for initialization.

∙ According to our research results, we show that a sorted initialfunction is not even working for some data sets.

18

Page 20: Initialization methods for the tsp with time windows using variable neighborhood search

computational results random/sorted function comparative study

Name N M. WL B. S. Proposed by RSC RST -b. s. SSC SST -b. s.n20w120 20 120 265.6 Ohlmann and Thomas (2007) 357.49 0.242 34% 371.78 0.081 39%n20w140 20 140 232.8 Ohlmann and Thomas (2007) 337.05 0.222 44% 370.61 0.049 59%n20w160 20 160 218.2 Ohlmann and Thomas (2007) 331.00 0.163 51% 398.08 0.031 82%n20w180 20 180 236.6 Ohlmann and Thomas (2007) 336.58 0.413 42% 418.13 0.029 76%n20w200 20 200 241.0 Ohlmann and Thomas (2007) 365.87 0.202 51% 414.70 0.052 72%n40w120 40 120 360.0 Calvo (2000) 521.18 12.485 44% 549.97 0.265 52%n40w140 40 140 348.4 Calvo (2000) 493.35 41.671 41% 563.83 0.320 61%n40w160 40 160 326.8 Ohlmann and Thomas (2007) 482.20 146.295 47% 553.81 7.190 69%n40w180 40 180 326.8 Calvo (2000) 532.49 121.664 62% 561.09 2.240 71%n40w200 40 200 313.8 Ohlmann and Thomas (2007) 493.65 19.919 57% 558.65 1.163 78%

19

Page 21: Initialization methods for the tsp with time windows using variable neighborhood search

future work and discussion

∙ GVNS heuristic for solving the TSP-TW using Java.

∙ We concentrated on finding initial feasible solutions.

∙ Search for alternative random procedures with differentprobability distributions (next step).

∙ TSP remains a standard point of reference in many applications.

∙ The intractability of TSP-TW problem depends not only on thenumber of nodes, but also on the “width” of the time window.

20

Page 22: Initialization methods for the tsp with time windows using variable neighborhood search

key references

Bianchi, L., Dorigo, M., Gambardella, L. M., and Gutjahr, W. J.A survey on metaheuristics for stochastic combinatorial optimization.Natural Computing: an international journal 8, 2 (2009), 239–287.

Calvo, R. W.A new heuristic for the traveling salesman problem with time windows.Transportation Science 34, 1 (2000), 113–124.

Da Silva, R. F., and Urrutia, S.A general vns heuristic for the traveling salesman problem with time windows.Discrete Optimization 7, 4 (2010), 203–211.

Dumas, Y., Desrosiers, J., Gelinas, E., and Solomon, M. M.An optimal algorithm for the traveling salesman problem with time windows.Operations research 43, 2 (1995), 367–371.

Mladenović, N., and Hansen, P.Variable neighborhood search.Computers & Operations Research 24, 11 (1997), 1097–1100.

Mladenović, N., Todosijević, R., and Urošević, D.An efficient gvns for solving traveling salesman problem with time windows.Electronic Notes in Discrete Mathematics 39 (2012), 83–90.

Ohlmann, J. W., and Thomas, B. W.A compressed-annealing heuristic for the traveling salesman problem with time windows.INFORMS Journal on Computing 19, 1 (2007), 80–90.

21

Page 23: Initialization methods for the tsp with time windows using variable neighborhood search

Any Questions?

22