Traveling Salesman Problem with Time Windows Solved with Genetic Algorithms

Similar documents
GENETIC ALGORITHM with Hands-On exercise

A Steady-State Genetic Algorithm for Traveling Salesman Problem with Pickup and Delivery

Models and Algorithms for Shortest Paths in a Time Dependent Network

Fuzzy Inspired Hybrid Genetic Approach to Optimize Travelling Salesman Problem

Using Genetic Algorithm with Triple Crossover to Solve Travelling Salesman Problem

Reduce Total Distance and Time Using Genetic Algorithm in Traveling Salesman Problem

Optimizing the Sailing Route for Fixed Groundfish Survey Stations

Modified Order Crossover (OX) Operator

Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm

CHAPTER 4 GENETIC ALGORITHM

Escaping Local Optima: Genetic Algorithm

A Meta-heuristic Applied for a Topologic Pickup and Delivery Problem with Time Windows Constraints

Introduction to Genetic Algorithms. Genetic Algorithms

An Improved Genetic Algorithm for the Traveling Salesman Problem with Multi-Relations

The study of comparisons of three crossover operators in genetic algorithm for solving single machine scheduling problem. Quan OuYang, Hongyun XU a*

Comparison of Heuristics for the Colorful Traveling Salesman Problem

ARTIFICIAL INTELLIGENCE (CSCU9YE ) LECTURE 5: EVOLUTIONARY ALGORITHMS

A NEW HEURISTIC ALGORITHM FOR MULTIPLE TRAVELING SALESMAN PROBLEM

A Parallel Architecture for the Generalized Traveling Salesman Problem

Solving Traveling Salesman Problem for Large Spaces using Modified Meta- Optimization Genetic Algorithm

Multiobjective Job-Shop Scheduling With Genetic Algorithms Using a New Representation and Standard Uniform Crossover

A New Selection Operator - CSM in Genetic Algorithms for Solving the TSP

An Evolutionary Algorithm for the Multi-objective Shortest Path Problem

Hybridizing PSM and RSM Operator for Solving NP-Complete Problems: Application to Travelling Salesman Problem

IE 102 Spring Routing Through Networks - 1

C 1 Modified Genetic Algorithm to Solve Time-varying Lot Sizes Economic Lot Scheduling Problem

Task Graph Scheduling on Multiprocessor System using Genetic Algorithm

Genetic Algorithm for Network Design Problem-An Empirical Study of Crossover Operator with Generation and Population Variation

Comparison of TSP Algorithms

A Web-Based Evolutionary Algorithm Demonstration using the Traveling Salesman Problem

Solving ISP Problem by Using Genetic Algorithm

Designing Routes of Various Depot Multiple Traveling Salesman Problem by Using of Genetic Algorithm

Genetic algorithms and VRP: the behaviour of a crossover operator

Mutations for Permutations

Solving the Capacitated Vehicle Routing Problem with a Genetic Algorithm

Design of a Route Guidance System with Shortest Driving Time Based on Genetic Algorithm

GENETIC ALGORITHM-AIDED ROUTING ON 3D DYNAMIC NETWORKS

Solving A Nonlinear Side Constrained Transportation Problem. by Using Spanning Tree-based Genetic Algorithm. with Fuzzy Logic Controller

Study on GA-based matching method of railway vehicle wheels

A data-driven approach for solving route & fleet optimization problems

Evolutionary Computation. Chao Lan

Evolutionary Algorithms. CS Evolutionary Algorithms 1

Comparison of Genetic Algorithm and Hill Climbing for Shortest Path Optimization Mapping

Genetic Algorithms Variations and Implementation Issues

SOLVING VEHICLE ROUTING PROBLEM WITH SIMULTANEOUS PICKUP AND DELIVERY WITH THE APPLICATION OF GENETIC ALGORITHM

Khushboo Arora, Samiksha Agarwal, Rohit Tanwar

The Generalized Traveling Salesman Problem: A New Genetic Algorithm Approach

Innovative Systems Design and Engineering ISSN (Paper) ISSN (Online) Vol.5, No.1, 2014

Solving the Travelling Salesman Problem in Parallel by Genetic Algorithm on Multicomputer Cluster

Suppose you have a problem You don t know how to solve it What can you do? Can you use a computer to somehow find a solution for you?

Hybrid of Genetic Algorithm and Continuous Ant Colony Optimization for Optimum Solution

Dynamic Vehicle Routing Using Hybrid Genetic Algorithms

A Hybrid Genetic Algorithms and Tabu Search for Solving an Irregular Shape Strip Packing Problem

Solving Traveling Salesman Problem Using Parallel Genetic. Algorithm and Simulated Annealing

AN EVOLUTIONARY APPROACH TO DISTANCE VECTOR ROUTING

