Simulate an Insect Population


This page gives background information on a simulation model that was written to see how insect populations can be regulated by parasitoids, predators and other mortality factors. Click here to start the simulation

Insect population dynamics

Insect populations can grow very rapidly. There are two reasons for this. One reason is that insects have a short life cycle; it takes only a short period to develop from egg to larvae to pupa to adult. Another reason is that female insect will usually produce hundreds of eggs.

What would happen if all these insects survive?

Imagine we start with one female moth which lays 200 fertile eggs. If all would survive, we will have after one generation 200 adult moths. About half of these would be females, so we have 100 adult females. These females will lay 100×200 = 20,000 eggs resulting in 10,000 2nd generation females. They will produce 1,000,000 3rd generation females, who will produce 100,000,000 4th generation females, and so on. A real population explosion is the result. Within a couple of weeks the population has grown from one female moth to a hundred million.

Fortunately there are many reasons why this doesn’t happen.

What factors keep pest populations under control?

At all stages (egg, larva, pupa, and adult) some insects will die for a variety of reasons. These mortality factors can be biotic (e.g. parasitoids, predators and diseases will kill some insects) or abiotic (some will die because of bad weather conditions such as wind or rain).

In nature, all these mortality factors together usually help to regulate populations of insects.

A simple example: A population of house flies can grow rapidly when there are only few spiders. When there are many flies there is plenty of food for the spiders, so the spider populations will grow. There are now many spiders eating the flies so the fly population decreases. When there are few flies left the spiders have nothing to eat any more, so now many spiders will die. And when there are only few spiders left, the fly population can start growing again.

In real life it is a bit more complicated then this. To see how insect populations can be regulated I have made a small program (JavaScript) that simulates the growth of a population of insects, which is being regulated by a range of mortality factors (parasitoids, predators, wind, rain). To start the simulation, the user will first set the value of several variables (for example: percentage eggs killed by egg parasitoids, percentage larvae killed by predators, number of eggs per female, etc.) and the script will then calculate how the insect population develops.

Simulating a population of insects

The model can start with a wide range of data. I have tried to set default values that simulate a well-known insect pest, the Diamond-Back Moth (Plutella xylostella). In many parts of the world this insect can cause serious damage to cabbage, cauliflower, kale, or similar crops. The simulation model can show how quick populations of Diamond-Back Moth (DBM) can develop, and what factors keep the population under control? In the rest of this explanation I will refer to DBM as an example, but when you run the simulation you can enter your own starting data.

Larva, pupa and adult of the Diamond-Back Moth

Population dynamics of Diamondback moth

For the simulation model we first need some general background information about the life cycle of the pest. What do we know about DBM?

  • A female will lay between 50 and 400 eggs
  • Eggs develop in 2 to 3 days
  • The larval stage (small green caterpillars) takes 8 to 10 days
  • The pupal stage (a pupa in a small cocoon) takes 3 to 4 days
  • Adult female moths will deposit their eggs after 5 to 7 days

The life cycle depends a lot on the environmental conditions (availability and quality of food, temperature, etc.). When conditions are good the population will develop faster because there will be more eggs and the duration of each development stage will be shorter. Under poor conditions the development takes longer and the population will grow slower.

A percentage of the eggs will not survive

Eggs of DBM can be killed by egg parasitoids (e.g. Trichogramma wasps) and by predators (e.g. Ladybird beetles). Also some eggs will not hatch because they are either infertile or they are killed by other environmental factors (e.g. fungal diseases, sunshine, rain, etc.).

The effect of parasitoids and predators is density dependent. If there are very few diamondback moth eggs in the field, the parasitoids and predators will have a hard time finding them. They may even fly away to other fields to find more food. Therefore, at low population densities of DBM, parasitization and predation rates will be low. But when there are many DBM eggs in the field, the parasitoids and predators can easily find them and populations of these natural enemies will start to increase. Therefore, at higher population densities, a higher percentage of eggs is being killed by parasitoids or predators.

The simulation model takes this into account. For example, for egg parasitoids and for egg predators you can enter a "low" value and a "high" value for the percentage of eggs that will be killed. During each cycle of the simulation, the script will use an algorithm to select a parasitization or predation rate depending on the number of eggs. This value will be near the "low" when there are few eggs in the field, and near the "high" when there are many eggs.

For the effect of other factors (sunshine, rain, fungal diseases, etc.) you can also enter a low and a high value for the percentage that will be killed. But as these factors are not (or hardly) density dependent, the program will in every cycle select at random a value between the low and high. This mimics the effect of good or bad environmental conditions.

A percentage of the larvae and pupae will not survive

Larvae are killed by a number of larval parasitoids (e.g. Cotesia sp. and Diadegma sp.), by predators (e.g. ladybird beetles, birds, spiders), and by other factors (e.g. rain, sunshine, diseases). The same is the case for pupae (e.g. Diadromus collaris is a pupal parasitoid of DBM).

Just like egg mortality, the simulation model will calculate larval and pupal mortality based on "low" and "high" values that are entered by the user. Effect of parasitoids and predators is density dependent (i.e. if many larvae are present in the field, the percentage that is killed by parasitoids and predators will be higher). Effect of other factors is a random value between the selected “low” and “high”.

A percentage of adults will be killed before they can reproduce

