Skip to content

A program which uses Simulated Annealing in order to solve the TSP

Notifications You must be signed in to change notification settings

Rolyyy/Travelling-Salesman-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travelling Salesman Problem

A program which uses Simulated Annealing in order to solve the TSP. Beginning of the Source code has intructions on how to run the program !

TSP asks the following 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?"

The TSP is an algorithmic problem in the field of computer science and operations research. It is focused on optimization. In this context, better solution often means a solution that is cheaper, shorter, or faster. TSP is a mathematical problem.

Simulated annealing (SA) is a probabilistic technique for approximating the global optimum of a given function.(the greatest value) Specifically, it is a metaheuristic, in which given a large space of potential solutions, tries to approximate the best possible solution available.

Simulated Annealing is an analogy to annealing in metallurgy, whereby a metal that has been heated to a high temperature will cool gradually, and be harder to alter. Similarly, in SA as time passes there is a lower chance of a solution being accepted. SA is an more advanced and effective form of the RHMC (Random Mutation Hill Climbing algorithm). Whereas in RMHC a better solution is always accepted, SA uses a formula in order to accept or reject a new solution. This can be useful in order to escape local optima.

A graphical representation which shows how being trapped in a Local Optima can prevent a Hill Climbing algorithm from finding the Global optimum: https://www.allaboutlean.com/polca-pros-and-cons/local-global-optimum/

About

A program which uses Simulated Annealing in order to solve the TSP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages