Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix immunized #89

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions chapters/chap12.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@
"outputs": [],
"source": [
"def add_immunization(system, fraction):\n",
" system.init.s -= fraction\n",
" system.init.r += fraction"
" # Multiply 'fraction' by the proportion of susceptible\n",
" # individual to be sure to subtract and add a value that \n",
" # does not exceeds the proportion of susceptible \n",
" # individials\n",
" system.init.s -= fraction*system.init.s\n",
" system.init.r += fraction*system.init.s"
]
},
{
Expand Down
8 changes: 6 additions & 2 deletions notebooks/chap12.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@
" system: System object\n",
" fraction: number from 0 to 1\n",
" \"\"\"\n",
" system.init.S -= fraction\n",
" system.init.R += fraction"
" # Multiply 'fraction' by the proportion of susceptible\n",
" # individual to be sure to subtract and add a value that \n",
" # does not exceeds the proportion of susceptible \n",
" # individials\n",
" system.init.S -= fraction*system.init.S\n",
" system.init.R += fraction*system.init.S"
]
},
{
Expand Down
Loading