You are on page 1of 53

Modelling Cities: An

Approach using Agent-


Based Models and GIS

Andrew Crooks
Centre For Advanced Spatial Analysis
andrew.crooks@ucl.ac.uk
www.gisagents.blogspot.com

1
Outline

Outline
• The Context & Introduction
– What is Agent-Based Modelling?
• Part 1:
– Why link Agent-based models with GIS?
– The Approach
– Model Development
• Application 1: A Segregation Model
• Application 2: A Location Model

– Summary
• Part 2:
– Current work: An Agent-Based Model for Residential Location & Housing
• Challenges and Problems
• Part 3:
– Outreach & Communication: Agent-Based Models in Second Life
• Conclusion

2
Context

Context: Why Study Cities?


• Cities play a critical role in our lives, providing
habitats for more than half the world’s population.
– Expected to increase to 75% by 2100.
– Creating not only acute pressure on housing but other issues
such as urban sprawl, congestion, segregation, sustainability
etc.
• Understanding such systems is extremely complex.
– Represents “…one of the major scientific challenges of
our time” (Wilson 2000).
• Focus has shifted to a bottom-up approach to urban
systems.
• One such approach is agent-based modelling (ABM).

3
What is Agent-Based Modelling?

What is Agent-Based Modelling?


• Artificial worlds
populated by agents.
• Agents:
– Individuals which are not centrally
governed (focus on the individual).
– Dictate their own rules (i.e. have a
behaviour).
– Dynamic.
– Capable at modelling bottom up
processes.

• Example applications:
– urban growth, residential
dynamics, traffic simulation &
pedestrian modelling.

Castle, C.J.E. and Crooks, A.T. (2006), Principles and Concepts of Agent-Based Modelling for Developing Geospatial Simulations,
Centre for Advanced Spatial Analysis (University College London): Working Paper 110, London, UK.

4
What is Agent-Based Modelling?

Example of a simple ABM: Traffic Simulation


• Models the movement of cars on a road
• Each car follows a simple set of rules:
– If there’s a car close ahead, it slows down.
– If there’s no car ahead, it speeds up.
• Demonstrates how traffic jams
can form without any obvious
incident.
• Simple rules can explain
phenomena.

More information: Sugiyama


et al 2008 New J. Phys. 10
033001 5

5
What is Agent-Based Modelling?

Shockwave Traffic Jam in Reality


• 22 cars equally spaced on
a 230m single lane circle.
• Drivers asked to cruise
steadily at 30km/h.
• 1st traffic moved freely
• Disturbances/clusters soon
appear.
• Causing cars to slow/stop.
• Cars at front of cluster can
accelerate at 40km/h.
• But these join another jam.

Source: http://www.youtube.com/watch?v=Suugn-p5C1M
New Scientist Article: http://technology.newscientist.com/article/dn13402
6
The Context

Context: Why Link GIS and ABM?


• The world is inherently spatial, objects have a
location and events are embedded in time.
• Growing interest in GIS and ABM integration
(e.g. Gimblett, 2002; Benenson and Torrens, 2004; Parker 2005).
–Allows agent-based modellers to have agents
related to actual geographic locations.
–For GIS users, it provides the ability to model the
emergence of phenomena through the individual
interaction of features in a GIS over space and
time.

7
The Problem

The Problem
• Many ABM applications represent space as a series of discrete
cells.
• These applications capture geographic detail but miss geometric
detail (Batty, 2005).
– Explore geographically explicit agent-based models which consider geometric
detail directly in the simulation process
– How this approach can be applied to the study of different types of urban
phenomena especially that of housing and residential location.

Geometric Detail Discrete Cells

8
The Approach: Geometric Detail

Represent the world as a series of Points,


Lines & Polygons -the building blocks
of the city
Point
(X=1, Y=1)

Line Polygon

• Geometry: provides the size, shape, and


relative position in space for all elements in
the city.
– Allows for the representation of different size
objects.
– Acts as a container to which all actions happen.

9
The Approach

