-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
@NLconstraint
names
#3069
Comments
This is related to the MOI Nonlinear redesign. At the moment, nonlinear constraints don't exist as first-class objects, so they don't support the So implementing this would first require jump-dev/MathOptInterface.jl#846 |
I'm going to close this as won't-fix for now. Nonlinear constraints don't have names. If/when we update MOI to have first-class nonlinear constraints, this is something that will happen naturally. |
They do appear to have names now... using JuMP
m=Model()
@variable(m,x);
@NLconstraint(m, constraint_1, exp(x) <= 1)
#exp(x) - 1.0 <= 0
m[:constraint_1]
#exp(x) - 1.0 <= 0 |
They have a symbolic identifier, but not a
I think what you're asking for in DisjunctiveProgramming is a way to look up if a constraint has been stored in the |
ok. makes sense. Thanks for clarifying. |
It's great to see that names (with indexing) can now be assigned to nonlinear constraints. The following features would be nice to have:
@NLconstraint
macro to allow thebase_name
kwarg as is the case in@constraint
.JuMP.name
to allow accessing the name of the nonlinear constraint.JuMP.set_name
for nonlinear constraints.The text was updated successfully, but these errors were encountered: