Page 113 - Control Theory in Biomedical Engineering
P. 113
Modeling and optimal control of cancer-immune system 99
%v=1;
s1=0.3;
s=0.3;
roh=0.01;
B= 100;
B2=50;
%without treatment
sol = dde23(’Rihan’,1.2,[0.3; 100; 0.9], [0 30]);
%with treatment
% the initial values of the state variables and
%the control values at time r(i)
for i=1:m+1
r(i)=i*h–m*h;
E(i)=0.3; T(i)=100; N(i)=0.9; u(i)=0.1; v(i)=0; w(i)=0;
end
% the initail values for lambdas at the final times
for i=N1+m+1:N1+2*m+1
lambda1(i)=0;lambda2(i)=0;lambda3(i)=0;lambda4(i)=0;
end
% the forward and backword systems to be solved simultaneously
for i=m+1:N1+m
E(i+1)=E(i)+ h*(s+roh*E(i–m)*T(i–m)/(eta+T(i–m))–....
mu*E(i–m)*T(i–m)–delta*E(i)–a1*(1–exp(–u(i)))*E(i)+w(i)*s1);
T(i+1)=T(i)+h*(r2*T(i)*(1–b*T(i))–n*E(i)*T(i)–....
c1*N(i)*T(i)–a2*(1–exp(–u(i)))*T(i));
N(i+1)=N(i)+h*(r3*N(i)*(1–N(i))–c2*N(i)*T(i)–a3*(1–exp(–u(i)))
*N(i));
u(i+1)=u(i)+h*(v(i) – d*u(i));
if ((N1–i)*h<=tf–m*h & (N1–i)*h >=0)
lambda1(N1+2*m+1–i)=lambda1(N1+2*m+2–i)–....
h*(–1+lambda1(N1+2*m+2–i)*(delta+ .....
a1*(1–exp(–u(i+1))))+lambda2(N1+2*m+2–i)*n*T(i+1)+....
lambda1(N1+2*m+2–i+m)*(mu*T(i+1)–roh*T(i+1)/(eta+T(i+1))));
lambda2(N1+2*m+1–i)=lambda2(N1+2*m+2–i)–...
h*(1+lambda2(N1+2*m+2–i)*(–r2+2*r2*...
b*T(i+1)+n*E(i+1)+c1*N(i+1)+...
a2*(1–exp(–u(i+1))))+lambda3(N1+2*m+2–i)*c2*N(i+1)+...
lambda1(N1+2*m+2–i+m)*(roh*E(i+1)*T(i+1)/(eta+T(i+1))^2 – ...
roh*E(i+1)/(eta+T(i+1))...