Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

40
Spatial Dynamical Modelling with TerraME Lectures 4: Agent- based modelling Gilberto Câmara

Transcript of Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Page 1: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Spatial Dynamical Modelling with TerraME

Lectures 4: Agent-based modellingGilberto Câmara

Page 2: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agent-based modelling with TerraME

Page 3: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

What are complex adaptive systems?

Page 4: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agent

Agent: flexible, interacting and autonomous

An agent is any actor within an environment, any entity that can affect itself, the environment and other agents.

Page 5: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agents: autonomy, flexibility, interaction

Synchronization of fireflies

Page 6: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agents: autonomy, flexibility, interaction

football players

Page 7: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agent-Based Modelling

Goal

Environment

Representations

Communication

ActionPerception

Communication

Gilbert, 2003

Page 8: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agents are…

Identifiable and self-contained

Goal-oriented Does not simply act in response to the environment

Situated Living in an environment with which interacts with other

agents

Communicative/Socially aware Communicates with other agents

Autonomous Exercises control over its own actions

Page 9: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Bird Flocking

No central authority: Each bird reacts to its neighbor

Bottom-up: not possible to model the flock in a global manner. It is necessary to simulate the INTERACTION between the individuals

Page 10: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Bird Flocking: Reynolds Model (1987)

www.red3d.com/cwr/boids/

Cohesion: steer to move toward the average position of local flockmates

Separation: steer to avoid crowding local flockmates

Alignment: steer towards the average heading of local flockmates

Page 11: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Agents changing the landscape

Page 12: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Characteristics of CA models (1)

Self-organising systems with emergent properties: locally defined rules resulting in macroscopic ordered structures. Massive amounts of individual actions result in the spatial structures that we know and recognise;

Page 13: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Characteristics of CA models (1)

Wolfram (1984): 4 classes of states:

(1) homogeneous or single equilibrium

(2) periodic states(3) chaotic states(4) edge-of-chaos: localised

structures, with organized complexity.

Page 14: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Bird Flocking

Reynolds Model (1987)

http://ccl.northwestern.edu/netlogo/models/Flocking

Animation example

Page 15: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Swarm

Page 16: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Repast

Page 17: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Netlogo

Page 18: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Netlogo

Page 19: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

TerraME

Page 20: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Development of Agent-based models in TerraME

Page 21: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Emergence

source: (Bonabeau, 2002)

“Can you grow it?” (Epstein; Axtell; 1996)

Page 22: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Epstein (Generative Social Science)

If you didn´t grow it, you didn´t explain its generation

Agent-based model Generate a macro-structure

Agents = properties of each agent + rules of interaction

Target = macrostruture M that represents a plausible pattern in the real-world

Page 23: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Scientific method

Science proceeds by conjectures and refutations (Popper)

Page 24: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Explanation and Generative Sufficiency

Macrostructure

Spatial segregationBird flocking

Agent modelA1

Agent modelA2

Agent modelA3

?

Refutation

Conjectures

?

Page 25: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Explanation and Generative Sufficiency

Macrostructure

Occam´s razor:"entia non sunt multiplicanda praeter necessitatem", or

"entities should not be multiplied beyond necessity".

Agent modelA1

Agent modelA2

?

Page 26: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Explanation and Generative Sufficiency

Macrostructure

Popper´s view"We prefer simpler theories to more complex ones

because their empirical content is greater and because they are better testable"

Agent modelA1

Agent modelA2

?

Page 27: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Explanation and Generative Sufficiency

Macrostructure

Einstein´s rule:The supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of

experience"

"Theories should be as simple as possible, but no simpler.

Agent modelA1

Agent modelA2

?

Page 28: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

TerraME extension for agent-based modelling

ForEachAgent = function(agents, func, event)nagents = table.getn(agents)for i = 1, nagents do

func (agents[i],(event))end

end

Replicate = function(agent, nagents)ag = {}for i = 1, nagents do

ag[i] = agent() ag[i].id = i

endreturn ag

end

(contained in file agent.lua)

Page 29: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

ABM example

Urban Dynamics in Latin American cities:an agent‐based simulation approach

Joana Barros

Page 30: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Latin American cities

High speed of urban growth (urbanization)Poverty + spontaneous settlementsPoor control of policies upon the development processSpatial result: fragmented set of patches, with different

morphological patterns often disconnected from each other that mutate and evolve in time.

Page 31: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Peripherization

São Paulo - Brasil Caracas - Venezuela

Process in which the city grows by the addition of low‐income residential areas in the peripheral ring.

These areas are slowly incorporated to the city by spatial expansion, occupied by a higher economic group while new low‐income settlements keep emerging on the periphery..

Page 32: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Urban growth

“Urban sprawl” in United States

“Urban sprawl”in Europe (UK)

Peripherization in Latin America

(Brazil)

Page 33: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Research question

How does this process happen in space and time?

How space is shaped by individual decisions? Complexity approach

Time + Space automata modelSocial issues agent‐based simulation)

Page 34: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

The Peripherisation Model

Four modules:

Peripherisation module

Spontaneous settlements module

Inner city processes module

Spatial constraints module

Page 35: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Peripherization moduls

reproduces the process of expulsion and expansion by simulating the residential locational processes of 3 distinct economic groups.

assumes that despite the economic differences all agents have the same locational preferences. They all want to locate close to the best areas in the city which in Latin America means to be close to high‐income areas

all agents have the same preferences but different restrictions

Page 36: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Peripherization module: rules

1. proportion of agents per group is defined as a parameter

2. high‐income agent –can locate anywhere 3. medium‐income agent –can locate anywhere

except on high‐income places4. low‐income agent –can locate only in the vacant

space5. agents can occupy another agent’s cell: then the

latter is evicted and must find another

Page 37: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Peripherization module: rules

Page 38: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Peripherization module: rules

Spatial pattern:

the rules do not suggests that the spatial outcome of the model would be a segregated pattern

Approximates the spatial structure found in the residential locational pattern of Latin American cities

multiple initial seeds ‐resembles certain characteristics of metropolitan areas

Page 39: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

Comparison with reality

Maps of income distribution for São Paulo, Brazil (census 2000)

Maps A and B: quantile breaks (3 and 6 ranges)

Maps C and D: natural breaks (3 and 6 ranges)

No definition of economic groups or social classes

Page 40: Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.

TerraME extension for agent-based modelling

ForEachAgent = function(agents, func, event)nagents = table.getn(agents)for i = 1, nagents do

func (agents[i],(event))end

end

Replicate = function(agent, nagents)ag = {}for i = 1, nagents do

ag[i] = agent() ag[i].id = i

endreturn ag

end

(contained in file agent.lua)