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 _createConsBasicLinear #917

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Joao-Dionisio
Copy link
Collaborator

Added _createConsBasicLinear based on #910.

Also added stage check for freeTransform, freeReoptSolve. I don't know if there's a better way to do this than to do it manually for every method.

Tried to add transformProb. No compilation errors, but the test seemed like it didn't do anything, I'm not sure what's going on.

@Opt-Mucca
Copy link
Collaborator

Things I'm for in this MR:

  • Adding stage checks to the functions. I think there is no better way to do this than what you've done.
  • The transform functionality. What is the difference between this and calling presolve however? I would need to this distinction made clear.

Things I don't like:

  • Why do users need to add basic linear constraint? Shouldn't this be done with _createConsLinear? The basic include is supposed to save users implementing certain callbacks. This is easy in Python though and doesn't take up much code, and I think it's more confusing to provide this functionality.

@Joao-Dionisio
Copy link
Collaborator Author

Hey @Opt-Mucca, thanks for looking into this.

After transformProb the problem is in stage TRANSFORMED, so presolving wasn't called yet. I'm not entirely sure what presolving does after the problem is transformed though, but agreed that we should make it clear.

The idea for adding _createConsBasicLinear was because it might help out in other projects. There is this ML4LB repo that asks users to install PySCIPOpt and then compile their own version with these added methods. I'm not entirely sure that this is actually needed (they use it here), but it's still an annoyance for the users, as described in #910.

To be fair, in the documentation we do have this line, but we might want to remove it:

Ideally speaking, we want every SCIP function to be wrapped in PySCIPOpt.

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

Successfully merging this pull request may close these issues.

2 participants