Evolutionary Computation for Combinatorial Optimization

4/22/2014. Genetic Algorithms. Diwakar Yagyasen Department of Computer Science BBDNITM. Introduction

ACO and other (meta)heuristics for CO

A Genetic Algorithm for Graph Matching using Graph Node Characteristics 1 2

Optimal Facility Layout Problem Solution Using Genetic Algorithm

Sparse Matrices Reordering using Evolutionary Algorithms: A Seeded Approach

Combining Two Local Searches with Crossover: An Efficient Hybrid Algorithm for the Traveling Salesman Problem

of optimization problems. In this chapter, it is explained that what network design

Introduction to Genetic Algorithms. Based on Chapter 10 of Marsland Chapter 9 of Mitchell

Crew Scheduling Problem: A Column Generation Approach Improved by a Genetic Algorithm. Santos and Mateus (2007)

March 19, Heuristics for Optimization. Outline. Problem formulation. Genetic algorithms

A Parallel Architecture for the Generalized Travelling Salesman Problem: Project Proposal

Selecting the Best Spanning Tree in Metro Ethernet Networks using Genetic Algorithm

Genetic Algorithms. Kang Zheng Karl Schober

A Memetic Algorithm for Parallel Machine Scheduling

International Journal of Digital Application & Contemporary research Website: (Volume 1, Issue 7, February 2013)

Genetic Algorithm for Dynamic Capacitated Minimum Spanning Tree

Keywords Traveling salesman problem, genetic optimization algorithms optimize population, Dijikstra etc.

Introduction to Approximation Algorithms

Genetic Algorithms with Oracle for the Traveling Salesman Problem

Introduction to Genetic Algorithms

ANTICIPATORY VERSUS TRADITIONAL GENETIC ALGORITHM

Algorithms & Complexity

A Genetic Algorithm Framework

Enhanced ABC Algorithm for Optimization of Multiple Traveling Salesman Problem

val(y, I) α (9.0.2) α (9.0.3)

Parallel Traveling Salesman. PhD Student: Viet Anh Trinh Advisor: Professor Feng Gu.

Analysis of TSP Optimization Problems using Genetic Algorithm

Outline. Motivation. Introduction of GAs. Genetic Algorithm 9/7/2017. Motivation Genetic algorithms An illustrative example Hypothesis space search

Rich Vehicle Routing Problems Challenges and Prospects in Exploring the Power of Parallelism. Andreas Reinholz. 1 st COLLAB Workshop

Solving Travelling Salesman Problem and Mapping to Solve Robot Motion Planning through Genetic Algorithm Principle

The Optimization Model and Algorithm for Train Connection at Transfer Stations in Urban Rail Transit Network

A genetic algorithm approach for finding the shortest driving time on mobile devices

Optimization of Non-Linear Multiple Traveling Salesman Problem Using K-Means Clustering, Shrink Wrap Algorithm and Meta-Heuristics

Routing in Dynamic Network using Ants and Genetic Algorithm

METAHEURISTICS Genetic Algorithm

Outline. CS 6776 Evolutionary Computation. Numerical Optimization. Fitness Function. ,x 2. ) = x 2 1. , x , 5.0 x 1.

6 ROUTING PROBLEMS VEHICLE ROUTING PROBLEMS. Vehicle Routing Problem, VRP:

Issues in Solving Vehicle Routing Problem with Time Window and its Variants using Meta heuristics - A Survey

METAHEURISTICS. Introduction. Introduction. Nature of metaheuristics. Local improvement procedure. Example: objective function

An Efficient Hybrid Genetic Algorithm for Performance Enhancement in solving Travelling Salesman Problem

Li Minqiang Institute of Systems Engineering Tianjin University, Tianjin , P.R. China

PATH PLANNING OF ROBOT IN STATIC ENVIRONMENT USING GENETIC ALGORITHM (GA) TECHNIQUE

Introduction to Evolutionary Computation

A Development of Hybrid Cross Entropy-Tabu Search Algorithm for Travelling Repairman Problem

Transcription:

