Simple Urban CA
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This simple urban growth CA let's you explore how key factors such as distance to city center or neighborhood effects influence growth patterns.
HOW IT WORKS
The urban CA considers four land cover classes: built-up, road, agri, green.
During setup, built-up area is randomly distributed within concentric rings around the middle of the landscape, with density decreasing towards the outskirts of the city. Green and agricultural areas are randomly assigned in larger clusters. Major roads are randomly created, starting from the city center. Elevation is initialised with two hills in the landscape.
The probability is calculated based on a simple multi-criteria evaluation. If the factors elevation, distance to main roads, distance to city center or neighborhood are chosen, they get a weight of 1. If they are not selected, they get a weight of 0.
The input factors are standardised so that their minimum values are 0 and their maximum values are 1.
The probability of future urban growth is calculated for agricultural areas and green areas. If protect-green is selected, the probability is calculated only for agricultural areas.
The probability is calculated as: p = weight(elevation) x elevation
- weight(dist. roads) x distance roads
- weight (dist. center) x distance center
- weight(neighbors) x sum of built-up neighbors in Moore neighborhood
New bult-up cells are allocated on patches with the highest probabilities. If probabilities are equal, random cells are converted to built-up.
HOW TO USE IT
Start with section "Explore landscape". Once you have familiarized yourself with the urban landscape, explore the buttons on the right: "Run CA in steps". You can turn on or off different variables that influence the probability of further urban growth: elevation, distance to main roads, distance to city center and the share of built-up cells in the neighborhood. You can also protect existing green areas from growth. Press the button : calculate probability to update the probability, and show probability to visualise the probability. To allocate 100 new built-up cells according to the rules you selected, press the respective button. The tick counter counts how often you have allocated 100 cells, i.e. pressed that button for the current landscape.
THINGS TO NOTICE
How does the probability change after turning off the distance to city center as a key influence factor?
THINGS TO TRY
Turn on (or off) the factors infuencing urban growth: elevation, the neighborhood effect, distance to roads, distance to city center and green space protection.
EXTENDING THE MODEL
There are many ways this simple cellular automaton could be extended.
Obviously, we could add more layers, such as slope, waterbodies or infrastructure (e.g. schools, hospitals). We could also import GIS files for an actual city, instead of playing with this hypothetical city. And we could export the city landscapes we have created for further use in a GIS.
NETLOGO FEATURES
RELATED MODELS
If you would like to explore the basics of a cellular automaton, have a look at the Game of Life in the NetLogo model library.
CREDITS AND REFERENCES
This model was written by Nina Schwarz to teach about urban cellular automata. Please cite as follows: Schwarz, N. (2025): Urban growth cellular automaton.
License for this model: CC BY 4.0, https://creativecommons.org/licenses/by/4.0/
Comments and Questions
patches-own [landcover distance-cent distance-roads elevation probability] ; landcover classes: built-up, road, agri, green to setup ask patches [ set landcover "agri"] ask patch 0 0 [ ask n-of 500 patches in-radius 30 [ set landcover "built-up" ] ] ask patch 0 0 [ ask n-of 300 patches in-radius 10 [ set landcover "built-up" ] ] ask patch 0 0 [ ask n-of 500 patches in-radius 50 [ set landcover "built-up" ] ] ask patches with [ landcover != "built-up"] [set landcover one-of ["agri" "green"] ] ;; Inspired by code example Patch Clusters repeat 20 [ ask patches ; with [ landcover != "built-up"] [ set landcover [landcover] of one-of neighbors4 ] ] ; then impose the city on top again ask patch 0 0 [ ask n-of 500 patches in-radius 30 [ set landcover "built-up" ] ] ask patch 0 0 [ ask n-of 300 patches in-radius 10 [ set landcover "built-up" ] ] ask patch 0 0 [ ask n-of 2000 patches in-radius 50 [ set landcover "built-up" ] ] ; Creating roads as a random walk ask patch 0 0 [ sprout 7] ask turtles [ while [ patch-ahead 1 != nobody ] [ ask patch-ahead 1 [ set landcover "road"] move-to patch-ahead 1 set heading ( heading + ( random 11 - 5 )) ] die ] show-landcover ; calculate distance to center ask patches [ set distance-cent distance patch 0 0 ] let max-dc max [ distance-cent ] of patches ask patches [ set distance-cent ( distance-cent / max-dc ) ] ; calculate distance to roads ask patches [ set distance-roads 0 ] ask patches with [ landcover != "road"] [ let dist 1 while [ distance-roads = 0 ] [ if any? patches in-radius dist with [ landcover = "road"] [ set distance-roads dist] set dist ( dist + 1) ] ] ; min-max standardisation let max-dr max [ distance-roads] of patches ask patches [set distance-roads (distance-roads / max-dr ) ] ; create elevation using two "hills" at 30 30 and at 0 -50 patch coordinates ask patches [ let elev1 100 - distancexy 30 30 let elev2 50 - distancexy 0 -50 ifelse elev1 > elev2 [set elevation elev1] [set elevation elev2] ] let max-el max [ elevation] of patches let min-el min [ elevation] of patches ask patches [set elevation (elevation - min-el ) / ( max-el - min-el ) ] ask patches [ set probability 0 ] reset-ticks end to calculate-probability ; reset needed if changes made on the fly ask patches [ set probability 0 ] ; 1. identify which cells can be changed let usable-patches patches with [ landcover = "agri" or landcover = "green"] if protect-green = true [ set usable-patches patches with [ landcover = "agri"] ] ; 2. Translate choosers into numerical values we can use here let weight-elevation 0 if use-elevation = true [ set weight-elevation 1 ] let weight-roads 0 if use-roads = true [ set weight-roads 1 ] let weight-city-center 0 if use-city-center = true [ set weight-city-center 1 ] let weight-neighbors 0 if use-neighbors = true [ set weight-neighbors 1 ] ; 3. calculate probability of change for these cells ask usable-patches [ set probability ( weight-elevation * elevation - weight-roads * distance-roads - weight-city-center * distance-cent + weight-neighbors * count neighbors with [ landcover = "built-up"]) / count neighbors ] ; 4. standardise this with a min/max standardisation let max-pb max [ probability] of usable-patches let min-pb min [ probability] of usable-patches ifelse max-pb - min-pb = 0 [ ask usable-patches [ set probability 0 ] ] [ ask usable-patches [ set probability ( probability - min-pb) / (max-pb - min-pb) ] ] end to allocate-growth calculate-probability let usable-patches patches with [ landcover = "agri" or landcover = "green"] if protect-green = true [ set usable-patches patches with [ landcover = "agri"] ] ask max-n-of 100 usable-patches[probability] [ set landcover "built-up" ] show-landcover tick end to show-landcover ask patches with [ landcover = "agri"] [ set pcolor yellow ] ask patches with [ landcover = "built-up"] [ set pcolor red] ask patches with [ landcover = "green"] [ set pcolor green] ask patches with [ landcover = "road" ] [ set pcolor black] end to show-dist-CBD ask patches [set pcolor scale-color black distance-cent 1 0 ] end to show-dist-roads ask patches [set pcolor scale-color black distance-roads 1 0 ] end to show-elevation ; ask patches [set pcolor scale-color black elevation 1 0] end to show-probability ask patches [set pcolor scale-color black probability 1 0 ] end
There is only one version of this model, created 3 days ago by Gianluc Ambros.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.