Thank you!Ilya.
The problemminimize norm(x) - q.T*xsubject to A*x == bis equivalent tominimize t - q.T*xsubject to A*x == bnorm(x) <= t
where norm(x) <= t means that (t,x) belongs to a second order cone, i.e., you can use cvxopt.solvers.conelp or cvxopt.solvers.socp.
There is no need to keep sqrt there. Indeed,you can minimise the convex function<x-q/2,x-q/2>=<x,x>-<q,x>+<q,q>/4. (E.g. just change the variables y:=x-q/2).Now your $\sqrt{<x,x>-<q,x>}=\sqrt{<x-q/2,x-q/2>-<q,q>/4}$, as required.This is totally standard trick...HTHDima
On Saturday, January 28, 2017 at 12:18:35 AM UTC+1, Ilya Grigoriev wrote:
Thank you both very much for your help!@Martin: I'm pretty sure this solved my problem. It took me a while to figure out why `socp` does exactly what is needed, so I wrote it out (even though it's just renaming things). I can take the n-vector `x` and append a scalar `t` to the beginning to make an n+1-vector `w`. To match the language of the documentation for `socp`, if I pick the matrix G_1 to be -identity and the vector h_1 to be zero, one of the conditions `socp` promises becomes `s_1 = w`. `socp` promises to find a `w` such that `s_10 >= \norm{s_11}`, which in this case means `t >= \norm{x}`, which is exactly what we want.@Dima: Unless I misunderstood something, your suggestion optimizes \sqrt{<x,x> - <q,x>} as opposed to \sqrt{<x,x>} - <q,x> (which is what I wanted). I didn't understand what the change of variables buys me. What am I missing?