vaccinate_num#

class vaccinate_num(vaccine, num_doses, booster=False, subtarget=None, sequence=None, **kwargs)[source]#

Bases: BaseVaccination

This vaccine intervention allocates vaccines in a pre-computed order of distribution, at a specified rate of doses per day. Second doses are prioritized each day.

Parameters:
  • vaccine (dict/str) – which vaccine to use; see below for dict parameters

  • label (str) – if vaccine is supplied as a dict, the name of the vaccine

  • booster (bool) – whether it’s a booster (i.e. targeted to vaccinated people) or not

  • subtarget (dict) – subtarget intervention to people with particular indices (see test_num() for details)

  • sequence

    Specify the order in which people should get vaccinated. This can be

    • An array of person indices in order of vaccination priority

    • A callable that takes in cv.People and returns an ordered sequence. For example, to vaccinate people in descending age order, def age_sequence(people): return np.argsort(-people.age) would be suitable.

    • The shortcut ‘age’, which does prioritization by age (see below for implementation) If not specified, people will be randomly ordered.

  • num_doses

    Specify the number of doses per day. This can take three forms

    • A scalar number of doses per day

    • A dict keyed by day/date with the number of doses e.g. {2:10000, '2021-05-01':20000}. Any dates are converted to simulation days in initialize() which will also copy the dictionary passed in.

    • A callable that takes in a cv.Sim and returns a scalar number of doses. For example, def doses(sim): return 100 if sim.t > 10 else 0 would be suitable

  • **kwargs – Additional arguments passed to cv.BaseVaccination

Example::

pfizer = cv.vaccinate_num(vaccine=’pfizer’, sequence=’age’, num_doses=100) cv.Sim(interventions=pfizer, use_waning=True).run().plot()

Methods