Individuals

hier eine subsection: wie fragt man den Status der agents ab (hier alle funktionen, wie man states queried)

Overview Structs

Overview Functions

Structs

GEMS.AgentType

Supertype for simulation agents

GEMS.IndividualType
Individual <: Agent

A type to represent individuals, that act as agents inside the simulation.

Fields

  • General

    • id::Int32: Unique identifier of the individual
    • sex::Int8: Sex (Female (1), Male(2), Diverse (3))
    • age::Int8: Age
    • education::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 decease
    • hospital_status::Int8: State in the hopsital (0 = not hospitalized, 1 = hospitalized, 2 = ventilation, 3 = ICU)
  • Associated Settings

    • household::Int32: Reference to household id
    • office::Int32: Reference to office id
    • schoolclass::Int32: Reference to schoolclass id
    • municipality::Int32: Reference to municipality id
  • Pathogen

    • pathogen_id::Int8: pathogen identifier
    • infection_id::Int32: Current infection id
    • disease_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 with disease_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 superspreaders
    • number_of_infections::Int8: infection count
  • Natural Disease History

    • exposed_tick::Int16: Tick of most recent infection
    • infectious_tick::Int16: Tick of most recent change into "infectious" state (considered asymptomatic)
    • onset_of_symptoms::Int16: Tick of the onset of symptoms
    • onset_of_severeness::Int16: Tick of onset of severe symptoms
    • hospitalized_tick::Int16: Tick of hospitalization
    • ventilation_tick::Int16: Tick of ventilation
    • icu_tick::Int16: Tick of ICU (Intensive Care Unit)
    • death_tick::Int16: Tick of Death
    • removed_tick::Int16: Tick of most recent removal event
  • Testing

    • last_test::Int16: Tick of last test for pathogen
    • last_test_result::Bool: Flag for positivity of last test
    • last_reported_at::Int16: Tick at which this individual was last reported
  • Vaccination

    • vaccine_id::Int8: Vaccine identifier
    • number_of_vaccinations::Int8: Individual's vaccination counter
    • vaccination_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 quarantine
    • quarantine_release_tick::Int16: End tick of quarantine

Constructors

GEMS.IndividualMethod
Individual(properties::Dict)

Create an individual with the provided properties. Properties must have at least keys id, sex, age.

GEMS.IndividualMethod
Individual(properties::DataFrameRow)

Create an individual with the provided properties. Properties must have at least keys id, sex, age.

Functions

GEMS.ageFunction
age(individual::Individual)

Return an individual's age.

GEMS.class_idFunction
class_id(individual::Individual)

Returns an individual's associated class's ID.

GEMS.comorbiditiesFunction
comorbidities(individual::Individual)

Returns an individual's comorbidities.

GEMS.critical!Method
critical!(individual::Individual)

Marks the individual's condition as critical.

GEMS.criticalMethod
critical(individual::Individual)

Returns wether the individual's condition is critical.

GEMS.deadMethod
dead(individual::Individual)

Returns an individual's death flag.

GEMS.death_tick!Method
death_tick!(individual::Individual, tick::Int16)

Sets an individual's death tick.

GEMS.death_tickMethod
death_tick(individual::Individual)

Returns an individual's death tick.

GEMS.disease_stateMethod
disease_state(individual::Individual)

Returns an individual's disease status (currently infected).

GEMS.educationMethod
education(individual::Individual)

Return an individual's education class

GEMS.end_quarantine!Method
end_quarantine!(individual::Individual)

Ends an individuals quarantine.

GEMS.exposedMethod
exposed(individual::Individual)

Returns wether the individual is exposed (infected, but not yet infectious).

GEMS.exposed_tick!Method
exposed_tick!(individual::Individual, tick::Int16)

Sets an individual's exposed tick.

GEMS.exposed_tickMethod
exposed_tick(individual::Individual)

Returns an individual's exposed tick (currently infected).

GEMS.has_municipalityMethod
has_municipality(individual::Individual)

Returns true if individual is assigned to an instance of type Municipality.

GEMS.home_quarantine!Method
home_quarantine!(individual::Individual)