Some adult moths are killed by predators (e.g. spiders, birds) or by adverse weather conditions (e.g. wind, rain). Adult mortality by predators is again density dependent. Mortality that results from bad weather is a random value between the selected "low" and "high".

How does the model use density dependent mortality factors in the simulation?

We have already seen that the program will select low parasitization and predation rates at low population densities, and higher mortality at high population densities. But what is low and what is high density?

Let’s assume the simulation of Diamondback moth to take place in 1 hectare of cabbage. With a planting distance of 0.5 x 0.5 meter we have about 40,000 cabbage plants on a hectare.

It’s the caterpillars (larvae) that do the damage to the plant, so the number of larvae is of special interest for the farmer. Let’s look at population densities of the larvae. What are the densities that we would call low, medium or high?

A density of 10,000 caterpillars per hectare is about 0.25 larvae per plant. This is a rather low population density and a level that can be easily tolerated considering the small size of diamondback moth caterpillars.

A density of 100,000 caterpillars per hectare is something to start worrying as it corresponds to about 2½ larvae per plant. A conventional farmer would probably start spraying pesticides even at slightly lower densities.

A density of 1,000,000 is quite serious. With 25 larvae on each plant the cabbage heads would be seriously damaged. Cabbages with so many caterpillars crawling around would not get a high price at the market.

Based on this the simulation model uses an algorithm to select the lowest mortality factors when insect densities (eggs, larvae, pupae, or adult DBM) are near or below 10,000. It will use high mortality rates when populations are near or exceeding 1,000,000. And it will use intermediate values when the population density is around 100,000 insects.

Explanation of the algorithm to calculate density dependent mortality factors

Density dependent mortality factors are calculated by the program based on the “low” and “high” values that were entered by the user, and based on the actual population density.

The script uses a sigmoid curve based on the formula: y = c+ d / (1 + exp(bx-a))

In this formula:

  • “x” represents the logarithm (base 10) of the population density
  • “y” is the mortality factor we are looking for
  • value “a” shifts the curve from left to right
  • value “b” will change the angle of the curve (if b is a positive number the curve will slope down, to slope upwards b has to be negative)
  • value “c” determines the “floor” of the curve (which is the “low” value entered by the user)
  • and “c” + “d” determines the “ceiling” (the “high” value entered by the user)

In the model, the values “a” and “b” have been set to -10 and -2. This results in a curve that centers at x = 5, which corresponds to a population size of 100,000.

An example:
Let’s assume that the “low” value is 0.32 (i.e. 32% mortality) and the “high” value 0.71 (i.e. 71%) and we want to find egg mortality at a population size of 220,000 eggs. The sigmoid curve calculated by the algorithm will look like this (note floor and ceiling):

Sigmoid curve to find density dependent mortality factor

The program will look up the egg mortality at x = log(220,000), which is at x = 5.34. It finds the corresponding egg mortality factor to be 0.579, equivalent to 57.9% mortality.

It can be seen in the graph that at population sizes below 10,000 (x=4) the mortality approaches the “low” value, while above 1,000,000 (x=6) it approaches the “high” value.

More variation needed?

Computers have no fantasy. If you would select a low predation rate of 40% and a high of 70% then the simulation model would at a medium population density of 100,000 DBM always set the predation rate at 55% (half way 40 and 70).

To make the simulation a bit more realistic I therefore introduced an extra variability factor, which creates at random small variations in the values that were entered by the user. Instead of running each cycle with predation 40-70%, the simulation could for example use 38-65% in one generation and 41-72% in the next. A higher variability factor creates more of this variation. If you set variability to 0% the program will use fixed low and high values (the actual low and high values entered by you). If you set it to 100%, the low and high values can fluctuate up to 10 percentage point. That means that if you set high to 80%, the program will pick a random high value between 70 and 90%.

Less variation needed?

As explained already, several mortality factors are density dependent. You select a low percentage mortality for low densities and a high percentage for high densities. It is possible to select the same value for "low" and "high". This will fix the mortality rate; it will not be density dependent. But doing that, the results of the simulation will of course be less realistic.

When does the simulation stop?

The program will simulate a fixed number of generations (maximum 40), but it will stop earlier if the number of females is below 1 (the population has completely collapsed) or if the number of larvae is higher than the maximum which can be set by the user. Default for this maximum is 10,000,000 (the population has exploded and with over 250 caterpillars per plant they will soon run out of food).

How realistic is this simulation model?

Well, it's just a simple model to simulate population growth with a few mortality factors that can (or cannot) stabilize the population. A model is always a simplification of a situation which in real life is much more complex. For example, the model works with generations that develop one after another. At a given time there is only one development stage in the field. This is not realistic. In real life, there will be always a mix of development stages at the same time in the cabbage field. Another simplification of the model is that it doesn't consider immigration (of pests and natural enemies). In a real cabbage field, the populations of DBM and its parasitoids would increase or decrease by insects flying into the field or away from it.

Time to get started

With this introduction I hope you have enough information about Diamondback moth (the insect used for default settings) and about the simulation model. When starting the simulation you will first see a form where you can set a lot of parameters that determine population growth and mortality factors. The form starts with some default values which you can keep or replace.

Click here to run the simulation. If you need more information or if you have a comment, please write me.

Scroll to Top