Exemple #1
0
    def vaccinate_schedule(self, schedule):

        if not isinstance(schedule, VaccineSchedule):
            ModelException(
                "argument VaccineSchedule must be an object of type VaccineSchedule"
            )

        return covid19.intervention_vaccinate_age_group(
            self.c_model, schedule.c_fraction_to_vaccinate,
            schedule.vaccine_type, schedule.efficacy, schedule.time_to_protect,
            schedule.vaccine_protection_period, schedule.c_total_vaccinated)
Exemple #2
0
    def vaccinate_schedule(self, schedule ):

        if not isinstance( schedule, VaccineSchedule ) :
            ModelException( "argument VaccineSchedule must be an object of type VaccineSchedule")
           
        if not isinstance( schedule.vaccine, Vaccine ) :
            ModelException( "schedule.vaccine must be an object of type Vaccine, add one using model.add_vaccine()")
               
        return covid19.intervention_vaccinate_age_group( 
            self.c_model, 
            schedule.c_fraction_to_vaccinate, 
            schedule.vaccine.c_vaccine,
            schedule.c_total_vaccinated
        )