Crates.io | tsp-solver |
lib.rs | tsp-solver |
version | 0.0.1 |
source | src |
created_at | 2023-03-24 17:03:42.812801 |
updated_at | 2023-03-25 02:58:16.788093 |
description | Genetic travelling salesman problem solver |
homepage | |
repository | https://github.com/oovm/tsp-art |
max_upload_size | |
id | 819520 |
size | 18,123 |
use tsp_solver::{Point2D, TspSolver};
pub fn main() {
let problem = Point2D::random(20, 16.0, 9.0);
let mut solver = TspSolver::load_or_create("target/days365/", problem.view());
for solution in solver.ant_colony_optimization(20) {
println!("{:04}: {}", solution.best_distance, solution.best_path);
}
}