External Exposure
Bases: BaseFeature
Source code in titan/features/external_exposure.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
init_agent(pop, time)
Initialize the agent for this feature during population initialization (Population.create_agent
). Called on only features that are enabled per the params.
If an agent has defined sex_type, with a random probability from params, assign them to be an agent with external exposure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
Population
|
the population this agent is a part of |
required |
time |
int
|
the current time step |
required |
Source code in titan/features/external_exposure.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
update_agent(model)
Update the agent for this feature for a time step. Called once per time step in TITAN.update_all_agents
. Agent level updates are done after population level updates. Called on only features that are enabled per the params.
If the agent has external exposure, with a probability from params, convert the agent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
TITAN
|
the instance of TITAN currently being run |
required |
Source code in titan/features/external_exposure.py
30 31 32 33 34 35 36 37 38 39 40 41 42 |
|