Is it possible to add user-defined nonlinear functions as constraints in JuMP? I couldn’t find any documentation about a case like this nor any examples where someone would have done this.

I mean something like this:

```
JuMP.register(m, :g, 1, g, autodiff=true)
JuMP.addNLconstraint(m, g(x) <= 0)
```

If this is not possible, then is there any way to do this kind of optimization with Julia?