aprender_tsp/lib.rs
1//! aprender-tsp: Local TSP optimization with personalized .apr models.
2//!
3//! This crate provides command-line tools for training, optimizing, and deploying
4//! Traveling Salesman Problem (TSP) solvers using local `.apr` model files.
5//!
6//! # Features
7//!
8//! - **Train personalized TSP models** from your own problem instances
9//! - **Optimize routes** using state-of-the-art metaheuristics (ACO, Tabu Search, GA)
10//! - **Export solutions** in standard formats (JSON, CSV)
11//! - **Deploy offline** with zero cloud dependency
12//!
13//! # Example
14//!
15//! ```rust
16//! use aprender_tsp::{TspInstance, AcoSolver, TspSolver, Budget};
17//!
18//! // Create a simple instance
19//! let coords = vec![(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)];
20//! let instance = TspInstance::from_coords("square", coords).unwrap();
21//!
22//! // Solve with ACO
23//! let mut solver = AcoSolver::new().with_seed(42);
24//! let solution = solver.solve(&instance, Budget::Iterations(100)).unwrap();
25//!
26//! println!("Tour length: {:.2}", solution.length);
27//! ```
28//!
29//! # Toyota Way Principles
30//!
31//! - **Genchi Genbutsu**: Users understand their logistics problems best
32//! - **Kaizen**: Continuous model improvement through incremental updates
33//! - **Jidoka**: Build quality in through checksums and validation
34
35pub mod error;
36pub mod instance;
37pub mod model;
38pub mod solver;
39
40// Re-exports for convenience
41pub use error::{TspError, TspResult};
42pub use instance::TspInstance;
43pub use model::TspModel;
44pub use solver::{
45 AcoSolver, Budget, GaSolver, HybridSolver, SolutionTier, TabuSolver, TspAlgorithm, TspSolution,
46 TspSolver,
47};