good_lp icon indicating copy to clipboard operation
good_lp copied to clipboard

Add support for RELP

Open lorenzleutgeb opened this issue 3 years ago • 4 comments

I am using good_lp (at the moment with minilp). I am interested in exact solutions for rational numbers, and therefore I would like to experiment with relp. This is a request to add relp, or guide me doing so.

If I understand correctly, a new "type" of good_lp::variable::VariableDefinition (other than the existing types "continuous" and "integer") would be required. Generally, I am not sure how to deal with the discrepancy of f64 vs. the number types in relp_num which relp uses.

lorenzleutgeb avatar Mar 16 '22 17:03 lorenzleutgeb

cc @vandenheuvel in case you are willing to help.

lorenzleutgeb avatar Mar 16 '22 18:03 lorenzleutgeb

I don't think you need to add a new variable type. But you need to implement all existing operations on variables and expressions with these numbers, and you need to make expression generic to account for the different coefficients it will be able to hold. It will be quite a major change.

https://github.com/rust-or/good_lp/blob/main/src/expression.rs

If you do it, please put it behind a feature flag, so that it does not add a new mandatory dependency.

lovasoa avatar Mar 17 '22 08:03 lovasoa

I haven't prioritized a nice API yet, so I very much welcome integration into this project. I don't have a lot of capacity at the moment and diving into the inner-workings of good_lp is not something I'm available for, but I'm happy to answer questions or make some adaptations to relp's APIs to ease the integration.

vandenheuvel avatar Mar 17 '22 13:03 vandenheuvel

Hello ! I just created a CONTRIBUTING.md for this repo, please let me know if it helps, and what to add / improve to make it easier for you.

lovasoa avatar Sep 23 '23 19:09 lovasoa