Download NetLogo 4.0.2 User Manual: Tutorial #1: Models

Transcript
NetLogo 4.0.2 User Manual: Tutorial #1: Models
4/21/09 11:28 PM
Let's experiment with their effect on the behavior of the model.
Open Wolf Sheep Predation if it's not open already.
Press "setup" and "go" and let the model run for about a 100 time-ticks. (Note: there is a readout of the number
of ticks right above the plot.)
Stop the model by pressing the "go" button.
What happened to the sheep over time?
Let's take a look and see what would happen to the sheep if we change one of the settings.
Turn the "grass?" switch on.
Press "setup" and "go" and let the model run for a similar amount of time as before.
What did this switch do to the model? Was the outcome the same as your previous run?
Just like buttons, switches have information attached to them. Their information is set up in an on/off format. Switches turn on/off a
separate set of directions. These directions are usually not necessary for the model to run, but might add another dimension to the model.
Turning the "grass?" switch on affected the outcome of the model. Prior to this run, the growth of the grass stayed constant. This is not a
realistic look at the predator-prey relationship; so by setting and turning on a grass growth rate, we were able to model all three factors:
sheep, wolf and grass populations.
Another type of setting is called a slider.
Sliders are a different type of setting then a switch. A switch has two values: on or off. A slider has a range of numeric values that can be
adjusted. For example, the "initial-number-sheep" slider has a minimum value of 0 and a maximum value of 250. The model could run with
0 sheep or it could run with 250 sheep, or anywhere in between. Try this out and see what happens. As you move the marker from the
minimum to the maximum value, the number on the right side of the slider changes; this is the number the slider is currently set to.
Let's investigate Wolf Sheep Predation's sliders.
Read the contents of the Information tab, located above the toolbar, to learn what each of this models' sliders
represents.
The Information tab offers guidance and insight into the model. Within this tab you will find an explanation of the model, suggestions on
things to try, and other information. You may want to read the Information tab before running a model, or you might want to just start
experimenting, then look at the Information tab later.
What would happen to the sheep population if there was more initial sheep and less initial wolves at the
beginning of the simulation?
Turn the "grass?" switch off.
Set the "initial-number-sheep" slider to 100.
Set the "initial-number-wolves" slider to 20.
Press "setup" and then "go".
file:///Applications/NetLogo%204.0.2/docs/tutorial1.html
Page 3 of 8