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.
sedumi will be called several times to refine the solution.
Original size: 21 variables, 11 equality constraints
4 exponentials add 32 variables, 20 equality constraints
-----------------------------------------------------------------
Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------+---------------------------------+---------
4/ 4 | 3.608e+00 9.922e-01 2.166e-07 | Solved
4/ 4 | 1.314e-01 1.230e-03 5.761e-07 | Solved
3/ 3 | 8.388e-03 4.893e-06 3.197e-07 | Solved
0/ 2 | 5.249e-04 2.081e-08 4.268e-08 | 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