# Using structures with JuMP

**URL:** <https://discourse.julialang.org/t/using-structures-with-jump/110663>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [February 23, 2024, 6:24pm UTC](https://discourse.julialang.org/t/using-structures-with-jump/110663 "2024-02-23T18:24:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 23, 2024, 7:22pm UTC](https://discourse.julialang.org/t/using-structures-with-jump/110663/2 "2024-02-23T19:22:37Z")

</div>

Hi @joaomcostab, welcome to the forum!

Last year we rewrote JuMP’s nonlinear interface, precisely to support structures like this.

See:

- [ANN: JuMP v1.15 is released](https://discourse.julialang.org/t/ann-jump-v1-15-is-released/103875)
- [Nonlinear Modeling · JuMP](https://jump.dev/JuMP.jl/stable/manual/nonlinear/)

To update, change

```Julia
register(model, :gauss_cheby_integral_f, 4, gauss_cheby_integral_f, autodiff=true)

```

to

```Julia
@operator(model, op_gauss_cheby_integral_f, 4, gauss_cheby_integral_f)

```

Use `op_gauss_cheby_integral_f` instead of `gauss_cheby_integral_f` in the constraint macros, and change `@NLconstraint` to `@constraint`.

If you get stuck, post a reproducible example that we can copy and paste, and we can help fix any issues.

---

_[View the full topic](https://discourse.julialang.org/t/using-structures-with-jump/110663)._
