Implementation of CSP Cross Over in Solving Travelling Salesman Problem Using Genetic Algorithms

Similar documents
Comparative Study of Different Selection Techniques in Genetic Algorithm

GENETIC ALGORITHMS. Narra Priyanka. K.Naga Sowjanya. Vasavi College of Engineering. Ibrahimbahg,Hyderabad.

Intro. ANN & Fuzzy Systems. Lecture 36 GENETIC ALGORITHM (1)

Introduction To Genetic Algorithms

The Metaphor. Individuals living in that environment Individual s degree of adaptation to its surrounding environment

Logistics. Final exam date. Project Presentation. Plan for this week. Evolutionary Algorithms. Crossover and Mutation

Part 1: Motivation, Basic Concepts, Algorithms

College of information technology Department of software

Genetic Algorithm: An Optimization Technique Concept

Introduction To Genetic Algorithms

Machine Learning. Genetic Algorithms

Machine Learning. Genetic Algorithms

Introduction to Genetic Algorithm (GA) Presented By: Rabiya Khalid Department of Computer Science

What is Evolutionary Computation? Genetic Algorithms. Components of Evolutionary Computing. The Argument. When changes occur...

Evolutionary Computation

Enhanced Order Crossover for Permutation Problems

Comp215: Genetic Algorithms - Part 1

Keywords Genetic Algorithm (GA), Evolutionary, Representation, Binary, Floating Point, Operator

Genetic'Algorithms'::' ::'Algoritmi'Genetici'1

Optimisation and Operations Research

Journal of Global Research in Computer Science PREMATURE CONVERGENCE AND GENETIC ALGORITHM UNDER OPERATING SYSTEM PROCESS SCHEDULING PROBLEM

A Genetic Algorithm on Inventory Routing Problem

VISHVESHWARAIAH TECHNOLOGICAL UNIVERSITY S.D.M COLLEGE OF ENGINEERING AND TECHNOLOGY. A seminar report on GENETIC ALGORITHMS.

Evolutionary Algorithms

Introduction Evolutionary Algorithm Implementation

Genetic Algorithm Optimizing for the Travelling Salesman Problem with Range based Crossover

COMPARATIVE STUDY OF SELECTION METHODS IN GENETIC ALGORITHM

Genetic Algorithm. Presented by Shi Yong Feb. 1, 2007 Music McGill University

Genetic Algorithm: A Search of Complex Spaces

2. Genetic Algorithms - An Overview

PARALLEL LINE AND MACHINE JOB SCHEDULING USING GENETIC ALGORITHM

OPTIMIZATION OF TEST CASES BY PRIORITIZATION

Minimizing Makespan for Machine Scheduling and Worker Assignment Problem in Identical Parallel Machine Models Using GA

Machine Learning: Algorithms and Applications

Evolutionary Algorithms - Population management and popular algorithms Kai Olav Ellefsen

A Study of Crossover Operators for Genetic Algorithms to Solve VRP and its Variants and New Sinusoidal Motion Crossover Operator

Evolutionary Computation. Lecture 1 January, 2007 Ivan Garibay

[Sharma* et al., 5(6): June, 2016] ISSN: IC Value: 3.00 Impact Factor: 4.116

EFFECT OF CROSS OVER OPERATOR IN GENETIC ALGORITHMS ON ANTICIPATORY SCHEDULING

Computational Intelligence Lecture 20:Intorcution to Genetic Algorithm

IMPLEMENTATION OF AN OPTIMIZATION TECHNIQUE: GENETIC ALGORITHM

Keywords Genetic algorithm, Premature convergence, DGCA, Elitist, Diversity

Available online at International Journal of Current Research Vol. 9, Issue, 07, pp , July, 2017

Storage Allocation and Yard Trucks Scheduling in Container Terminals Using a Genetic Algorithm Approach

Evolutionary Computation. Lecture 3. Evolutionary Computation. X 2 example: crossover. x 2 example: selection