Traveling Salesman Problem with Time Windows Solved with Genetic Algorithms Assistant lecturer, László Illyés EMTE Sapientia University, Miercurea-Ciuc Romania, Department of Mathematics and Informatics Abstract: The Traveling Salesman Problem (TSP) is a very common problem in many applications. It appears in the transportation of goods and not only. As we know this problem is NP hard. Time Windows (TW) brings us some additional constraints to solve. In case there are many Time Windows the problem constraints determine almost the whole solution of the problem and in some cases we can solve the problem. We restrict the cardinality of Time Windows. In our work we define the following conditions without loss of generality: 1. The salesman has to visit one town each day 2. The distance between two towns can be performed in a day 3. We have maximum two Time Windows 4. We have routes between every two towns, but the cost of the routes may differ in case we go from town A to town B, or we go from town B to town A. Genetic algorithms are powerful tools for solving NP hard problems. They utilize search and optimization procedures that operate in a similar way to the evolutionary processes observed in nature. We have to code the problem data structure in a structure (chromosome), which allows us to make some genetic operations over this chromosome. Genes constitute chromosomes. A chromosome represents a possible solution in the space of solutions. We can code the problem of time windows in some chain of chromosome where the first chain segment starts with the town from where the salesman starts his journey and the end of the segment, the first constraint of time window, the town specified in the first time window. The second chain starts from the town reached from the first time window, and ends with the second town specified in the second Time Window constraint and so on. The chains connected together form the desired chromosome. None of the towns appears twice in the chromosome, the length of this chromosome equals with n, the desired cardinality of the towns to visit. Even if we reach an optimal solution, we can t prove that it is optimal because of NP hardness. Keywords: Traveling Salesman Problem, Time Window, genetic algorithms, chromosome, genes

1. Introduction The traveling salesman problem (TSP) is to find a minimum-cost Hamiltonian cycle that visits node of n exactly once and returns to the starting node, given a network G(V,E), node set V={1,2,,n}, arc set E={(i,j):i j, i,j V}, and cost c from node i to node j [SHM05]. Our paper refers to the asymmetric type of the problem, where c c ji. We can find real-world instances of the TSP in a variety of areas, i.e. delivery, scheduling, network designs etc. The TSP is one of the first optimization problems proved as NP hard. Time constraint introduces other problems in solving the main problem. 2. Mathematical model in a given network G(V,E) [SHM05] Minimize c x i V Subject to i V j V j V x =1, j V, (1) x =1, i V, (2) x =0,1, (i,j) E, (3) x 1, S, S 2 (4) i S j V S We assume, that none of two time windows overlap. We order the time windows in the natural order, where TW 1 <TW 2 <TW m. We consider TW k =[t kmin,t kmax ], the k-th time window. k=1,2 m and A k the town corresponding to this time window. According to our problem definition, where every town is visited in a single day, and time windows are referring to a release day and a deadline day, time constraints are transformed in a structural problem for the proposed data. Day windows DW k =[D kmin,d kmax ]. D kmin is the minimum of the relative day from the beginning of the journey to reach the town A k. D kmax is the deadline. We have two limit conditions in this problem. If there is no time window, we have n! possibilities to perform the route and we reach the classical TSP. In case that all towns has time windows with one possible day for every town, the problem is obvious, and not NP hard. 2. Data structure for genetic approach. Generating chains We use the 2 TW model and some concrete data for easy understanding, and make the desired generalization. We choose the following chromosome: (g 1,g 2, g j..g k g n-1,g n,g 1 ), where g 1 =A 0, g j =A j town and

g k =A k town. A 0 is the starting and ending town, A j and A k are the towns with Time Windows. The rest of chromosome consists of the nonconstrained towns. The first town has to be the last one too; else we have the WSP (wandering salesman problem). Genes represent the towns and the locus of the genes the order of the TS arrival (day). We generate the first population in order to satisfy the TW constraints. We can generate this in the following way: We randomly choose from the first time window the day, when the TS have to be in the first constrained town. We randomly generate the day for the second TW in the same way. Next we generate randomly the remaining string for the 3 chains of chromosome. In this case we know the length of each chromosome. We show this with concrete dates: let it be n=100, the first Time Window: [25,27], the second Time Window: [35,38]. In case, that the randomized value of the first time constraint is 26 and for the second is 36. We have the first chain length 26, the second equals width 11, the last with 65, the structure of chromosome is: (g 1, g 2, g 26..g 36 g 99, g 100,g 1 ). The first chain is (g 1, g 2, g 26 ), the second chain is (g 26,g 27, g 36 ) and the third (g 36, g 37, g 100,g 1 ). The chains length may differ from one chromosome to another, because the randomized generation of desired day of Time Window. 3. The 2 Level genetic approaches. Bottom up technique. In this case we apply genetic algorithm for the chains occur as an individual from the first population. This we apply for every individual and for every chain occurred. This will be the first level of the genetic approach. On the next level we have some problems to solve. One of them is, that the chain lengths may differ from a chromosome to another. In this case we have to define different genetic operators from the well known ones. Genetic operators are the reproduction, crossover and mutation. We have to show the operators for both levels. First level (chain optimization): Selection for reproduction based on roulette wheel, fitness based selection; Crossover operators used are from the classical operators: order crossover (OX), partially matched crossover (PMX), cycle crossover (CX), Stefan Jakobs crossover (SJX), and edge recombination crossover (ERC). Because the asymmetry the ERC operator we can use only in an adequate mode, i.e. the order in the chain must be the same in both parents. Mutation operator can be reciprocal exchange, inversion,

