# Method Error using round on JuMP Variable

**URL:** <https://discourse.julialang.org/t/method-error-using-round-on-jump-variable/37136>\
**Category:** Optimization (Mathematical)\
**Created:** [April 7, 2020, 12:33am UTC](https://discourse.julialang.org/t/method-error-using-round-on-jump-variable/37136 "2020-04-07T00:33:40Z")\
**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:** [April 7, 2020, 1:15am UTC](https://discourse.julialang.org/t/method-error-using-round-on-jump-variable/37136/2 "2020-04-07T01:15:37Z")

</div>

Please see the first post of [Please read: make it easier to help you - #8](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757/8). In particular, provide a minimal working example and use the tools to format your code.

You should also read the docs on NLP: [Nonlinear Modeling · JuMP](https://www.juliaopt.org/JuMP.jl/stable/nlp/)

For your specific question, there is a chain of issues: i) don’t use nonlinear functions in `@constraint` and ii) no, you can’t use `round`. You will need to think of a way to reformulate your problem to make it amenable to solvers.

You may be interested in [GitHub - RoboticExplorationLab/TrajectoryOptimization.jl: A fast trajectory optimization library written in Julia](https://github.com/RoboticExplorationLab/TrajectoryOptimization.jl)

---

_[View the full topic](https://discourse.julialang.org/t/method-error-using-round-on-jump-variable/37136)._