The Approach
Created a Basic Model:
– Utilizing and extending RepastJ.
– Easily extended.
– Represents the world as a series
of points, lines and polygons:
• At different geographical scales &
shapes.
– Direct consideration of
geographical features:
• Utilising GIS methods.
– User Interaction, parameter
setting and Data capture.
– Use data held within fields of data Representing Points, Lines and Polygons
files to create agents.

Crooks, A.T. (2007), The Repast Simulation/Modelling System for


Geospatial Simulation, Centre for Advanced Spatial Analysis (University
College London): Working Paper 123, London, UK.

10
The Approach: Basic Model

Reading in the Data & Building the Model

1 4

Actions of individual agents will create changes in their physical environment.

11
Application: Residential Segregation Model

Application: Residential Segregation Model


• Many different types of segregation.
• Seen within many cities.
• Model based on Schelling’s (1971)
“Dynamic Models of Segregation.”
– Good example of emergent phenomena based
on simple rules at the neighbourhood scale.
• Demonstrates how macro-level segregation Cellular Grids
does not necessarily reflect micro-level
preferences.
– However there are criticisms of it e.g.
neighbourhood tolerances.
– Previous versions focus on cellular or irregular
grids.
• Allows for testing of the basic model – Irregular Grids
multiple agents in 1 area.

12
Application: Residential Segregation Model

Segregation Model User Interface

13
Application: Residential Segregation Model

Segregation Model Structure Results from Neighbourhood


Calculation
Neighbours No. of Agents Percentage

Red Agents 6 60%

Blue Agents 0 0%

Green Agents 4 40%

White Agents 0 0%
Agents
Attributes

Urban
Environment

Red Agent Preferences


Red with Red >= 50% Red

Red with Blue < 30%


Red with Green < 50%
Red with White < 10%
Calculating Neighbourhoods
Example of Agent Preferences
14
Application: Residential Segregation Model

The Role of Preferences

Agents satisfied if a certain % of their Neighbourhood >=%

15
Application: Residential Segregation Model

The Impact of Geographical Features (Geometry)


• Physical features can act as
boundaries between areas.
• Most urban research uses socio-
economic boundaries.
• Compare constrained &
unconstrained buffers.
• Patterns of Segregation are subtly
different.
Constrained Buffer Unconstrained Buffer

16
Application: Residential Segregation Model

The Addition and Removal of Agents

17
Application: Residential Segregation Model

5% of the Population are White at the Start


Initial Conditions Simulation Run

• The 5% of White agents are concentrated in area 3.


• As agents are added, whites concentrate in one area and
slowly spread out – forcing other types to move.
18
Application: Residential Segregation Model

• By looking only at the


aggregate information
we loose what is
happening at the
boundaries.
• Demonstrated how the
complexities of
geographic reality can
be incorporated into
such models.
• Individual agents are not
restricted to discrete
cells.
• Highlights the
importance of space in
the segregation process.
Segregation within areas and across
boundaries. A: the entire area, B: a zoomed in Crooks, A.T. (2008), Constructing and Implementing an Agent-Based
section of A. Model of Residential Segregation through Vector GIS, Centre for
Advanced Spatial Analysis (University College London): Working
Paper 133, London, UK.

19
Application: Residential Segregation Model

A Polygon Model of Segregation


• Designed to explore the
importance of space & resulting
pattern of segregation.
• Represents agents as polygons
(e.g. houses, OA, Wards).
• Still considers geographical
features in neighbourhood
calculations.
• 2 types of agents.
• Same rules as previous
models.
– However movement is
random & thus forces agents
to move due to limited
space.

20
Application: Residential Segregation Model

Results from the Polygon Segregation model


• All agents want 50% of their neighbours to be of same type.
• Thames acts as a barrier.
• Less empty space the quicker the model is to stabilise.

30% Blue 45% Blue


30% Red 45% Red
40% Empty 10% Empty

21
Application: The Location Model

Application: The Location Model


