Individuals
hier eine subsection: wie fragt man den Status der agents ab (hier alle funktionen, wie man states queried)
Overview Structs
Overview Functions
GEMS.age
GEMS.class_id
GEMS.comorbidities
GEMS.critical
GEMS.critical!
GEMS.dead
GEMS.death_tick
GEMS.death_tick!
GEMS.disease_state
GEMS.education
GEMS.end_quarantine!
GEMS.exposed
GEMS.exposed_tick
GEMS.exposed_tick!
GEMS.has_municipality
GEMS.home_quarantine!
GEMS.hospital_status
GEMS.hospitalize!
GEMS.hospitalized
GEMS.hospitalized_tick
GEMS.hospitalized_tick!
GEMS.household_id
GEMS.icu
GEMS.icu!
GEMS.icu_tick
GEMS.icu_tick!
GEMS.id
GEMS.infected
GEMS.infection_id
GEMS.infectious
GEMS.infectious_tick
GEMS.infectious_tick!
GEMS.infectiousness
GEMS.infectiousness!
GEMS.is_student
GEMS.is_working
GEMS.isdetected
GEMS.isquarantined
GEMS.isvaccinated
GEMS.kill!
GEMS.last_reported_at
GEMS.last_reported_at!
GEMS.last_test
GEMS.last_test!
GEMS.last_test_result
GEMS.last_test_result!
GEMS.mandate_compliance
GEMS.mandate_compliance!
GEMS.municipality
GEMS.municipality_id
GEMS.num_of_infected
GEMS.number_of_infections
GEMS.number_of_vaccinations
GEMS.occupation
GEMS.office
GEMS.office_id
GEMS.onset_of_severeness
GEMS.onset_of_severeness!
GEMS.onset_of_symptoms
GEMS.onset_of_symptoms!
GEMS.pathogen_id
GEMS.presymptomatic
GEMS.presymptomatic!
GEMS.progress_disease!
GEMS.quarantine_release_tick
GEMS.quarantine_release_tick!
GEMS.quarantine_status
GEMS.quarantine_tick
GEMS.quarantine_tick!
GEMS.recover!
GEMS.removed_tick
GEMS.removed_tick!
GEMS.reset!
GEMS.setting_id
GEMS.setting_id!
GEMS.settings
GEMS.severe
GEMS.severe!
GEMS.sex
GEMS.social_factor
GEMS.social_factor!
GEMS.symptom_category
GEMS.symptom_category!
GEMS.symptomatic
GEMS.symptomatic!
GEMS.vaccination_tick
GEMS.vaccine_id
GEMS.ventilate!
GEMS.ventilated
GEMS.ventilation_tick
GEMS.ventilation_tick!
Structs
GEMS.Agent
— TypeSupertype for simulation agents
GEMS.Individual
— TypeIndividual <: Agent
A type to represent individuals, that act as agents inside the simulation.
Fields
General
id::Int32
: Unique identifier of the individualsex::Int8
: Sex (Female (1), Male(2), Diverse (3))age::Int8
: Ageeducation::Int8
: Education class (i.e. highest degree)occupation::Int8
: Occupation class (i.e. manual labour, office job, etc...)
Behaviour
social_factor::Float32
: Parameter for the risk-willingness. Can be anywhere between -1 and 1 with neutral state is 0.mandate_compliance::Float32
. Paremeter which influences the probability of complying to mandates. Can be anywhere between -1 and 1 with neutral state is 0.
Health Status
comorbidities::Vector{Bool}
: Indicating prevalence of certain health conditions. True, if the individual is preconditioned with the comorbidity associated to the array index.dead::Bool
: Flag indicating individual's deceasehospital_status::Int8
: State in the hopsital (0 = not hospitalized, 1 = hospitalized, 2 = ventilation, 3 = ICU)
Associated Settings
household::Int32
: Reference to household idoffice::Int32
: Reference to office idschoolclass::Int32
: Reference to schoolclass idmunicipality::Int32
: Reference to municipality id
Pathogen
pathogen_id::Int8
: pathogen identifierinfection_id::Int32
: Current infection iddisease_state::Int8
: Current State in natural disease history (0 = not infected, 1 = Presymptomatic, 2 = Symptomatic, 3 = Severe, 4 = Critical)symptom_category::Int8
: Endstate in current disease progression. The numbers should align withdisease_state
, but can be interpreted as the symptom category of this case (0 = None, 1 = Asymptomatic, 2 = Mild, 3 = Severe, 4 = Critical)infectiousness::Int8
: an individuals infectiousness (1-127), i.e. for superspreadersnumber_of_infections::Int8
: infection count
Natural Disease History
exposed_tick::Int16
: Tick of most recent infectioninfectious_tick::Int16
: Tick of most recent change into "infectious" state (considered asymptomatic)onset_of_symptoms::Int16
: Tick of the onset of symptomsonset_of_severeness::Int16
: Tick of onset of severe symptomshospitalized_tick::Int16
: Tick of hospitalizationventilation_tick::Int16
: Tick of ventilationicu_tick::Int16
: Tick of ICU (Intensive Care Unit)death_tick::Int16
: Tick of Deathremoved_tick::Int16
: Tick of most recent removal event
Testing
last_test::Int16
: Tick of last test for pathogenlast_test_result::Bool
: Flag for positivity of last testlast_reported_at::Int16
: Tick at which this individual was last reported
Vaccination
vaccine_id::Int8
: Vaccine identifiernumber_of_vaccinations::Int8
: Individual's vaccination countervaccination_tick::Int16
: Tick of most recent vaccination
Interventions
quarantine_status::Int8
: Status to indicate quarantine (none, household_quarantined, hospitalized, etc...)quarantine_tick::Int16
: Start tick of quarantinequarantine_release_tick::Int16
: End tick of quarantine
Constructors
GEMS.Individual
— MethodIndividual(properties::Dict)
Create an individual with the provided properties. Properties must have at least keys id
, sex
, age
.
GEMS.Individual
— MethodIndividual(properties::DataFrameRow)
Create an individual with the provided properties. Properties must have at least keys id
, sex
, age
.
Functions
GEMS.age
— Functionage(individual::Individual)
Return an individual's age.
GEMS.class_id
— Functionclass_id(individual::Individual)
Returns an individual's associated class's ID.
GEMS.comorbidities
— Functioncomorbidities(individual::Individual)
Returns an individual's comorbidities.
GEMS.critical!
— Methodcritical!(individual::Individual)
Marks the individual's condition as critical.
GEMS.critical
— Methodcritical(individual::Individual)
Returns wether the individual's condition is critical.
GEMS.dead
— Methoddead(individual::Individual)
Returns an individual's death flag.
GEMS.death_tick!
— Methoddeath_tick!(individual::Individual, tick::Int16)
Sets an individual's death tick.
GEMS.death_tick
— Methoddeath_tick(individual::Individual)
Returns an individual's death tick.
GEMS.disease_state
— Methoddisease_state(individual::Individual)
Returns an individual's disease status (currently infected).
GEMS.education
— Methodeducation(individual::Individual)
Return an individual's education class
GEMS.end_quarantine!
— Methodend_quarantine!(individual::Individual)
Ends an individuals quarantine.
GEMS.exposed
— Methodexposed(individual::Individual)
Returns wether the individual is exposed (infected, but not yet infectious).
GEMS.exposed_tick!
— Methodexposed_tick!(individual::Individual, tick::Int16)
Sets an individual's exposed tick.
GEMS.exposed_tick
— Methodexposed_tick(individual::Individual)
Returns an individual's exposed tick (currently infected).
GEMS.has_municipality
— Methodhas_municipality(individual::Individual)
Returns true
if individual is assigned to an instance of type Municipality
.
GEMS.home_quarantine!
— Methodhome_quarantine!(individual::Individual)
Quarantines an individual in their household.
GEMS.hospital_status
— Methodhospital_status(individual::Individual)
Returns the hospital_status of the individual.
GEMS.hospitalize!
— Methodhospitalize!(individual::Individual)
Hospitalizes the individual.
GEMS.hospitalized
— Methodhospitalized(individual::Individual)
Returns wether the individual is hospitalized.
GEMS.hospitalized_tick!
— Methodhospitalized_tick!(individual::Individual, tick::Int16)
Sets an individual's tick for when it gets hospitalized.
GEMS.hospitalized_tick
— Methodhospitalized_tick(individual::Individual)
Returns an individual's tick for when it gets hospitalized.
GEMS.household_id
— Methodhousehold_id(individual::Individual)
Returns an individual's associated household's ID.
GEMS.icu!
— Methodicu!(individual::Individual)
Sets the individual to be in ICU.
GEMS.icu
— Methodicu(individual::Individual)
Returns wether the individual is in ICU.
GEMS.icu_tick!
— Methodicu_tick!(individual::Individual, tick::Int16)
Sets an individual's tick for when it will be delivered into icu.
GEMS.icu_tick
— Methodicu_tick(individual::Individual)
Returns an individual's tick when it will be delivered into icu.
GEMS.id
— Methodid(individual::Individual)
Return the unique identifier of the individual.
GEMS.infected
— Methodinfected(individual::Individual)
Returns whether an individual is currently infected.
GEMS.infection_id
— Methodinfection_id(individual::Individual)
Returns an individual's infection_id (currently infected).
GEMS.infectious
— Methodinfectious(individual::Individual)
Returns whether an individual is currently infectious.
GEMS.infectious_tick!
— Methodinfectious_tick!(individual::Individual, tick::Int16)
Sets an individual's infectious tick.
GEMS.infectious_tick
— Methodinfectious_tick(individual::Individual)
Returns an individual's infectious tick (currently infected).
GEMS.infectiousness!
— Methodinfectiousness!(individual::Individual, infectiousness)
Assigns a specified infectiousness (0-127) to an individual.
GEMS.infectiousness
— Methodinfectiousness(individual::Individual)
Returns an individual's infectiousness (currently infected).
GEMS.is_student
— Methodis_student(individual::Individual)
Returns true
if individual is assigned to an instance of type SchoolClass
.
GEMS.is_working
— Methodis_working(individual::Individual)
Returns true
if individual is assigned to an instance of type Office
.
GEMS.isdetected
— Methodisdetected(individual::Individual)
Returns true if an individual was currently infected and already reported.
GEMS.isquarantined
— Methodisquarantined(individual::Individual)
Returns wether the individual is in quarantine or not.
GEMS.isvaccinated
— Methodisvaccinated(individual::Individual)
Returns wether the individual is vaccinated.
GEMS.kill!
— Methodkill!(individual::Individual)
Kills the individual.
GEMS.last_reported_at!
— Methodlast_reported_at!(individual::Individual, report_tick::Int16)
Sets last tick this individual was last reported.
GEMS.last_reported_at
— Methodlast_reported_at(individual::Individual)
Returns the last tick this individual was a reported case.
GEMS.last_test!
— Methodlast_test!(individual::Individual, tick::Int16)
Sets last test date (tick).
GEMS.last_test
— Methodlast_test(individual::Individual)
Returns last test date (tick).
GEMS.last_test_result!
— Methodlast_test_result!(individual::Individual, test_result::Bool)
Sets last test result.
GEMS.last_test_result
— Methodlast_test_result(individual::Individual)
Returns whether last test was positive. Defaults to false.
GEMS.mandate_compliance!
— Methodmandate_compliance!(individual::Individual, val::Float32)
Overwrites the individual's mandate_compliance
attribute.
GEMS.mandate_compliance
— Methodmandate_compliance(individual::Individual)
Return an individual's mandate_compliance
value.
GEMS.municipality
— Methodmunicipality(i::Individual, sim::Simulation)::Municipality
Returns the Municipality
instance referenced in an individual.
GEMS.municipality_id
— Methodmunicipality_id(individual::Individual)
Returns an individual's associated municipalities ID.
GEMS.num_of_infected
— Methodnum_of_infected(individuals::Vector{Individual})
Takes a vector of individuals and returns the number of infected individuals.
GEMS.number_of_infections
— Methodnumber_of_infections(individual::Individual)
Returns an individual's number of infections (currently infected).
GEMS.number_of_vaccinations
— Methodnumber_of_vaccinations(individual::Individual)
Returns the number of vaccinations.
GEMS.occupation
— Methodoccupation(individual::Individual)
Returns an individual's occupation class.
GEMS.office
— Methodoffice(i::Individual, sim::Simulation)::Office
Returns the Office
instance referenced in an individual.
GEMS.office_id
— Methodoffice_id(individual::Individual)
Returns an individual's associated office's ID.
GEMS.onset_of_severeness!
— Methodonset_of_severeness!(individual::Individual, tick::Int16)
Sets an individual's tick for the onset of severe symptoms, if it's a severe case.
GEMS.onset_of_severeness
— Methodonset_of_severeness(individual::Individual)
Returns an individual's tick for the onset of severe symptoms, if it's a severe case.
GEMS.onset_of_symptoms!
— Methodonset_of_symptoms!(individual::Individual, tick::Int16)
Sets an individual's tick for the onset of symptoms, if symptomatic.
GEMS.onset_of_symptoms
— Methodonset_of_symptoms(individual::Individual)
Returns an individual's tick for the onset of symptoms, if symptomatic.
GEMS.pathogen_id
— Methodpathogen_id(individual::Individual)
Returns an individual's pathogen (currently infected).
GEMS.presymptomatic!
— Methodpresymptomatic!(individual::Individual)
Marks the individual as asymptomatic, but infectious.
GEMS.presymptomatic
— Methodpresymptomatic(individual::Individual)
Returns if individual is asymptomatic.
GEMS.progress_disease!
— Methodprogress_disease!(indiv::Individual, tick::Int16, lookup_dict::Dict = SYMPTOM_CATEGORY_DICT)
Progresses the disease of the (infected) individual. The dictionary lookup_dict
can be provided, if custom disease compartements were implemented. The key-value-pairs should align with the meaning of the parameter disease_state
or symptom_category
. This means, that if disease_state==1
means "Asymptomatic", that status[1]=="Asymptomatic"
.
This function doesn't kill agents as this is handled a level higher for the simulation to log deaths.
GEMS.quarantine_release_tick!
— Methodquarantine_release_tick!(individual::Individual, tick::Int16)
Sets an individual's quarantine release tick.
GEMS.quarantine_release_tick
— Methodquarantine_release_tick(individual::Individual)
Returns an individual's quarantine release tick.
GEMS.quarantine_status
— Methodquarantine_status(individual::Individual)
Returns an individuals quarantine status.
GEMS.quarantine_tick!
— Methodquarantine_tick!(individual::Individual, tick::Int16)
Sets an individual's quarantine tick.
GEMS.quarantine_tick
— Methodquarantine_tick(individual::Individual)
Returns an individual's quarantine tick.
GEMS.recover!
— Methodrecover!(individual::Individual)
Recovers the individual from its infection.
GEMS.removed_tick!
— Methodremoved_tick!(individual::Individual, tick::Int16)
Sets an individual's removed tick (currently infected).
GEMS.removed_tick
— Methodremoved_tick(individual::Individual)
Returns an individual's removed tick (currently infected).
GEMS.reset!
— Methodreset!(individual::Individual)
Resets all non-static values like the disease progression timing. The individual will get back into a state where it was never infected, vaccinated, tested, etc.
GEMS.setting_id!
— Methodsetting_id!(individual::Individual, type::DataType, id::Int32)
Changes the assigned setting id of the individual for the given type of setting to id
.
GEMS.setting_id
— Methodsetting_id(individual::Individual, type::DataType)
Returns the id of the setting of type
associated with the individual. If the settingtype is unknown or the agent isn't part of a setting of that type, -1 will be returned.
GEMS.settings
— Methodsettings(individual::Individual, sim::Simulation)
Return a dictionary with the assigned setting types as keys and the assigned IDs as values.
GEMS.severe!
— Methodsevere!(individual::Individual)
Marks the individual's disease to be severe.
GEMS.severe
— Methodsevere(individual::Individual)
Returns wether the individual's disease is severe.
GEMS.sex
— Methodsex(individual::Individual)
Return an individual's sex.
GEMS.social_factor!
— Methodsocial_factor!(individual::Individual, val::Float32)
Overwrites the individual's social_factor
attribute.
GEMS.social_factor
— Methodsocial_factor(individual::Individual)
Returns an individual's social_factor
value.
GEMS.symptom_category!
— Methodsymptom_category!(individual::Individual, category::Int8)
Sets an infected individuals symptom_category.
GEMS.symptom_category
— Methodsymptom_category(individual::Individual)
Returns an infected individual's symptom category.
GEMS.symptomatic!
— Methodsymptomatic!(individual::Individual)
Marks the individual as symptomatic.
GEMS.symptomatic
— Methodsymptomatic(individual::Individual)
Returns wether the individual is symptomatic.
GEMS.vaccination_tick
— Methodvaccination_tick(individual::Individual)
Returns the time of last vaccination.
GEMS.vaccine_id
— Methodvaccine_id(individual::Individual)
Returns the id of the vaccine the individual is vaccinated with.
GEMS.ventilate!
— Methodventilate!(individual::Individual)
Sets the individual to require ventilation.
GEMS.ventilated
— Methodventilated(individual::Individual)
Returns wether the individual needs ventilation.
GEMS.ventilation_tick!
— Methodventilation_tick!(individual::Individual, tick::Int16)
Sets an individual's tick for when it gets ventilated.
GEMS.ventilation_tick
— Methodventilation_tick(individual::Individual)
Returns an individual's tick when it gets ventilated.