You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deriv(S) <- Births - b*S - beta * S * I / N
deriv(I) <- beta * S * I / N - (b+sigma) * I
deriv(R) <- sigma * I - b*R
# initial conditions of the variables
initial(S) <- N - I0
initial(I) <- I0
initial(R) <- 0
# parameter values
N <- 1e6 # total population size
I0 <- user(1) # num infectious cases at start of epidemic
beta <- R0*(sigma+b) # transmission parameter
sigma <- user(2) # recovery rate (1/mean duration infectiousness)
R0 <- user(5) # av num new cases caused by single infectious case
b <- user(0.02) # death rate (average life expectancy of 1 year or 52 weeks) = 1/52
Births <- b*N # number of births (for a constant population size)
output(R0) <- S + I + R
this one validates but won't compile (this is not great in the web version, as the user has no indication of what is wrong). There's a slightly different variant if the target of output is a constant rather than user parameter:
deriv(S) <- Births - b*S - beta * S * I / N
deriv(I) <- beta * S * I / N - (b+sigma) * I
deriv(R) <- sigma * I - b*R
# initial conditions of the variables
initial(S) <- N - I0
initial(I) <- I0
initial(R) <- 0
# parameter values
N <- 1e6 # total population size
I0 <- user(1) # num infectious cases at start of epidemic
beta <- R0*(sigma+b) # transmission parameter
sigma <- user(2) # recovery rate (1/mean duration infectiousness)
R0 <- user(5) # av num new cases caused by single infectious case
b <- user(0.02) # death rate (average life expectancy of 1 year or 52 weeks) = 1/52
Births <- b*N # number of births (for a constant population size)
output(N) <- S + I + R
In this case N is full of junk and eventually crashes R.
Not sure what effect these might have in non-C targets but it can't be good either way really.
Also logged as mrc-3628, same issue
The text was updated successfully, but these errors were encountered:
Two models that break:
this one validates but won't compile (this is not great in the web version, as the user has no indication of what is wrong). There's a slightly different variant if the target of output is a constant rather than user parameter:
In this case
N
is full of junk and eventually crashes R.Not sure what effect these might have in non-C targets but it can't be good either way really.
Also logged as mrc-3628, same issue
The text was updated successfully, but these errors were encountered: