SOS Module のコマンド sos, solvesos を利用して,sos_decomposition1.m と同じ問題を解く.
>> sos_decomposition2
-------------------------------------------------------------------------
YALMIP SOS module started...
-------------------------------------------------------------------------
Detected 0 parametric variables and 2 independent variables.
Detected 0 linear inequalities, 0 equality constraints and 0 LMIs.
Using kernel representation (options.sos.model=1).
Initially 6 monomials in R^2
Newton polytope (0 LPs).........Keeping 3 monomials (0.0624sec)
Finding symmetries..............Found 1 symmetry (0sec)
Partitioning using symmetry.....3x3(1)
SeDuMi 1.3 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
eqs m = 5, order n = 4, dim = 10, blocks = 2
nnz(A) = 6 + 0, nnz(ADA) = 25, nnz(L) = 15
it : b*y gap delta rate t/tP* t/tD* feas cg cg prec
0 : 3.42E+000 0.000
1 : -1.47E-001 3.04E-001 0.000 0.0889 0.9900 0.9900 1.60 1 1 9.1E-001
2 : -8.27E-005 8.23E-004 0.000 0.0027 0.9990 0.9990 1.22 1 1 5.2E-002
3 : -1.02E-011 9.41E-011 0.000 0.0000 1.0000 1.0000 1.00 1 1 6.4E-009
4 : -1.87E-016 1.11E-015 0.000 0.0000 1.0000 1.0000 1.00 1 1 7.3E-014
iter seconds digits c*x b*y
4 0.5 5.9 0.0000000000e+000 -1.8721170283e-016
|Ax-b| = 5.5e-015, [Ay-c]_+ = 2.0E-017, |x|= 2.5e+000, |y|= 2.1e-016
Detailed timing (sec)
Pre IPM Post
2.620E-001 3.990E-001 7.701E-002
Max-norms: ||b||=1.668905e+000, ||c|| = 0,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.
sol =
yalmiptime: 2.3580
solvertime: 0.8170
info: 'No problems detected (SeDuMi-1.3)'
problem: 0
dimacs: [2.0910e-015 0 0 1.9742e-017 1.8721e-016 1.8721e-016]
monos =
[3x1 sdpvar]
Q =
[3x3 double]
resi =
9.7700e-015
>> Q{1}
ans =
4.0000 1.0000 -0.3120
1.0000 3.6239 -0.0000
-0.3120 -0.0000 2.0000
>> min(eig(Q{1})) %%% Q の最小固有値
ans =
1.9340
>> sdisplay(monos{1})
ans =
'x2^2'
'x1*x2'
'x1^2'
>> sdisplay(monos{1}'*Q{1}*monos{1})
2.0000*x1^4+3.0000*x1^2*x2^2+2.0000*x1*x2^3+4.0000*x2^4