Pesticide Resistance Simulation

Introduction

This page contains a JavaScript that simulates the development of pesticide resistance in an insect.

When an insect population gets repeatedly sprayed with a pesticide, the population develops pesticide resistance.

I made a simulation model for this. Below you will find the script and you can play around with different settings. But let’s first discuss what the simulation is supposed to do.

I intended to make a simulation of monogenic pesticide resistance. So only one gene is involved in the pesticide resistance. This also happens in real life situations, for example the monogenetic DDT resistance in Drosophila melanogaster depends on one gene.

In my model, the gene has two alleles, A and a. Insects with genotypes AA and Aa are resistant, and insects with genotype aa are sensitive to the pesticide.

If an insect population after repeated pesticide applications becomes resistant against the pesticide, this is not happening because the pesticide ‘makes’ the insects resistant. It happens because the pesticide selectively kills the susceptible insects while the resistant ones survive. The ‘resistance gene’ (allele A) must therefore have been present in a susceptible insect population, but in a low frequency. When the pesticide sprays start killing the susceptible insects, the frequency of A in the population will increase. So why do insects have these resistance genes to begin with?

For my simulation model I imagined an insect population that can produce an enzyme that detoxifies certain toxic chemicals in its food plants, and that the same enzyme can also detoxify the pesticide.

To build a simulation model, I had to make a few assumptions and simplifications:

  • We have an insect population that feeds on two species of food plants: X and Y.
  • Insects have no preference between the plants; they feed on both plants and the proportion of X and Y in their diet depends on the relative availability of the two plant species.
  • The ratio between X and Y varies in time. So some generations of the insect population eat more X and others may eat more Y.
  • Plant Y contains a natural toxin that reduces the fitness of the insects; it reduces the egg production of the insects that feed on the plant. Insects that feed on Y produce fewer eggs than insects that feed on X.
  • On a mix of plants, the effect of the toxin is intermediate. For example if the toxin reduces egg production 40%, then an insect that feeds equally on X and Y will have a 20% reduction of eggs.
  • Insects with genotypes AA or Aa produce an enzyme that can neutralize the toxin of plant Y. For these insects, it doesn’t matter which plant they are eating.
  • BUT, … producing the enzyme has a ‘cost’. An insect that produces the enzyme will produce fewer eggs than an insect that does not waste energy producing the enzyme.
  • This means that if the majority of plants are of type Y (with toxin), the AA and Aa insects have an advantage because they are not affected by the toxin. If most plants are of type X (no toxin), the aa insects have an advantage, because they don’t have the ‘cost’ of producing the enzyme.

Here is an example for an insect population that produces a maximum of 100 eggs per female. The toxin of plant Y reduces egg production by 40%. Producing the enzyme reduces egg production by 15%. The table shows how egg production of the different genotypes depends on the food plants they eat.

Genotype Phenotype Only X 75% X
25% Y
50% X
50% Y
Only Y
AA Enzyme 85 85 85 85
Aa Enzyme 85 85 85 85
aa No enzyme 100 90 80 60

The table shows that:

  • Maximum egg production is in insects that feed only on X and produce no enzyme.
  • For insects with the enzyme, it doesn’t matter which plants they feed on.
  • Insects without the enzyme have an advantage if most food plants are of type X, but a disadvantage if most food plants are Y.

We now have a general picture of our model insects in a natural situation before any pesticides are involved.

Hint: In the simulation model you can try different ratios of plants X and Y and see what happens to the alleles
A and a. Or you can try varying the ‘cost’ of feeding on Y and the ‘cost’ of producing the enzyme.

In this model we then introduce pest control with a pesticide that can be detoxified by the same enzyme. Here are some more considerations for the rest of the simulation model.

  • To make it simple, the pesticide does not have an effect on egg production but only on mortality. In the presence of the pesticide an insect gets killed or it survives. If it survives, the egg production is not affected.
  • With pesticide spray, the percentage mortality depends on the presence of the enzyme.
    • Insects without the enzyme have a high percentage mortality, for example 90%.
    • Insects with the enzyme will have low mortality. This could be 0% (all survive), but we will allow the possibility that some die, for example 5% mortality.
  • We want the user of the model to have control over the spray moments, for example spray every generation, or every nth generation.

This seems to set the stage for the simulation, but there is one more thing to consider. Insects multiply rapidly because they lay many eggs, so the population size will quickly explode (exponential growth). We therefore need another mortality factor apart from the occasional pesticide sprays.

