* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Educational Simulation of Complex Ecosystems in the World
Survey
Document related concepts
Storage effect wikipedia , lookup
Habitat conservation wikipedia , lookup
Unified neutral theory of biodiversity wikipedia , lookup
Ecological fitting wikipedia , lookup
Latitudinal gradients in species diversity wikipedia , lookup
Occupancy–abundance relationship wikipedia , lookup
Restoration ecology wikipedia , lookup
Introduced species wikipedia , lookup
Reconciliation ecology wikipedia , lookup
Biodiversity action plan wikipedia , lookup
Island restoration wikipedia , lookup
Transcript
Educational Simulation of Complex Ecosystems in the World-Wide Web Manuel Alfonseca, Juan de Lara, Estrella Pulido Dept. Ingeniería Informática, Universidad Autónoma de Madrid {Manuel.Alfonseca, Juan.Lara, Estrella.Pulido}@ii.uam.es Acknowledgement: This paper has been sponsored by the Spanish Interdepartmental Commission of Science and Technology (CICYT), project numbers TIC-96-0723-C02-01 and TEL97-0306. Abstract This paper describes the procedure we have used to generate semiautomatically a course on Ecology for the high-school level, using an extension of the Volterra equations to describe the interaction between different species levels. The simulations used in the course have been written in our own special-purpose object-oriented continuous simulation language (OOCSMP) and also in Modelica. Our compiler for this language automatically generates Java code and html pages, which must be completed manually with the associated text and icons. Introduction The currently most successful hypermedia system is the World Wide Web (WWW), which has the great advantage on traditional hypertext applications of being distributed, working in a natural way on a computer network, and being available from very distant locations all around the world. This has brought around the current proliferation of educational courses in the WWW, which run from a simple transposition of lecture notes, to pages including more sofisticated elements, such as animated graphics, simulations, and so forth. There are, however, few studies about the usefulness of these resources for the students and the teachers. The recent emergence of the Java language as the standard tool for the execution of programs associated to the WWW has made these eduactional applications more interactive, faster in execution (in spite of Java's interpretative nature), and easier to transport to multiple platforms. We have been working for some time on the development of advanced simulation [1] tools that simplify the generation of educational courses for the WWW. The language we are using for this purpose is an extension to the old CSMP language (Continuous System Modelling Program), sponsored by IBM [2]. We call the new language OOCSMP [3], for its main difference with CSMP is the addition of objectoriented constructs which make much easier the simulation of complex systems based on the mutual interaction of many similar agents. We have used this language to build a course on Newton's gravitation and the solar system [4]. In a previous publication [5] we have described our first approach to the development of a course on Ecology in the WWW, aimed at high-school students, which simulates the behavior of an ecosystem with three to five species belonging to three different levels: • A primary producer (a plant) • One or two preys (herbivores) • One or two predators (carnivores) Different situations are simulated, such as perfect equilibrium between three species, which is broken by the invasion by a new species (a second prey or a second predator or both). A page is also included with an user interface that lets the student modify the different parameters of the five species ecosystem to perform experiments. In this paper, we are presenting a second version of the course, which simulates a much more real and complex ecosystem, including fifteen different species which interact to build complicated trophic chains 1 and ecological niches. The ecological model has been written in OOCSMP and also in the Modelica language [6]. A real ecological model In real ecosystems, things are never so clear and straightforward as in the first model we used. We have detected the following problems: • • • • • A predator may be prey for another predator. A species may be prey for one predator, but not for another. A predator may be omnivorous (i.e. it preys upon both primary producers and herbivores). Trophic chains longer than three species are frequent. Ecosystems are divided in niches, which means that neighboring species may neither belong to the same trophic chain, nor compete for the same resources. Like the former, our new model, is also based upon the Volterra equations [7], but with a few modifications. We consider three different types of species: • Primary producers, usually plants, which are preyed upon, but do not prey. The evolution of their population X follows the equation: X' = m.X - ∑ ni.X.Yi where [Yi] is the vector of populations of the species that prey upon the primary producer (consumers), [ni] is a vector of coefficients, giving the share of each consumer (herbivore or omnivore) feeding on the primary producer. Finally, m is the coefficient of spontaneous reproduction of the primary producer, which regulates the speed with which its population increases in the absence of consumers. • Superpredators, which prey but are not preyed upon. The evolution of their population X follows the equation: X' = -m.X + ∑ ni.X.Yi where [Yi] is the vector of populations of the species preyed upon by the superpredator, [ni] is a vector of appetence coefficients, proportional to the share of each prey on the feeding habits of the superpredator. Finally, m is the coefficient of inverse resistance to hunger of the superpredator, that regulates the speed with which its population declines in the absence of food. • Intermediate consumers, which prey and are preyed upon. The evolution of their population X follows the equation: X' = -m.X + ∑ ni.X.Yi - Sigma pi.X.Zi where [Yi] is the vector of populations of the species preyed upon by the consumer, [ni] is the corresponding vector of appetence coefficients, [Z i] is the vector of populations of the species preying upon the consumer, [pi] is the corresponding vector of coefficients, and m is the coefficient of inverse resistance to hunger of the consumer, regulating the speed with which its population declines in the absence of food and predators. In this model, no distinction is drawn between predators and herbivores. A consumer may be either or both (as in omnivore species). All the problems detected in the preceding model are thus solved. The modelled ecosystem is in perfect equilibrium when the first derivatives of all the species are zero and no straneous effects happen (such as illnesses or invasions). In our first version of the new model, we considered the [ni] and [pi] coefficients to be constant for a given species. However, this assumption was found not to adapt to the real situations. For example: let us take an ecosystem in equilibrium with the following four species: • A lion as superpredator. • Zebras and gnus as consumers. • Long grass as primary producer. The lion appetence vector for zebras and gnus is [0.7, 0.3], meaning that in the initial conditions 70 percent of its preys are gnus, 30 percent are zebras. Assume now that gnus are subject to a sudden 2 epidemy and their population is reduced to one half. If the lion's appetence coefficients were to be constant, the number of zebras the lion would capture would remain the same, but it would get less gnus, and the lion population would decrease immediately. The zebra population, on the other hand, would increase suddenly, as it would find less competence for the primary producer and would be less preyed upon. Finally, the gnus would never recover, as they would still support a large rate of predation by the lions. The ecosystem would be unstable. This is not what would happen in a real ecosystem. The lions would adapt to the change by modifying their appetence coefficients, increasing the proportion of zebras and reducing that of gnus. The result would be an initial decrease in the zebra population (instead of an increase) soon followed by an increase when the grass population would go up, due to the decrease in gnus. The gnus, on the other hand, would recover thanks to the reduced rate of predation they would suffer. After some time, things would come back more or less to equilibrium. The ecosystem would be stable. A way of representing this situation in the model is by making the [ni] and [pi] coefficients functions of the population proportions. This change solves the indicated problem and gives rise to stable situations, that recover from small alterations. Listing 1 depicts the resulting model, written in OOCSMP, which also introduces the possibility of simulating epidemics and such effects. ************************************************************ * Definition of the Species class * ************************************************************ CLASS Species { ****************************** Data ************************ NAME name DATA X0, M, N1, N2:=0, start:=0, max:=1000, K:=1 DATA Ill:=10, When:=1000, Int:=1000 **************************** Equations ********************* DYNAMIC X:=STEP(start)*LIMIT(1E-6,max,XT) XT:=INTGRL(X0,XP) XP:=K*X*(M-IMPULS(When,Int)*Ill) XPdel1 :=0 XPdel2 :=0 TEats :=0 TEats0 :=0 ***************************** ACTION *********************** ACTION Species S, Percent, Last XPdel1 +=INSW(Percent, Percent*S.X*S.TEats0/S.TEats, 0) XPdel2 +=INSW(Percent, 0, Percent*S.X*S.X/S.X0) TEats +=INSW(Percent, 0, 1)*S.X TEats0 +=INSW(Percent, 0, 1)*S.X0 XP +=INSW(Percent, Last*K*N2*X*XPdel1*X/X0, Last*K*N1*X*XPdel2*TEats0/TEats) } Listing 1: OOCSMP definition of the Species class (file Species.CSM) Each species contains the following attributes and parameters: • • • • • • • • • X0: initial population. X: actual population. XP: first derivative of the population. M, N1, N2: coefficients in the extended Volterra equation. start: time at which the species invades the ecosystem (its default value is zero, i.e. the species is a permanent member of the ecosystem). max: a practical limit to the species population. Ill: intensity of a possible illness affecting the species. When: point in time when the illness happens. Int: interval of repetition of the illness. The default values of the three preceding parameters are such that no illnesses happen. A simulation of the African savanna We have used the model to simulate a part of the African savanna ecosystem. The data used for the parameters and coefficients are more or less real, as found in the literature [8]. Our model contains fifteen different species, four of which are carnivore, six herbivore, two omnivore, and three primary 3 producers (plants). There are several trophic chains, the longest of which consists of five species: lionjackal-rat-locust-grass. Listing 2 shows the model of the savanna in OOCSMP. INCLUDE Species.CSM ***************************************************************** * Actual species * ***************************************************************** Species Lion ("Lion", 2,-.0195,.001 ) Species Cheetah("Cheet", 4,-.028, .001 ) Species Hyaena ("Hyaen", 4,-.024, .001 ) Species Jackal ("Jacka", 10,-.0128,.0002, .0012) Species Zebra ("Zebra", 20,-.012, .0001, .01 ) Species Gnu ("Gnu", 20,-.01, .0001, .01 ) Species Buffalo("Buffa", 10,-.02, .00007, .004 ) Species Gazelle("Gazel", 30,-.025, .000115,.005 ) Species Giraffe("Giraf", 10,-.01, .00028, .002 ) Species Boar ("Boar", 30,-.021, .00025, .0125) Species Rat ("Rat", 80,-.01, .00015, .002 ) Species Locust ("Locus",100,-.02, .000305,.002 ) Species LGrass ("LGras",400, .016, 0, .0005) Species SGrass ("SGras",400, .027, 0, .0005) Species Acacia ("Acaci", 50, .01, 0, .001 ) Species EcoSystem:=Lion,Cheetah,Hyaena,Jackal,Zebra,Gnu,Buffalo,Gazelle,Giraffe,Boar,Rat,Locust, LGrass,SGrass,Acacia EcoSystem.STEP() Lion.ACTION(Gnu, 0.3, 0) Lion.ACTION(Zebra, 0.25, 0) Lion.ACTION(Buffalo, 0.15, 0) Lion.ACTION(Gazelle, 0.1, 0) Lion.ACTION(Boar, 0.1, 0) Lion.ACTION(Giraffe, 0.06, 0) Lion.ACTION(Jackal, 0.04, 1) . . . Boar.ACTION(SGrass, 0.5, 0) Boar.ACTION(Rat, 0.3, 0) Boar.ACTION(Locust, 0.2, 1) Boar.ACTION(Cheetah,-0.6, 0) Boar.ACTION(Lion, -0.4, 1) . . . SGrass.ACTION(Gazelle,-0.4, 0) SGrass.ACTION(Boar, -0.2, 0) SGrass.ACTION(Rat, -0.2, 0) SGrass.ACTION(Locust, -0.2, 1) Acacia.ACTION(Giraffe, -1, 1) *********************************************************************** * Timer and show data * *********************************************************************** TIMER delta:=0.1,FINTIM:=900,PRdelta:=10,PLdelta:=1 PLOT Lion.X,Jackal.X,Rat.X,Locust.X,SGrass.X,Zebra.X,Gnu.X,LGrass.X,TIME METHOD ADAMS Listing 2: OOCSMP model of the African savanna ecosystem Figure 1 shows what happens in the model when the population of gnus is assumed to suffer a sudden illness at time 100. The populations of lions, jackals, gnus, zebras, rats, locusts, and both kinds of grasses are shown. In figure 2, it is rats that suffer a sudden population decrease. The plot shows the same populations, which includes the long trophic chain mentioned above: lions, jackals, rats, locusts and grass. It may be seen that the result in this case is the sudden emergence of a locust plague, after which the ecosystem recovers and stabilizes. Semiautomatic generation of an educational course for the Internet The OOCSMP models we have developed are translated into standard object-oriented languages by means of a compiler we have built. Depending on the compiling options used, we can tailor the compiler to: • Generate C++ code and test it under DOS. • Generate Java code and test it under a Java interpreter or an applet viewer. • Generate Java code and embed the applet in an html page. 4 • Automatically add buttons to select between different execution alternatives of the model. • Automatic addition of the iconic view. • Provide special windows and widgets to modify the values of the model parameters and make it possible to perform "what if" experiments. Figure 1: Ecosystem recovery after a sudden epidemics on the population of gnus Figure 2: A locust plague as the result of an epidemy on the population of rats To debug the models, we usually start by generating C++ code, provided with a graphic interface that makes it very easy to adjust the values of the different parameters in the system and shows the results of the simulations as graphical plots. 5 Once debugged and adjusted, the same compiler, invoked with different options, can be used to generate Java applets and html skeletons. The same model, with a few adjustments, may be used to simulate different ecological systems, and thus generate the several html pages that make up the course. The automatic preparation of the course ends here. Manual adjustment are needed to fill the html skeletons with explanations, images and cross references to other pages. The resulting set of pages is ready to be made available to the students through the Internet. This procedure has been followed to generate a course on Ecology aimed at high-school students. The course consists of several pages presenting the ecosystems described in this paper and a few others. The outputs of the simulations are presented graphically in two different ways: • A plot of the evolution of the populations of the different species along time, similar to those in figures 1 and 2. • An iconic representation of the same populations. The number of icons of a given species shown is proportional to its population at any moment. As populations wax and wane, icons appear or disappear. Figure 3 shows an example for the savanna ecosystem. One of the pages makes it possible to dynamically add objects (species), during the execution of the model. Figure 3: Iconic representation used in the course on Ecology 6 The ecosystem in Modelica Listing 3 shows the representation of our ecosystem in the Modelica language. We have used inheritance to separate the three distinct levels of species indicated above. In the OOCSMP model, we used a single class to represent all the levels, with two parameters, one of which will be zero for superpredators and primary producers. The same approach has been used in Modelica. // Class Species partial model Species // Class modelling a species parameter Real M "Isolated population growth coeficient"; parameter Real init=0 "Species arrival time"; parameter Real Ill=10, When=1000, Int=1000 "Illness intensity and timing"; parameter Real K=1 "Multiplier"; Real Pop "Population"; Real LPop "Limited population"; Real IllEffect "Effect of the illness"; equation LPop = step(init)*limiter(0.000001,1000,Pop); IllEffect=Ill*impulse(When,Int); end Species // Class Consumer model Consumer extends Species // Class modelling a consumer input Species Eats[:] "This consumer eats..."; input Real A1[:] "Coefficients for food"; input Species Eaten[:] "This consumer is eaten by..."; input Real A2[:] "Coefficients for predators"; parameter Real N1,N2 "Coincidence coeficients"; protected constant n1 = size(A1,1); constant n2 = size(A2,1); Real auxv1[n1], auxv2[n2]; Real TEats; Real TEats0 = Eats.Pop.start*ones(n1); equation for i in 1:n1 loop auxv1[i]=Eats.LPop[i]*Eats.LPop[i]/Eats.Pop.start[i]; end for; for i in 1:n2 loop auxv2[i]=Eaten.LPop[i]*Eaten.TEats0[i]/Eaten.TEats[i]; end for; TEats = Eats.LPop*ones(n1); der(Pop) = K*LPop*(M +N1*(A1*auxv1)*TEats0/TEats -N2*(A2*auxv2)*(LPop/Pop.start) -IllEffect); end Consumer // Class Plant model Plant = Consumer(N2=0); // Class modelling a plant // Class SuperPredator model SuperPredator = Consumer(N1=0); // Class modelling a super predator // model Ecosystem // Class modelling an ecosystem SuperPredator Lion (Pop.start=2,M=-.0195,N1=.001) . . . Consumer Boar (Pop.start=30,M=-.021,N1=.00025,N2=.0125) . . . Plant SGrass (Pop.start=400,M=.027,N2=.0005) Plant Acacia (Pop.start=50,M=.01,N2=.001) equation Lion.Eats =[Gnu, Zebra, Buffalo, Gazelle, Boar, Giraffe, Jackal] Lion.A =[0.3, 0.25, 0.15, 0.1, 0.1, 0.06, 0.04 ] . . . Boar.Eats =[SGrass, Rat, Locust] Boar.A1 =[0.5, 0.3, 0.2 ] Boar.Eaten =[Cheetah, Lion] Boar.A2 =[0.6, 0.4 ] . . . SGrass.Eaten =[Gazelle, Boar, Rat, Locust] SGrass.A =[0.4, 0.2, 0.2, 0.2 ] Acacia.Eaten =[Giraffe] Acacia.A =[1 ] end Ecosystem Listing 3: Modelica model of the African savanna ecosystem 7 Conclusion The procedure described here makes it very easy to build Internet educational courses based on the simulation of physical, biological and other systems. The OOCSMP language, designed for the purpose, contains features that simplify programming the models. The compiler we have developed automatically generates C++ and Java code, as well as html skeletons. Some extra effort is required to complete the course, with the addition of textual explanations. However, this effort is small, as compared to the actual development of the model. The example proposed in the paper (a practical course on Ecology, executable on the Internet) can be found and tested at the following address: html://www.ii.uam.es/~epulido/ecology/simul.htm Our course provides many educational advantages, such as the fact that the models are executed under command of the student, who can introduce changes and perform experiments, including the addition of new species to the ecosystem and the onset of epidemics and other non-standard factors. In the future, we will extend the language and the compiler to integrate the text for the html pages with the model. We also intend to develop a control system with access to a data base, so as to be able to control the performance of each student with the courses we generate. References [1] Y.Monsef, "Modelling and Simulation of Complex Systems", SCS Int., Erlangen, 1997. [2] IBM Corp.: "Continuous System Modelling Program III (CSMP III) and Graphic Feature (CSMP III Graphic Feature) General Information Manual", IBM Canada, Ontario, GH19-7000, 1972. [3] M.Alfonseca, E.Pulido, J.de Lara, R.Orosco, "OOCSMP: An Object-Oriented Simulation Language", Proc. 9th European Simulation Symposium ESS97, SCS Int., Erlangen, 1997, p. 44-48. [4] M.Alfonseca, J.de Lara, E.Pulido, "Semiautomatic Generation of Educational Courses in the Internet by Means of an Object-Oriented Continuous Simulation Language", Proc. ESM'98, Manchester, 1998. [5] M.Alfonseca, R.Carro, J.de Lara, E.Pulido, "Education in Ecology at the Internet with an ObjectOriented Simulation Language", Proc. Eurosim'98, Fed. European Simulation Societies, ed. K.Juslin, 1998. [6] H.Elmqvist, S.E.Mattson, "An Introduction to the Physical Modeling Language Modelica", Proc. 9th European Simulation Sympossium ESS97, SCS Int., Erlangen, 1997, pp. 110-114. See also http://www.Dynasim.se/Modelica/index.html. [7] Volterra, V.: "Leçons sur la Théorie Mathématique de la Lutte pour la Vie", Gauthier-Villars, Paris, 1931. [8] Rodríguez de la Fuente, F. et al.: "Enciclopedia Salvat de la Fauna", Salvat, 1970. 8