7.6.11

Summer Project 2010

My first exploration with agent-based simulations was, thanks to my good friend Melissa, via Netlogo: a free and really nice piece of software with a whole host of built in models for you to explore.

I had limited programming ability before starting at Southampton and some introductory model building during my first year with Matlab, Python and C# told me that I did not have enough experience as of yet to attempt to create my first ABM (agent-based model) in one of these languages. Netlogo is a lot easier to use than stand-alone languages, coming in a friendly GUI environment and lacking the usual 'grammer' and 'punctuation' of other more advanced languages. The package is built specifically for agent-based modelling and I found it quick, easy and straightforward to pick up.

If programming is not your strong point then I definitely recommend using Netlogo, at least to start with.

It was easy to get agents moving around the screen: Netlogo has a built in feature that automatically displays agents on the screen. You can add buttons, graphs and sliding scales to change model parameters, display certain bits of information and keep a running output of any agent characteristics that you may be interested in.

Check out the simple sheep-wolf model that comes as part of the Netlogo package. The link will open up the model in a standard web browser from where you can manipulate and run the model:



1. Click on setup. This will display the landscape, sheep and wolves in the display box on the right.
2. Clock on go. This will run the model and you should see the sheep and wolves moving around the display box.
3. Clock on go again to stop the simulation.
4. Note the graph of population size of both sheep and wolves at the bottom, changing over time as the simulation runs.
5. Change any of the settings and run the simulation again (remembering to click setup before you click on go).
6. You should not see a change in the graph at the bottom of the page that reflects the changes you made in the parameters.
7. Change the show-energy? and grass? buttons to on instead of off and these will now be displayed in the display box.
8. Its as easy as that!

Example:



When you download netlogo you are presented with a blank display console incorporating a blank display box on the right hand side. Clicking on file - models library, will open the list of available models that you can choose to run.

A really great feature, from having so many models included in the package, is that it is really easy to figure  out how to create models: simply look at the code that comes with any of the included models to figure things out. This is done via the procedures tab at the top of the netlogo console.

The Netlogo website has a lot of information on how to get started, notably via the User manual and the tutorials, which can be found here.



next post: my first netlogo model

No comments:

Post a Comment