tspvis README

项目的 README,来自 github.com/jhackshaw/tspvis。合并为一个 markdown 文件: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)

正在搜索数据库…

466 ·GitHub
这是什么?一个网页应用,用于可视化和演示旅行商问题(TSP)的算法,主要作为教学工具开发。项目以 MIT 许可证开源。
这是可以导入的库,还是独立应用?是独立的网页应用,不是库。它基于 Gatsby 和 React 构建,在浏览器中运行,可以在本地运行,也可以使用托管的网站。
如何在本地运行?克隆仓库,安装 libvips(macOS 上通过 Homebrew 安装),安装 Node.js 依赖,然后启动本地开发服务器,通常运行在 localhost 上。README 中还介绍了如何构建生产版本并提供构建产物的服务。
需要先安装什么吗?需要 Node.js,以及 libvips。README 要求在安装项目依赖之前先安装 libvips。在 macOS 上可以通过 Homebrew 获取 libvips。
项目还在维护吗?作者正在寻找新的维护者,并表示目前没有足够的时间对项目进行妥善维护,因此更新可能比较慢。欢迎提交 Pull Request 和 Issue。
什么是旅行商问题?给定一组城市以及每两座城市之间的距离,要求找出一条最短的路线,使其经过每座城市并回到出发点。这是算法研究和优化领域的经典问题。
不安装任何东西能直接试用吗?可以。作者在 tspvis.com 上提供了在线版本,您可以直接在浏览器中使用。
穷举算法在处理大规模输入时实用吗?穷举算法总能找到最优路径,但它们的计算成本远高于启发式算法,因此随着城市数量增加,速度会迅速下降。
作者
jhackshaw
大小
3.3 MB
星标
466
更新
提交Jun 06
时长
7年
提交 · 90 天