Building the 2nd Model -- Add a Genetics Sector

Let's expand the introductory model to allow random mating between the black and white adults. We will use two sectors -- a main sector to simulate the population life cycle and a genetics sector simulate whether the matings lead to white or black broods. The "main sector" is shown in Figure 4 . It keeps track of the 12 month life cycle, and it assumes that black and white moths are exposed to the same loss fractions.

Figure 4. Main sector of the second model.

The "genetics sector" is shown in Figure 5. This sector simulates two phenotypes, black and white.
  • The black (melanic) moth may be an individual with either of two genotypes (MM or Mm). (M stands for the melanic allele which is dominant; m stands for the light allele which is recessive.)
  •  The white (typical) moth will have only one genotype (mm).
The genetics sector keeps track of the matings and resulting broods with either the black phenotype or the white phenotype.

Figure 5. Genetics sector of the second model.

The genetic information is embedded in the three probabilities shown in Figure 5:

 probability_of_White_from_WW_mating
= 1
Let's start with the probability that a mating between two white moths will lead to a white brood. A mating between two white moths is certain to lead to a white brood because both the male and the female have the white allele (m).

 probability_of_White_from_WB_mating
= .25
Next, consider the matings between a white female and black male (or between a black female and a white male). The probability of a white brood is set at 25% based on the assumption that half of the black parents are homozygotes (MM) and half are heterozygotes (Mm). When one of the parents is a homozygote, the brood will be black, so at least 50% of the broods will be black. The other 50% of the matings are between heterozygotes, and half of these will result in a white brood. Consequently, the probability of a white brood is set at 0.5*0.5 or 25%.

 probability_of_White_from_BB_mating
= .0625
The third probability involves the matings between a black female and a black male. The probability of a white brood from such a mating is set at 6.25% based on the assumption that half of the black parents are homozygotes (MM) and half are heterozygotes (Mm). There is a 1 in 4 probability of heterozygotes mating, and these are the only matings with a possibility for a white brood. When heterozygotes mate, 25% of the matings will lead to a white (mm) brood. Consequently, the probability of a white brood is set at 0.25*0.25 or 6.25%.

The genetics sector finds the number of broods from each of the eight possible matings and uses Stella's summer feature to find the total of white broods and the total of black broods. The totals are passed to the main sector to keep track of black and white egg deposition.

Now, you should remain alert to the assumptions underpinning the three probabilities. The key assumption is that the two genotypes of the melanic phenotye are equally frequent. This may be true after one generation of random mating (ie, as described by the Hardy-Weinberg principle). But it is not necessarily true in general.