GEOG3150 - GIS, Geocomputation and Geoplanning - Semster 2


Table of Contents

1. Creating the world
2. Buttons and Procedures
4. Sliders and Variables
5. Creating Turtles and Patches
6. Making the Model Go

Practical 2, part 1 - Creating the World


Before creating a model, we need to configure the world, or environment. We do this by specifying how large we would like the world to be (how many patches) and by specifying how the coordinate system works.

  1. Open NetLogo and create a new model (File - New)
  2. The first thing we need to do is to set the size of the environment that we want to use.

    Setting up the environment
  3. Right click on the display (the part that would usually show the agents) and choose 'Edit'.
  4. You should see a window that allows you to configure the model world.

  5. Put the location of the origin (0,0) to be at the edge of the world on the bottom.
  6. Set the minimum x coordinate (min-pxcor) to zero.
  7. Set the maximum x and y coordinates (max-pxcor and max-pycor) to 20. This will give us a 20x20 cell grid.
  8. Tick the buttons so that the world wraps both horizontally and vertically. This means that if a turtle leaves one side of the world they come back in at the other side).
  9. Leave the other variables as they are. See the right image to check you have configured the environment correctly.
  10. Click OK. Now the world is ready.

That's all you need to do to prepare the environment. Check that you understand the questions below, and then move on to part 2 to create a button.

Questions

If you're not sure about any of the questions below, have a look at the NetLogo interface guide, particularly the section on views.

  1. If the world is a 20x20 grid, wow many patches will there be in the model?  
  2. If you had chosen to place the origin (0,0) in the centre of the world, what would the be the (x,y) coordinate of the patch in the bottom-left corner?  
  3. What about the patch in the top-right corner?  
  4. What do the 'wrap horizontally' and 'wrap vertically' boxes do? (If you're not sure about this, have a look at the NetLogo interface guide )  

[School of Geography homepage] [Leeds University homepage]