scipopt / russcip

Rust interface for SCIP
https://crates.io/crates/russcip
Apache License 2.0
38 stars 11 forks source link

support getting best solution when optimal solution has not been reached #42

Closed yonch closed 1 year ago

yonch commented 1 year ago

See #41. I had encountered it when trying to configure a time bound with good_lp. This has been successfully returning returning a satisfactory, not optimal, solution.

yonch commented 1 year ago

Note that it looks like this breaks test model::tests::unbounded_model:

---- model::tests::unbounded_model stdout ----
thread 'model::tests::unbounded_model' panicked at 'assertion failed: sol.is_none()', src/model.rs:682:9

I'm not going to have time to dive in there right now.. Any pointers are appreciated..

mmghannam commented 1 year ago

Note that it looks like this breaks test model::tests::unbounded_model:

---- model::tests::unbounded_model stdout ----
thread 'model::tests::unbounded_model' panicked at 'assertion failed: sol.is_none()', src/model.rs:682:9

I'm not going to have time to dive in there right now.. Any pointers are appreciated..

I think you just revealed a bug in the tests, in the unbounded case there is still a solution. The test should be the opposite sol.is_some().

mmghannam commented 1 year ago

Closes #41.

mmghannam commented 1 year ago

@yonch I fixed the test. The pr should be good now, thank you for your contribution!

yonch commented 1 year ago

This was a pleasure sir, thank you!