Open lassepe opened 3 years ago
Hi, I think this is in-line with the JuMP documentation (https://jump.dev/JuMP.jl/v0.21.1/nlp). "Note that the @objective
and @constraint
macros (and corresponding functions) do not currently support nonlinear expressions."
I haven't kept up with recent JuMP developments though so if this isn't accurate, I can look into updating to support @constraint
.
Hi, thank you for your quick reply!
Hi, I think this is in-line with the JuMP documentation (https://jump.dev/JuMP.jl/v0.21.1/nlp). "Note that the
@objective
and@constraint
macros (and corresponding functions) do not currently support nonlinear expressions."
I think the use of the term "nonlinear" is a bit confusing in the JuMP documentation. JuMP allows affine and quadratic expressions in @constraint
and @objective
. Thus, the formulation above should be valid. In fact, Ipopt and other JuMP enabled solvers are able to solve this problem.
I haven't kept up with recent JuMP developments though so if this isn't accurate, I can look into updating to support @constraint.
It would certainly be good to have support for @constraint
and @objective
in SNOPT7.jl because they are perhaps the main workhorses in JuMP at the moment. Unfortunately, I am not too familiar with the backend of either JuMP or SNOPT7 at this point. However, I'd be happy to help with the implementation of this feature if you can provide some rough guidance of what would be needed for this.
First of all, thank you for making SNOPT available in Julia!
I was able to run the JuMP example in
example/hs72.jl
. However, I am not able to run an equivalent formulation in which the last constraint is encoded viaJuMP.@constraint
rather thanJuMP.@NLconstraint
:I am getting the following error message (truncated)
Tl;DR Is it not possible to use any
JuMP.@contraint
calls with SNOPT7.jl; i.e. do I have to convert all of them toJuMP.@NLconstraint
? If so, are there any plans to supportJuMP.@constraint
in the future?