rust-or / rust-lp-modeler

Lp modeler written in Rust
MIT License
96 stars 29 forks source link

Fix bounds native cbc #58

Closed carrascomj closed 4 years ago

carrascomj commented 4 years ago

Closes #55

Description

NativeCbcSolver was giving wrong results for problems which were relatively easy (for instance, this one).

Solution

There were two stupid bugs introduced by a certain me:

carrascomj commented 4 years ago

By the way, I ran some benchmarks against the problem that was failing using criterion. It is a LP problem with 144 constraints and 95 variables. Albeit being a simple and small problem, the difference is still noticeable. changes_cbc

jcavat commented 4 years ago

Thanks ! What's the density in the y-axis ?

carrascomj commented 4 years ago

@jcavat It is supposed to be the Probability Density Function (PDF) for the samples (https://bheisler.github.io/criterion.rs/book/user_guide/plots_and_graphs.html#pdf).

jcavat commented 4 years ago

Ok so, one iteration do exactly the same job, right ?

carrascomj commented 4 years ago

Yep, it is this one for different branches using the different solvers (there are around 3ms that are spent on reading the model, but that's independent of this crate) https://github.com/carrascomj/kair/blob/trunk/benches/formulate_from_sbml.rs#L13