Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SCIP support #11

Closed
matbesancon opened this issue Aug 10, 2021 · 9 comments
Closed

Add SCIP support #11

matbesancon opened this issue Aug 10, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@matbesancon
Copy link

SCIP is one of the commonly-used MI(N)LP solvers and could be of interest to the rust-or communities (free and source available for academic use).

I'd be willing to help add it to lp-solvers if this is the appropriate repository

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2021

Hello !

If you want to do things cleanly, you should create a raw rust binding to their C API, publish it to crates.io under scip-sys, then a safe rust binding on top of that published as scip, then add support for this rust library in good-lp

If you want to interface with the precompiled binary application (which is easier, but less versatile, less reusable and less performant), then lp-solvers is the right place. This will require less work from you, but more setup for the final user.

@matbesancon
Copy link
Author

perfect thank you, I hadn't grasped the difference between the two libraries. Can we transfer this issue to good-lp to keep track of it?

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2021

Yes ! Are you ready to start the implementation ?

@matbesancon
Copy link
Author

Yes. I was checking highs-sys. Is there a documented automated way to produce the -sys crate with bindgen?

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2021

@lovasoa lovasoa transferred this issue from rust-or/lp-solvers Aug 11, 2021
@lovasoa lovasoa added the enhancement New feature or request label Feb 25, 2022
@mmghannam
Copy link
Contributor

Hi! I am working on a rust interface for SCIP https://github.com/mmghannam/russcip. It has basic MIP-solving functionality now, it can add variables and constraints. It would be great if you could tell me the next steps to plug it into the good_lp API, more specifically which traits and functions do I need to implement. Thanks a lot!

@lovasoa
Copy link
Collaborator

lovasoa commented Feb 12, 2023

Great news @mmghannam !

You should create a new file in the src/solvers directory, and add a new feature flag to this library. You can start from one of the existing solvers as an example (I think minilp is the best to take as an example because it's tiny and simple). The main thing to do is to write an scip function that takes an UnsolvedProblem and returns a custom struct that wraps an scip model object. Then you have to implement SolverModel on it.

@mmghannam
Copy link
Contributor

Thanks! that's very helpful. I will work on it and add a pull request soon.

@jacobsvante
Copy link
Contributor

Should this be closed?

@lovasoa lovasoa closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants