papilo-rs 0.1.0

Rust bindings for the PaPILO library
Documentation
  • Coverage
  • 100%
    14 out of 14 items documented1 out of 12 items with examples
  • Size
  • Source code size: 27.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 354.24 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2m 7s Average build duration of successful builds.
  • all releases: 2m 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mmghannam/papilo-sys
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mmghannam

papilo-rs

Rust bindings for the PaPILO (Parallel Presolve for Integer and Linear Optimization) library.

Usage

Add this crate to your project by running:

cargo add papilo-rs

Example

Then, you can use it in your Rust code as follows:



```rust
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);
}

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.