Reputation:
I'm trying to solve a quadratic optimisation problem using the cvxopt python library. I have quadratic constraints which I'm converting to cone constraints.
My question is regarding the cvxopt documentation for cone programming. The general cone program is described with (among others) the constraints:
s_0 => 0
s_k0 => || s_k1 || for k = 1,...,M
Do they really mean this?
They give an example under the documentation:
that they represent as:
G = [ matrix( [[12., 13., 12.], [6., -3., -12.], [-5., -5., 6.]] ) ]
G += [ matrix( [[3., 3., -1., 1.], [-6., -6., -9., 19.], [10., -2., -2., -3.]] ) ]
h = [ matrix( [-12., -3., -2.] ), matrix( [27., 0., 3., -42.] ) ]
which seems to suggest that the constraints are instead:
s_k0 => || s_k1 || for k = 0,...,M
Upvotes: 0
Views: 575
Reputation: 39843
You've missed the important part of the example:
sol = solvers.socp(c, Gq = G, hq = h)
From the documentation for cone programming:
The argument
Gq
is a list of M dense or sparse matrices G_1, ..., G_M. The argumenthq
is a list of M dense single-column matrices h_1, ..., h_M. The elements ofGq
andhq
must have at least one row. The default values ofGq
andhq
are empty lists.
So the componentwise inequalities represented by s_0
are just omitted.
Upvotes: 1