15.1 Introduction

Simulation methods address ‘what if’ questions. Given a set of assumed values assigned to all decision variables and parameters in a model of some system, and given the set of assumed external inputs, a simulation of the system produces model outputs that can be used to compare with other simulations based on other sets of assumed values in the search for the ‘best’ system decision variable values. Models used for simulating a system can be as detailed in their representation of a system as desired, as there are no restrictions imposed by the method of solution, as is the case for all the optimization methods presented in the previous chapters. Thus, simulation model outputs can be more realistic indications of system performance, again given the assumptions made when developing any simulation model and setting the values of its parameters and variables.

Simulation methods can be applied to natural, engineered, or social systems to gain insight into their functioning or performance. For example, simulation models are used to predict the impacts of traffic congestion, or the spread of a contagious disease, or to estimate the likely damage resulting from flooding events in a community. Computer based simulations of systems are useful and much less expensive and quicker to perform than designing and building and operating alternative real systems and waiting to find out how well they performed over time.

In situations in which the number of alternatives that warrant such simulations, together with the time required to evaluate the output of each alternative simulation, takes too much time, some sort of preliminary screening of alternatives may be useful. In many cases optimization modeling can serve as a means of preliminary screening. Optimization can be performed not necessarily to find the best values of decision variables but to eliminate from further consideration the clearly inferior ones.

Interactive simulation methods, sometimes referred to as human-in-the-loop simulations, are simulations that include humans making decisions as the simulation proceeds and responds to those decisions. Humans are making decisions based on the state of the system and external factors while the simulations are taking place. Examples include flight, rail, ship handling, or bus driving simulators. Such simulations, as illustrated in Fig. 15.1, are often used for training system operators, but they can also be used to learn more about how a system should be designed and/or managed or operated and about human behavior or decision-making under various system states.

Fig. 15.1
figure 1

Flight training simulators that include humans in the simulation. https://en.wikipedia.org/wiki/Flight_simulator#/media/File:980310-N-7355H-03_Simulator_Training.jpg File: SSJ100 FFS 1 (9318513805).jpg. https://en.wikipedia.org/wiki/Flight_simulator Public Domain and CC BY-SA 2.0

Computer simulation has become a useful way to study many systems in physics, chemistry, biology, engineering, agriculture, business, economics, regional planning, and sociology among other application areas. Humans are often part of all such systems even though not always included in the simulation models.

15.2 Stochastic Simulations

As discussed in Chap. 14, Monte Carlo sampling provides a means of generating random values from given probability distributions. The name comes from its resemblance to what takes place in a real gambling casino. Monte Carlo methods are often useful when random inputs and outputs apply in any system simulation. Many systems have random inputs. Hospitals, police and fire departments, shelters for the homeless, libraries, schools, food pantries, and public parks are among the many examples of public systems having random inputs. Simulating such systems can benefit from the use of Monte Carlo methods to provide random inputs that come from realistic probability distributions.

Associated with a set of inputs, a simulation model will produce a corresponding set of outputs. Each alternative system simulated many times will have its own output distribution. Statistical measures of these output distributions provide a basis for comparing alternative system performances.

Two example simulation models follow.

15.3 Water Quality Simulation

Consider a small fully mixed lake (Fig. 15.2) having a constant volume V. Its inflow Q contains a pollutant W. By simulating the lake’s quality, one can estimate what the pollutant concentration, C, of the lake will be over time. As we develop this simulation model, we will start with a simple one and add more realism later.

Fig. 15.2
figure 2

A constant volume lake receiving wastewater containing a pollutant

To begin, assume the inflows Q and pollutant loadings W are constant over time. Thus everything is constant except the pollutant concentration in the lake until it too reaches an equilibrium and does not change over time. Also assume, since the volume of the lake is constant, the inflow equals the outflow (and there is no significant evaporation or seepage).

Defining the variables and parameters needed to model this lake, we will be dealing with units of mass (M), length (L), and time (T) (Table 15.1).

Table 15.1 Notation used to develop a simulation model that will predict the changing quality of the lake

The mass of pollutant input per unit time period, W, is its flow discharge times its concentration. Its flow discharge is included in the total inflow to the lake, Q.

