# Why the @objective value is negative?

**URL:** <https://discourse.julialang.org/t/why-the-objective-value-is-negative/46781>\
**Category:** Optimization (Mathematical)\
**Created:** [September 17, 2020, 2:26pm UTC](https://discourse.julialang.org/t/why-the-objective-value-is-negative/46781 "2020-09-17T14:26:13Z")\
**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:** [September 17, 2020, 8:20pm UTC](https://discourse.julialang.org/t/why-the-objective-value-is-negative/46781/2 "2020-09-17T20:20:33Z")

</div>

Because you haven’t fixed the `iszero` issue: [Condition in @objective - #5 by odow](https://discourse.julialang.org/t/condition-in-objective/46526/5)

Look at your objective function use `objective_function(premex)`. It won’t be what you think it is.

---

_[View the full topic](https://discourse.julialang.org/t/why-the-objective-value-is-negative/46781)._
