== Overview ==
This is a series of exercises created for the Spatial Modelling of Human Environment Interactions course which I taught in GeoSciences at the University of Edinburgh from 2009-2011. It starts with a simple Cellular Automata model, and expands it to look at:
* agent types and preferences
* social networks
* planning and risk
== Getting Started ==
All of the files are in a zip file at the bottom of the page. In the zip file are:
* repast.pdf: very quick introduction to using Repast for this course
* allLabs.zip: an archive containing 5 Eclipse projects, one for each practical.
* lab[1-4].pdf, project.pdf: descriptions of the work to be done in each practical
* assignment2.pdf: the second assignment from the course
* project.pdf: the final assignment
* install Repast 1.2 ([[http://sourceforge.net/projects/repast/files/Repast%20Simphony/Repast%20Simphony%201.2.0/ Download Page]])
* import all the projects from allLabs.zip (File -> Import -> Existing Projects Into Workspace -> Select Archive File -> find the zip file, select all projects, import)
* do the relevant exercises
More info on installing Repast at the bottom of this page.
== Exercises ==
=== Excercise 1 ===
Exercise 1 starts from the principles of a cellular automata (CA), and is based on a working paper by Mike Batty1. It translates a theoretical equation that describes urban growth into an agent-based framework. Starting from a CA framework, you will experiment with parameters, add rules for redevelopment, and then add stochasticity.
* Description: lab1.pdf
* Project: GeoInformatics1
=== Exercise 2 ===
Exercise 2 looks at demographics, in a non-spatial way. You will explore birth and death rates, and transitions from one stage of life to another.
* Description: lab2.pdf
* Project: GeoInformatics2
=== Excercise 3 ===
Exercise 3 combines the demographics from Ex2 with the CA from Ex1, in particular replacing constant urban expansion rates with ones based on the agent population (and hence driven by demographic change). It looks at stylised versions of planning policy, and also location preference differences between different types of agent.
* Description: lab3.pdf
* Project: GeoInformatics3
Assignment 2 asks some general questions about the models from Exercises 2 and 3
=== Excercise 4 ===
Exercise 4 looks at friendship and social segregation. Segregation is driven by preference for similar agents, based on Thomas Schelling's work2. Agents of different types have a preference for living near similar agents. Agents also have a social network, which is independent of type, and they like to live near friends. This exercise explores the tension between the two drives.
* Description: lab4.pdf
* Project: GeoInformatics4
=== Exercise 5 / Project ===
The final project is about extending all the models so far, to include scenarios and risk analysis. The model includes spatial features - a river, which has a floodplain. The practical starts with either: adding spatial features which the agents react to, or adding additional behaviour to the existing types. Then, SRES scenarios are translated into demographic and other parameters. Finally the number of agents at risk of flooding, is analysed across the different scenarios.
* Description: project.pdf
* Project: GeoinformaticsAssignment
== Installing Repast 1.2 ==
These models are setup with Repast 1.2, which is quite old now. The easiest thing to do is download the complete Eclipse+Repast bundle from their download site.
If you have an Eclipse already set up that you want to use, you *can* install Repast 1.2 as a plugin. To do this, you'll need to
* install extra dependencies: EMF and GEF, Groovy, possibly JOGL. See "Instructions for linux users" [[http://repast.sourceforge.net/download.html here]].
* use the 1.2 [[http://mirror.anl.gov/pub/repastsimphony/1.2.0/ Update Site]] to install repast.
Make sure you do it in that order, or it won't work. Try creating a Repast Simphony project - if that works, you're good to go.