-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
[docs] add warning about Y <= X, Set() syntax #3769
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3769 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 44 44
Lines 5879 5885 +6
=======================================
+ Hits 5784 5790 +6
Misses 95 95 ☔ View full report in Codecov by Sentry. |
@@ -1238,8 +1238,9 @@ julia> @constraint(model, x in MOI.ExponentialCone()) | |||
## Set inequality syntax | |||
|
|||
For modeling convenience, the syntax `@constraint(model, x >= y, Set())` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that as per https://docs.julialang.org/en/v1/manual/unicode-input/
⪰
can be "trivially" inputted as \succeq
.
Wouldn't it be possible to:
@constraint(model, x \succeq y)
# error: specify one of the conic sets
@constraint(model, x >= y, <... Some conic set ...>)
# warning: use \succeq instead
@constraint(model, x \succeq y, <... Some non-conic set ...>)
# warning: use >= instead
@constraint(model, x >= y)
# becomes @constraint(model, x - y, Nonnegatives)
@constraint(model, x <= y)
# becomes @constraint(model, x - y, Nonpositives)
Is the concern that someone writes @constraint(model, x >= y)
thinking it means PSDCone
,
it silently works, and doesn't do what's expected? Or is there some other concern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the concern that someone writes @constraint(model, x >= y) thinking it means PSDCone,
it silently works, and doesn't do what's expected?
Yes.
We won't be adding support for \succeq
. There is too much risk of confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:/ I really feel such a decision should be made with a larger headcount than i see here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a new issue
x-ref #3766