Expand description

Find an approximate solution to the Travelling Salesman Problem using Hill Climbing

For more information, please see the metaheuristics::hill_climbing documentation.

Examples

extern crate time;
extern crate travelling_salesman;

fn main() {
  let tour = travelling_salesman::hill_climbing::solve(
    &[
       (27.0, 78.0),
       (18.0, 24.0),
       (48.0, 62.0),
       (83.0, 77.0),
       (55.0, 56.0),
    ],
    time::Duration::seconds(1),
  );

  println!("Tour distance: {}, route: {:?}", tour.distance, tour.route);
}

Modules

Find an approximate solution to the Travelling Salesman Problem using Hill Climbing with random restarts

Functions

Returns an approximate solution to the Travelling Salesman Problem using Hill Climbing