tspvis README

The project's README from github.com/jhackshaw/tspvis. As one markdown file: README.md.

Netlify Status code style: prettier Live Demo Contributors GitHub

[!WARNING]
Seeking maintainers: If you're qualified and interested in taking over this project, I'd love to hear from you! The analytics suggest it is still helpful to a number of users, but I don't currently have the time to give it the attention it deserves. There's a lot of potential here and I'm looking to transition this to someone interested in making it better. Please shoot me a message if you're interested.

Traveling Salesman Problem

The traveling salesman problem (TSP) asks the question, "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?".

This project

Heuristic algorithms

Heuristic algorithms attempt to find a good approximation of the optimal path within a more reasonable amount of time.

Construction - Build a path

Improvement - Attempt to take an existing constructed path and improve on it

Exhaustive algorithms

Exhaustive algorithms will always find the best possible solution by evaluating every possible path. These algorithms are typically significantly more expensive then the heuristic algorithms discussed above. The exhaustive algorithms implemented so far include:

Dependencies

These are the main tools used to build this site:

Contributing

Pull requests are always welcome! Also, feel free to raise any ideas, suggestions, or bugs as an issue.

Instructions on How to Install

To set up the project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/jhackshaw/tspvis.git
    cd tspvis
    
  2. Install libvips: On macOS, you can install libvips using Homebrew:

    brew install vips
    
  3. Install dependencies: Ensure you have Node.js installed. Then, run:

    npm install
    
  4. Start the development server: To run the project locally, use:

    npm run develop
    

    This will start a local development server, typically accessible at http://localhost:8000.

  5. Build for production: If you want to create a production build, run:

    npm run build
    

    The output will be in the public/ directory.

  6. Serve the production build: To test the production build locally, use:

    npm run serve
    
  7. Clean the cache: If you encounter issues, you can clean the Gatsby cache and public directories:

    npm run clean
    

tspvis (jhackshaw/tspvis)

Searching Database…

466 ·GitHub
What is this?A web app that visualizes and controls algorithms for the traveling salesman problem (TSP), built mainly as an educational tool. It is open source under the MIT license.
Is it a library I can import, or a standalone app?A standalone web app, not a library. It is built with Gatsby and React and runs in the browser, either locally or on the hosted site.
How do I run it locally?Clone the repo, install libvips (on macOS via Homebrew), install the Node.js dependencies, then start the local development server, which usually runs on localhost. The README also covers building for production and serving the build.
Do I need anything installed first?Node.js, plus libvips, which the README asks you to install before the project dependencies. On macOS you can get libvips through Homebrew.
Is it still maintained?The author is looking for a new maintainer and says they do not currently have time to give the project proper attention, so updates may be slow. Pull requests and issues are welcome.
What is the traveling salesman problem?Given a list of cities and the distances between each pair, it asks for the shortest possible route that visits every city and returns to the start. It is a classic problem in algorithm research and optimization.
Can I try it without installing anything?Yes, the author hosts it live at tspvis.com, so you can use it in the browser right away.
Are the exhaustive algorithms practical for large inputs?They always find the best possible path, but they are much more expensive than the heuristic algorithms, so they slow down quickly as the number of cities grows.
Creator
jhackshaw
Size
3.3 MB
Stars
466
Updated
CommitJun 06
Age
7y
Commits · 90 Days