Norm in the Objective Function

771 views
Skip to first unread message

Aditya Bhat

unread,
Apr 14, 2016, 10:13:36 PM4/14/16
to Gurobi Optimization
I am trying to optimize an an objective function which looks like the following
minimize sqrt((0.5*cos(theta1)+0.5*cos(theta2)-0.3)^2 + (0.5*sin(theta1)+0.5*sin(theta2)-0.3)^2)

There are constraints on theta1 and theta2.
Theta1 and Theta2 have a piecewise linear approximation.
 
How do I take into account the norm while feeding it to the gurobi optimizer?
I am aware of setPWLObj method but I am unsure how to take the square of the individual terms and then take its square root (or the L2 norm).

Tobias Achterberg

unread,
Apr 28, 2016, 3:46:48 AM4/28/16
to gur...@googlegroups.com
This is a highly non-linear objective function and thus hard to model and solve
with mixed integer linear/quadratic programming techniques.

First, the sqrt() can be discarded as the function is monotone. Minimizing
sqrt(x) is the same as minimizing x, as long as x >= 0.

It remains to minimize

(0.5*cos(theta1)+0.5*cos(theta2)-0.3)^2 +
(0.5*sin(theta1)+0.5*sin(theta2)-0.3)^2

In order to do this, you can minimize x^2 + y^2 and then use a set of
constraints and auxiliary variables to model

x = 0.5*cos(theta1)+0.5*cos(theta2)-0.3

and

y = 0.5*sin(theta1)+0.5*sin(theta2)-0.3

using a piece-wise linear approximation.

But I am not sure whether this will lead to a reasonable model that can be
solved in reasonable time and is still close enough to what you really want to
solve.


Tobias
Reply all
Reply to author
Forward
0 new messages