Hi I am trying to recreate a relatively simple optimization function that I have working with python using (casadi + ipopt).

I am having some trouble figuring out how I can describe the objective function since it involves matrix/vectors. What would be the correct method to handle such a function with JuMP?

Reference working python code (Function in line 11): http://ix.io/2Ecl
What I have got with Julia so far: http://ix.io/2Ecp (line 55 in solve_InfMat())

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 summarises some of the difficulties of working with non-linear objectives in Ipopt.

JuMP doesn’t have the same features as CasADi for writing nonlinear problems with matrix-valued and vector-valued subexpressions. However, it looks like you’re in luck because your objective appears to be quadratic with respect to U. You can therefore write something like: