Exemple #1
0
 def __init__(self, _compartments: List[Compartments], r0: float):
     """
     Initialize the run of SEIR disease model
     """
     super().__init__(_compartments, r0=r0)
     self.population = Utils.total_population(file='initial_population')
     self._num_comp = len(_compartments)
     self.util = Utils()
Exemple #2
0
            dx[13] = sum([vd for kd, vd in dd_oa.items()])
            dx[14] = sum([vr for kr, vr in dr_oa.items()])
            dx[15] = sum([vr for kr, vr in dr_toa.items()])

            return dx
        except Exception as e:
            print('Error equations: {0}'.format(e))
            return None


if __name__ == "__main__":
    start_processing_s = time.process_time()
    start_time = datetime.datetime.now()
    ut = Utils()
    initial_population = ut.initial_population_ct(file='initial_population', delimiter=';')
    total_population = ut.total_population(file='initial_population', delimiter=';')
    mi_ae = ut.probabilities(parameter_1='MortalityAllCauseMortality', parameter_2='ALL')
    mi_ac = ut.probabilities(parameter_1='MortalityHomecare', parameter_2='ALL')
    mi_ah = ut.probabilities(parameter_1='MortalityHospitalized', parameter_2='ALL')
    mi_au = ut.probabilities(parameter_1='MortalityCriticalCare', parameter_2='ALL')
    ro = ut.probabilities(parameter_1='TraceNoTrace', parameter_2='ALL')
    death_hospitalized = ut.probabilities(parameter_1='SymptomaticHospitalized', parameter_2='ALL')
    death_critical_care = ut.probabilities(parameter_1='SymptomaticCriticalCarePopulation', parameter_2='ALL')

    contact_matrix = Utils.contact_matrices(file='contact_matrix', delimiter=',')

    compartments = []
    s_oa = Compartments(name="Susceptible", value=0.0)
    compartments.append(s_oa)
    s_toa = Compartments(name="Susceptible traced", value=0.0)
    compartments.append(s_toa)