traveling-salesman

Looking for an open source Traveling Salesman function / library in c / c++?

I know there are a few different Traveling Salesman projects out there and I've played with LKH a bit, but I was wondering if anyone had any recommendations on any other ones? My project is GPL'ed so I would need something that is compatible with that license. ...

Have you used a traveling salesman algorithm to solve a problem?

I studied TSP in college in the context of NP Completeness. I have never actually had a situation where it would apply to a practical problem. A little bit of research shows that it has been used to pick the cheapest path to move a drill around, that is making holes in circuit boards. That is pretty much all I could find. Are you ...

Optimal map routing with Google Maps

Is there a way using the Google Maps API to get back an "optimized" route given a set of waypoints (in other words, a "good-enough" solution to the traveling salesman problem), or does it always return the route with the points in the specified order? ...

Traveling Salesman - Nearest Neighbor vs Genetic DEATHMATCH

Over the last few days I have noted a few web sites that demonstrated TS solution using genetic algorithms. I am looking for your opinion which is better for this particular problem. Heuristics vs Genetic. By better, I mean will yield a shorter/lower cost path. Explain why you feel the way that you do. Examples, and off-site links a...

Using Traveling Salesman Solver to Decide Hamiltonian Path

This is for a project where I'm asked to implement a heuristic for the traveling salesman optimization problem and also the Hamiltonian path or cycle decision problem. I don't need help with the implementation itself, but have a question on the direction I'm going in. I already have a TSP heuristic based on a genetic algorithm: it assum...

Variation of TSP which visits multiple cities

I am looking to discuss branch and bound solution for TSP with multiple visits.(that is every city needs to be visited atleast once , instead of just once) Edit: Removed the doubt as it was not relevant as pointed by Jitse. Now the question is more clear. ...

Minimum cost strongly connected digraph

I have a digraph which is strongly connected (i.e. there is a path from i to j and j to i for each pair of nodes (i, j) in the graph G). I wish to find a strongly connected graph out of this graph such that the sum of all edges is the least. To put it differently, I need to get rid of edges in such a way that after removing them, the g...

Сrossover operation in Genetic algorithm for TSP

Hello everybody. I'm trying to solve the Travelling Salesman Problem (TSP) with Genetic algorithm My Genome is permutation of vertex in graph (path for Salesman). How should I perform the crossover operation over my genomes? Where I can find implementations of my problem in C#? ...

Local search algorithm, complete confusion...

In (a) and (b), assuming a 2-exchange transformation operator, connect solutions A and B, which are TSP tours in path representation, to their possible neighbors among tours C, D, E, F, G (a) A: 1 2 3 4 5 6 7 C: 1 3 5 7 2 4 6 D: 1 2 5 4 3 6 7 E: 2 3 1 7 5 4 6 F: 4 1 7 5 3 2 6 G: 1 2 3 7 6 5 4 (b) B: 1 3 2 7 5 4 6 C: 1 3 5 7 2 4 6 D: ...

TSP - branch and bound

Hi. I'm trying to solve the TSP with branch and bound algorithm. I'm must bulid a matrix with cost but i have one big problem. I have city with coordinates x and y. The cost of travel is ceil(ceil(sqrt((x1-x2)^2+(y1-y2)^2))/v) + days in city. V is speed. Days in city depend from day when w come to city. For example when we arrived on...

Suggested GA operators for a TSP problem?

I'm building a genetic algorithm to tackle the traveling salesman problem. Unfortunately, I hit peaks that can sustain for over a thousand generations before mutating out of them and getting better results. What crossover and mutation operators generally do well in this case? ...

Teleporting Traveler, Optimal Profit over time Problem

I'm new to the whole traveling-salesman problem as well as stackoverflow so let me know if I say something that isn't quite right. Intro: I'm trying to code a profit/time-optimized multiple-trade algorithm for a game which involves multiple cities (nodes) within multiple countries (areas), where: The physical time it takes to travel...

Non-cycle path to all nodes

Is there an algorithm or set of algorithms that would let you find the shortest walking distance from an arbitrary start node so that every node gets visited in a weight, undirected graph? It's not quite Traveling Salesman, because I don't care if a node is visited more than once. (It doesn't even matter if you make it back to the start ...

SML travelling salesman problem

please anybody having travelling salesman problem solution in Standard ML, plz tell me. I've tried a lot but am not successfull... Thx in advance. ...

Why does adding Crossover to my Genetic Algorithm gives me worse results?

I have implemented a Genetic Algorithm to solve the Traveling Salesman Problem (TSP). When I use only mutation, I find better solutions than when I add in crossover. I know that normal crossover methods do not work for TSP, so I implemented both the Ordered Crossover and the PMX Crossover methods, and both suffer from bad results. Here...

A detail question when applying genetic algorithm to traveling salesman

I read various stuff on this and understand the principle and concepts involved, however, none of paper mentions the details of how to calculate the fitness of a chromosome (which represents a route) involving adjacent cities (in the chromosome) that are not directly connected by an edge (in the graph). For example, given a chromosome 1...

Travelling Salesman Problem Constraint Representation

Hey! I read a couple of articles and sample code about how to solve TSP with Genetic Algorithms and Ant Colony Optimization etc. But everything I found didn't include time (window) constraints, eg. "I have to be at customer x before 12am)" and assumed symmetry. Can somebody point me into the direction of some sample code or articles t...

Is this a variation of the traveling salesman problem?

I'm interested in a function of two word lists, which would return an order agnostic edit distance between them. That is, the arguments would be two lists of (let's say space delimited) words and return value would be the minimum sum of the edit (or Levenshtein) distances of the words in the lists. Distance between "cat rat bat" and ...

traveling salesman problem, 2-opt algorithm c# implementation

Hello Can someone give me a code sample of 2-opt algorithm for traveling salesman problem. For now im using nearest neighbour to find the path but this method is far from perfect, and after some research i found 2-opt algorithm that would correct that path to the acceptable level. I found some sample apps but without source code. ...

Traveling salesman example with known global optimum

Hello. I made a memetic algorithm in Python for traveling salesman problem. However, all the test data (list of distances between cities) I've encountered lack the information of the best solution, so I can't know how close to global optimum my algorithm gets. Does anyone know where I can find some tsp test data (preferably in matrix f...