/GeneticAlgorithmForTSP

A multi-threaded implementation of a Genetic Algorithm for solving the vehicle routing problem which is a ”generalized” version of the TSP-problem.

Primary LanguagePython

A multi-threaded implementation of a Genetic Algorithm for solving the vehicle routing problem which is a ”generalized” version of the TSP-problem. It is made harder to solve by including multiple vehicle, all going their own routes and a capacity limit for each vehicle. The problem to be solved is fulfilling the demand of each customer while not exceeding the capacity limit of the vehicles while minimizing the travelling distance for all vehicles. Thus it is a combinatorial optimization problem.

Run instructions:

  • Use a terminal and execute with "python3 file_name n_rounds n_threads"
  • Parameters are set in the "args" list inside the "main" function
  • Ultimate value for test_data is close to 1300

Author: Victor Hwasser