# Problem in @NLobjective

**URL:** <https://discourse.julialang.org/t/problem-in-nlobjective/33190>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, first-steps\
**Created:** [January 10, 2020, 10:40am UTC](https://discourse.julialang.org/t/problem-in-nlobjective/33190 "2020-01-10T10:40:28Z")\
**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:** [January 10, 2020, 2:38pm UTC](https://discourse.julialang.org/t/problem-in-nlobjective/33190/2 "2020-01-10T14:38:07Z")

</div>

You cannot use `>` in a sum like this. To model this properly, you will need to add binary variables, transforming your problem into a mixed-integer nonlinear program (i.e., very hard to solve), and you won’t be able to use Ipopt. Are you sure you want to have a hard 0-1 jump?

A slightly relaxed approach could be to use a [sigmoid](https://en.wikipedia.org/wiki/Sigmoid_function) centered at `1e-4`.

p.s., You should read the first post of: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757). In particular, it’s much easier to help if you post the text of your code, rather than a photo.

---

_[View the full topic](https://discourse.julialang.org/t/problem-in-nlobjective/33190)._
