Questions tagged [traveling-salesman]

The "traveling salesman problem" is a classical computer science problem which involves finding the shortest path which could be taken by a hypothetical salesman to make a single visit to each location on a map (in a graph).

The traveling salesman problem (often referred to by its initials: TSP) is one of the most well known "hard" (NP-complete) problems in classical computer science. Simply stated, it involves finding the shortest path which could be taken by a hypothetical salesman to make a single visit to each location on a map (in a graph).

732 questions
0
votes
1 answer

Strategy to tackle knapsack binded with travelling salesman

I have been assigned the following problem as a research topic for summer. However, I have not been able to successfully find related problem, except that it seems to be a combination of travelling salesman with the knapsack, even though I'm not…
0
votes
0 answers

Python scoping issues - struggling with scope within a function

Thanks in advance. So I am trying to make a recursive traveling salesman solution in Python as I need the shortest path from point 'a' to point 'b', and I want a general solution for any number of 'towns' in between a and b. My problem comes about…
0
votes
0 answers

Multiple Travelling salesman with given deadline (single depot)

I have a problem that related to Travelling Salesman Problem with multiple salesmen. I have a list of cities to visit from an initial location,and the all salesmen start and end at the same places .Each salesman have to visit cities and come back to…
Tina
  • 111
  • 1
  • 1
  • 9
0
votes
0 answers

TSP branch and bound - sometimes incorrect results C#

I need to solve the TSP problem with the branch and bound algorithm. Here's the code. The problem is, the code works only in small instances (i.e. three cities), but also it isn't working every time. I've been looking for some mistakes but I…
tim.bek
  • 1
  • 1
0
votes
1 answer

Tile Trial NP-hard complexity

In the game Final Fantasy XIII-3, the player is presented with a couple puzzles. The first puzzle introduced is called Tile Trial, which presents the player with a grid of tiles, some of which have crystals on them. The goal is to retrieve all of…
G. Zuin
  • 1
  • 2
0
votes
1 answer

Why won't my Genetic Algorithm Converge, or at least get a little better?

First of all, I hate to ask such a vague question like this, but I'm at my whits' end here. I am attempting to make a genetic algorithm for the traveling salesman classic CS problem. I have tried to comment my code well such as to make each step…
Matthew Darnell
  • 1,315
  • 2
  • 12
  • 24
0
votes
2 answers

highest weighted path for multiple destinations

I have a directed cyclic weighted graph. I want to find a path with the highest some of weights, in length of X vertices, and I don't care what is the destination. I only want to find the highest cost.
0
votes
0 answers

A* search heuristic for TSP with benefit and cost?

I would like to solve a TSP problem with benefit and cost. Let us say A salesman has a set of customers to visit each visit will take cost of moving time from the current location to the location of a customer and as well as visit duration.…
Priska Aprilia
  • 1,149
  • 1
  • 15
  • 34
0
votes
1 answer

TSP Heuristics - Worst case ratio

I have some trouble trying to summarize the worst-case ratio of these heuristics for the metric (this means that it satisfies the triangle inequality) traveling salesman problem: Nearest neighbor Nearest insertion Cheapest insertion Farthest…
Spinnaker
  • 185
  • 1
  • 3
  • 14
0
votes
0 answers

the 2-opt algorithm c++

I used the nearest neighbor algorithm to solve traveling sales man problem but it provides a sub-optimal tour . I tried to implement the 2-opt algorithm but i was lost , i hope some one can help to implement that algorithm . Here is the nearest…
Komp
  • 1
  • 1
0
votes
1 answer

Traveling Salesman Variation: Building a tour of baseball stadiums

I'm trying to write a Java program to find the best itinerary to do a driving tour to see a game at each of the 30 Major League Baseball stadiums. I define the "best" itinerary using the metric Miles Driven + (200 * Number of Days on the Road); this…
matt1414
  • 11
  • 1
0
votes
1 answer

Travelling Salesman and shortest path

I am currently working on a project involving a mixture of travelling salesman and shortest path. It goes as follows: I am given a set of 9 vertices,all with positive coordinates in 2 space, (x,y), where x and y are positive real numbers. I am then…
0
votes
1 answer

macro for creating matrix rows for Node optimization

I am currently working on a traveling sales person problem in Excel. For this I need to generate two rows parallel to each other ( Row1 for row Row2 for column) and use INDEX MATCH MATCH to look up the distances between nodes and solve using solver…
0
votes
1 answer

How to add additional constraints to Concorde TSP solver

I am trying to solve a modified version of the Traveling Salesmen Problem. This is a modification of the basic TSP so that all nodes have a color property and the optimal path cannot Touch more than four nodes of the same color sequentially. This…
0
votes
1 answer

travelling salesman local search heuristic

I am trying to create a local search heuristic to solve the TSP, and this process seems to be failing. I have generated a random Hamiltonian cycle and stored it in outgoing[] with outgoing[i] denoting the vertex which one of the edges originating at…