GENETIC ALGORITHM CHAPTER 2

Genetic Algorithms. Part 3: The Component of Genetic Algorithms. Spring 2009 Instructor: Dr. Masoud Yaghini

Genetic approach to solve non-fractional knapsack problem S. M Farooq 1, G. Madhavi 2 and S. Kiran 3

Introduction to Artificial Intelligence. Prof. Inkyu Moon Dept. of Robotics Engineering, DGIST

EVOLUTIONARY ALGORITHMS AT CHOICE: FROM GA TO GP EVOLŪCIJAS ALGORITMI PĒC IZVĒLES: NO GA UZ GP

Intelligent Techniques Lesson 4 (Examples about Genetic Algorithm)

Hybridization of Genetic Algorithm and Neural Network for Optimization Problem

What is an Evolutionary Algorithm? Presented by: Faramarz Safi (Ph.D.) Faculty of Computer Engineering Islamic Azad University, Najafabad Branch

Processor Scheduling Algorithms in Environment of Genetics

Genetic Algorithms and Genetic Programming Lecture 13

Novel Encoding Scheme in Genetic Algorithms for Better Fitness

Evolutionary Algorithms - Introduction and representation Jim Tørresen

Performance Analysis of Multi Clustered Parallel Genetic Algorithm with Gray Value

10. Lecture Stochastic Optimization

Genetic Algorithms for Optimizations

Memetic Algorithm with Hybrid Mutation Operator

Artificial Evolution. FIT3094 AI, A-Life and Virtual Environments Alan Dorin

Optimization Drilling Sequence by Genetic Algorithm

Optimal Regression Test Case Prioritization using genetic algorithm. T. Prem Jacob 1, Dr. T. Ravi 2.

Pusan National University, Busandaehak-ro, Geumjeong-gu, Busan, , Korea

initial set of random solutions called population satisfying boundary and/or system

Artificial Intelligence Breadth-First Search and Heuristic

Validity Constraints and the TSP GeneRepair of Genetic Algorithms

Genetic algorithms. History

A Genetic Algorithm for Order Picking in Automated Storage and Retrieval Systems with Multiple Stock Locations

Railroad Yard Location Optimization Using A Genetic Algorithm

A Simulator to Prevent Premature Convergence in YM using GA

9/17/14 LOCAL SEARCH. Today. Reading. Read AIMA Ch Objectives. Simulated Annealing Genetic algorithms Gradient ascent

CSE /CSE6602E - Soft Computing Winter Lecture 9. Genetic Algorithms & Evolution Strategies. Guest lecturer: Xiangdong An

Available online at ScienceDirect. Procedia Computer Science 102 (2016 )

Generational and steady state genetic algorithms for generator maintenance scheduling problems

A HYBRID ALGORITHM TO MINIMIZE THE NUMBER OF TARDY JOBS IN SINGLE MACHINE SCHEDULING

Assoc. Prof. Rustem Popa, PhD

TIMETABLING EXPERIMENTS USING GENETIC ALGORITHMS. Liviu Lalescu, Costin Badica

An introduction to evolutionary computation

An Effective Genetic Algorithm for Large-Scale Traveling Salesman Problems

Multi-Plant Multi-Product Aggregate Production Planning Using Genetic Algorithm

Genetic Algorithms. Moreno Marzolla Dip. di Informatica Scienza e Ingegneria (DISI) Università di Bologna.

CHAPTER 4 LINEAR ANTENNA ARRAY SYNTHESIS USING GENETIC ALGORITHM

GENETIC ALGORITHM A NOBLE APPROACH FOR ECONOMIC LOAD DISPATCH

Modeling and Optimisation of Precedence-Constrained Production Sequencing and Scheduling for Multiple Production Lines Using Genetic Algorithms

Energy management using genetic algorithms