Quarantines an individual in their household.

GEMS.hospital_statusMethod
hospital_status(individual::Individual)

Returns the hospital_status of the individual.

GEMS.hospitalize!Method
hospitalize!(individual::Individual)

Hospitalizes the individual.

GEMS.hospitalizedMethod
hospitalized(individual::Individual)

Returns wether the individual is hospitalized.

GEMS.hospitalized_tick!Method
hospitalized_tick!(individual::Individual, tick::Int16)

Sets an individual's tick for when it gets hospitalized.

GEMS.hospitalized_tickMethod
hospitalized_tick(individual::Individual)

Returns an individual's tick for when it gets hospitalized.

GEMS.household_idMethod
household_id(individual::Individual)

Returns an individual's associated household's ID.

GEMS.icu!Method
icu!(individual::Individual)

Sets the individual to be in ICU.

GEMS.icuMethod
icu(individual::Individual)

Returns wether the individual is in ICU.

GEMS.icu_tick!Method
icu_tick!(individual::Individual, tick::Int16)

Sets an individual's tick for when it will be delivered into icu.

GEMS.icu_tickMethod
icu_tick(individual::Individual)

Returns an individual's tick when it will be delivered into icu.

GEMS.idMethod
id(individual::Individual)

Return the unique identifier of the individual.

GEMS.infectedMethod
infected(individual::Individual)

Returns whether an individual is currently infected.

GEMS.infection_idMethod
infection_id(individual::Individual)

Returns an individual's infection_id (currently infected).

GEMS.infectiousMethod
infectious(individual::Individual)

Returns whether an individual is currently infectious.

GEMS.infectious_tick!Method
infectious_tick!(individual::Individual, tick::Int16)

Sets an individual's infectious tick.

GEMS.infectious_tickMethod
infectious_tick(individual::Individual)

Returns an individual's infectious tick (currently infected).

GEMS.infectiousness!Method
infectiousness!(individual::Individual, infectiousness)

Assigns a specified infectiousness (0-127) to an individual.

GEMS.infectiousnessMethod
infectiousness(individual::Individual)

Returns an individual's infectiousness (currently infected).

GEMS.is_studentMethod
is_student(individual::Individual)

Returns true if individual is assigned to an instance of type SchoolClass.

GEMS.is_workingMethod
is_working(individual::Individual)

Returns true if individual is assigned to an instance of type Office.

GEMS.isdetectedMethod
isdetected(individual::Individual)

Returns true if an individual was currently infected and already reported.

GEMS.isquarantinedMethod
isquarantined(individual::Individual)

Returns wether the individual is in quarantine or not.

GEMS.isvaccinatedMethod
isvaccinated(individual::Individual)

Returns wether the individual is vaccinated.

GEMS.kill!Method
kill!(individual::Individual)

Kills the individual.

GEMS.last_reported_at!Method
last_reported_at!(individual::Individual, report_tick::Int16)

Sets last tick this individual was last reported.

GEMS.last_reported_atMethod
last_reported_at(individual::Individual)

Returns the last tick this individual was a reported case.

GEMS.last_test!Method
last_test!(individual::Individual, tick::Int16)

Sets last test date (tick).

GEMS.last_testMethod
last_test(individual::Individual)

Returns last test date (tick).

GEMS.last_test_result!Method
last_test_result!(individual::Individual, test_result::Bool)

Sets last test result.

GEMS.last_test_resultMethod
last_test_result(individual::Individual)

Returns whether last test was positive. Defaults to false.

GEMS.mandate_compliance!Method
mandate_compliance!(individual::Individual, val::Float32)

Overwrites the individual's mandate_compliance attribute.

GEMS.mandate_complianceMethod
mandate_compliance(individual::Individual)

Return an individual's mandate_compliance value.

GEMS.municipalityMethod
municipality(i::Individual, sim::Simulation)::Municipality

Returns the Municipality instance referenced in an individual.

GEMS.municipality_idMethod
municipality_id(individual::Individual)

Returns an individual's associated municipalities ID.

GEMS.num_of_infectedMethod
num_of_infected(individuals::Vector{Individual})

