Download NetLogo heatbugs
Transcript
5. Save your model. 6. Click the Setup button. 7. Click the Go button. What happens? 8. While the model is running, experiment with different values of the random-move-prob, dissipation-rate, and diffusion-rate sliders. Do you notice any changes in the aggregate behavior of the heatbugs? 9. Try setting up and re-running the simulation with different values of the ideal and radiant heat range sliders. What changes in aggregate behavior do you notice? Task 6: Making Heat Visible Sometimes we choose to add strictly visual elements to a model, even though they don't have any effect on agent behavior, and even if they don't present output data in a form we can easily collect and analyze. Such elements can be very useful in helping us, as modelers and programmers, understand what is going on as the simulation is running. They can also be useful to enrich the explanatory power of a model that will be shown to others. In this model, we don't have (as of yet) an easy way to see what's going on in the environment. We know that the heatbugs are reacting to the heat in the environment, and we know they are adding heat to the environment, but so far we are able to observe the heat in the environment only indirectly, through the heatbugs' actions. Let's do something about that now. One frequently used way to visualize data that varies across a landscape is to color that landscape, according to the data. NetLogo supports this, allowing us not only to set the color of a turtle agent, but also to set patch colors. For our model, let's use shades of blue, with the darkest shades representing little or no heat, and the lightest shades (nearly white) representing a lot of heat. But how much is a lot? We generally won't know, in advance, how hot the hottest patches might get. How should we calibrate our shading, so that we use the full range of the shades of blue, without having some patches that turn out to be hotter than the temperature corresponding to the lightest shade of blue? The most direct way to solve this problem would be to get the temperature of every patch after each tick, get the largest of those values, and then use that largest value as the temperature corresponding to the lightest shade of violet, scaling everything else from there. In fact, the NetLogo code for this approach is very simple: the expression max [temperature] of patches uses just a few characters to get the key piece of information we need: the highest temperature on the terrain. Heatbugs with NetLogo Page 14