• Aim: to explore how residential and employer groups
interact to form urban spatial structures characteristic of
large cities.
• Based on Alonso’s (1964) ‘Bid-
rent’ model.
- Empl & Res aim to optimise their
accessibility in relation to their space
requirements.
• An example of ‘blended modelling’
whereby individual dynamics is
added to a relatively static theory.
- The rent curves are a product of Alonso’s Bid Rent Curves
individual interaction.
22
Application: The Location Model

• Radial transport network.


• 50% of all employment and population is within 8 km and 13 km of Charing Cross.
23
Application: The Location Model

Location Model Structure


Agents
Urban Attributes
Environment Residents

Employers

Locate in the most


accessible area they
can afford where their
space requirements are
met

price (m) = Area/sum of total


Local Searching Search Entire Area income of agents in the area.
24
Application: The Location Model

The Effects of Space and Income

Residents Income range:


279 and 628.
Employers Income range:
1116 and 2512.

Space Requirements

System Evolution Over Time

25
Application: The Location Model

Resulting Spatial Distribution of Agents

• Agent distribution at 100 iterations

Minimum Space vs. Distance Income vs. Distance


from the Centre. from the Centre.

Once the land-use pattern is established it is not easily changed - ‘lock in’.

26
Application: The Location Model

Experimenting with
Income

Different Income Ranges Same Income Ranges

27
Application: The Location Model

System Evolution when Agents are Added

28
Application: The Location Model

Changing Accessibility

Distribution of agents between 100 & 110 iterations when accessibility has been changed

29
Summary of Part 1

Summary: so far
• Shown how geographical explicit agent-based models can
be built considering geometrical relationships directly into
the simulation process.
• Both applications explore general
questions of location and
spatial interaction:
– Segregation – agents locate and interact
with their surrounding environment.
– Location – competition for land results
in distinct spatial patterns emerging.
– Micro interaction => emergent patterns
• Shown how different theories and
hypothesis can be tested .
• Therefore furthering our understanding
of cities and the importance of space.

30
Part 2: Current Work

Part 2: Current Work

The makings of an Agent-Based Model for


Residential Location & Housing

31
Part 2: Current Work

Why use ABM for Residential Location &


Housing?
• Urban systems composed of
many individuals:
– Interacting with each other &
their environment.
• Each person faces the
fundamental question of
where to locate.
• Location is a trade-off
between many factors.
– E.g. dwelling type, social class,
neighbourhood, income,
ethnicity, gender, age etc.…
• Leads to urban structure
developing (e.g. spatial
clustering).
• Residential location and other studies of urban phenomena are active ABM
research topics (see Batty, 2005; Benison & Torrens, 2004; Portugali,
2000).

32
Part 2: Current Work

Current Work: taking the models further


Current work: linking people to places, grounding previous
models with data.
– Can a geographically explicit agent-based model be developed to
explore residential dynamics such as residential location & housing at the
fine scale?
– Thus improve our understanding of residential location?

But before we do this, we need data:


• Lack of property data.
– No national cadastre on housing attributes (such as size, type and age).
Restricts application of GIS in planning & as a foundation to ABM.
• New data sets are becoming available.
– Could combining recent data sets, such as OS address data and Land
Registry transaction data etc..., begin to fill this data gap and provide a
basis for such models?

33
Part 2: Current Work - Housing & Built Environment Database
Geometry Fine Scale Socio-Economic Data

OS MM Building LIDAR Building OS MasterMap Cities Revealed Land Registry House VOA Business
Footprints Heights Address Data Land Use, Price Transaction Rates (floor
Building Age & Data space)
Type

Transport Network
Zonal Geographies
Geodemographic Data,
Housing & Built Census Data,
Environment Employment Data
Database

Core and Potential Applications

Urban Housing Urban Sprawl


Land use Modelling Energy Usage

Explore uplift rates


Density (e.g. Access to local (e.g. new builds)&
density of Residential services & green hedonic modelling Accessibility
dwellings) Location spaces Measures

34
Part 2: Current Work

Housing Classification
• Straightforward classification of housing types-

• Detached housing- 1 Building with 1 Dwelling per


block.