Takes a vector of individuals and returns the number of infected individuals.

GEMS.number_of_infectionsMethod
number_of_infections(individual::Individual)

Returns an individual's number of infections (currently infected).

GEMS.occupationMethod
occupation(individual::Individual)

Returns an individual's occupation class.

GEMS.officeMethod
office(i::Individual, sim::Simulation)::Office

Returns the Office instance referenced in an individual.

GEMS.office_idMethod
office_id(individual::Individual)

Returns an individual's associated office's ID.

GEMS.onset_of_severeness!Method
onset_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_severenessMethod
onset_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!Method
onset_of_symptoms!(individual::Individual, tick::Int16)

Sets an individual's tick for the onset of symptoms, if symptomatic.

GEMS.onset_of_symptomsMethod
onset_of_symptoms(individual::Individual)

Returns an individual's tick for the onset of symptoms, if symptomatic.

GEMS.pathogen_idMethod
pathogen_id(individual::Individual)

Returns an individual's pathogen (currently infected).

GEMS.presymptomatic!Method
presymptomatic!(individual::Individual)

Marks the individual as asymptomatic, but infectious.

GEMS.presymptomaticMethod
presymptomatic(individual::Individual)

Returns if individual is asymptomatic.

GEMS.progress_disease!Method
progress_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!Method
quarantine_release_tick!(individual::Individual, tick::Int16)

Sets an individual's quarantine release tick.

GEMS.quarantine_statusMethod
quarantine_status(individual::Individual)

Returns an individuals quarantine status.

GEMS.quarantine_tick!Method
quarantine_tick!(individual::Individual, tick::Int16)

Sets an individual's quarantine tick.

GEMS.quarantine_tickMethod
quarantine_tick(individual::Individual)

Returns an individual's quarantine tick.

GEMS.recover!Method
recover!(individual::Individual)

Recovers the individual from its infection.

GEMS.removed_tick!Method
removed_tick!(individual::Individual, tick::Int16)

Sets an individual's removed tick (currently infected).

GEMS.removed_tickMethod
removed_tick(individual::Individual)

Returns an individual's removed tick (currently infected).

GEMS.reset!Method
reset!(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!Method
setting_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_idMethod
setting_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.settingsMethod
settings(individual::Individual, sim::Simulation)

Return a dictionary with the assigned setting types as keys and the assigned IDs as values.

GEMS.severe!Method
severe!(individual::Individual)

Marks the individual's disease to be severe.

GEMS.severeMethod
severe(individual::Individual)

Returns wether the individual's disease is severe.

GEMS.sexMethod
sex(individual::Individual)

Return an individual's sex.

GEMS.social_factor!Method
social_factor!(individual::Individual, val::Float32)

Overwrites the individual's social_factor attribute.

GEMS.social_factorMethod
social_factor(individual::Individual)

Returns an individual's social_factor value.

GEMS.symptom_category!Method
symptom_category!(individual::Individual, category::Int8)

Sets an infected individuals symptom_category.

GEMS.symptom_categoryMethod
symptom_category(individual::Individual)

Returns an infected individual's symptom category.

GEMS.symptomatic!Method
symptomatic!(individual::Individual)

Marks the individual as symptomatic.

GEMS.symptomaticMethod
symptomatic(individual::Individual)

Returns wether the individual is symptomatic.

GEMS.vaccination_tickMethod
vaccination_tick(individual::Individual)

Returns the time of last vaccination.

GEMS.vaccine_idMethod
vaccine_id(individual::Individual)

Returns the id of the vaccine the individual is vaccinated with.

GEMS.ventilate!Method
ventilate!(individual::Individual)

Sets the individual to require ventilation.

GEMS.ventilatedMethod
ventilated(individual::Individual)

Returns wether the individual needs ventilation.

GEMS.ventilation_tick!Method
ventilation_tick!(individual::Individual, tick::Int16)

Sets an individual's tick for when it gets ventilated.

GEMS.ventilation_tickMethod
ventilation_tick(individual::Individual)

Returns an individual's tick when it gets ventilated.