1974 year Hoppensteadt First of all, in the text [1] An age structured epidemic model is established and studied in this paper ． so far , Age structured Many achievements have been made in the study of epidemic models （ see [2]-[5] etc. ）, However, most of these models do not consider the age of infection , The influence of incubation period on disease transmission The impact of ． This can not accurately describe some infectious diseases with long incubation period and course of disease （ measles , Tuberculosis, etc ） The spread of , Therefore, the establishment of And research has physiological age , It is of great significance to establish an infectious disease model with latent period and age of infection ． at present , They also have physiological age , Get sick Age , There are few studies on latent period of infectious disease model , Only some special problems result , Ruwen [6]-[7] The physiological age and age were studied Infectious disease model based on age of infection , writing [8]-[9] We established and studied the model with simultaneous incubation period , Non immune type of age of infection and physiological age SEIS pass Disease model and well posedness of its solution ． This article focuses on measles , Tuberculosis and other diseases , Divide the crowd into groups S（ Susceptible class ）,E（ Latent class ）,I（ Get sick class ）,R（ Healing ） Four groups of people , utilize K-M Principle of silo model （ See article [10]）, It is easy to establish and has physiological age , Age of infection , latent Ambulatory SEIR Model

.

The specific code is as follows ：

function Message_Spread_Modeticload 'Data\Link.txt'; % Read in connection matrix % load

'\Data\Point_X.txt'; % Read in abscissa % load '\Data\Point_Y.txt'; % Read in ordinate

%-------------------------------------------------------------------------%

% State distribution and state transition probability SEIR%0: Susceptible state S（Susceptible） P_0_1; （P_0_3: Preimmunity coefficient ）%1: Latent state E（Exposed）

P_1_0;P_1_2;P_1_3%2: Infected state I（Infected） P_2_0;P_2_3%3: Immune status R（Recovered） P_3_0

%-------------------------------------------------------------------------%

% Calculate the degree of each user node De=sum(Link); % Degree of user node

%------------——————---- Parameter setting and description --------------------------------%[M

N]=size(Link); % Scale of connection matrix I_E=0.6; % incubation period E Infection intensity of users I_I=0.9; % Onset period I Infection intensity of users

lamda=sum(De)/M; % Average number of messages sent per unit time %P_m1： User pre immunity coefficient

%State： User status State=zeros(1,M);0: Indicates a susceptible state （Susceptible）

%---------------------------------1---------------------------------------%

% First, we discuss the user pre immunity coefficient P_m1 Impact on virus transmission TimeStep=50;%input(' Simulation time of virus propagation in SMS network ：');P_m1=[0.1,0.5,0.9];

% User pre immunity coefficient % State=zeros(TimeStep,M); % User status G_t=5; %G_t： Immune duration of users , It reflects the mutation frequency of the virus

F_t=5; %F_t： The time from virus discovery to virus killing and upgrading for i=1:length(P_m1) TimeLong_F=zeros(1,M);

% How long is the user in the period of infection TimeLong_E=zeros(1,M); % How long is the user in the incubation period Sta=zeros(1,M); % User status

% Perform pre immunization setting for j=1:M if rand(1)<=P_m1(i) Sta(j)=3; % Enter immune state TimeLong_E(j)=1;

% The time of in and out incubation period is 1 else continue; end end % state transition % Initially, a node is randomly selected as the source of disease （ At this time, the immune point cannot be selected ）

% problem ： The degree of nodes is different , There may be some reasons for the simulation results % To avoid this problem , We take the node with the highest degree as the source node , If immunized , Choose the next largest , Go down at once

[Number,Sta]=Select_Infected_Point(M,Sta,De); %Number： Disease source node %State

： Node state matrix after determining the source node State=zeros(TimeStep,M); Number_State=zeros(4,TimeStep);

% Statistics of the number of user states for t=1:TimeStep if t==1 State(t,:)=Sta; else % Simulate the state of each user node for

j=1:M % Determine the state of the user node , Then according to its state to determine its transformation if State(t-1,j)==0 % At this point in the susceptible state 0, It may be transferred to the incubation period

Num=Select_Number_Near(j,Link); % Find the node j Neighbor nodes of P=zeros(1,length(Num));

% The probability of a neighbor node infecting the node for k=1:length(Num) if State(t-1,Num(k))==1 % The node is in the incubation period E（1）

P(k)=I_E/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./...

(factorial([1:De(Num(k))]-1))); else if State(t-1,Num(k))==2 % The node is in the infected stage I（2）

P(k)=I_I/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./(factorial([1:De(Num(k))]-1)));

else continue; end end end P_0_1=max(P); % Probability of node infected with virus if rand<=P_0_1 % At this time, the node enters the incubation period

