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

Scipy.optimize.linprog : OptimizeWarning for A_eq Rank, how do I find redundant constraints for TSP?

I was solving the TSP and I got this error : "OptimizeWarning: A_eq does not appear to be of full row rank. To improve performance, check the problem formulation for redundant equality constraints. TSP_res = linprog(c=TSP_c, A_eq=TSP_A_eq,…
0
votes
1 answer

Defining the linear programming constraints in the Traveling Salesman Problem (TSP) for the scipy.optimize.linprog Python function

I am trying to solve the Linear Programming formulation of the Traveling Salesman Problem (TSP) using scipy.optimize.linprog in Python. This document clearly defines the problem and, though I understand the idea, I can't figure out how to translate…
0
votes
1 answer

Using Scipy's linprog and the simplex method, how do I solve a simple tableau and get the expected results?

I am trying to solve a simple simplex tableau using the python library scipy. c = [7, 9, 18, 17] A = [ [2, 4, 5, 7], [ 1, 1, 2, 2], [ 1, 2, 3, 3] ] b = [42, 17, 24] from scipy.optimize import linprog print(linprog(c, A, b,…
0
votes
0 answers

Dummy node for TSP and finding shortest Hamiltonian Path

Can anyone provide assistance to the problem I'm facing? I'm working on implementing a delivery system algorithm. I have attempted to solve it using a graph, where addresses are represented as nodes and the distance between nodes as the weight of…
0
votes
0 answers

Loop in R, VNS for TSP

I am doing a VNS algorithm in R for a TSP (Travelling Salesman Problem), however I'm having trouble with selecting more than one neighbours. When I solve the first combination of cities and one neighbour does not improve the solution I don't know…
Han
  • 1
0
votes
1 answer

Modified TSP with Branch-and-Bound algorithm

I've been struggling to solve it using branch-and-bound to find the optimal path for the next task: There's a list of cities, that are all connected with each other, basically, a complete graph, each city has a interest index ( city 'A' has 8…
0
votes
0 answers

How to implement an algorithm for an optimised schedule for a person on holiday based on multiple factors?

Hi i want to do a trip planner application using android studio application using java i have set up firebase, google maps and places apis. From user inputs of several saved locations, i hope to create an optimised schedule/iternary that  considers…
shjonz
  • 11
  • 1
0
votes
0 answers

TSP using Simulated annealing

I am doing the problem "Deliverer's Path" (TSP) using Simulated annealing algorithm. The problem is that after solving, the evaluation difference has reached a good value, but the optimal state is not correct. import numpy as np import pandas as…
0
votes
0 answers

Using LKH solver to find the shortest route for a tsptw

I need to solve a bunch of tsp with time windows, I'm working with python and using the LKH package (since it is the state of art solver next to concorde). The goal of my work is to optimize a given route, so I would like to take the initial route…
0
votes
0 answers

Evaluate algorithm for the Travelling Salesman Problem (TSP)

It is my first post in this site, so please excuse if something is not clearly explained (and please, provide feedback to improve wording if necessary!). I have been thinking on an algorithm to approach the Travelling Salesman Problem (TSP), and I…
0
votes
0 answers

How integrate time window constraints to dynamic programming to solve tsp problem?

I have recursive dynamic programming code that solve TSP while minimizing the travelling cost. But I can't integrate the time window constraints. Please, I need your help.
atef
  • 11
  • 4
0
votes
1 answer

Optimization of Travelling Salesman Problem Nearest Neighbor algorithm with Limited Weight per cycle

Currently working on a TSP problem, and the idea is to optimize it for the use of restaurants, thus making food delivery easier. One of the criteria is that each path the courier takes has to have cumulative weight less than 60 (minutes) so that the…
0
votes
1 answer

tidying igraph plot and routing or TSP question

I have less experience in R and I need help tidying my plot as it looks messy. Also, my project is to find the best minimal route from Seoul to every city and back to Seoul. It is almost like Traveling Salesman Problem (TSP) but there are some…
zwen hms
  • 3
  • 1
0
votes
1 answer

In R, is it possible to solve the traveling salesman problem exactly without using Cygwin?

I am trying to find a solution to a traveling salesman problem (TSP) in R. The "TSP" package gives heuristic and often stochastic solutions unless one uses the external Concorde solver. However, on Windows the use of Concorde requires a Cygwin…
L. Mann
  • 143
  • 6
0
votes
0 answers

Collect all pickups while passing on the street for the first time in Jsprit

I'm trying to solve a simple TSP with Jsprit. I only have 1 vehicle and a total of about 200 pickups. This is my vehicle routing algorithm code: val vrpBuilder =…