Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@cache('run')
def initial_time():
"""
INITIAL TIME
0
Day
(None, None)
constant
The initial time for the simulation.
"""
return 0
@cache('run')
def total_population():
"""
Total Population
1000
Persons
(None, None)
constant
This is just a simplification to make it easer to track how many folks
there are without having to sum up all the stocks.
"""
return 1000
@cache('step')
def succumbing():
"""
Succumbing
Susceptible*Infectious/Total Population * Contact Infectivity
Persons/Day
(None, None)
component
"""
return susceptible() * infectious() / total_population() * contact_infectivity()
@cache('run')
def time_step():
"""
TIME STEP
0.03125
Day
(0.0, None)
constant
The time step for the simulation.
"""
return 0.03125
@cache('step')
def recovered():
"""
Recovered
INTEG ( Recovering, 0)
Persons
(None, None)
component
These people have recovered from the disease. Yay! Nobody dies in this
model.
"""
return integ_recovered()
@cache('run')
def duration():
"""
Duration
5
Days
(None, None)
constant
How long are you infectious for?
"""
return 5
@cache('step')
def susceptible():
"""
Susceptible
INTEG ( -Succumbing, Total Population)
Persons
(None, None)
component
The population that has not yet been infected.
"""
return integ_susceptible()
@cache('run')
def contact_infectivity():
"""
Contact Infectivity
0.3
Persons/Persons/Day
(None, None)
constant
A joint parameter listing both how many people you contact, and how likely
you are to give them the disease.
"""
return 0.3
@cache('step')
def recovering():
"""
Recovering
Infectious/Duration
Persons/Day
(None, None)
component
"""
return infectious() / duration()
@cache('step')
def infectious():
"""
Infectious
INTEG ( Succumbing-Recovering, 5)
Persons
(None, None)
component
The population with the disease, manifesting symptoms, and able to
transmit it to other people.
"""
return integ_infectious()