Pest Control Simulation 3

Simulation 3: Limiting population growth

In simulation 2 we started using a reproduction factor (r) which depends on birth (b) and mortality (m) factors. But we have also seen that when birth and mortality are fixed values the simulation is not realistic. The population either explodes (r is positive) or it dies out (r is negative).

We therefore need to find ways to make sure that population growth slows down when population size increases. We need a simulation that is "density dependent" similar to what happens in real life.

In nature, exponential growth can sometimes take place for a short period. This happens when conditions are perfect, which means plenty of food, no competition for space, no diseases, no predators, ideal weather conditions, etc.

This exponential growth can only happen at relatively low population densities. As soon as the population starts growing there will be changes that slow down the growth of the population. The most obvious is that at some point there is a shortage of resources (food, space).

The population cannot grow beyond a certain point, which we will call the ecosystem’s carrying capacity (K) or the ‘equilibrium maximum’ of the insect population.

When the population size reaches this carrying capacity the reproduction should either become zero (or negative), because we can never go beyond that "ceiling".

A healthy population will tend to stabilize at the carrying capacity of the environment. If the population is at carrying capacity and suddenly it decreases (for example a day with very rough weather kills a part of the population) there will be a new opportunity to start growing again. If however a population is at carrying capacity and it increases (for example by extra insects migrating into the area) we have a disaster situation with acute food shortages and the population will quickly decrease. Let’s try to find a model to simulate this.

Our next model uses the following parameters.

N0    = Population size at the start of the simulation.
N1    = Population size at time 1 (i.e. after 1 day)
Nt    = Population size at time t (after t days)
b    = Birth factor
m    = Mortality factor
r    =   b-m  =  Reproduction factor
K    = Carrying capacity of the environment

Let’s rewrite formula [5] to show the daily growth of the population

[6]    Nt+1 – Nt = Nt × r

In this equation, the daily growth is represented by r. That is fine at low population densities. But as the population size is approaching K we want the daily growth to be reduced towards 0. For this we include a new factor (a fraction between 0 and 1) which reflects how close the population size is near the carrying capacity (K).

[7]    Nt+1 – Nt = Nt × r × (K – Nt ) / K

which is equivalent to

[8]    Nt+1 =  Nt + Nt × r × (1 – Nt / K)

This new factor (K – Nt ) / K  or (1 – Nt / K) will be 0 when population size has reached K. At very low population size, this factor will be almost 1.

Now try it with different values for r ( = b-m ) and K. You can change the default settings, then run the simulation.

Simulation 3

Simulation settings

Simulation 3
Insect population    
Start population size (N0) ( 1 or higher)
Equilibrium maximum (K) ( 1 or higher)
Birth factor ( 0 or higher)
Mortality factor ( 0 or higher)



When reproduction factor r (difference between b and m) is between 0 and 1 we see an s-shaped population growth which stabilizes at K. This is a sigmoid curve and it is in fact the model we are looking for. If we select a start population higher than K, the population will quickly fall back to the equilibrium.

But the model allows us to test some other (unrealistic) values for r. With values of r that are higher than 1 we see different types of behavior. Values of r between 1 and 2 show an oscillation around K, but the population finally stabilizes at K. With values between 2 and 2.4  the population reaches a point where it shows an oscillation between 2 values. Higher values result in oscillations between 4 points (r =  2.45 – 2.53) or between 8 points (r = 2.55-2.56) or in very chaotic looking fluctuations (r = 2.57-3.0). When r reaches above 3 the population will quickly die.

All this strange behavior with different values of r looks interesting, but for our simulation of an insect population it is not very useful. We have already decided that for an insect population the birth factor b should be in the range 0.1 – 0.5 and if we don’t want the population to go extinct we have to use a mortality factor m that is lower than b. If we set values of r>1 we are simulating populations with an abnormally high reproduction.

Simulation 3 also allows you to set an r value below zero (if you set m bigger than b). This is also an unrealistic situation because the population will decline and die out. The simulation shows this if you start below K. However with r below 0 and starting above K the model gets crazy: with r negative and also (K – Nt ) / K being negative, the model would show a population increase. Try it.

To avoid such strange behavior, I will in the following simulations not allow mortality (m) to be higher than birth (b). So (r) has to be 0 or above.

Another problem may arise if you set the start population higher than the Equilibrium maximum (K). It is a situation which in nature could not happen, unless you release pests on purpose. So I will in the following simulations not allow the simulation to start at a population level (N0) above the equilibrium maximum (K).

But with any simulation you have to consider carefully how you set the parameters. Remember GIGO (Garbage In, Garbage Out). Erroneous input causes erroneous output.


With formula [7] and with values of b between 0.1 and 0.5  and with values of m below b, we have a simple model for the development of an insect population. When starting at low population density, the growth follows a sigmoid curve until it reaches the environment’s carrying capacity K. When starting above K, the population quickly declines to K.

Go to Simulation 4: Simulate use of pesticides.

The scripts for these simulations are written in JavaScript. If you have any questions or comments, or if you discover any errors, please contact me.

Scroll to Top