Giter Club home page Giter Club logo

tsp's Introduction

The Travelling Salesman problem

  • Deterministic Algorithm Implementation sample output on different runs produces the same results for final distance.
Initial distance: 40
Finished
Final distance: 20
Solution: >> tspdynamic.City@4517d9a3 >> tspdynamic.City@372f7a8d >> tspdynamic.City@2f92e0f4 >> tspdynamic.City@28a418fc >> tspdynamic.City@5305068a >> tspdynamic.City@1f32e575 >> tspdynamic.City@279f2327 >> tspdynamic.City@2ff4acd0 >> tspdynamic.City@54bedef2 >> tspdynamic.City@5caf905d >> tspdynamic.City@27716f4 >> tspdynamic.City@8efb846 >> tspdynamic.City@2a84aee7 >> tspdynamic.City@a09ee92 >> tspdynamic.City@30f39991 >> tspdynamic.City@452b3a41 >> tspdynamic.City@4a574795 >> tspdynamic.City@f6f4d33 >> tspdynamic.City@23fc625e >> tspdynamic.City@3f99bd52 >>
Initial distance: 44
Finished
Final distance: 20
Solution: >> tspdynamic.City@4517d9a3 >> tspdynamic.City@372f7a8d >> tspdynamic.City@2f92e0f4 >> tspdynamic.City@28a418fc >> tspdynamic.City@5305068a >> tspdynamic.City@1f32e575 >> tspdynamic.City@279f2327 >> tspdynamic.City@2ff4acd0 >> tspdynamic.City@54bedef2 >> tspdynamic.City@5caf905d >> tspdynamic.City@27716f4 >> tspdynamic.City@8efb846 >> tspdynamic.City@2a84aee7 >> tspdynamic.City@a09ee92 >> tspdynamic.City@30f39991 >> tspdynamic.City@452b3a41 >> tspdynamic.City@4a574795 >> tspdynamic.City@f6f4d33 >> tspdynamic.City@23fc625e >> tspdynamic.City@3f99bd52 >>
Initial distance: 28
Finished
Final distance: 20
Solution: >> tspdynamic.City@4517d9a3 >> tspdynamic.City@372f7a8d >> tspdynamic.City@2f92e0f4 >> tspdynamic.City@28a418fc >> tspdynamic.City@5305068a >> tspdynamic.City@1f32e575 >> tspdynamic.City@279f2327 >> tspdynamic.City@2ff4acd0 >> tspdynamic.City@54bedef2 >> tspdynamic.City@5caf905d >> tspdynamic.City@27716f4 >> tspdynamic.City@8efb846 >> tspdynamic.City@2a84aee7 >> tspdynamic.City@a09ee92 >> tspdynamic.City@30f39991 >> tspdynamic.City@452b3a41 >> tspdynamic.City@4a574795 >> tspdynamic.City@f6f4d33 >> tspdynamic.City@23fc625e >> tspdynamic.City@3f99bd52 >>
  • Non-Deterministic Algorithm Implementation
  • The non deterministic algorithm is implemented using Simulated Annealing method. The mothod involves creating a temperature variable to simulate the heating/cooling process of metals. It is initially set to high value and allow the value to reduce slowly allowing the algorithm to accept solutions that are worse than the current solution.As the value for temperature reduces, the chance of accepting worse solutions also reduces, thereby allowing the algorithm to gradually focus in on a area of the search space in which a close to optimum solution can be found. Sample output on different runs produces different results:
Initial solution distance:2030
Final solution distance: 988
Tour:  >> tspnondeterministic.City@5ca881b5 >> tspnondeterministic.City@24d46ca6 >> tspnondeterministic.City@4517d9a3 >> 	tspnondeterministic.City@372f7a8d >> tspnondeterministic.City@2f92e0f4 >> tspnondeterministic.City@28a418fc >> tspnondeterministic.City@5305068a >> 	tspnondeterministic.City@1f32e575 >> tspnondeterministic.City@279f2327 >> tspnondeterministic.City@2ff4acd0 >> tspnondeterministic.City@54bedef2 >> 	tspnondeterministic.City@5caf905d >> tspnondeterministic.City@27716f4 >> tspnondeterministic.City@8efb846 >> tspnondeterministic.City@2a84aee7 >> 	tspnondeterministic.City@a09ee92 >> tspnondeterministic.City@30f39991 >> tspnondeterministic.City@452b3a41 >> tspnondeterministic.City@4a574795 >> 	tspnondeterministic.City@f6f4d33 >>
Initial solution distance:2422
Final solution distance: 881
Tour:  >> tspnondeterministic.City@5ca881b5 >> tspnondeterministic.City@24d46ca6 >> tspnondeterministic.City@4517d9a3 >> 	tspnondeterministic.City@372f7a8d >> tspnondeterministic.City@2f92e0f4 >> tspnondeterministic.City@28a418fc >> tspnondeterministic.City@5305068a >> 	tspnondeterministic.City@1f32e575 >> tspnondeterministic.City@279f2327 >> tspnondeterministic.City@2ff4acd0 >> tspnondeterministic.City@54bedef2 >> 	tspnondeterministic.City@5caf905d >> tspnondeterministic.City@27716f4 >> tspnondeterministic.City@8efb846 >> tspnondeterministic.City@2a84aee7 >> 	tspnondeterministic.City@a09ee92 >> tspnondeterministic.City@30f39991 >> tspnondeterministic.City@452b3a41 >> tspnondeterministic.City@4a574795 >> 	tspnondeterministic.City@f6f4d33 >>
Initial solution distance:2164
Final solution distance: 913
Tour:  >> tspnondeterministic.City@5ca881b5 >> tspnondeterministic.City@24d46ca6 >> tspnondeterministic.City@4517d9a3 >> 	tspnondeterministic.City@372f7a8d >> tspnondeterministic.City@2f92e0f4 >> tspnondeterministic.City@28a418fc >> tspnondeterministic.City@5305068a >> 	tspnondeterministic.City@1f32e575 >> tspnondeterministic.City@279f2327 >> tspnondeterministic.City@2ff4acd0 >> tspnondeterministic.City@54bedef2 >> 	tspnondeterministic.City@5caf905d >> tspnondeterministic.City@27716f4 >> tspnondeterministic.City@8efb846 >> tspnondeterministic.City@2a84aee7 >> 	tspnondeterministic.City@a09ee92 >> tspnondeterministic.City@30f39991 >> tspnondeterministic.City@452b3a41 >> tspnondeterministic.City@4a574795 >> 	tspnondeterministic.City@f6f4d33 >>

tsp's People

Contributors

mburuanthony avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.