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
0 answers

How can I approach the Travelling Saleman Problem with multiple salesman?

I have a problem that has been effectively reduced to a Travelling Salesman Problem with multiple salesman. I have a list of cities to visit from an initial location, and have to visit all cities with limited salesman. I am trying to come up with a…
dustin ledezma
  • 615
  • 2
  • 6
  • 10
0
votes
2 answers

Traveling salesman variant

I'm trying to build a model using the traveling salesman as a starting point. Instead of being just one traveling salesman I need it to be multiple salesmans that have to reach the same end node and then come back to the origin node. The logic is…
0
votes
1 answer

Travelling Salesman problem in dynamic programming

i am trying to resolve the travelling salesman problem with dynamic programming in c++ and i find a way using a mask of bits, i got the min weight, but i dont know how to get the path that use, it would be very helpful if someone find a way. This is…
0
votes
0 answers

Ploting the TSP tour using matpltotlib

I am using this code snippet from here after modifying it to fit with the rest of my python script, I think I have done this modification not the right way. positions = list_points # Where list_points(np.array) = [[3.7440e+01 5.4121e+02]…
Josh
  • 140
  • 8
0
votes
1 answer

Fixed location loading time using OR tools with C#

Im trying to solve Vehicle Routing Problem with Time Windows using OR tool with C#. Is it possible to add loading time (fixed duration, that vehicle have to stay at the location after arrival) to every location (no depot, but location)?
Smyk L.
  • 42
  • 3
0
votes
1 answer

Rstudio Error: OVERFLOW in CCbigguy_addmult (4), BIGGUY errors are fatal

I am trying to run the Concorde on a TSP generated from a distance matrix. Here is my Code library("TSP") concordePath = "E:/Concorde_Code/" concorde_path(concordePath) concorde_help() num_rows=10 num_cols = 10 data_4 = matrix(sample.int(15, size =…
Sarwan Ali
  • 151
  • 1
  • 1
  • 11
0
votes
2 answers

Problem in R studio while solving Traveling Salesman Problem (TSP) using Concorde

I am working with Concorde to solve TSP problems. Here is my code library(TSP) concordePath = "E:/Concorde_Code/" concorde_path(concordePath) concorde_help() dataset_path = "E:/RA/" name = "graph1.txt" dataset =…
0
votes
2 answers

How to interpret sub tour elimination constraint in travelling salesman problem in cplex?

I have written the following code: How to interpret auxiliary constraints and sub tour elimination constraints in the following formulation?
0
votes
1 answer

How I can show the correctness of brute-force TSP algorithm?

I'm working on exploring TSP. So I have to prove the correctness of brute-force algorithm on graphs (pickin up the good permutation from all permutations that exists ~ O(n!)). So I'm learning a lot of books and sites, but I can't find how to prove…
0
votes
1 answer

Mlrose TSPOpt Genetic Algorithm own cost function

I want to program my own cost function for my own TSP problem. I do not want to use the mlrose one, because I want to optimize real coords with time. First of all, I created a coords_List which looks like this:…
Mare Seestern
  • 335
  • 1
  • 3
  • 13
0
votes
1 answer

Minizinc error: invalid type-inst: expected `float', actual `var float'

I have the following Minizinc program which is a work in progress towards being a solution for the Traveling Salesman Problem (TSP). I know it's missing more than just fixing this error, but I would still like to understand why I'm getting this…
0
votes
1 answer

Algorithm for picking orders from warehouses

I'll explain My Problem With an example. Let's say we have: An Order from a certain store for five products, We will name those products A,B,C,D, & E, with their quantities In the Order A(19),B(25),C(6),D(33),E(40). A single Truck that can fit…
Makdous
  • 1,447
  • 1
  • 12
  • 24
0
votes
1 answer

Solving a modified Travelling Salesman Problem(TSP) using networkx

I am trying to solve a modified version of the TSP. In my version, multiple visits to a city are allowed, as long as the path is the shortest, and also, only subset of the cities are compulsory to visit, as in, you can go through other cities to…
Shantanu Shinde
  • 932
  • 3
  • 23
  • 48
0
votes
0 answers

Travelling Sales Man: Finding Total Shortest Distance Travelled To All Points Without Going Back To Origin (C++)

This is a school project, where we are supposed to find the total shortest distance travelled to all points once, without going back to the origin. I have solved this using the nearest neighbour method, however, sometimes it will not give the…
0
votes
0 answers

JavaScript object attributes not updating after they were changed

i got a problem - when i update the "distanz" of my object "Punkt" it is not being changed, so how can i update the attributes of the object? I also have the problem that i can't figure out how to delete the object that is 100% similar to "AE_punkt"…
saltea
  • 37
  • 6