Should @objective be replaced by @NLobjective in JuMP documentation?

Hello,

I’m currently reading the introductory section of the JuMP documentation and observed in the examples for the non-linear problems, that the macros @objective and @constraints are used. If I run these examples I get an error message with the statement

Are you trying to build a nonlinear problem? Make sure you use @NLconstraint/@NLobjective.

Should the macros in the example be replaced by their NL-counterparts @NLconstraint and @NLobjective?

1 Like

Hi @dnldlg,

You’re probably using an older version of JuMP that doesn’t support the updated nonlinear syntax.

You should either update to the latest version of JuMP, or consult the documentation for the version you are using.

There is a version selector in the bottom-left of the documentation page:

2 Likes

Thank you, that was indeed the issue. As I was not using the newest Julia version, my downloaded package was not v1.21.

1 Like