problemreductions/solvers/ilp/mod.rs
1//! ILP (Integer Linear Programming) solver module.
2//!
3//! This module provides an ILP solver using the HiGHS solver via the `good_lp` crate.
4//! It is only available when the `ilp` feature is enabled.
5//!
6//! # Example
7//!
8//! ```rust,ignore
9//! use problemreductions::models::algebraic::{ILP, LinearConstraint, ObjectiveSense};
10//! use problemreductions::solvers::ILPSolver;
11//!
12//! // Create a simple binary ILP: maximize x0 + 2*x1 subject to x0 + x1 <= 1
13//! let ilp = ILP::<bool>::new(
14//! 2,
15//! vec![LinearConstraint::le(vec![(0, 1.0), (1, 1.0)], 1.0)],
16//! vec![(0, 1.0), (1, 2.0)],
17//! ObjectiveSense::Maximize,
18//! );
19//!
20//! let solver = ILPSolver::new();
21//! let solution = solver.solve(&ilp);
22//! ```
23
24mod solver;
25
26pub use solver::ILPSolver;