# 【美赛·算法】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.恢复健康者是否有抗体？

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;

02-12 3万+

02-09 3万+
04-25 10万+
01-21 5万+
03-19 1万+
03-10 7226
10-12
02-06 6692
02-17
07-06 1万+
06-15
03-10 2万+