Abstraction and Modeling Transcription [Title slide] In this video, we’ll discuss the concept of abstraction again. This time, we’re going to focus on how we use abstraction in modeling and simulation. [Slide 1] As we learned in the last video about abstraction, abstraction is simplification. Why would we want to use abstraction when we’re modeling? Well, when you want to model a problem, you’ll find that most real-world problems are just too complicated. In order to model them, you must simplify them. Therefore, you must apply abstraction. This simplification means that you must ignore some details or parts of the problem so that you can focus on what’s most important to you at that time.As you interests change or your knowledge grows, the amount of abstraction you need for your model may change too. [Slide 2] Abstraction involves assumptions. Assumptions are things that you take to be true at any given time. When you use assumptions before you do abstraction, it helps you in your abstraction process, and also, after you’ve done abstraction, when you’re trying to take your abstraction and make a model out of it. Assumptions are what a modeler uses or assumes when moving from the real-world problem to an actual model. Sometimes, that’s a simplification, and sometimes that’s a specification. What do I mean by those two things? Sometimes, to just make an assumption so that it’s easier to do the model. For instance, if you’re looking at a gigantic ecosystem, but you really are only interested in rabbits, you might be able to ignore most other things besides rabbits. The assumption in that case would be only rabbits are important to my model. A specification might be that you know that each rabbit or each female rabbit would have six baby rabbits every year. The birth rate for rabbits in your model would be specified to be six rabbits per year. Assumptions need to be carefully considered because they affect the outcome of the model. If the model is really important, then those assumptions should be validated. [Slide 3] Here’s a picture of a pond ecosystem. There are a lot of things involved in a pond ecosystem as you can see. We have everything from microorganisms and snails and slugs and salamanders. We have insects, fish, beavers and snakes. There are a lot of animals involved in the water itself. Then, there are animals that interact with the water and may affect the pond ecosystem. For instance, raccoons don’t actually live in the water, but they may eat things that are in the water so they affect the pond ecosystem. Birds … some birds actually eat fish or other small animals inside the pond. We see people fishing. We know that people interact with the ecosystem by fishing or by polluting. You can see at the bottom of the lake here, there are some cans and bottles and plastic and other debris. Another way that man interacts with the ecosystem is by farming or changing the land close to the water. Farming can be particularly detrimental to a pond ecosystem because of run-off from the farm, other run-off in terms of pesticides or manure or any other thing that you might find in a farm. Abstraction and Modeling Transcription Page 1 of 3 Way in the distance, you see there’s a city. That city could actually affect the pond ecosystem if any water that comes from the city or air pollution from the city reaches this pond environment. It’s very, very complicated. Because it’s so complicated it is very difficult to model. If you were interested, say, in how many bass there might be in this pond, and that’s what you wanted to model because you like fish, then, you might not actually pay attention to too many other parts of the ecosystem besides the bass and what the bass eats and what eats the bass. You might group the other things together in some way, to represent them if you find that they are important. For instance, you might group all forms of pollution together and have that affect the pond in some way. Your model might include bass, and maybe some small fish, if that’s what bass eat or some insects, and perhaps fisherman because fisherman eat bass, and perhaps otters. Here, we have an otter. That might eat the bass, I guess, small bass. You might include those things in your model, and you might not include, say for instance, snails, unless you know that bass eat snails which I don’t know. You might not include deer, since deer might not interact in a way that affects the population of bass. Let’s move on to another problem. [Slide 4] Let’s say we want to apply abstraction to modeling a rabbit’s ecosystem, but we’re mostly interested in the population of rabbits. Like with the pond, there are many things that affect rabbits and rabbit populations. Living things affect the rabbit population and non-living things affect rabbit populations. The living things that could affect the rabbit population include the rabbit characteristics itself. For instance, the birth rate, the death rate, the metabolism, how fast they digest their food, and how much energy they use and infection. People might affect rabbit populations because they might build homes where rabbits like to live, or they might hunt rabbits. Rabbits eat plants, so the plants available to a rabbit are very important to the rabbit population. Other animals are important to a rabbit population too. For instance, predators are critically important to rabbit population, how many coyotes or foxes or rafters. Even microscopic things could affect your rabbit population. For instance, some small microscopic infection could infect the plants that the rabbit might eat. The non-living things that could affect the rabbit population could include the water, water quality, how much water there is, the soil, can the rabbit make a rabbit hole, to find a place to live, will the plants grow in that soil, the weather, is it too wet or too dry for the rabbit population to be optimal, any natural disasters and pollution. Those are a lot of things to include in a model, so we would probably simplify that. We would maybe include some rabbit characteristics, like the birth and death rate, and the fact that rabbits expend energy just by living. We would have to include plants because rabbits eat plants. We might create a simple model that includes just those things. Let’s go take a look. Abstraction and Modeling Transcription Page 2 of 3 [Slide 5] Here, we have the rabbits live model. Let’s look at the code. I’m only showing you just the top part of the code here. We’re going to be looking primarily at the rabbits interacting with their ecosystem. Here, we have rabbits move, rabbits eat, rabbits reproduce and rabbits die. Rabbits move around using the wiggle motion, which you’re all familiar with. They gain energy when they eat and they lose energy when they move around and when they reproduce. When they have no energy they die. Let’s take a look at the model. We have the net logo, two-dimensional plain with the green squares of grass. We have the little rabbits distributed around the plain. If we hit the “rabbits live”, we can see that the rabbits reproduce, and you get many more rabbits. They’re eating the grass. They keep eating the grass until there’s no more grass left. Then, the rabbits start to die, until eventually there are no more rabbits left. This is, of course, not a very realistic model, since the rabbits have died off. We know in the real world that we never seem to completely eliminate the rabbits from our environment so we know that this is not a realistic model. That means we have to add more things to the model to make it more realistic. Let’s go back to our list. [Slide 6] This time, we’re going to add other animals to the model. Also, we’re going to have the grass re-grow so the rabbits continuously have something to eat. Let’s take a look at that. This time, we’ve added coyotes to our model with the rabbits and the grass. The coyotes get energy from eating the rabbits. They lose energy by moving around and by reproducing. We have two species, the rabbits and the coyotes that are eating to gain energy, and are losing energy by reproducing and by moving around. When they lose all their energy they die. Let’s see what happens. The rabbit population increases, and then the coyote population increases. It goes back and forth. We have the population at some sort of equilibrium a much more realistic situation. [Slide 7] One thing that I did not show you in the modeling process was that I did have to manipulate the birth rates and the energy value of the plants in order to get the model to stabilize. There, you see, we can model a rabbit ecosystem and have a realistic outcome. [Slide 8] In summary, abstraction is required for modeling. Different levels of interest will vary the amount of abstraction that’s needed. Abstraction involves assumptions before, during and after the abstraction process. Assumptions can affect the outcome of the model and should be carefully considered and evaluated. Thank you. Abstraction and Modeling Transcription Page 3 of 3