Skip to content

Commit

Permalink
NEW GEN IMMUNITY CHANGES
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Chaillet committed Apr 12, 2022
1 parent cfa4a35 commit 0c6b3c3
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions batchRuns/ODESGeneralizedImmunity.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ SEAI_p<-function(t,y,p){
NU2ND = (Bu*(1-rNU/capacity)*infN*d1)

#naive U class getting enough # of infections to move to SU
NU2SU = (Bu*(1-rNU/capacity)*rho1*(infN*muWU+(1-infN)))
NU2SU = (Bu*(1-rNU/capacity)*rho1*1/((1/(infN*muWU))+(1/(1-infN))))
#naive U class die from infections
NUInfDie = (Bu*(1-rNU/capacity)*infN*muWU*muNU)

#naive D class getting enough # of infections to move to SD
ND2SD = (Bd*(1-rND/capacity)*rho1*(infN*muRD+(1-infN)))
ND2SD = (Bd*(1-rND/capacity)*rho1*1/((1/(infN*muRU))+(1/(1-infN))))

#naive D class die from infections
NDInfDie = (Bd*(1-rND/capacity)*infN*muRD*muND)
Expand All @@ -122,10 +122,10 @@ SEAI_p<-function(t,y,p){
SU2SD = (Bu*(1-rSU/capacity)*infS*d2)

#SU class getting enough # of infections to move to AU
SU2AU = (Bu*(1-rSU/capacity)*rho2*(infS*muWU+(1-infS)))
SU2AU = (Bu*(1-rSU/capacity)*rho2*1/((1/(infS*muWU))+(1/(1-infS))))

#SD class getting enough # of infections to move to AD
SD2AD = (Bd*(1-rSD/capacity)*rho2*(infS*muRD+(1-infS)))
SD2AD = (Bd*(1-rSD/capacity)*rho2*1/((1/(infS*muRD))+(1/(1-infS))))

#AU class getting infected, show symptoms, and treated
AU2AD = (Bu*(1-rAU/capacity)*infA*omega*d3)
Expand Down Expand Up @@ -379,17 +379,16 @@ SEAI_resOnly<-function(t,y,p){
infS = 1 - (red) #red is the reduction in infectivity due to generalized immunity and is between 0 and 0.5
#infA = (1-1/nstrains)^fracA
infA = 1 - (2*red)

#naive class getting infected, and treated
NU2ND = (Bu*(1-rNU/capacity)*infN*d1)

#naive U class getting enough # of infections to move to SU
NU2SU = (Bu*(1-rNU/capacity)*rho1*(infN*muWU+(1-infN)))
NU2SU = (Bu*(1-rNU/capacity)*rho1*1/((1/(infN*muWU))+(1/(1-infN))))
#naive U class die from infections
NUInfDie = (Bu*(1-rNU/capacity)*infN*muWU*muNU)

#naive D class getting enough # of infections to move to SD
ND2SD = (Bd*(1-rND/capacity)*rho1*(infN*muRD+(1-infN)))
ND2SD = (Bd*(1-rND/capacity)*rho1*1/((1/(infN*muRU))+(1/(1-infN))))

#naive D class die from infections
NDInfDie = (Bd*(1-rND/capacity)*infN*muRD*muND)
Expand All @@ -398,14 +397,13 @@ SEAI_resOnly<-function(t,y,p){
SU2SD = (Bu*(1-rSU/capacity)*infS*d2)

#SU class getting enough # of infections to move to AU
SU2AU = (Bu*(1-rSU/capacity)*rho2*(infS*muWU+(1-infS)))
SU2AU = (Bu*(1-rSU/capacity)*rho2*1/((1/(infS*muWU))+(1/(1-infS))))

#SD class getting enough # of infections to move to AD
SD2AD = (Bd*(1-rSD/capacity)*rho2*(infS*muRD+(1-infS)))
SD2AD = (Bd*(1-rSD/capacity)*rho2*1/((1/(infS*muRD))+(1/(1-infS))))

#AU class getting infected, show symptoms, and treated
AU2AD = (Bu*(1-rAU/capacity)*infA*omega*d3)

# Parasite pop ODE------
## sensitive-------
dPW_NU.dt = 0
Expand Down Expand Up @@ -621,12 +619,12 @@ SEAI_wildOnly<-function(t,y,p){
NU2ND = (Bu*(1-rNU/capacity)*infN*d1)

#naive U class getting enough # of infections to move to SU
NU2SU = (Bu*(1-rNU/capacity)*rho1*(infN*muWU+(1-infN)))
NU2SU = (Bu*(1-rNU/capacity)*rho1*1/((1/(infN*muWU))+(1/(1-infN))))
#naive U class die from infections
NUInfDie = (Bu*(1-rNU/capacity)*infN*muWU*muNU)

#naive D class getting enough # of infections to move to SD
ND2SD = (Bd*(1-rND/capacity)*rho1*(infN*muRD+(1-infN)))
ND2SD = (Bd*(1-rND/capacity)*rho1*1/((1/(infN*muRU))+(1/(1-infN))))

#naive D class die from infections
NDInfDie = (Bd*(1-rND/capacity)*infN*muRD*muND)
Expand All @@ -635,10 +633,10 @@ SEAI_wildOnly<-function(t,y,p){
SU2SD = (Bu*(1-rSU/capacity)*infS*d2)

#SU class getting enough # of infections to move to AU
SU2AU = (Bu*(1-rSU/capacity)*rho2*(infS*muWU+(1-infS)))
SU2AU = (Bu*(1-rSU/capacity)*rho2*1/((1/(infS*muWU))+(1/(1-infS))))

#SD class getting enough # of infections to move to AD
SD2AD = (Bd*(1-rSD/capacity)*rho2*(infS*muRD+(1-infS)))
SD2AD = (Bd*(1-rSD/capacity)*rho2*1/((1/(infS*muRD))+(1/(1-infS))))

#AU class getting infected, show symptoms, and treated
AU2AD = (Bu*(1-rAU/capacity)*infA*omega*d3)
Expand Down

0 comments on commit 0c6b3c3

Please sign in to comment.