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

Constraint Handler Plugin #130

Open
mmghannam opened this issue Mar 13, 2024 · 4 comments
Open

Constraint Handler Plugin #130

mmghannam opened this issue Mar 13, 2024 · 4 comments

Comments

@mmghannam
Copy link
Member

No description provided.

@mwien
Copy link

mwien commented Mar 31, 2024

I'm also very interested in this and might try to find the time to contribute here (though I don't have much experience yet)...

@mmghannam
Copy link
Member Author

Hi @mwien!
Thanks for considering to contribute! @egaban also has told me he's interested in this so maybe you can collaborate on it if you want.

I will try to layout an implementation plan here to try to save you as much time/effort as possible. This works for any plugin (I think).

  1. SCIP plugins are essentially interfaces. So first step would be to check the plugin's (fundamental) callbacks from SCIP's documentation and write an interface that represents it. Here's the one for the constraint handler plugin.
  2. SCIP saves PLUGIN_DATA for each plugin type. This is what russcip uses to wrap the struct that implements the interface. You'd need to add an include_{PLUGIN_NAME} method on Model<ProblemCreated> that takes a box of this interface and defines the C callbacks. As a reference you can take a look at the pricer plugin implementation and it's include method.

Hope this helps!

@mwien
Copy link

mwien commented Apr 2, 2024

Thanks, that helps a lot :)

@egaban
Copy link

egaban commented Apr 3, 2024

Hi! I'm struggling with the C api TBH. I'm trying to implement a constraint handler in C initially to learn how to do that, and then defining the rust interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants