【美赛·算法】SEIR 传染病模型 及其实现

SEIR是属于遗传病学的经典算法,

SUSCEPTIBLES--those able to contract the disease
EXPOSED--those who have been infected but are not yet
infectious
INFECTIVES--those capable of transmitting the disease
RECOVERED--those who have become immune

S: 易感人群

E:潜伏人群

I: 感染者

R:恢复健康者。

在这个模型中,可以分成许多子模型:

1.潜伏期人群是否有 传染能力?delay or not?

2. 潜伏期是否有时间限制?  infinite or not?

3.恢复健康者是否有抗体?


这个其实早就有论文了,参考最原始的:Seasonality and Period-doubling Bifurcation in an Epidemic Model

func_SEIR.m

function dy=func_SEIR(~,y)
global alpha beta0 beta1 gamma mu 
S = y(1);
E = y(2);
I = y(3);
tt = y(4);
x=beta0*(cos(2*pi*tt)*beta1+1);
dS = mu-x*S*I-mu*S;
dE = x*S*I-(mu + alpha)*E;
dI = alpha*E-(mu+gamma)*I;
ds = 1;
dy=[dS;dE;dI;ds];
end


SEIR_main.m
global alpha beta0 beta1 gamma mu 
mu=0.02;
alpha = 31.74;
gamma = 52;
beta0 = 1095;
beta1 = 0.05;

options = odeset('MaxStep',0.01);
[T,Y] = ode45(@func_SEIR, [0,50], [0.0658 0.0007 0.0002 0.00], options);  

figure(1)
plot(T,Y(:,3),'k','LineWidth',2);
xlabel('t/ yr');
ylabel('I/ people');

%figure(2);
%plot(Y(:,1),Y(:,3));
%xlabel('-ln(S)');
%ylabel('-ln(I)');

figure(2);
%options = odeset('MaxStep',0.01);
%[T,Y] = ode45('func_SEIR',[0 50],[0.0658 0.0007 0.0002 0.0],options);  
T=T(1:450);
 T=T(1:8.6:end);
YY=Y(1:450,3);
 YY=YY(1:8.6:end)
 plot(T,YY,'k','LineWidth',2);
 xlabel('t /yr');
 ylabel('I/ people');
 hold on;



你可能感兴趣的:(【美赛·算法】SEIR 传染病模型 及其实现)