The pollutant decay constant k is the mass of pollutant loss per unit of mass available per time period (i.e., a day) (M/M/T or 1/T). Its value depends on the type of pollutant as well as the water temperature.

To create a mass balance equation for the pollutant in the lake, we can equate the change in mass of pollutant in the lake to the mass that comes into the lake minus the mass that is contained in the lake outflow and the amount that decays while in the lake. Each term in this mass balance equation will have units of mass/time or M/T.

Denoting the change of pollutant concentration, C, in the lake over time t, as dC/dt, ( M/L3/T),

$$VdC/dt = W{-}QC{-}kVC.$$

Thus the change in mass of pollutant in lake = V dC/dt, (L3M/L3/T = M/T), equals.

  • the mass that comes into the lake = W (M/T),

  • less the mass that is discharged from the lake = QC, ((L3/T)(M/L3) = M/T),

  • less the mass that decays in the lake = kVC, ((M/M/T)(L3/T)(M/L3) = M/T).

Since volumes, flows, pollutant inflow concentrations and decay rates are constant over time, eventually the lake pollutant concentration will become constant. It will not change over time. The term dC/dt in the above mass balance equation will be 0. Solving this equation when dC/dt is 0 for C will define its equilibrium concentration value, Ceq.

$$C^{{{\text{eq}}}} = W/\left( {KV + Q} \right).$$

Using discrete simulation for this deterministic system, we can see what happens to the lake’s pollutant concentration on its way toward an equilibrium. In other words, we can generate a time series of predicted lake concentrations C(t) at the beginning of each time period t given an initial concentration, C(1), at t = 1.

Let dC be approximated by (C(t + 1) − C(t)) and dt by Δt. Then the mass balance equation can be written as

$$V\left( {C\left( {t + 1} \right){-}C\left( t \right)} \right) = \left[ {W{-}Q\left( {C\left( {t + 1} \right) + C\left( t \right)} \right)/2{-}kV\left( {C\left( {t + 1} \right) + C\left( t \right)} \right)/2} \right] \, \Delta t.$$

This equation assumes that the units of all the parameters and variables are consistent, and the outgoing concentration in each period t is the average of the initial and final concentrations in the lake in that period.

To simulate a numerical example, assume W = 450; Q = 20; k = 0 and 0.1; V = 100; Δt = 3; and an initial pollutant concentration, C(1), is 5. The model’s successive solutions are listed in Table 15.2 for 19 3-day time periods.

Table 15.2 Successive lake pollutant concentrations C(t) for two different values of the pollutant decay constant k

15.4 Lake Quality Simulation with Random Wasteloads

Consider the same lake having a constant volume, inflow and outflow, and pollutant decay rate, but with a random pollutant loading. The concentrations of pollutants entering the lake are described by a probability distribution. For this example, assume this probability distribution of pollutant inputs, W(t), is uniform, ranging from 200 to 700 with a mean of 450. Let Δt = 1. We can now generate a time series of W(t) and C(t) and based on that time series, compute the mean and standard deviation of the waste loads W(t) and lake pollutant concentrations C(t).

For purposes of comparison, we can assume the same deterministic values for inflow, lake volume, and a decay constant of K = 0. We can define the cumulative distribution of pollutant mass inputs W(t) per unit time and use it to convert a generated series of uniformly distributed random variable values, p, ranging from 0 to 1, to corresponding random variables of W(t) distributed uniformly from 200 to 700 (Fig. 15.3).

Fig. 15.3
figure 3

Wasteload probability distribution and its cumulative distribution

The cumulative probability, p(t), of a pollutant loading of W(t) at time t is (W(t) − 200)/500 for W(t) between 200 and 700, hence

$$W\left( t \right) = 200 + 500 \, p\left( t \right),$$

and

$$\begin{aligned} V\left( {C\left( {t + 1} \right) - C\left( t \right)} \right) & = (W\left( t \right) - Q\left( {C\left( {t + 1} \right) + C\left( t \right)} \right)/2 \\ & \quad \quad - \, kV\left( {C\left( {t + 1} \right) \, + \, C\left( t \right)} \right)/2 \, ) \, \Delta t. \\ \end{aligned}$$

