scipopt / russcip

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

Feature request: SOS1 constraint support #141

Open jacobsvante opened 2 months ago

jacobsvante commented 2 months ago

We currently use SOS1 with coin-cbc in good_lp, but would like to be able to try out SOS1 with SCIP instead. It seems that it's implemented by SCIP, and good_lp has a trait which must be implemented by russcip for support.

My C/C++ skills are lacking to say the least, but I could do the good_lp implementation if something lands in russcip.

mmghannam commented 2 months ago

Shouldn't be too much work to implement, you can take a look at the implementation of create_cons_quadratic here. SOS1 should be easier to implement, no C/C++ skills are necessary :)

The SCIP functions you'd need are probably just SCIPcreateConsBasicSOS1 and like for the quadratic one, SCIPaddCons. Let me know where I can help. You can start by copying the code for the quadratic one and doing some renaming and calling other functions and I think you'll get there easily.

jacobsvante commented 2 months ago

Thanks for the direction @mmghannam, I'll try it when I'm done with the static builds 😅