Section 4.5.4: Minimum spectral radius via Peron-Frobenius theory (GP)
c_nom = [1 1]';
b_nom = [2 3 2 1]';
alpha = [1 1 1 1]'; beta = [1 1 1 1]';
s_nom = [1 1 3]';
gamma = [1 1 1]'; delta = [1 1 1]';
cvx_begin gp
variables lambda b(4) s(3) v(4) c(2)
minimize( lambda )
subject to
b'*v <= lambda*v(1);
s(1)*v(1) <= lambda*v(2);
s(2)*v(2) <= lambda*v(3);
s(3)*v(3) <= lambda*v(4);
[0.5; 0.5] <= c; c <= [2; 2];
b == b_nom.*((ones(4,1)*(c(1)/c_nom(1))).^alpha).*...
((ones(4,1)*(c(2)/c_nom(2))).^beta);
s == s_nom.*((ones(3,1)*(c(1)/c_nom(1))).^gamma).*...
((ones(3,1)*(c(2)/c_nom(2))).^delta);
cvx_end
disp(' ')
if lambda < 1
fprintf(1,'The fastest decay rate of the bacteria population is %3.2f.\n', lambda);
else
fprintf(1,'The slowest growth rate of the bacteria population is %3.2f.\n', lambda);
end
disp(' ')
fprintf(1,'The concentration of chemical 1 achieving this result is %3.2f.\n', c(1));
fprintf(1,'The concentration of chemical 2 achieving this result is %3.2f.\n', c(2));
disp(' ')
A = zeros(4,4);
A(1,:) = b';
A(2,1) = s(1);
A(3,2) = s(2);
A(4,3) = s(3);
disp('Eigenvalues of matrix A are: ')
eigA = eig(A)
Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 19 variables, 10 equality constraints
For improved efficiency, SDPT3 is solving the dual problem.
Approximation size: 52 variables, 30 equality constraints
-----------------------------------------------------------------
Target Conic Solver
Precision Error Status
---------------------------
1.221e-04 1.643e+00 Solved
1.221e-04 5.077e-03 Solved
1.221e-04 0.000e+00 Solved
1.490e-08 2.430e-06 Solved
1.490e-08 0.000e+00 Solved
-----------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +0.804067
The fastest decay rate of the bacteria population is 0.80.
The concentration of chemical 1 achieving this result is 0.50.
The concentration of chemical 2 achieving this result is 0.50.
Eigenvalues of matrix A are:
eigA =
0.8041
-0.2841
-0.0100 + 0.2263i
-0.0100 - 0.2263i