• Semi-detached housing- 2 Buildings each with 1


Dwelling per block.

• Terraced housing- more than 1 Building each with


1 Dwelling per block.

• Flats- 1 or more Buildings per block with more than


2 Dwellings.

• Housing Classification Patterns


– Identify fine scale variation in the housing market.
– Can be matched to transaction data at address level
and other land use information.
– Shows complex overlapping submarkets, due to
mixed housing stock, pace of development & path
dependence.
• Upmarket new-build flats situated near the Thames is a
common pattern in London.
• Varied clustering of housing types- public housing, new

• The data can be used to ground the Agent-


based model.

35
Part 2: Current Work

House Prices and Income

Average weekly earnings: by industry group


and sex, April 2002 for the United Kingdom
and London (source: New Earnings Survey,
Income restricts where people can live. 2002).

36
Part 2: Current Work

Building Function and Land Use Data


• Data can be
simplified to basic
classes in this
example (e.g. Office
Mixed Use – offices
with retail).
• Can now map land
use (including
housing type) at
building level
• Land use data can
be combined with
building heights to
visualise land use
and urban form
relationships.
• The data can be
used to help ground
the agent-based
model.

37
Part 2: Current Work- Prototype Residential Housing Model

Prototype Residential Housing Model


Further Work:
• Using a similar approach to building
the basic agent-based models, the
Housing & Built Environment
Database allows:
– MM TOIDS to represent the built
environment.
– MM Address Layer for no. of units
tagged to buildings.
– Attach Agents to such units.
– Land Registry data for prices.
• Agents behaviours & preferences for
locations can be based on both the
built environment & socio-economic
characteristics:
– Agents choice of location can be trade
off between price, type of residence,
its location both in terms of
neighbourhood & place of work, etc…
– All vary depending on age, sex, marital
status & income.
– Geodemographics?
– Microsimulation?

• Outputs could be coupled with 3D


software.

38
Part 2: Current Work

Potential Problems and Questions


• Too much data/not the right data?
• MAUP & Ecological Fallacy with zonal geographies.
– Boundaries are drawn quite randomly.
• Is qualitative and quantitative analysis needed?
• Is Vector better than Raster?
– Depends on Purpose (see Landis, 2001; Benenson et al., 2005).
• Numerous issues/challenges with this approach and ABM
generally:
– Purpose of the model, Theory and Model, Replication and Experiment,
Verification, Calibration/Validation, Agent Representation and
Dynamics, Sharing/Communication (see Crooks et al 2009) etc.

Crooks, A.T., Castle, C.J.E., and Batty, M. (2009), ‘Key Challenges in Agent-Based Modelling for
Geo-spatial Simulation’ Computers, Environment and Urban Systems.

39
Part 3: Agent Street - Agent-Based Modelling in Second Life

Part 3: Agent-Based Models in


Second Life
• Exploring SL potential for 3D ABM for social
scientists.
• SL and ABM are both artificial worlds
• Traditionally before pervasive computing
communicating models was through
discussion.
• Created 3 different types of agent-based
models as pedagogic demonstrators.
• Demonstrates:
– The potential of how experts, model
builders and the non specialist can view,
interact and discuss agent-based models.
– Symbolic (i.e. mathematical modelling)
inside of Iconic models (i.e. geometric
modelling).
Crooks, A., Hudson-Smith, A & Dearden, J. (under preparation) Agent
Street: Agent-Based Modelling in Second Life

40
Part 3: Agent Street - Agent-Based Modelling in Second Life

41
Part 3: Agent Street - Agent-Based Modelling in Second Life

Prototype Pedestrian
Evacuation Model
• Shows how we can test ideas
and hypothesis of phenomena
which are not easy to do in the
real world (i.e. set buildings on
fire).
• Walking speed governed by
surrounding density.
• Stationary obstacles such as
tables and walls as well as non-
stationary obstacles (i.e. other
pedestrians) will have effect on
occupant movement (Castle, 2007).
• Agents are not restricted to
discrete cells.
42
Part 3: Agent Street - Agent-Based Modelling in Second Life

