# Struggle at using JuMP/MathOptInterface for calculating number of constraints

**URL:** <https://discourse.julialang.org/t/struggle-at-using-jump-mathoptinterface-for-calculating-number-of-constraints/116275>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, optimization, variable-length, constraint\
**Created:** [June 26, 2024, 8:32pm UTC](https://discourse.julialang.org/t/struggle-at-using-jump-mathoptinterface-for-calculating-number-of-constraints/116275 "2024-06-26T20:32:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [June 29, 2024, 12:12am UTC](https://discourse.julialang.org/t/struggle-at-using-jump-mathoptinterface-for-calculating-number-of-constraints/116275/6 "2024-06-29T00:12:31Z")

</div>

The `@NL` macros are part of the legacy interface. You should change them to use `@constraint` instead.

For information on the new nonlinear interface, see:

- [JuMP 1.15.0 is released | JuMP](https://jump.dev/blog/1.15.0-release/)
- [ANN: JuMP v1.15 is released](https://discourse.julialang.org/t/ann-jump-v1-15-is-released/103875)

---

_[View the full topic](https://discourse.julialang.org/t/struggle-at-using-jump-mathoptinterface-for-calculating-number-of-constraints/116275)._
