【美赛·算法】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;



  • 27
    点赞
  • 218
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值