Crate papilo_rs

Crate papilo_rs 

Source
Expand description

Rust bindings for the PaPILO presolving library.

§Example

use papilo_rs::solver::{SolveResult, Solver};
use papilo_rs::problem::Problem;

 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);
 let res = solver.start();
 assert_eq!(res.best_solution_objective(), 30.0);
 assert_eq!(res.solve_result(), SolveResult::Optimal);

Re-exports§

pub use papilo_sys as ffi;

Modules§

problem
Contains wrappers for the Papilo_Problem struct and its methods.
solver
Contains wrappers for the Papilo_Solver struct and its methods.