displacement and heuristic. The fitness function can be the quadratic 1 inversion of the cost. f = 2 1+ C. Second level (global optimization). After we made the optimization for the chains we can make the global optimization in different ways. We assume that we have some piece of chain with good proprieties. We have to define here the genetic operators. These operators have to work even if the chains have not equal lengths. The best method in this approach we consider not a genetic algorithm but an evolutionary algorithm. In this case we have to look after the biggest changeable chain between every sub chain obtained because time windows. We consider that we have 15 towns with 2 time windows. Let s have town 1 the origin town, town 2 and town 3 with time windows. Time windows should be [4,6] and [8,10], meaning that the 2 nd town has to be reached in the 4 th day, but not least then in the 6 th day, and so on. In this case the first chain length is [4,6], the second [2,6] and the last [5,7] because of the time windows. We define some mutation operators. The first changes between 2 parts of the chains. The second makes rotational changes. We take from every chain a sub chain and put in another chain in clockwise order or in counter-clockwise order. 4. Another point of view (global optimization from the beginning): We can view the problem like the m+1 MTSP (Multiple Traveling Salesperson Problem) where m is the number of the time windows. Here we have the constraint that every salesman has to travel from one specific town to another specific town. The first and last towns are fixed, and to have the global TSP, the starting town of the first salesman and the ending town of the last salesman is the same. We can use the twopart chromosome technique from [CAR05]. The difference between our chromosome and the MTSP is that we introduce the starting town and the TW towns only in the calculus. These towns are not in the first part of the chromosome. In the second part we have the number of days. The first gene from the second part is the number of days performed by the salesman to reach the first time-constrained town. And so on. Constraints on the second part of the chromosome are more than in the [CAR05].

The data structure for chromosome we consider could be: 1 4 6 11 2 5 14 10 9 3 15 12 8 13 7 1 But similarly to the two-part chromosome technique used we don t introduce in the chromosome the starting town and the time windows towns: 4 6 11 5 14 10 9 15 12 8 13 7 5 10 Chromosome splitter The chromosome doesn t correspond with the real positions, we have to subtract the subtracted positions too, and from the first time window we extract 2, from the second 3 positions. In this case we can proceed in different ways. Or we transform time windows, or we make transformations only when we make the calculus. In the first case, TW 1 =[4,6][2,4], and in the second case TW 1 =[8,10][5,7]. With this kind of notation we have the chromosome in another form: 4 6 11 5 14 10 9 15 12 8 13 7 3 7 Genetic operators: In the first part of chromosome we can use the classical operators that were enumerated in the first approach. In the second part of the chromosome we can use another approach: the covering approach or we can simply choose one of the gene from the first parent, the second from the second. A possible reproduction scheme with CX operator The parents involved: P1 4 6 11 5 14 10 9 15 12 8 13 7 5 10 P2 6 9 8 10 11 13 7 5 4 12 15 14 4 9 The offsprings: O1 4 6 11 10 14 13 9 5 12 8 15 7 5 9 O2 6 9 8 5 11 10 7 15 4 12 13 14 4 10

Conclusions: The appropriate data structure for the chromosome was found, with genetic operators too to solve the problem. We transform a sophisticated problem in a problem with easy genetic approach. References [ALA02] Álmos, A. et.all., (2002), Genetikus algoritmusok, Typotex Kiadó Budapest [BOI04] Borgulya, I., (2004), Evolúciós algoritmusok, Dialóg Campus Kiadó Budapest-Pécs [CAR05] Carter A.E., Ragsdale C.T., (2005), A new approach to solving the multiple traveling salesperson problem using genetic algorithms, European Journal of Operational Research xxx (2005) xxx-xxx [FAB02] Fabian, Cs. B., (2002), Generalized Simple and Crossover Mutations for Evolutionary Algorithms, International Conference on Economic Cybernetics Bucharest [HES02] Heung-Suk H., (2002), An improved model for vehicle routing problem with time constraint based on genetic algorithm, Computers & Industrial Engineering 42, pp.361-369 [ILP05] Illyés, L.; Pál, L., (2005) Generalized particular covering problem with genetic algorithms, AMO Advanced Modeling and Optimization, Volume 7, Number 1, 2005, pp.1-7 [SHM05] Sang-Ho K., Hun-Tae K., Main-Kyu K., (2005), Determination of the candidate arc set for the asymmetric traveling salesman problem, Computers & Operations Research 32 (2005) pp.1045-1057 [SMK05] Mitrovic-Minic S., Krishnamuri R., (2005), The multiple TSP with time windows: vehicle bounds based on precedence graphs, Operations Research accepted work.