Skip to content

Repository files navigation

Homework-Algorithm-TSPLIB95

This project aims to replicate and implement several classic algorithms for solving the traveling salesman problem, including:

  • Greedy Nearest Neighbor Algorithm
  • Christofides-Serdyukov Algorithm
  • Simulated Annealing Algorithm
  • Genetic Algorithm

I am planning to submit this project as my homework for the "Evolutionary Computation" course at WUST.

Getting Started

Prerequisites

pip install -r requirements.txt

Running the tests

An example is as follows:

problem = Problem('a280', verbose=True, vis=False)

solver = SimulatedAnnealing(
    t=1000, eps=1e-14, alpha=0.98, time_out=1,
    early_stop=problem.dimension, verbose=True)

solver.solve(problem)
print(problem.best_seen.length)

Informative Material

About

🧬Implement genetic algorithm to resolve the TSP Problem.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages