JuMP.jl
JuMP.jl copied to clipboard
Improve matrix inequality support
Follow-up to #3766.
In our discussion of https://github.com/jump-dev/JuMP.jl/pull/3766, we never really talked about the fact that == is not ambiguous.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.40%. Comparing base (
95da051) to head (4228d97).
Additional details and impacted files
@@ Coverage Diff @@
## master #3778 +/- ##
=======================================
Coverage 98.40% 98.40%
=======================================
Files 44 44
Lines 5956 5966 +10
=======================================
+ Hits 5861 5871 +10
Misses 95 95
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Can we just replace Nonnegatives here:
https://github.com/jump-dev/JuMP.jl/blob/301d46e81cb66c74c6e22cd89fb89ced740f157b/src/macros/%40constraint.jl#L583
What are the other cases that you'd like to intercept ?
I didn't do this, because it could be interpreted as a breaking change.
Bump @blegat
I didn't do this, because it could be interpreted as a breaking change.
Breaking change for which function ? We are changing it to _OpGreaterThan before giving it to build_constraint in this PR as well anyway.
Changes the return of operator_to_set, but perhaps this is minor: https://juliahub.com/ui/Search?type=code&q=operator_to_set
Indeed, the function could be used outside of a JuMP macro. I'd say it is minor. _intercept_operator is complicated or code too much just to accomplish to accomplish exactly the same thing as changing the returned value of operator_to_set
I made a slight tweak to get rid of _intercept_operator but add a new method to operator_to_set.
I still think this complicating things too much just for such a small breaking change. Users are expected to implement operator_to_set, we never said that calling it would always return the same thing. I can't believe we haven't made something that could qualify as breaking for the returned value of such function since JuMP v1.0
Okay how about now
I'd prefer to name things for what they are rather than what they are used for.
What about calling the set Nonnegative and saying that
@constraint(model, a - b in Nonnegative()) and @constraint(model, a >= b) are synonymous.
Let's please not have Nonnegative and Nonnegatives for the same but slightly different thing.
How about GreaterThanZero ?
This needs something similar to https://github.com/jump-dev/JuMP.jl/pull/3797
This needs something similar to #3797
What do you mean ?
It needed the adjoint dual for the new constraints, which is why this PR is based against #3797
On Tue, 6 Aug 2024, 12:17 am Benoît Legat, @.***> wrote:
This needs something similar to #3797 https://github.com/jump-dev/JuMP.jl/pull/3797
What do you mean ?
— Reply to this email directly, view it on GitHub https://github.com/jump-dev/JuMP.jl/pull/3778#issuecomment-2268934419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6MQJJXGCZ54AZI6C6MI3DZP5UMHAVCNFSM6AAAAABJ4WXBR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYHEZTINBRHE . You are receiving this because you authored the thread.Message ID: @.***>
Okay, this is good to go on my end.