Simple Layout
Second Life Path Traces

Can explore how basic room configurations can impact on


evacuation time in an event of an alarm being sounded 43

43
Part 3: Agent Street - Agent-Based Modelling in Second Life

Complex Layout
Second Life Path Traces

44

44
Part 3: Agent Street - Agent-Based Modelling in Second Life

1st Floor

Multi-Floor Layout
Ground Floor
45
Part 3: Agent Street - Agent-Based Modelling in Second Life

Summary of agent-based models in SL


• The models demonstrate:
– Different types of agent-based models can be created in SL.
– The ability to easily share and visualise complex models to the non
experts therefore the potential to significantly impact on the outreach
of ABM.
– Potentially provides a medium for online model building (or
collaboratories).
– A medium for linking abstract & realistic models, real & virtual worlds,
as well as symbolic & iconic models through visualisation.
• There are problems:
– Need of land, deficiencies of the internet (e.g. bandwidth, package
delivery etc.), server side delays, limited script sizes
• The future?
– Others have imported ‘real’ world buildings e.g. Burj Al Arab hotel in
Dubai and the Ajax stadium in the Netherlands, could these be
used?
46
Part 3: Agent Street - Agent-Based Modelling in Second Life

Finally - every so often our agents escape


Further information: www.casa.ucl.ac.uk/abm/secondlife 47

47
Conclusions
• Cities play a crucial role in our lives but extremely complex.
• Introduced ABM and how they can be linked to GIS
– Shown a range of applications.
– These demonstrate how a range of theories and hypothesises can be tested
through computer simulation.
– Exploring very general questions of residential location & spatial interaction.
– The importance of representing space & geometry within the modelling
process.
• All the models explore how micro interaction => emergent patterns.
• ABM provide us with a medium to further our understanding of cities
through experimentation.
• This is work in progress: need data and theory to base the models
on.

48
Further Information

Further Information
http://www.casa.ucl.ac.uk/andrew/phd/

http://www.gisagents.blogspot.com

http://www.casa.ucl.ac.uk/abm/secondlife/index.asp
49
Thank you for listening! Welcome comments,
questions and suggestions.

andrew.crooks@ucl.ac.uk
I would like to thank Joel, Duncan, Andy & GLA Economics
50
References

References
• Alonso, W. (1964), Location and Land Use: Toward a General Theory of Land Rent, Harvard
University Press, Cambridge, MA.
• Ando, K., Ota, H. and Oki, T. (1988), 'Forecasting the Flow of People', Railway Research
Review, 45(8): 8-14.
• Batty, M. (2005a), Cities and Complexity: Understanding Cities with Cellular Automata,
Agent-Based Models, and Fractals, The MIT Press, Cambridge, MA.
• Batty, M. (2005b), 'Approaches to Modelling in GIS: Spatial Representation and Temporal
Dynamics', in Maguire, D.J., Batty, M. and Goodchild M, F. (eds.), GIS, Spatial Analysis and
Modelling, ESRI Press, Redlands, CA, pp. 41-61.
• Benenson, I., Omer, I. and Hatna, E. (2002), 'Entity-Based Modelling of Urban Residential
Dynamics: The Case of Yaffo, Tel Aviv', Environment and Planning B, 29(4): 491-512.
• Benenson, I. and Torrens, P.M. (2004), Geosimulation: Automata-Based Modelling of
Urban Phenomena, John Wiley & Sons, London, UK.
• Benenson, I., Aronovich, S. and Noam, S. (2005), 'Let’s Talk Objects: Generic Methodology
for Urban High-Resolution Simulation', Computers, Environment and Urban Systems, 29(4):
425–453.
• Castle, C.J.E. (2007), Agent-Based Modelling of Pedestrian Evacuation: A Study of London’s
King’s Cross Underground Station, PhD Thesis, University College London, London, UK.
• Castle, C.J.E. and Longley, P.A. (2008), 'Emergency Pedestrian Evacuation Analysis: A
Review and Interpretation of Software Applications', in Sui, D.Z. and Cutter, S.L. (eds.),
Geospatial Technologies and Homeland Security: Research Frontiers and Challenges,
Springer, Berlin, Germany, pp. 209-228.

