rmp-route-optimizer 0.1.0

High-performance route optimization library for waste collection and logistics using Eulerian circuit algorithms
Documentation
//! # RMP Route Optimizer
//!
//! A high-performance route optimization library for waste collection, logistics,
//! and delivery services using Eulerian circuit algorithms.
//!
//! ## Features
//!
//! - **Eulerian Circuit Optimization**: Solves the Chinese Postman Problem for efficient route planning
//! - **Geographic Awareness**: Uses Haversine distance for accurate real-world routing
//! - **Side-of-Street Routing**: Supports pickup side constraints (left/right/either)
//! - **Graph Augmentation**: Automatically adds edges to make graphs Eulerian
//! - **High Performance**: Optimized Rust implementation with minimal allocations
//!
//! ## Example
//!
//! ```rust
//! use rmp_route_optimizer::{RouteOptimizer, Node, Edge, PickupSide};
//!
//! // Create nodes (locations)
//! let nodes = vec![
//!     Node { id: 1, lat: 40.7128, lon: -74.0060 },
//!     Node { id: 2, lat: 40.7138, lon: -74.0070 },
//!     Node { id: 3, lat: 40.7148, lon: -74.0080 },
//! ];
//!
//! // Create edges (roads)
//! let edges = vec![
//!     Edge { from: 1, to: 2, cost: 100.0, oneway: false, side: PickupSide::Either },
//!     Edge { from: 2, to: 3, cost: 100.0, oneway: false, side: PickupSide::Either },
//!     Edge { from: 3, to: 1, cost: 100.0, oneway: false, side: PickupSide::Either },
//! ];
//!
//! // Optimize route
//! let optimizer = RouteOptimizer::new(nodes, edges);
//! let circuit = optimizer.optimize_eulerian(1, false).unwrap();
//!
//! println!("Optimized route: {:?}", circuit.nodes);
//! println!("Total cost: {}", circuit.total_cost);
//! ```

pub mod error;
pub mod optimizer;
pub mod types;

pub use error::{OptimizationError, Result};
pub use optimizer::RouteOptimizer;
pub use types::{Edge, EulerianCircuit, Node, PickupSide};

/// Library version
pub const VERSION: &str = env!("CARGO_PKG_VERSION");