Visualisation of Genetic Algorithms for the Traveling Salesman Problem in Java --by Johannes Sarg

原创 2004年08月14日 02:20:00

The Traveling Salesman Problem (TSP)

Find the shortest trip through n towns where each town must be visited exactly once.

In the following we define that from each town all other towns can be visited. The costs to visit a town from another are represented by their euklidic distance. Therefore the costs are reflexive.

The Genetic Algorithm (GA)

A GA tries to use basic principles of natural evolution. It is especially appropriate for problems with large and complex search-spaces, where the global optimum can't be found within a reasonable amount of time using traditional techniques as e.g. total enumeration or branch and bound. It cannot be guaranteed that the optimum solution is found by the GA. Here are some references for GAs.

Structure of a GA:

procedure GA begin t = 0; initialize(P(t)); evaluate(P(t)); while (not termination condition) begin t = t + 1; Qs(t) = selection(P(t-1)); Qr(t) = recombination(Qs(t)); P(t) = mutation(Qr(t)); evaluate(P(t)); end;

end;

Description:

A set of potential solutions are randomly initialized and their quality evaluated. Out of this set better solutions are preferred, corresponding to a probability distribution. Each time, two of the selected solutions creats new solutions by recombination which finally are mutated. These generated solutions are evaluated and represents the basis for the next generation. In this way a GA tries to find better solutions and to reach the global optimum.

Objectives of the program TSPGA

exact simulation and visualisation of a GA run visualisation of the mutation and recombination methods possibility to compare different GA runs concerning the same TSP

The GA for TSPs

In the "Options" menu, you can configure the following properties for the GA:

GA parameters:

recombination methode: Partially Matched Crossover (PMX) Order Crossover (OX) Cycle Crossover (CX) Uniform Order Based Crossover (UOBX) Edge Recombination Crossover (ERX) ERX with heuristic (Grefenstette) None recombination probability (0% - 100%) mutation methode: Inversion Insertion Displacement Reciprocal Exchange (Swap) None mutation probability (0% - 100%) population size (5 - 100) k value for the Tournament selection (1 - 10) elitism (true / false)

Set Problem: A grid can be defined where the user can set the positions of the towns (4 - 100 towns).

Traveling Salesman Problem Based on Genetic Algorithm

  • 2010年04月24日 13:43
  • 2.92MB
  • 下载

solve Traveling Salesman Problem

  • 2009年04月05日 17:38
  • 189KB
  • 下载

旅行商问题(travelling salesman problem, TSP) 解题报告

旅行商问题是个熟知的问题。这次是因为coursera上面选的算法课而写代码实现。这里做个简单总结。 测试程序: 25 20833.3333 17100.0000 20900.0000 1706...
  • thestoryofsnow
  • thestoryofsnow
  • 2013-04-14 12:51:22
  • 10963

The Traveling Salesman Problem

http://www.tsp.gatech.edu/
  • nomad2
  • nomad2
  • 2011-06-15 22:27:00
  • 524

HDU-5402 Travelling Salesman Problem(模拟)

比赛时已经想出和题解大致一样的思路,只是绕格子的方式分的太细,结果没时间写完(主要是自己太渣) 题解:...
  • idealism_xxm
  • idealism_xxm
  • 2015-08-18 20:52:40
  • 300

tsp_nn matlab

  • 2010年06月11日 16:05
  • 3KB
  • 下载

双调旅行商问题 Bitonic Traveling Salesman Problem

题目: 现有p1, p2, p3...pn一系列城市。假设每两个城市之间的距离都是标准欧几里得距离。并没任意两点的x或者y坐标都是唯一的。一个双调的旅行既从最西边的城市开始严格向东旅行达到最东边的城市...
  • u012204343
  • u012204343
  • 2014-03-26 05:43:13
  • 1345

蚁群算法 解决旅行商(TSP)问题

  • 2014年01月03日 20:13
  • 3KB
  • 下载

贪心解决:TSP问题(Travelling Salesman Problem)即旅行商问题

一、TSP问题 TSP问题(Travelling Salesman Problem)即旅行商问题,又译为旅行推销员问题、货郎担问题,是数学领域中著名问题之一。假设有一个旅行商人要拜访n个城市...
  • hzw05103020
  • hzw05103020
  • 2015-11-13 16:12:25
  • 8440

ACA matlab算法程序

  • 2011年10月06日 09:43
  • 4KB
  • 下载
收藏助手
不良信息举报
您举报文章:Visualisation of Genetic Algorithms for the Traveling Salesman Problem in Java --by Johannes Sarg
举报原因:
原因补充:

(最多只允许输入30个字)