Skip to content

Commit f84f97c

Browse files
authored
Merge overleaf-2019-06-17-1550 into master
2 parents 1649a88 + 4838d17 commit f84f97c

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

book/book.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@ \section{System objects}
21632163
plot_results(census, un, results, 'Constant growth model')
21642164
\end{python}
21652165

2166-
The results are the same as Figure~\ref{chap03-fig02}.
2166+
The results are the same as Figure~\ref{chap05-fig02}.
21672167

21682168
It might not be obvious that using functions and \py{System} objects is a big improvement, and for a simple model that we run only once, maybe it's not. But as we work with more complex models, and when we run many simulations with different parameters, we'll see that the organization of the code makes a big difference.
21692169

@@ -2261,7 +2261,7 @@ \section{Factoring out the update function}
22612261

22622262
Passing a function as an argument is the same as passing any other value. The argument, which is \py{update_func1} in this example, gets assigned to the parameter, which is called \py{update_func}. Inside \py{run_simulation}, we can run \py{update_func} just like any other function.
22632263

2264-
The loop in \py{run_simulation} calls \py{update_func1} once for each year between \py{t_0} and \py{t_end-1}. The result is the same as Figure~\ref{chap03-fig03}.
2264+
The loop in \py{run_simulation} calls \py{update_func1} once for each year between \py{t_0} and \py{t_end-1}. The result is the same as Figure~\ref{chap06-fig01}.
22652265

22662266

22672267
\section{Combining birth and death}
@@ -2288,7 +2288,7 @@ \section{Combining birth and death}
22882288
results = run_simulation(system, update_func2)
22892289
\end{python}
22902290

2291-
Again, the result is the same as Figure~\ref{chap03-fig03}.
2291+
Again, the result is the same as Figure~\ref{chap06-fig01}.
22922292

22932293
Before you go on, you might want to read the notebook for this chapter, \py{chap06.ipynb}, and work on the exercises. For instructions on downloading and running the code, see Section~\ref{code}.
22942294

@@ -2582,7 +2582,7 @@ \section{Generating projections}
25822582
results = run_simulation(system, update_func_quad)
25832583
\end{python}
25842584

2585-
We have already seen the results in Figure~\ref{chap03-fig04}. Now, to generate a projection, the only thing we have to change is \py{t_end}:
2585+
We have already seen the results in Figure~\ref{chap07-fig01}. Now, to generate a projection, the only thing we have to change is \py{t_end}:
25862586

25872587
\begin{python}
25882588
system.t_end = 2250
@@ -2832,7 +2832,7 @@ \section{Analysis and simulation}
28322832

28332833
\begin{itemize}
28342834

2835-
\item With analysis we can sometimes compute, exactly and efficiently, a value that we could only approximate, less efficiently, with simulation. For example, in Figure~\ref{chap03-fig05}, we can see that net growth goes to zero near 14 billion, and we could estimate carrying capacity using a numerical search algorithm (more about that later). But with the analysis in Section~\ref{equilibrium}, we get the general result that $K=-\alpha/\beta$.
2835+
\item With analysis we can sometimes compute, exactly and efficiently, a value that we could only approximate, less efficiently, with simulation. For example, in Figure~\ref{chap07-fig02}, we can see that net growth goes to zero near 14 billion, and we could estimate carrying capacity using a numerical search algorithm (more about that later). But with the analysis in Section~\ref{equilibrium}, we get the general result that $K=-\alpha/\beta$.
28362836

28372837
\item Analysis often provides ``computational shortcuts", that is, the ability to jump forward in time to compute the state of a system many time steps in the future without computing the intervening states.
28382838

@@ -3857,6 +3857,12 @@ \section{Immunization}
38573857

38583858
Without immunization, almost 47\% of the population gets infected at some point. With 10\% immunization, only 31\% gets infected. That's pretty good.
38593859

3860+
\begin{figure}
3861+
\centerline{\includegraphics[height=3in]{figs/chap12-fig02.pdf}}
3862+
\caption{Fraction of the population infected as a function of immunization rate.}
3863+
\label{chap12-fig02}
3864+
\end{figure}
3865+
38603866
Now let's see what happens if we administer more vaccines. This following function sweeps a range of immunization rates:
38613867

38623868
\index{sweep}
@@ -3883,17 +3889,11 @@ \section{Immunization}
38833889

38843890
As the immunization rate increases, the number of infections drops steeply. If 40\% of the students are immunized, fewer than 4\% get sick. That's because immunization has two effects: it protects the people who get immunized (of course) but it also protects the rest of the population.
38853891

3886-
\begin{figure}
3887-
\centerline{\includegraphics[height=3in]{figs/chap12-fig02.pdf}}
3888-
\caption{Fraction of the population infected as a function of immunization rate.}
3889-
\label{chap12-fig02}
3890-
\end{figure}
3891-
38923892
Reducing the number of ``susceptibles" and increasing the number of ``resistants" makes it harder for the disease to spread, because some fraction of contacts are wasted on people who cannot be infected. This phenomenon is called {\bf herd immunity}, and it is an important element of public health (see \url{http://modsimpy.com/herd}).
38933893

38943894
\index{herd immunity}
38953895

3896-
The steepness of the curve in Figure~\ref{chap05-fig03} is a blessing and a curse. It's a blessing because it means we don't have to immunize everyone, and vaccines can protect the ``herd" even if they are not 100\% effective.
3896+
The steepness of the curve in Figure~\ref{chap12-fig02} is a blessing and a curse. It's a blessing because it means we don't have to immunize everyone, and vaccines can protect the ``herd" even if they are not 100\% effective.
38973897

38983898
But it's a curse because a small decrease in immunization can cause a big increase in infections. In this example, if we drop from 80\% immunization to 60\%, that might not be too bad. But if we drop from 40\% to 20\%, that would trigger a major outbreak, affecting more than 15\% of the population. For a serious disease like measles, just to name one, that would be a public health catastrophe.
38993899

@@ -4169,7 +4169,7 @@ \section{Sweeping gamma}
41694169
\label{chap13-fig02}
41704170
\end{figure}
41714171

4172-
Figure~\ref{chap06-fig13} shows the results. When \py{gamma} is low, the recovery rate is low, which means people are infectious longer. In that case, even a low contact rate (\py{beta}) results in an epidemic.
4172+
Figure~\ref{chap13-fig02} shows the results. When \py{gamma} is low, the recovery rate is low, which means people are infectious longer. In that case, even a low contact rate (\py{beta}) results in an epidemic.
41734173

41744174
When \py{gamma} is high, \py{beta} has to be even higher to get things going.
41754175

0 commit comments

Comments
 (0)