State(t,j)=1; else State(t,j)=State(t-1,j); end else if State(t-1,j)==1

% At this point in the latent state E, May be susceptible to S, Get sick I And immunity R transfer if rand<=1/(1+exp(-De(j))) % Towards the state of infection I transfer State(t,j)=2;

TimeLong_F(j)=TimeLong_F(j)+1; % user j Duration of illness else if rand<=1/(1+exp(-De(j)))

% To the susceptible state S transfer State(t,j)=0; else if rand<=1/(1+exp(-De(j))) % Towards immune state R transfer State(t,j)=3;

TimeLong_E(j)=TimeLong_E(j)+1; % Immune time increased 1 else State(t,j)=State(t-1,j);

% The state remains unchanged , It's still the incubation period E（1） end end end else if State(t-1,j)==2 % At this time, he was in a state of being infected with the disease I, May be susceptible to S, immune R transfer

if TimeLong_F(j)<=F_t % This means that the user will not deal with the virus at this time State(t,j)=State(t-1,j); % At this time, the user remains in the original state I

TimeLong_F(j)=TimeLong_F(j)+2; else % At this time, the user will carry out antivirus and upgrade the virus library , Enter immune state R State(t,j)=3;

TimeLong_F(j)=0; % It's in the stage of infection （ Toxic state ） Length of time TimeLong_E(j)=1; % The length of time into the immune phase end else

% At this time, the user is in the immune period if TimeLong_E<=G_t % The virus did not mutate at this time , Maintain the original state R（ Immune status ） State(t,j)=State(t-1,j);

TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased else if rand<=1/G_t % Virus mutation , State transition to susceptible state S

State(t,j)=0; TimeLong_E(j)=0; else % At this time, the user status remains unchanged State(t,j)=State(t-1,j);

TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased end end end end end end end

% Count the number of nodes in each state Number_State(1,t)=sum(State(t,:)==0);% In a susceptible state S Total number of nodes

Number_State(2,t)=sum(State(t,:)==1);% In a susceptible state E Total number of nodes

Number_State(3,t)=sum(State(t,:)==2);% In a susceptible state I Total number of nodes

Number_State(4,t)=sum(State(t,:)==3);% In a susceptible state R Total number of nodes figure(i) if rem(t,3)==0

plot([t-1 t],[Number_State(1,t-1) Number_State(1,t)],'md-'),hold on plot([t-1

t],[Number_State(2,t-1) Number_State(2,t)],'gh:'),hold on plot([t-1

t],[Number_State(3,t-1) Number_State(3,t)],'bs-.'),hold on plot([t-1

t],[Number_State(4,t-1) Number_State(4,t)],'k.-'),hold on else continue; end

legend(' Susceptible state Susceptible',' Latent state Exposed',' Infected state Infected',' Immune status Recovered')

xlabel(' Simulation time ') ylabel(' Number of users in each state ') endendP_m1=0.3; % User pre immunity coefficient %

State=zeros(TimeStep,M); % User status % G_t=5; %G_t： Immune duration of users , It reflects the mutation frequency of the virus G_t=[1,5,9];

F_t=5; %F_t： The time from virus discovery to virus killing and upgrading for i=1:length(G_t) TimeLong_F=zeros(1,M);

% How long is the user in the period of infection TimeLong_E=zeros(1,M); % How long is the user in the incubation period Sta=zeros(1,M); % User status

% Perform pre immunization setting for j=1:M if rand(1)<=P_m1 Sta(j)=3; % Enter immune state TimeLong_E(j)=1;

% The time of in and out incubation period is 1 else continue; end end % state transition % Initially, a node is randomly selected as the source of disease （ At this time, the immune point cannot be selected ）

% problem ： The degree of nodes is different , There may be some reasons for the simulation results % To avoid this problem , We take the node with the highest degree as the source node , If immunized , Choose the next largest , Go down at once

[Number,Sta]=Select_Infected_Point(M,Sta,De); %Number： Disease source node %State

： Node state matrix after determining the source node State=zeros(TimeStep,M); Number_State=zeros(4,TimeStep);

% Statistics of the number of user states for t=1:TimeStep if t==1 State(t,:)=Sta; else % Simulate the state of each user node for

j=1:M % Determine the state of the user node , Then according to its state to determine its transformation if State(t-1,j)==0 % At this point in the susceptible state 0, It may be transferred to the incubation period

Num=Select_Number_Near(j,Link); % Find the node j Neighbor nodes of P=zeros(1,length(Num));

% The probability of a neighbor node infecting the node for k=1:length(Num) if State(t-1,Num(k))==1 % The node is in the incubation period E（1）