Plan for today GENETIC ALGORITHMS. Randomised search. Terminology: The GA cycle. Decoding genotypes

Reducing Premature Convergence Problem in Genetic Algorithm: Application on Travel Salesman Problem

A METAEVOLUTIONARY APPROACH IN SEARCHING OF THE BEST COMBINATION OF CROSSOVER OPERATORS FOR THE TSP

International Journal of Advanced Research in Computer Science and Software Engineering

CHAPTER 3 RESEARCH METHODOLOGY

An Evolutionary Solution to a Multi-objective Scheduling Problem

Power Stability Solution using Genetic Algorithm

CEng 713 Evolutionary Computation, Lecture Notes

A Study on Transportation Algorithm of Bi-Level Logistics Nodes Based on Genetic Algorithm

GENETIC ALGORITHMS. Introduction to Genetic Algorithms

CapSel GA Genetic Algorithms.

Genetic Algorithm for Variable Selection. Genetic Algorithms Step by Step. Genetic Algorithm (Holland) Flowchart of GA

Feature Selection for Predictive Modelling - a Needle in a Haystack Problem

Transcription:

Implementation of CSP Cross Over in Solving Travelling Salesman Problem Using Genetic Algorithms Karishma Mendiratta #1, Ankush Goyal *2 #1 M.Tech. Scholar, *2 Assistant Professor, Department of Computer Science and Engineering, Shri Ram College of Engineering and Management, Palwal, Haryana,India Abstract - Travelling salesman problem is a well known NP- COMPLETE problem. TSP is applicable in many areas of science and engineering. Research has been carried out to solve it in recent years. In this paper an optimization of crossover operator in genetic algorithm to solve travelling salesman problem TSP has been proposed. A new cross over operator named Common Sub Paths Crossover CSP is introduced to solve TSP. CSP crossover consider the importance of common sub path in parents to generate a new child. The performance of new crossover operator is compared against classical one point crossover. New operator is implemented for a random population and results has been analyzed. The experimental result justify that new crossover operator is better than classical crossover in GA. Keywords chromosomes, crossover operator, fitness function, genetic algorithm, Travelling salesman problem I. INTRODUCTION In travelling salesman problem a salesman person has to visit different cities for his business purpose. All the cities are connected together. Salesman can start his journey from any headquarter visit all the cities and returned back to headquarter. For n-city TSP problem there exist ((n-1)!)/2 possible ways to solve it. TSP has been proved as NP-Complete problem. So there is no way to find best solution to solve a TSP for large value of n(no of cities). Genetic Algorithm is a best heuristic way to find the near optimal solution for a TSP. Naveen kumar, Karambir,Rajiv Kumar [1] compare the performance of three well known cross over operators named as PMX,CX and OX. [2] Gohar Vahdati et.el. propose a new Heuristic approach for solving TSP using genetic algorithms. They suggest that their approach is better than the existing PMX and CX operators. Rakesh kumar, Girdhar Giopal, Gajesh Kumar [3] propose a novel crossover operator for genetic algorithm for permutation problems. They apply this operator on TSP. [4] Poonam Panwar, Saloni Gupta conducted a survey on how different soft computing techniques such as GA can be applied in the optimization of TSP. [5] Karishma and Ankush proposed a new CSP cross over to solve TSP using GA. In this paper the method proposed in [5] has been implemented and results has been analysed. 1.1 Genetic Algorithms Genetic algorithms (GAs) [7] are search techniques based on principles of natural selection and genetics a concept taken from medical science (Fraser, 1957; Bremermann, 1958; Holland, 1975). Let us start with a brief introduction of genetic algorithms and terminology. GAs encode the decision variables of a search problem into finite-length strings. These strings are candidate solutions to the search problem and are referred to as chromosomes, these alphabets are referred to as genes and the values of these genes are called alleles. Once the problem is encoded in a chromosomal form and a fitness function for discriminating good solutions from bad ones has been selected. GA process can be started to evolve solutions to the search problem by using the following steps: 1.1.1 Initialization. The initial population of candidate solutions (chromosomes) is usually generated randomly from the search space. However, domain-specific knowledge or other information can be easily incorporated in finding the initial population. 1.1.2 Evaluation. In this step the fitness values of the candidate solutions are evaluated by using the fitness function. 1.1.3 Selection. Selection allocates more copies of those solutions in to mating pool with higher fitness values and thus imposes the survival-of-the-fittest mechanism. The main idea of selection is to prefer better solutions, and many selection procedures have been proposed by different researchers to accomplish this idea, including roulette-wheel selection, stochastic universal selection, rank based selection and tournament based selection. 1.1.4 Recombination. In this step parents have been selected and recombined to generate children. There are many ways of doing this (some of which are discussed in the next chapter in literature review ), and competent performance depends on a properly designed recombination mechanism. ISSN: 2231-5381 http://www.ijettjournal.org Page 455

