![]() Some of the results would seem very reasonable for example, the spread of a fire in a forest depends on the density of the trees. Given the interest in weather change, you may be interested in the earth science models. You may want to speed up the simulation and observe the occurrence of a deadlock. In computer science models, it is nice to see the visualisation of the dining philosophers. If the delay is 3 units, the path is close to a straight line. If the delay is just 1 unit, the ants follow almost the same path as the leader. The code to achieve consists merely of the delay between two successive ants leaving the nest and each ant, other than the leader, moving towards the previous ant. The leader ant moves towards the food using random movements however, the ants that follow move in a line! The seemingly smart behaviour of the ants can be simulated as follows: The best way to learn NetLogo is to study the models that are included in the distribution.Īn example is a line of ants. The evolution of the world when you click the Go button is also shown on the interface tab. You may provide information about the model in the information tab. The code for the functions is written on the code tab. You can set the option for it to run forever. Go is the function that is executed at a time interval.Setup is the function you write to initialise and set up the world.Its user interface consists of three tabs-interface, information and code.Ī model requires two functions- Setup and Go (the names are just a convenient convention), which are created as buttons on the interface tab. NetLogo is also a visual environment in which you create a number of turtles of multiple breeds, e.g., wolves and sheep, and study the dynamics of the world based on simple rules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |