· 10 years ago · Sep 27, 2016, 09:02 PM
1Scenario 4: A Population Model
2When studying the environment, scientists sometimes look at how population sizes of animals and plants change over time. The scientists can use this information to find out which species are in danger of becoming extinct, to predict the effect of introducing a foreign species of animal into the countryside, or to discover the effect of a pollutant.
3Studying populations of animals and plants in the wild can take a very long time, so scientists use computer models to help them in their studies.
4You have been asked to create a simple population model to investigate how a greenfly population changes. Greenflies are a common insect that are considered to be a pest by gardeners because they damage roses and other garden plants.
5The photograph above shows a greenfly infestation on a rose bush.
6The life cycle of greenfly is complex and the model you have been asked to create will model only some aspects of the greenfly life cycle. In the summer, the population consists only of females and each female gives birth only to females.
7The Population Model rules
8To create a population model, the following rules must be followed.
91. The population consists only of females.
102. At any one time there are three types of individual in the population:
11• Seniles – old greenfly that do not reproduce
12• Adults – greenfly that are reproducing
13• Juveniles – greenfly that are too young to reproduce.
143. The model lasts for a set number of new generations. At the end of each generation:
15• all surviving senile greenfly remain as seniles
16• all surviving adult greenfly change from adults to seniles
17• all surviving juvenile greenfly change from juveniles to adults.
184. Each type of individual has a survival rate. The survival rate is used to calculate the number of individuals that survive at the end of each generation. This number can be a value between 0 and 1.
19• A survival rate of 0 means no individuals of that type survive at the end of the generation.
20• A survival rate of 1 means all the individuals of that type survive at the end of the generation.
21• A survival rate of 0.25 means that a quarter of the individuals of that type survive to the next generation.
22The number of individuals surviving to the next generation is calculated using the formula:
23New number of individuals = Current number of individuals * survival rate
245. Adult greenfly have a birth rate. The birth rate is used to calculate the number of juveniles that adults produce each generation. This number can be a fraction, so a birth rate of 1.5 means that, on average, each adult produces 1.5 juveniles each generation.
25The number of juveniles born each generation is calculated using the formula:
26New number of juveniles = Current number of adults * birth rate
276. Numbers of individuals in the model are measured in thousands.
287. The following values must be set before the model is run:
29• the initial numbers (called Generation 0) of juveniles, adults and seniles
30• the birth rate and survival rates
31• the number of new generations over which the model runs. This must be between 5 and 25.
32Example data
33Table 1 shows the data that are used by the model to generate the results in Figure 1.
34Table 1
35Type of greenfly
36Initial population (1000s)
37Survival rate
38Juvenile
3910
401
41Adult
4210
431
44Senile
4510
460
47Number of new generations = 5
48Birth rate = 2
49Figure 1 shows the way the model works for five new generations.
50Figure 1
51(population numbers are in thousands)
52GENERATION
53JUVENILES
54ADULTS
55SENILES
56TOTAL
570
5810
5910
6010
6130
621
6320
6410
6510
6640
672
6820
6920
7010
7150
723
7340
7420
7520
7680
774
7840
7940
8020
81100
825
8380
8440
8540
86160
87
88Tasks
891. Develop a main menu for the program. The options on the main menu should be:
90• Set the Generation 0 values
91• Display the Generation 0 values
92• Run the model
93• Export data
94• Quit.
952. Develop the part of the program that allows the user to set the Generation 0 values for the:
96• population numbers of juveniles, adults and seniles
97• survival rates for juveniles, adults and seniles
98• birth rate
99• number of new generations to model. This should be between 5 and 25.
100The program should then return to the menu.
1013. Develop the part of the program that will display the Generation 0 values for juveniles, adults and seniles, the birth rate and the survival rates. The program should then return to the menu.
1024. Develop the part of the program that runs the model, displaying the number of juveniles, adults and seniles and the total population size for each generation from 0 to the number of new generations entered. The program should then return to the menu.
1035. The model needs an export feature to save the data so that it can be used in another application (such as a spreadsheet package).
104Develop your program so that when the user chooses to export the data:
105a) They are asked to enter a suitable filename
106b) The program should check whether a file of the same name already exists.
107c) If the file does not already exist, then the data are saved.
108d) If the file does already exist, the user should be asked whether they want to overwrite the existing file.
109e) If they choose to overwrite the existing file, then the data are saved.
110f) If they choose not to overwrite the existing file, then they should be returned to step a.
111After this option has been completed, the program should return to the menu.
112
1136. In a real population, if the total population becomes too high, the survival rates will decrease because of disease.
114When the total population size reaches a disease trigger point, disease will take effect.
115When the total population size falls below this trigger point, disease will have no effect.
116The effect of disease is unpredictable. To simulate this effect a disease factor is applied to the survival rates of juveniles and seniles.
117• The disease factor is represented by a random percentage between 20% and 50%.
118• To calculate the new number of juveniles and seniles in the next generation, the following formula is used:
119New number of individuals = Current number of individuals * survival rate * disease factor
120Extend your menu from Task 1 to include an option to enter the total population disease trigger point.
121Extend your program to allow for the effect of disease in calculating the population sizes. Disease will reduce the survival rates of juveniles and seniles only.