Cbc JuMP set constraints

I’ve opened an issue to improve the error message: https://github.com/jump-dev/JuMP.jl/issues/2680. The current error is confusing and isn’t good at explaining why this didn’t work.

Your problem is that Cbc does not support quadratic constraints.

Since your problem is a non-convex quadratic constraint, your options are Gurobi.jl or Ipopt.jl. In both cases the syntax you have is correct. No need for @NLconstraint.