def initialize(self, sim):
        ''' Fix the dates and store the vaccinations '''
        # Handle days
        self.start_day   = sim.day(self.start_day)
        self.end_day     = sim.day(self.end_day)
        self.days        = [self.start_day, self.end_day]

        # Process daily data
        self.daily_vaccines = process_daily_data(self.daily_vaccines, sim, self.start_day)

        # Ensure we have the dose scheduler
        flag = True
        for intv in sim['interventions']:
            if isinstance(intv, dose_scheduler):
                flag = False
        if flag:
            sim['interventions'] += [dose_scheduler()]

        # Save
        self.orig_rel_trans    = sc.dcp(sim.people.rel_trans) # Keep a copy of pre-vaccination transmission
        self.orig_symp_prob    = sc.dcp(sim.people.symp_prob) # ...and symptom probability

        # Initialize vaccine info
        self.vaccinations = np.zeros(sim.n, dtype=cvd.default_int)
        self.vaccine_take = np.zeros(sim.n, dtype=np.bool)
        self.vaccination_dates = [[] for p in range(sim.n)]  # Store the dates when people are vaccinated
        sim.results['new_doses'] = cvb.Result(name='New Doses', npts=sim['n_days']+1, color='#ff00ff')
        self.initialized = True

        return
    def initialize(self, sim):
        ''' Fix the dates and number of tests '''

        # Handle days
        self.start_day = sim.day(self.start_day)
        self.end_day = sim.day(self.end_day)
        self.days = [self.start_day, self.end_day]

        # Process daily data
        self.daily_tests = process_daily_data(self.daily_tests, sim,
                                              self.start_day)
        self.ili_prev = process_daily_data(self.ili_prev, sim, self.start_day)

        self.initialized = True

        return
 def initialize(self, sim):
     '''This is borrowed from interventions.test_prob'''
     self.start_day = sim.day(self.start_day)
     self.end_day = sim.day(self.end_day)
     self.days = [self.start_day, self.end_day]
     self.ili_prev = cvi.process_daily_data(self.ili_prev, sim,
                                            self.start_day)
     self.initialized = True
     return
    def initialize(self, sim):
        ''' Fix the dates '''
        self.start_day = sim.day(self.start_day)
        self.end_day = sim.day(self.end_day)
        self.days = [self.start_day, self.end_day]
        self.ili_prev = process_daily_data(self.ili_prev, sim, self.start_day)

        self.initialized = True

        return