Generally, a mortality factor should be made density dependent; it should be low when we have few insects and high when we have many insects. However, in this simulation we are not so much interested in population sizes, so we can make it simple and just set a ceiling for the population size. At the end of each generation the model will randomly ‘kill’ everything that exceeds the maximum population size.

Running the simulation

The form below allows you to change the simulation settings. It is already filled with some default values, which you can change. Most settings have a minimum and a maximum value.

For the percentage of plant type Y, you can enter two values. Each generation, the script will pick a random value within this range. If you want a fixed percentage of Y (and X), just enter two times the same value. If you want complete randomness of X and Y, let the range be from 0 to 100%.

The form has two settings that determine which generations get sprayed. In the first one you set an interval, for example spray every 10th generation. In the second one you enter a list of generations that will get the pesticide spray. The script combines the two settings.

Simulation output

With your settings, the script runs the simulation and shows the result in two or three graphs and a table.

  • The first graph shows the fractions of alleles A and a in the population.
  • The second graph shows the number of female insects with genotypes AA, Aa and aa. Note that because of the fixed sexratio in this model (50%) the number of males and their genotypes would be exactly the same.
  • The third graph is displayed when there are sprays. It shows the percentage of insects killed by the spray.
  • The table shows number of females, alleles A and a, and percentage killed.

Time to start.

Tip: Hide this introduction text while running the simulations.


Settings for the simulation


(between 1 and 1,000 generations)

(between 1 and 1,000,000)

(between 2 and 400)

(between 1,000 and 10,000,000)

(between 0 and 1)

(auto)

(range between 0 and 100%)

(between 0 and 100% egg reduction)

(between 0 and 100% egg reduction)

(between 0 and 100%)

(between 0 and 100%)

(between 0 and 100 generations)

(e.g. 5,12,13,14,30)

Learn more with demo settings

You can play around with the form and run simulations with your own settings or you can try some of the following demos, which each include some explanations that clarify how the model works.

Some simulations without spraying pesticide

What happens with different cost of toxin and cost of producing enzyme?

Cost of enzyme is higher than cost of the toxin

Cost of enzyme is lower than cost of the toxin

Cost of enzyme and cost of toxin are exactly the same

Cost of enzyme and cost of toxin are more or less the same

What happens if we have different ratios between plants X and Y?

Most plants are Y

Most plants are X

Random ratio of plants

Some simulations with pesticide

What happens if we spray the population at regular intervals?

Similar to Demo 1 but spray every 5th generation.

Same as Demo 8 but spray every 20th generation.

Hidden resistance

What happens if allele A is very rare?

Single spray in a very susceptible population.

Multiple sprays in a very susceptible population.

Managing pesticide resistance

So, where are we now? We wanted a simulation for an insect population which initially is susceptible to a pesticide. We have seen that if the cost of the toxin is higher than the cost of the enzyme, then the fraction of the resistance gene (allele A) will increase and the population becomes resistant without ‘help’ of a pesticide. That means that for our model we need to find a setting where in most generations the cost of the enzyme is higher than the toxin cost, and only occasionally the toxin cost is higher.

If we let the plants X and Y vary at random (range 0 to 100%) and set the cost of the toxin to 31 and the cost of enzyme to 30, we have such a situation. Generally (in about 97% of all generations) the cost of the enzyme will exceed the cost of the toxin.

In the absence of spray, the allele A will gradually decrease. You can see that in Demo 12, where we make the susceptible population resistant by spraying 10 generations in succession. The first spray will kill 90%, but within 10 sprays the efficiency drops dramatically. In the generations that follow, without pesticide, allele A will decrease again.

Multiple sprays in a very susceptible population.

Now we can try different frequencies of spray. With high frequency, the population will become resistant and then stay resistant because it has no time to recover. If we increase the spray interval, we will see that the population can stay susceptible if we allow sufficient time between sprays to let allele A decrease. Demos 13, 14 and 15 show this with different spray intervals.

Spray interval 5 days.
Spray interval 10 days.
Spray interval 15 days.

Main conclusions

  1. Even if the allele that causes resistance is very rare, repeated spray in high frequency will cause the population to develop resistance. This is demonstrated in Demo 11, but you could try it even more extreme. In Demo 11, increase the number of generations to 1000 and then start to spray in generation 900. With few sprays, you will see nothing happening. It will take more than 30 consecutive sprays before you start seeing an effect, but eventually the resistance pops up.
  2. Resistance can be ‘managed’ by allowing sufficient long time between sprays. Demo 15 shows that with sufficient long intervals between sprays the sprays will not lose their efficiency.

Have fun. Please send me your comments.

Scroll to Top