Write comment to clarify what  does
"sim.run()\n",
"\n",
"pl.figure()\n",
- "n_doses = np.array(n_doses)\n",
- "fully_vaccinated = (n_doses == 2).sum(axis=1)\n",
- "first_dose = (n_doses == 1).sum(axis=1)\n",
+ "n_doses = np.array(n_doses) # n_doses is an array with shape of [n_days x num_agents] \n",
+ "fully_vaccinated = (n_doses == 2).sum(axis=1) # this line calculates how many we agents had 2 doses on a given day\n",
+ "first_dose = (n_doses == 1).sum(axis=1) # this line calculates how many we agents had 1 dose on a given day\n",
"pl.stackplot(sim.tvec, first_dose, fully_vaccinated)\n",
"pl.legend(['First dose', 'Fully vaccinated'])"
]
"cell_type": "markdown",
"metadata": {},
"source": [
- "Notice how second doses are prioritized, so after 21 days, there is a backlog of people requiring second doses, so the first doses are suspended until all of the second doses have been delivered. In reality, the pace of vaccination typically increases following the commencement of vaccination, so capacity increases over time. The `doses_per_day` argument allows this increase to be captured. There are several ways to specify a time-varying dose, including a date-based dictionary to facilitate calibration when the number of doses each day is known. A simple option is to use a function that returns the number of doses to distribute based on the `cv.Sim` - for example:"
+ "Notice how second doses are prioritized, so after 21 days, there is a backlog of people requiring second doses, so the first doses are suspended until all of the second doses have been delivered. In reality, the pace of vaccination typically increases following the commencement of vaccination, so capacity increases over time. The `num_doses` argument allows this increase to be captured. There are several ways to specify a time-varying number of doses, including a date-based dictionary to facilitate calibration when the number of doses each day is known. A simple option is to use a function that returns the number of doses to distribute based on the `cv.Sim` - for example:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
- "collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"cell_type": "code",
"execution_count": null,
"metadata": {
- "collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"cell_type": "code",
"execution_count": null,
"metadata": {
- "collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.7"
+ "version": "3.9.10"
},
"toc": {
"base_numbering": 1,
