-
Notifications
You must be signed in to change notification settings - Fork 120
Refactor some constraint into GenericConstraint #590
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
Let me know when you'd like me to take a look |
Why would this be breaking for #589? |
|
We could keep the constant as an alias.
This needs a much bigger discussion. We could change it without this PR, but it's horribly breaking because it silently swaps the sign. I don't know how many people rely on this though. Convex.jl/src/constraints/LessThanConstraint.jl Lines 63 to 71 in 7eb1726
|
Yes we could, but since this release is changing the name already, it's already breaking this so by removing it before even introducing it, it's not more breaking. Not having these aliases would simplify things, you can still write
We can also avoid breaking this by using |
👍 at least for this PR.
I agree that we should fix it. But I don't know how to do it in a way that doesn't trip people up. At the very least, it needs to be a single PR just for that change. |
I think it would be good to give the expected sign, and I'm not sure so many folks are using the existing functionality; there's been no issues about the sign at least. Maybe we could tag a v0.15.5 with a warning in |
We are already changing the sign for the PSD cone: Convex.jl/src/constraints/PositiveSemidefiniteConeConstraint.jl Lines 82 to 84 in 7eb1726
so it's maybe consistent to consider that a <= b is b - a in Nonnegatives() as well. In JuMP, we avoid it by requiring the cone to be given explicitly for conic inequalities so rewriting @constraint(model, a <= b, PSDCone()) into b - a in PSDCone() shouldn't be confusing or surprising.
If we want to be on the safe side we could also simply throw a warning in v0.16 when someone gets a dual with a |
I've changed the sign in #593 |
I think we should consider releasing v0.16 without this PR. There are a lot of good changes sitting on |
I don't know how far we are from v1.0, I think this will be a v0.17 probably. Since v0.16 is going to be breaking, and v0.17 as well, it just think it might be best to break once to avoid people having to change back and forth.
Not much need to be done it seems. I'm planning to add default fallbacks in a follow-up PR. |
There are still lots of test errors? |
Okay, I've added I've left the existing |
I meant that not much need to be done "per set" once we have |
This is a first step towards allowing to create constraints with custom MOI vector sets.