tsp-solver | Travelling Salesman Problem solver in pure Python
kandi X-RAY | tsp-solver Summary
kandi X-RAY | tsp-solver Summary
This project provides a pure Python code for searching sub-optimal solutions to the TSP. Additionally, demonstration scripts for visualization of results are provided. The library does not requires any libraries, but demo scripts require: - Numpy - PIL (Python imaging library) - Matplotlib. The library works under both Python 2 and 3.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Solve the TSP solver algorithm
- Restore the path from the list of connections
- Optimize the solution of a given path
- Returns a list of coordinates sorted by distance
- Close loop
- Ensures that the distance matrix is left - triangle
- Returns n points from an image file
- Convert an image array to a numpy array
- Convert an image file into a numpy array
- Generate SVG contour
- Convert a float to a string
- Calculate the cost of a path
- Generate random ring points
- Compute the distance matrix
- Creates a random set of points
- Generate boxes
tsp-solver Key Features
tsp-solver Examples and Code Snippets
Community Discussions
Trending Discussions on tsp-solver
QUESTION
I have programmed a tsp-solver with genetic algorithm, but i have to solve it for 11000 cities. In the browser it gets very slow and hangs. How can I run javascript the fastest way?
Maybe with node.js in the Mac terminal or with node.js on an amazon EC2 server or with firebase cloud functions?
Thanks a lot
...ANSWER
Answered 2017-Nov-11 at 18:10It is very hard to solve with js. You need to run your code near by CPU. I prefer C,C++ with correct parameters. Then you can build engine as service. If speed not your first criteria, you can use server side technologies look like nodejs, php, .net. You need caching mechanism for saving solutions. If you plan to use AWS, you can check AWS lambda services. I prefer use own server without virtual instance. Virtual instance has low memory access speed. You need to make a lot of test for determining your correct platform.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tsp-solver
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page