51
References

References
• Crooks, A.T. (2008), Constructing and Implementing an Agent-Based Model of Residential
Segregation through Vector GIS, Centre for Advanced Spatial Analysis (University College
London): Working Paper 133, London, England.
• Crooks, A.T., Castle, C.J.E. and Batty, M. (2009), Key Challenges in Agent-Based
Modelling for Geo-Spatial Simulation, Centre for Advanced Spatial Analysis (University
College London): Working Paper 120, London, England.
• Fruin, J.J. (1971), Pedestrian Planning and Design, Metropolitan Association of Urban
Designers and Environmental Planners, New York, NY.
• Fossett, M. (2006), 'Ethnic Preferences, Social Distance Dynamics, and Residential
Segregation: Theoretical Explorations Using Simulation Analysis', The Journal of
Mathematical Sociology, 30(3-4): 185–274.
• Gimblett, H.R. (2002), Integrating Geographic Information Systems and Agent-Based
Modelling Techniques for Simulating Social and Ecological Processes, Oxford University
Press, Oxford, UK.
• Hankin, B.D. and Wright, R.A. (1958), 'Passenger Flow in Subways', Operational Research
Quarterly, 9(2): 81-88.
• Hudson-Smith, A., Crooks, A. T., Gibin, M., Milton R. and Batty, M. (under review)
Neogeography and Web 2.0: Concepts, Tools and Applications, Journal of Location Based
Services.
• Landis, J.D. (2001), 'CUF, CUFII, and CURBA: A Family of Spatially Explicit Urban
Growth and Land-Use Policy Simulation Models', in Brail, R.K. and Klosterman, R.E. (eds.),
Planning Support Systems: Integrating Geographic Information Systems, Models and
Visualisation Tools, ESRI Press, Redlands, CA, pp. 157-200.

52
References

References
• Najlis, R. and North, M.J. (2004), 'Repast for GIS', in Macal, C. M., Sallach, D. and North,
M.J. (eds.), Proceedings of the Agent 2004 Conference on Social Dynamics: Interaction,
Reflexivity and Emergence, Chicago, IL, pp. 255-260.
• New Earnings Survey (2002), New Earnings Survey 2002: Average Weekly Earnings: by
Industry and Sex, April 2002, Office for National Statistics, London, UK, Available at http://
www.statistics.gov.uk/STATBASE/ssdataset.asp?vlnk=7697&More=Y.
• O'Sullivan, D. (2008), 'Geographical Information Science: Agent-Based Models', Progress in
Human Geography, 32(4): 541-550.
• Portugali, J. (2000), Self-Organization and the City, Springer-Verlag, Berlin, Germany.
• Parker, D.C. (2005), 'Integration of Geographic Information Systems and Agent-Based
Models of Land Use: Challenges and Prospects', in Maguire, D.J., Batty, M. and Goodchild
M, F. (eds.), GIS, Spatial Analysis and Modelling, ESRI Press, Redlands, CA, pp. 403-422.
• Predtechenskii, V.M. and Milinskii, A.I. (1978), Planning for Foot Traffic Flow in
Buildings, Amerind, New Delhi, India.
• Schelling, T.C. (1971), 'Dynamic Models of Segregation', Journal of Mathematical Sociology
1: 143-186.
• Talen, E. (2003), 'Measuring Urbanism: Issues in Smart Growth Research', Journal of Urban
Design, 8(3): 195-215.
• Wegener, M. (2000), 'Spatial Models and GIS', in Fotheringham, A.S. and Wegener, M.
(eds.), Spatial Models and GIS: New Potential and New Models, Taylor and Francis, London,
UK, pp. 3-20.
• Wilson, A.G. (2000), Complex Spatial Systems: The Modelling Foundations of Urban and
Regional Analysis, Pearson Education, Harlow, UK.

53

You might also like