Expand description

Find an approximate solution to the Travelling Salesman Problem using Simulated Annealing

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

Examples

extern crate time;
extern crate travelling_salesman;

fn main() {
  let tour = travelling_salesman::simulated_annealing::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);
}

Functions

Returns an approximate solution to the Travelling Salesman Problem using Simulated Annealing