P(k)=I_E/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./...

(factorial([1:De(Num(k))]-1))); else if State(t-1,Num(k))==2 % The node is in the infected stage I（2）

P(k)=I_I/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./...

(factorial([1:De(Num(k))]-1))); else continue; end end end P_0_1=max(P);

% Probability of node infected with virus if rand<=P_0_1 % At this time, the node enters the incubation period State(t,j)=1; else State(t,j)=State(t-1,j);

end else if State(t-1,j)==1 % At this point in the latent state E, May be susceptible to S, Get sick I And immunity R transfer if

rand<=1/(1+exp(-De(j))) % Towards the state of infection I transfer State(t,j)=2; TimeLong_F(j)=TimeLong_F(j)+1;

% user j Duration of illness else if rand<=1/(1+exp(-De(j))) % To the susceptible state S transfer State(t,j)=0; else

if rand<=1/(1+exp(-De(j))) % Towards immune state R transfer State(t,j)=3;

TimeLong_E(j)=TimeLong_E(j)+1; % Immune time increased 1 else State(t,j)=State(t-1,j);

% The state remains unchanged , It's still the incubation period E（1） end end end else if State(t-1,j)==2 % At this time, he was in a state of being infected with the disease I, May be susceptible to S, immune R transfer

if TimeLong_F(j)<=F_t % This means that the user will not deal with the virus at this time State(t,j)=State(t-1,j); % At this time, the user remains in the original state I

TimeLong_F(j)=TimeLong_F(j)+2; else % At this time, the user will carry out antivirus and upgrade the virus library , Enter immune state R State(t,j)=3;

TimeLong_F(j)=0; % It's in the stage of infection （ Toxic state ） Length of time TimeLong_E(j)=1; % The length of time into the immune phase end else

% At this time, the user is in the immune period if TimeLong_E<=G_t(i) % The virus did not mutate at this time , Maintain the original state R（ Immune status ） State(t,j)=State(t-1,j);

TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased else if rand<=1/G_t(i)

% Virus mutation , State transition to susceptible state S State(t,j)=0; TimeLong_E(j)=0; else % At this time, the user status remains unchanged

State(t,j)=State(t-1,j); TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased end end end

end end end end % Count the number of nodes in each state Number_State(1,t)=sum(State(t,:)==0);% In a susceptible state S Total number of nodes

Number_State(2,t)=sum(State(t,:)==1);% In a susceptible state E Total number of nodes

Number_State(3,t)=sum(State(t,:)==2);% In a susceptible state I Total number of nodes

Number_State(4,t)=sum(State(t,:)==3);% In a susceptible state R Total number of nodes figure(i+5) if rem(t,3)==0

plot([t-1 t],[Number_State(1,t-1) Number_State(1,t)],'md-'),hold on plot([t-1

t],[Number_State(2,t-1) Number_State(2,t)],'gh:'),hold on plot([t-1

t],[Number_State(3,t-1) Number_State(3,t)],'bs-.'),hold on plot([t-1

t],[Number_State(4,t-1) Number_State(4,t)],'k.-'),hold on else continue; end

legend(' Susceptible state Susceptible',' Latent state Exposed',' Infected state Infected',' Immune status Recovered')

xlabel(' Simulation time ') ylabel(' Number of users in each state ') endendP_m1=0.3; % User pre immunity coefficient %

State=zeros(TimeStep,M); % User status % G_t=5; %G_t： Immune duration of users , It reflects the mutation frequency of the virus G_t=5;

F_t=[1,5,9]; %F_t： The time from virus discovery to virus killing and upgrading for i=1:length(F_t) TimeLong_F=zeros(1,M);

% How long is the user in the period of infection TimeLong_E=zeros(1,M); % How long is the user in the incubation period Sta=zeros(1,M); % User status

% Perform pre immunization setting for j=1:M if rand(1)<=P_m1 Sta(j)=3; % Enter immune state TimeLong_E(j)=1;

% The time of in and out incubation period is 1 else continue; end end % state transition % Initially, a node is randomly selected as the source of disease （ At this time, the immune point cannot be selected ）

% problem ： The degree of nodes is different , There may be some reasons for the simulation results % To avoid this problem , We take the node with the highest degree as the source node , If immunized , Choose the next largest , Go down at once

[Number,Sta]=Select_Infected_Point(M,Sta,De); %Number： Disease source node %State

： Node state matrix after determining the source node State=zeros(TimeStep,M); Number_State=zeros(4,TimeStep);

% Statistics of the number of user states for t=1:TimeStep if t==1 State(t,:)=Sta; else % Simulate the state of each user node for

