-
Notifications
You must be signed in to change notification settings - Fork 94
[Utilities] add supports_shift_constant #1237
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
Conversation
I'm hesitant between this has adding a |
I always get confused with out
If they pass the incorrect type, then the shift implemented will not work anyway. For example: |
Yes but |
Returning And It really, do you want to implement an extra |
Some user might also not see the error when |
This is user-error.
We haven't needed to yet? |
Why do you mean ? The user should never have
No, just speculative |
If the user doesn't check for a return of |
In order to close jump-dev/JuMP.jl#1943, we need a way of checking whether it is possible to push the function constant into the set. The easiest way is just to define this fallback, so the JuMP code will become:
This makes JuMP's heuristic of "I'll push the constant into the set" well-defined by "does it implement shift_constant".
As a follow-up question: should this be moved to MOI proper?