1.1.5 Mutation. While recombination operates on two or more chromosomes, it locally but randomly modifies a solution. Again, there are many different variations of mutation, but it usually involves one or more changes being made. In other words, mutation performs a random walk in the domain of a candidate solution. 1.1.6 Replacement. The new population created by selection, recombination, and mutation replaces the original chromosomes in the parental population. Some replacement techniques like elitist replacement, steady-state replacement methods and generation-wise replacement are used in GAs. 1.1.7 Repeat steps 2 6 until a terminating criteria does not met. Parent selection Initialization Parents Cross Over Population Mutation Termination Children Survivor selection Figure-1 The general scheme of Genetic Algorithm Procedure GA Begin Generate N random chromosomes N is the population size} Evaluate tour length produced by each path and store each one store best-path-so-far repeat for each chromosome of the population Select two parents using any of the selection methods apply crossover operator to produce new offspring apply mutation to offspring of the population evaluate tour length produced by offspring in the current population if offspring is better than weaker parent then it replaces it in population if offspring is better than best-path-so-far then it replaces bestpath-so-far } }until stopping criteria satisfied print best-path-so-far end II. PROPOSED WORK 2.1 Common Sub Path crossover (CSP) This cross over operator generate new child by taking in to consideration of common sub path in two paths. The key idea is that cities which are close to each other must be visited one after the other thus making sub path in the TSP problem. If these sub path are modified by any of the GA operator then it may increase the overall cost of the route and thus generate the child which are less fit. By not disturbing the sequence of the cities in the sub path we have tried to generate child with high fitness values. Example explaining Common Sub path crossover is as follows: Let No of citizens= 15 Path p1 : 1-13-12-8-9-10-11-4-7-3-6-5-2-14-15-1 Path p2 : 1-8-9-10-11-13-14-2-12-4-3-6-5-7-15-1 It can be seen that in both the parents a common sub route exist which are 8-9-10-11 and 3-6-5. The child generated after CSP cross over must have this sub route. The generated child will be Child c1 : 1-8-9-10-11-3-6-5-13-12-4-7-2-14-15-1 The common sub paths must be added first after that remaining nodes will come in the order of the parent p1. ISSN: 2231-5381 http://www.ijettjournal.org Page 456

Figure-2 Weight matrix showing distance between cities in a sample TSP of 14 cities Figure-3 Result of 50th generation for CSP cross over. ISSN: 2231-5381 http://www.ijettjournal.org Page 457