Starting with an initial lake concentration of C(1) = 0, one simulation of 100 daily time steps (Δt = 1) resulted in a mean pollutant mass input of 437 (compared to a true mean of 450), with a standard deviation of 130.

In this simulation the lake pollutant concentration, C(t), reached a value exceeding the equilibrium concentration of 22.5 in less than 20 days. The mean of the remaining concentrations was 19.6 with a standard deviation of 4.2.

Some of the concentrations at the beginning and end of this particular simulation run are listed in Table 15.3.

Table 15.3 Sample simulation and summary statistics of lake pollutant concentrations

15.5 Possible Chaos

This next purely mathematical example shows how the values of assumed parameters in a discrete simulation model along with the duration of the simulation time step may alter the path toward an equilibrium, even to one that may not reach an equilibrium even though an equilibrium exists. The model is defined by the simple differential equation

$$\begin{aligned} dx/dt \, & = \, \left( {a - 1} \right) \, x \, - \, ax^{2} {\text{ the rate of change in }} \\ & \quad x{\text{ depends on the value of }}x{\text{ and }}a{\text{ parameter `}}a{\text{'}}. \\ \end{aligned}$$

We can find the equilibrium solution by setting dx/dt equal to 0.

$$0 = \left( {a - 1} \right)x - ax^{2} = \left( {a - 1} \right) - ax,{\text{so }}x = \left( {a - 1} \right)/a,$$

thus an equilibrium exists when

$$x = \left[ {\left( {a - 1} \right)/a} \right]\quad {\text{for any non - zero value of a}}.$$

Clearly, as the value of the parameter ‘a’ increases, the equilibrium value of x approaches, but never reaches, 1.

A question is how will successive values of x tend toward their equilibrium values and will an equilibrium ever be reached if the system is not already in an equilibrium? In other words, are the equilibriums stable?

Consider a discrete simulation where dx/dt is approximated by

$$\Delta x/\Delta t = \left( {x\left( {t + 1} \right){-}x\left( t \right)} \right)/\Delta t = \left( {a - 1} \right)x\left( t \right){-}ax\left( t \right)^{2} ,$$

which can be written as x(t + 1) = x(t)) + ((a − 1)x(t) − ax(t)2)Δt.

The plots in Fig. 15.4 show successions of x values given six different non-negative values of the parameter ‘a’ and a simulation step size Δt starting at x(1) = 0.2. The smaller the step size Δt the larger the value of ‘a’ for which the equilibrium is stable. With a step size of 0.5, if ‘a’ is 6 the sequence of x values corresponds to the graph showing ‘a’ of 3.5 with step size of 1.

Fig. 15.4
figure 4

Plots showing the impact on x(t) values over time given some different values of ‘a’ and Δt

This example illustrates how simulations of deterministic non-linear systems can be sensitive to initial conditions and simulation step sizes, and in some cases even show apparent random behavior.

15.6 Endowment Giving

Many organizations, including those shown in Fig. 15.5, count on income from their endowment to cover some of their capital and operating costs. There is a strategy in raising an endowment. If an endowment campaign looks like it will be successful to potential donors, they are more likely to contribute to the endowment than if they think it will be unsuccessful. One measure of potential success is the amount of money already given. This is why some major donations are often sought before the ‘publicly announced’ campaign begins. Yet there may also be some who are reluctant to give to an organization if the total amount already raised is already very large, especially donors wanting to maximize the marginal values of their donations. Giving a specific amount of money to a well-endowed organization will likely result in a smaller marginal value than that derived by an organization having a smaller endowment but similar expenses.

Fig. 15.5
figure 5

Just a few of the most highly endowed universities in the US

These notions are captured in the following example illustrated in Fig. 15.6. The variable E(t) is the level of giving already raised in the campaign by the beginning of period t.

Fig. 15.6
figure 6

A function for estimating the amount of giving over time, each amount being dependent on the amount, E(t), already given shown on the horizontal axis

The above plot shows a function used to predict the money raised over time, each amount raised being dependent on the total endowment already raised, E(t), by the beginning of period t. The change in the total endowment in period t is E(t + 1) − E(t), and E(t + 1) is

$$E\left( {t + 1} \right) = a \, E\left( t \right)^{0.7} {-}100.$$

At equilibrium E(t + 1) = E(t).

Hence when E = a E0.7 – 100 the system is in equilibrium.

If ‘a’ is 50, E = 2.800119 or 460,170.5.

The lower equilibrium is unstable. If E(t) is less than 2.8, the following E(t + 1) will be even smaller, which in fact will not happen, but it indicates a decreasing interest in donor giving, at least until E(t) reaches 2.8. Perhaps this shows why many fund-raising campaigns are not announced until the organizers have already raised a substantial amount. If E(t) is greater than 2.8 in this example, then the following values of E(t + 1) will be even more until its value equals its upper equilibrium value. Beyond that upper equilibrium value donors are less likely to give more, perhaps feeling the organization’s endowment campaign has raised enough money. The fact that mathematically changes in the endowment are negative below the lower equilibrium value of 2.8 and above the upper equilibrium value of 460,171 simply shows that the valid range of this function are for all values of E(t) between these two equilibrium values.

  • In addition to predicting the sequence of endowment giving that will occur over time, the total time, n, needed to reach a given total amount of money, T, can be estimated. The total amount of additional endowment at the end of n periods, assuming the endowment is invested at a compound interest rate of i per period in following periods, is

    $$E\left( {t + 1} \right) = a \, \left[ {E\left( t \right)\left( {1 + i} \right)} \right]^{0.7} - 100, t = 1, \, 2, \, ..., \, n \;{\text{where}}\; \, E\left( {n + 1} \right) \ge T.$$

15.7 Forest Management

In a particular town watershed there exists two competing tree species: hardwoods and softwoods. The watershed is managed primarily to produce clean water, but it also serves as wildlife habitat and source of income from timber. Cutting trees in a sustainably managed way can increase water yields, habitat value, and timber income (Fig. 15.7).

Fig. 15.7
figure 7

Unmanaged and managed hardwood and softwood forests. https://en.wikipedia.org/wiki/Forestry By Queryzo—Own work, CC BY-SA 3.0, By Snežana Trifunović—Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=2647911 CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1975900

First consider an unmanaged forest. In an unmanaged forest, hardwood and softwood trees compete for the available sunlight, soil nutrients, and water. Hardwood trees grow more slowly but are more durable and produce more valuable timber. Softwood trees compete with the hardwoods by growing more rapidly and by consuming water and soil nutrients in the process. Can these two types of trees coexist indefinitely, or will one type of tree drive the other type to extinction?

Fig. 15.8
figure 8

Defining the basal area of a tree

One measure of the amount of forest growth in the watershed is the basal area of trees (Fig. 15.8). This is the cross sectional area of the trunk near the base of the tree. For both hardwood and softwood species the increase in basal area per hectare per year is directly proportional to the initial basal area of that species. However, this potential increase in basal area is reduced by the loss in basal area due to competition from its own species and from the other species.

Let

H(y):

Basal area of hardwoods per hectare at the beginning of year y.

S(y):

Basal area of softwoods per hectare at the beginning of year y.

rt:

basal area growth per unit basal area per hectare for species type t.

at:

basal area loss per unit of basal area of species type t per unit basal area of same species per hectare.

bt:

basal area loss per unit of basal area of species type t per unit basal area of different species per hectare.

Equations that describe the changes in basal area over time for both types of tree species can be written as

$$\begin{gathered} dH/dy = r_{H} H\left( y \right){-}a_{H} H\left( y \right)^{2} {-}b_{H} H\left( y \right)S\left( y \right), \hfill \\ dS/dy = r_{S} S\left( y \right){-}a_{S} S\left( y \right)^{2} {-}b_{S} H\left( y \right)S\left( y \right). \hfill \\ \end{gathered}$$

These two differential equations can be expressed as difference equations that define the basal areas at the end of each year y, H(y + 1) and S(y + 1), in terms of H(y) and S(y). Assume dH/dy = ΔHy. Similarly, replace dS/dy with ΔSy.

$$\begin{gathered} \Delta H = H\left( {y + 1} \right){-}H\left( y \right), \;{\text{and}} \hfill \\ \Delta S = S\left( {y + 1} \right){-}S\left( y \right). \hfill \\ \end{gathered}$$

Substituting these expressions into the differential equations above results in the mass balance equations:

$$\begin{gathered} H\left( {y + 1} \right) = H\left( y \right) + \left[ {r_{H} H\left( y \right){-}a_{H} H\left( y \right)^{2} {-}b_{H} H\left( y \right)S\left( y \right)} \right] \, \Delta y, \hfill \\ S\left( {y + 1} \right) = S\left( y \right) + \left[ {r_{S} S\left( y \right){-}a_{S} S\left( y \right)^{2} {-}b_{S} H\left( y \right)S\left( y \right)} \right] \, \Delta y. \hfill \\ \end{gathered}$$

These can be solved in succession starting with some initial conditions for H(1) and S(1).

There are four equilibrium solutions for these difference equations. Clearly one is when no trees exist. H = S = 0. Two others are when one or the other species does not exist.

$$\begin{gathered} {\text{If }}H \, = \, 0,{\text{ then from the softwood difference equation}},S = r_{S} /a_{S} , \hfill \\ {\text{If }}S = 0,{\text{ then from the hardwood difference equation}}, \, H = r_{H} /a_{H} . \hfill \\ \end{gathered}$$

If both H and S are positive, then from both difference equations, the equilibrium values are

$$\begin{gathered} H = \left( { \, a_{S} r_{H} {-}b_{H} r_{S} } \right)/\left( { \, a_{S} a_{H} {-}b_{H} b_{S} } \right), \hfill \\ S \, = \, \left( { \, a_{H} r_{S} {-} \, b_{S} r_{H} } \right)/\left( { \, a_{S} a_{H} {-} \, b_{H} b_{S} } \right). \hfill \\ \end{gathered}$$

For a numerical example let: rH = 0.3; rS = 0.5; aH = aS = 0.1; bH = bS = 0.05.

Thus if

$$\begin{gathered} H{\text{ is }}0{\text{ then }}S = r_{S} /a_{S} = 0.5/0.1 = 5, \hfill \\ S{\text{ is }}0{\text{ then }}H = r_{H} /a_{H} = 0.3/0.1 = 3. \hfill \\ \end{gathered}$$

Otherwise if both H and S > 0,

$$\begin{aligned} H & = \left( { \, a_{S} r_{H} - b_{H} r_{S} } \right)/\left( { \, a_{S} a_{H} - b_{H} b_{S} } \right) \, \\ & = \left( { \, 0.1\;0.3 - 0.05\;0.5 \, } \right)/\left( { \, 0.1\;0.1 - 0.05\,0.05_{{}} } \right) = 0.667, \\ \end{aligned}$$
$$\begin{aligned} S & = \left( { \, a_{H} r_{S} {-}b_{S} r_{H} } \right)/\left( { \, a_{S} a_{H} {-}b_{H} b_{S} } \right) \\ & = \left( {0.1\,0.5{-}0.05\;0.3 \, } \right)/\left( {0.1\;0.1{-}0.05\;0.05} \right) = 4.667. \\ \end{aligned}$$

This is the only stable equilibrium. At any of the other equilibria just one stray seed of a species that is missing from the forest will cause a move to a new equilibrium.

Assuming different combinations of initial basal area values, the succession of basal areas will converge to their equilibrium values (Table 15.4).

Table 15.4 Various simulations of forest hardwood H and softwood S basal areas given initial conditions

Too great a time step may result in negative basal areas. If this happens take shorter time steps by replacing Δy with 1/m where m is an integer  >1. Continue making m greater until the simulation converges without oscillations (Fig. 15.9).

Fig. 15.9
figure 9

Velocity plot showing H and S values converging to an equilibrium in a sequence of time steps

15.8 Military Battle

Two armies are to engage in battle. The red army enjoys a three-to-one numerical superiority, but the blue army is better trained and better equipped. Let R and B denote the respective levels of the red and blue armies. The Lanchester model of combat states that

$$\begin{gathered} dR/dt = {-} \, aB{-}bRB, \hfill \\ dB/dt = {-} \, cR{-}dRB. \hfill \\ \end{gathered}$$

where the parameters a and c are kills by the opposing armies per soldier per day and b and d are kills per soldier in both armies from friendly fire per day. The first term in each equation accounts for the direct fire (aimed at a specific enemy target), and the second term accounts for attrition of army personnel due to its own area fire (e.g., artillery), the intensity of which depends on the size of both armies. Solving a sequence of difference equations can yield estimates of the size of each army over time. For a > c and b > d, R(1) = 3n, B(1) = n, we can see who wins, i.e., which army population goes to 0 first.

$$R\left( {t + 1} \right) = R\left( t \right) - \left[ {a \, B\left( t \right) + \, b \, R\left( t \right)B\left( t \right)} \right] \Delta t,$$
$$B\left( {t + 1} \right) = B\left( t \right) - \left[ {c \, R\left( t \right) + d \, R\left( t \right)B\left( t \right)} \right] \Delta t.$$

Assume ∆t = 1, R(1) = 3000, B(1) = 1000, a = 0.004, b = 0.0002, c = 0.002, and d = 0.0001, the sequence of remaining army personnel is shown in Table 15.5.

Table 15.5 Decline of red and blue army populations over time

One can see that the blue army will need to surrender to the red one if they want to have any personnel left alive. This prediction would suggest that unless the values of some of the Blue army’s parameters can be made more favorable, the Blue army should not be fighting the Red army.

15.9 Disease Epidemic

Consider a population of 70,000 that can catch a disease. The disease is seldom fatal and leaves the cured victim immune to future infections of this disease. Infection can only occur when a susceptible person comes in direct contact with an infectious person. The infectious period for people that get the disease lasts 3 weeks (Obviously a less serious disease than COVID-19) (Fig. 15.10).

Fig. 15.10
figure 10

This cartoon, titled death's dispensary, is a caricature published during the London cholera epidemic of 1866 (George J. Pinwell/Public domain). https://www.cbc.ca/news/canada/newfoundland-labrador/apocalypse-then-conspiracy-theories-1.5792105

To develop a discrete simulation model that can estimate the number of sick, susceptible, cured, and dead over the course of an epidemic, we need some data, and we need to make some assumptions and define some notation identifying needed variables and parameters.

It seems reasonable that the change in the number of infected people is the difference between the rate of infection and the rate of being cured or dying. The rate of infection will depend on both the number of susceptible people and the number of infected, and therefore contagious, people. Both susceptible and infected people must exist for the disease to spread. Letting S(t) be the number of susceptible people at the beginning of period t, and I(t) the number of infected people at the beginning of period t, then one possible model for predicting the number of newly infected people in each successive period t, A(t), might be a function containing the product S(t) and I(t). This product, S(t)I(t), will insure that if either variable value is 0, no new infections. A(t) will occur. The additional number of people infected in period t is the additional number of people cured three periods later assuming there are no deaths.

Assume A(t) = a S(t) I(t). The parameter ‘a’ is a rate coefficient.

Denoting C(t) as the number of cured people at the beginning of period t, and D(t) the number of dead people at the beginning of period t, where d is the fraction that die, then at the beginning of period 1.

S(1) = 70,000,

C(1) = 0,

I(1) = 0,

D(1) = 0.

Mass balance requires that

Number of susceptible at beginning of period t + 1 = S(t + 1) = S(t) − A(t),

Number of newly infected in period t = A(t) = min [a S(t) I(t), S(t)],

Number of infected at beginning of period t + 1 = I(t + 1) = I(t) + A(t) – A(t – 3),

Number of cured at the beginning of period t + 1 = C(t + 1) = C(t) + A(t – 3)(1 – d),

Number of deaths at beginning of period t + 1 = D(t + 1) = D(t) + A(t − 3)d.

As a check, S(t) + C(t) + I(t) + D(t) should always equal S(1) which in this example is 70,000.

Assume that in the first week 28 people got the disease. During the next week there were 60 new cases.

Thus 60 = a(28)(70,00028) and therefore the infection rate constant ‘a’ = 60/{(28)(70,000–28) = 0.3062449E−04.

If no one is expected to die, the death rate fraction d will be 0. Assuming d = 0, the results of this example simulation for 15 weeks are shown in Table 15.6.

Table 15.6 Results of the disease simulation model

Figure 15.11 shows a plot of the data in Table 15.6.

Fig. 15.11
figure 11

Plot of progression of susceptible, infected, and cured among a population of 70,000 predicted by the disease simulation model

This would be the first step in identifying the effect of various policies for reducing the number of people that get infected or that may die. Vaccination, if available, various degrees of isolation from other people, protective clothing including masks, and travel restrictions are among alternatives that could reduce the infection rate constant or the number of susceptible people in a population, or the fraction that die, if any. In addition, the total population of susceptible persons could vary either randomly or deterministically, such as due to more tourists during certain weeks than others. The parameters ‘a’ and ‘d’ could be random. If so, this might suggest a Monte Carlo simulation to obtain probability distributions of the number of infected and cured people at any time.

Exercises

  1. 1.

    Bus replacement.

Every year 5% of the passenger buses in Ithaca need to be replaced due to obsolescence and no longer meeting safety and environmental standards. Current plans and budget constraints call for the purchase of 10 new busses each year. How many busses must the bus company have if these rates of change can be sustained? Is this equilibrium stable?

  1. 2.

    Controlling algal blooms.

In many lakes algal blooms are an increasing hazard. They are often caused by excessive phosphorus, P, entering the lake.

Consider a small lake having a constant volume V cubic meters. Thus its inflow Q equals its outflow Q. Currently the mass of phosphorus entering the lake is P kg per day. The daily rate of phosphorus decay per unit phosphorus mass in the lake is defined by the decay constant k. Each of these values, V, Q, P, and k, are known.

The daily change, dM/dt, of phosphorus mass, M, in the lake depends on the daily mass of phosphorus entering the lake, P, the mass of phosphorus that exits the lake in the outflow, QM/V, and the mass of phosphorus that decays in the lake, kM. This change in lake phosphorus mass can be written as

$$dM/dt = P{-}QM/V{-}kM.$$
  1. (a)

    Suppose the initial lake nutrient mass at the beginning of day 1, M(1), is 0. Given a constant mass of phosphorus, P, entering the lake each day beginning in day 1, show how you could determiine the mass of phosphorus, M(t), at the beginning of each following day t.

  2. (b)

    Will the phosphorus mass in the lake reach an equilibrium, and if so what is it?

    (Express as a function of V, Q, P, and k).

  3. (c)

    Suppose the phosphorus entering the lake, P, can be reduced by X percent, This would cost C(X). How could you define the tradeoff between this cost, C(X), and the equilibrium phosphorus concentration, M/V, in the lake?

  1. 3.

    Forest sustained yield:

One measure of the amount of forest growth in the watershed is the basal area of trees. This is the cross sectional area of the trunk near the base of the tree. For both hardwood and softwood species the increase in basal area per hectare per year is directly proportional to the initial basal area of that species. However, this potential increase in basal area is reduced by the loss in basal area due to competition from its own species and from the other species.

Let

H(y):

Basal area of hardwoods per hectare at the beginning of year y.

S(y):

Basal area of softwoods per hectare at the beginning of year y.

r t :

basal area growth per unit basal area per hectare for species type t.

a t :

basal area loss per unit of basal area of species type t per unit basal area of same species per hectare.

b t :

basal area loss per unit of basal area of species type t per unit basal area of different species per hectare.

Equations that describe the changes in basal area over time for both tree species can be written as

$$\begin{gathered} dH/dy = r_{H} H\left( y \right) - a_{H} H\left( y \right)^{2} - b_{H} H\left( y \right)S\left( y \right), \hfill \\ dS/dy = r_{S} S\left( y \right) - a_{S} S\left( y \right)^{2} - b_{S} H\left( y \right)S\left( y \right). \hfill \\ {\text{Assume}}\quad r_{H} = 0.3; \, r_{S} = 0.5; \, a_{H} = 0.1; \, a_{S} = 0.1; \, b_{H} = 0.05; \, b_{S} = 0.05. \hfill \\ \end{gathered}$$

If this forest is to be managed in a sustainable way to obtain a constant harvest of hardwood and softwood in each year, create a model to determine how much of each type of species can be harvested each year depending on the relative value per unit basal area of hardwoods compared to that of softwoods.

  1. 4.

    For the epidemic affecting 70,000 people described in this chapter, develop the equations needed to simulate the course of the disease over time, keeping track of the number of infected in each week, and the number susceptible and cured or immune at the beginning of each week. Carry out the simulation and plot graphs of the results over time as was shown in this chapter.