This project visualizes various algorithms for solving the Traveling Salesman Problem (TSP), including the Glutton Algorithm, Genetic Algorithm, and Simulated Annealing. It is built using React and TypeScript, with the goal of helping learners understand the basics of React and how optimization algorithms work.
The main objective of this project is to provide a hands-on learning experience with React, TypeScript, and fundamental optimization techniques. Users can visualize the performance of different algorithms in finding the shortest path through a set of cities.
- Visualization of TSP Solutions: See the paths generated by different algorithms in real-time.
- Interactive Interface: Input the number of cities and dynamically adjust algorithm parameters.
- Learning Resource: Gain a practical understanding of React components, hooks, and state management.
Ensure you have the following installed on your system:
- Node.js (version 14.x or higher)
- npm (usually comes with Node.js)
- Clone the Repository
git clone https://github.com/elmhadji/optimisation-methode
cd optimisation-methode
- Install Dependencies
npm install
To start the project, run the following command:
npm run dev
This will start the development server and automatically open the application in your default web browser. If it doesn't open automatically, navigate to http://localhost:3000
.
- Input the Number of Cities: Enter the number of cities you want to include in the TSP simulation.
- Compare between Algorithms: Compare between Glutton Algorithm, Genetic Algorithm, and Simulated Annealing.
- Visualize the Solution: Watch the algorithm compute and display the shortest path from same cities.