# JuMP: defining objective function uses matrix multiplication

**URL:** <https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169>\
**Category:** Optimization (Mathematical)\
**Created:** [November 15, 2020, 1:51am UTC](https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169 "2020-11-15T01:51:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [November 15, 2020, 2:10am UTC](https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169/2 "2020-11-15T02:10:15Z")

</div>

I do not know Python so many things are not clear to me in your example, from where comes `U`? Are `I` variables? (I am not sure of what comes from a `.mat` file.) If I am not wrong Ipopt supports arbitrary functions so you could code a function that does the same your objective function in python does and pass it to Ipopt by JuMP. I think [this post](https://discourse.julialang.org/t/conditional-inside-a-function-to-be-optimized/48563/16) summarises some of the difficulties of working with non-linear objectives in Ipopt.

---

_[View the full topic](https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169)._
