| Crates.io | papilo-rs |
| lib.rs | papilo-rs |
| version | 0.1.1 |
| created_at | 2025-07-24 16:22:45.393794+00 |
| updated_at | 2025-07-24 16:48:37.733364+00 |
| description | Rust bindings for the PaPILO library |
| homepage | |
| repository | https://github.com/mmghannam/papilo-sys |
| max_upload_size | |
| id | 1766265 |
| size | 31,514 |
Rust bindings for the PaPILO (Parallel Presolve for Integer and Linear Optimization) library.
Add this crate to your project by running:
cargo add papilo-rs
Then, you can use it in your Rust code as follows:
use papilo_rs::{Solver, Problem};
fn main() {
let mut problem = Problem::new();
let x = problem.add_col(1.0, 10.0, true, 10.0, "x1");
problem.add_row("r1", &[(x, 1.0)], 2.5, f64::INFINITY);
let mut solver = Solver::new();
solver.load_problem(problem);
assert!(
!solver.raw.is_null(),
"Solver instance should not be null after loading problem with integer columns"
);
let res = solver.start();
assert_eq!(res.dualbound, 30.0);
}
This project is licensed under the Apache License 2.0. See the LICENSE file for details.