The algorithm for CSP cross over is as follows: Algorithm: CSP() // This algorithm take two paths as parents and generate a new path (child_path) Step 1 : Place node-1 on to child_path. Step 2 : set current node = node-2 Step 3 : Find common sub route starting from current node in both of the parents. If such a common sub route exists then go to step 3 otherwise exit. Step 4 : Place all the cities from common route onto child_path. Step 5 : set current node = current node + no of the cities in the common sub route. Step 6 : if current node = last node then exit otherwise goto step 2. II. IMPLEMENTATION DETAILS The proposed algorithm has been implemented for a sample of 14 cities in C++. The distance between the cities has been stored in a two dimensional array called weight matrix. The weight matrix has been generated randomly. Figure-2 is showing a snapshot of weight matrix. The existing one point crossover OX1 [5] has also been implemented. In the program 500 generations for a sample population of 10 chromosomes for both existing OX1 cross over and proposed CSP crossover has been generated. Figure -3 is showing the snapshot for generation no 50 for CSP cross over. Table - 1 is showing the results for best path and worst path(min,max path length) in the population after given number of iterations. TABLE-1 PATH LENGTHS OF BEST PATHS FOR OX1 AND CSP CROSS OVER OPERATORS AFTER CERTAIN GENERATIONS. Generation No OX1(Ordered Crossover) Min path length Max path length CSP(Common Sub Path Crossover) Min path Max path length length 1 432 481 471 511 10 432 476 432 499 20 426 464 425 482 30 426 456 417 466 40 426 454 403 460 50 426 454 403 446 100 426 454 403 434 200 426 454 403 428 300 426 454 380 422 400 426 454 376 416 500 426 454 376 412 From Table-1 it can be seen that proposed CSP crossover is finding a route of 376 path length whereas existing OX1 crossover found a path of 426 length after 500 iterations. So our proposed method is better than existing OX1 crossover. A graph showing performance of two algorithms is shown in Figure-4. It can be seen that proposed algorithm is almost 13% better than the existing algorithm. 450 400 350 300 Path Length in OX1 Path Length in CSP 250 200 Figure-4 Graph showing performance of CSP crossover Vs OX1 cross over. ISSN: 2231-5381 http://www.ijettjournal.org Page 458

III. CONCLUSION AND FUTURE WORK In this paper a new crossover operator named common subroute cross over (CSP) to solve Travelling Salesman Problem (TSP) using genetic algorithm has been proposed. The algorithm use the concept that cities which are close to each other must be visited one after another. The proposed algorithm has been implemented for existing OX1 crossover and proposed CSP crossover. The results shows that proposed method is better than the existing method. Further there is a future scope to solve some well known TSP problems such as bayg29, kroa100 etc and compare the performance of the algorithm. REFERENCES [1] Naveen kumar,karambir,rajiv Kumar A Comparative Analysis of PMX, CX and OX Crossover operators for solving Travelling Salesman Problem International Journal of Latest Research in Science and Technology Vol.1,Issue 2 :Page No.98-101, July.August (2012) ISSN :2278-5299 [2] Gohar Vahdati, Mehdi Yaghoubi A New Approach to Solve Traveling Salesman Problem Using Genetic Algorithm Based on Heuristic Crossover and Mutation Operator 2009 International Conference of Soft Computing and Pattern Recognition, 978-0- 7695-3879-2/09 2009 IEEE DOI 10.1109/SoCPaR.2009.33 [3] Rakesh Kumar, Girdhar Gopal, Rajesh Kumar, Novel Crossover Operator for Genetic Algorithm for Permutation Problems International Journal of Soft Computing and Engineering (IJSCE) ISSN: 2231-2307, Volume-3, Issue-2, May 2013 [4] Poonam Panwar, Saloni Gupta Brief Survey of Soft Computing Techniques Used for Optimization of TSP, The International Journal of Computer Science & Applications (TIJCSA), Volume 2, No. 01, March 2013 ISSN 2278-1080 [5] Karishma Mendiratta and Ankush Goyal, Solving Travelling Salesman Problem Using CSP Cross Over, International Journal of Engineering Science Invention ISSN (Online): 2319 6734, ISSN (Print): 2319 6726. www.ijesi.org Volume 3 Issue 5ǁ May 2014 ǁ PP.27-43 ISSN: 2231-5381 http://www.ijettjournal.org Page 459