How to use string in @nlexpression

You cannot use a string for this, you must construct an Expr instead.

Documentation Nonlinear Modeling · JuMP