8000 GitHub - dgcollard/nph
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dgcollard/nph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nph

Some solvers for the Travelling Salesperson Problem

Requires

  • Ruby >= 1.9.3
  • RMagick gem - gem install rmagick
  • ImageMagick
  • Ghostscript

List a set of points in tsp.txt, then run rake tsp. The program will output an image called tsp.gif with a shortest possible tour of those points.

Example

tsp.txt

100 300
217 64
0 0
25 200
100 50
100 225
300 300
250 150
175 225

tsp.gif
An example TSP tour

Unit tests

Run unit tests contained in test/ with rake test, or just for the solver the image output uses run rake test TEST=test/tsp_test.rb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0