Exemple #1
0
 def __init__(self, covid_model, age, msp, hsp, mfd):
     super().__init__(unique_id(), covid_model)
     self.properties = IndividualProperties()
     self.initialize_individual_properties()
     self.home_district = None
     self.work_district = None
     self.school_district = None
     self.age = age
     self.moderate_severity_prob = msp
     self.high_severity_prob = hsp
     self.death_mark = mfd
     self.infection_days_count = 0
     self.infection_latency = 0
     self.infection_incubation = 0
     self.mild_duration = 0
     self.hospitalization_duration = 0
     self.infection_status = InfectionStatus.SUSCEPTIBLE
     self.hospitalized = False
     if self.is_worker(): 
         self.setup_work_info()
         self.covid_model.global_count.work_population += 1
     self.is_dead = False
     self.tribe = {}
     for sel in TribeSelector:
         self.tribe[sel] = []
     self.parameter_changed()
 def __init__(self, covid_model):
     super().__init__(unique_id(), covid_model)
     self.custom_parameters = {}
     self.humans = []
     self.locations = []
     self.container = None
     self.spreading_rate = get_parameters().get('spreading_rate')
 def __init__(self, covid_model, strid_prefix, strid_suffix):
     super().__init__(unique_id(), covid_model)
     self.custom_parameters = {}
     self.humans = []
     self.locations = []
     self.container = None
     self.spreading_rate = get_parameters().get('spreading_rate')
     self.strid = strid_prefix
     if strid_prefix != '':
         self.strid += '-'
     self.strid += type(self).__name__
     if strid_suffix != '':
         self.strid += '-' + strid_suffix
Exemple #4
0
 def __init__(self, covid_model, age, msp, hsp, mfd):
     super().__init__(unique_id(), covid_model)
     self.properties = IndividualProperties()
     self.disease_severity = None
     self.dilemma_history = None
     self.initialize_individual_properties()
     self.home_district = None
     self.work_district = None
     self.school_district = None
     self.hospital_district = None
     self.age = age
     self.moderate_severity_prob = msp
     self.high_severity_prob = hsp
     self.base_moderate_severity_prob = msp
     self.base_high_severity_prob = hsp
     self.death_mark = mfd
     self.infection_days_count = 0
     self.infection_latency = 0
     self.infection_incubation = 0
     self.mild_duration = 0
     self.hospitalization_duration = 0
     self.icu_duration = 0
     self.infection_status = InfectionStatus.SUSCEPTIBLE
     self.hospitalized = False
     self.hospital = None
     self.work_info = None
     if self.is_worker():
         self.setup_work_info()
         self.covid_model.global_count.work_population += 1
     self.is_dead = False
     self.tribe = {}
     for sel in TribeSelector:
         self.tribe[sel] = []
     self.mask_user = None
     self.immune = None
     self.early_symptom_detection = None
     self.count_infected_humans = 0
     self.has_been_hospitalized = False
     self.has_been_icu = False
     self.parameter_changed()
     self.social_event = None
     self.vaccination_days = []