Crates.io | travelling_salesman |
lib.rs | travelling_salesman |
version | 1.1.22 |
source | src |
created_at | 2015-05-24 23:00:23.94593 |
updated_at | 2022-07-16 07:41:33.714287 |
description | Travelling Salesman Problem Solvers |
homepage | https://crates.io/crates/travelling_salesman |
repository | https://github.com/alfiedotwtf/travelling_salesman |
max_upload_size | |
id | 2191 |
size | 24,150 |
Travelling Salesman Problem Solvers
The aim of this crate is to host various Travelling Salesman Problem solvers. Patches implementing useful algorithms most welcome.
For more information, please see the Travelling Salesman Problem Wikipedia article, and In Pursuit of the Traveling Salesman: Mathematics at the Limits of Computation.
The documentation for this crate can be found here.
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);
}
Please report any bugs or feature requests at:
Feel free to fork the repository and submit pull requests :)
IT COMES WITHOUT WARRANTY OF ANY KIND.
Copyright (C) 2021 to Alfie John
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.