j=1:M % Determine the state of the user node , Then according to its state to determine its transformation if State(t-1,j)==0 % At this point in the susceptible state 0, It may be transferred to the incubation period

Num=Select_Number_Near(j,Link); % Find the node j Neighbor nodes of P=zeros(1,length(Num));

% The probability of a neighbor node infecting the node for k=1:length(Num) if State(t-1,Num(k))==1 % The node is in the incubation period E（1）

P(k)=I_E/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./...

(factorial([1:De(Num(k))]-1))); else if State(t-1,Num(k))==2 % The node is in the infected stage I（2）

P(k)=I_I/De(Num(k))*sum((lamda.^([1:De(Num(k))]).*exp(-lamda))./...

(factorial([1:De(Num(k))]-1))); else continue; end end end P_0_1=max(P);

% Probability of node infected with virus if rand<=P_0_1 % At this time, the node enters the incubation period State(t,j)=1; else State(t,j)=State(t-1,j);

end else if State(t-1,j)==1 % At this point in the latent state E, May be susceptible to S, Get sick I And immunity R transfer if

rand<=1/(1+exp(-De(j))) % Towards the state of infection I transfer State(t,j)=2; TimeLong_F(j)=TimeLong_F(j)+1;

% user j Duration of illness else if rand<=1/(1+exp(-De(j))) % To the susceptible state S transfer State(t,j)=0; else

if rand<=1/(1+exp(-De(j))) % Towards immune state R transfer State(t,j)=3;

TimeLong_E(j)=TimeLong_E(j)+1; % Immune time increased 1 else State(t,j)=State(t-1,j);

% The state remains unchanged , It's still the incubation period E（1） end end end else if State(t-1,j)==2 % At this time, he was in a state of being infected with the disease I, May be susceptible to S, immune R transfer

if TimeLong_F(j)<=F_t(i) % This means that the user will not deal with the virus at this time State(t,j)=State(t-1,j); % At this time, the user remains in the original state I

TimeLong_F(j)=TimeLong_F(j)+2; else % At this time, the user will carry out antivirus and upgrade the virus library , Enter immune state R State(t,j)=3;

TimeLong_F(j)=0; % It's in the stage of infection （ Toxic state ） Length of time TimeLong_E(j)=1; % The length of time into the immune phase end else

% At this time, the user is in the immune period if TimeLong_E<=G_t % The virus did not mutate at this time , Maintain the original state R（ Immune status ） State(t,j)=State(t-1,j);

TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased else if rand<=1/G_t % Virus mutation , State transition to susceptible state S

State(t,j)=0; TimeLong_E(j)=0; else % At this time, the user status remains unchanged State(t,j)=State(t-1,j);

TimeLong_E(j)=TimeLong_E(j)+1; % The time in immune phase increased end end end end end end end

% Count the number of nodes in each state Number_State(1,t)=sum(State(t,:)==0);% In a susceptible state S Total number of nodes

Number_State(2,t)=sum(State(t,:)==1);% In a susceptible state E Total number of nodes

Number_State(3,t)=sum(State(t,:)==2);% In a susceptible state I Total number of nodes

Number_State(4,t)=sum(State(t,:)==3);% In a susceptible state R Total number of nodes figure(i+10) if rem(t,3)==0

plot([t-1 t],[Number_State(1,t-1) Number_State(1,t)],'md-'),hold on plot([t-1

t],[Number_State(2,t-1) Number_State(2,t)],'gh:'),hold on plot([t-1

t],[Number_State(3,t-1) Number_State(3,t)],'bs-.'),hold on plot([t-1

t],[Number_State(4,t-1) Number_State(4,t)],'k.-'),hold on else continue; end

legend(' Susceptible state Susceptible',' Latent state Exposed',' Infected state Infected',' Immune status Recovered')

xlabel(' Simulation time ') ylabel(' Population by state ') endendtoc

qq 1575304183

Technology

- Python122 blogs
- Java114 blogs
- Flow Chart79 blogs
- Vue66 blogs
- MySQL35 blogs
- javascript33 blogs
- programing language33 blogs
- Linux32 blogs
- more...

Daily Recommendation

views 7

©2020 ioDraw All rights reserved

0.96OLED display -4 Line SPI explain C++11 of std::function,std::bind,std::placeholdersJavaScript study （ Function declaration and parameters ）QTabWidget Style sheet settings The project passed idea Package and publish to tomcat The server postman Interface test get timestamp and MD5 encryption react Background management configuration route and sidebar ：python Simple game code -10 Minutes Python Write a snake game , simple You know? Python What does the foundation include ? Learn something ?10 individual Python Introduction to crawler