Urban Suite - Recycling

Urban Suite - Recycling preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)


(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 280 times • Downloaded 13 times • Run 1 time
Download the 'Urban Suite - Recycling' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


This model demonstrates the relationship of agents (people) trying to sustain their natural resource of land over the course of time. In this simplified scenario, two types of developers exist: recyclers and wastefuls.

Recyclers are more conscious of the amount of land they use in order to gain energy (money, utility, etc). Therefore, they use the land but do not destroy it by using part of the resource and recycling everything. On the other hand, wasteful individuals consume the whole patch of land and afterwards dump their waste on it making it unusable to anyone until it has been restored by a recycler.

While the model is unrealistic in many respects, it brings up very important issues of sustainability in land and natural resource usage. This model shows the energy and effort it takes to sustain an environment in order to make it continuously habitable for people. To maintain resources, a balance must be maintained between use and recycling/renewal. While recycling leads to a better environment overall, it comes at an additional cost, since it often means not exploiting resources to their fullest potential, and the effort of recycling/renewing resources can take considerably energy. Furthermore, it takes effort to clean up the mess left by the wasteful individuals.

All in all, it should serve as an excellent conversation piece, sparking debate regarding which assumptions are and aren't reasonable, and what the consequences of those assumptions are.


The environment consists of a grid of cells, each of which may be in three discrete states: new (shown as green), recycled (shown as lime green), or waste (shown as yellow). The cells are all initially in the "new" state.

There are two types of people agents - recyclers and wastefuls. All agents have a property called "energy", which they collect from the environment. All agents start with half of the maximum possible stored energy (defined by the MAX-STORED-ENERGY slider). If an agent runs out of energy, they disappear. This energy might be loosely construed as money or other economic resources, and when an agent runs out of funds, they are no longer a player in the land development game.

Each time step (tick) agents first process the cell they are on, and then move to one of the eight neighboring cells. The movement may be random, or the agent may be more intelligent about seeking resources (if the PEOPLE-SEEK-RESOURCES? switch is turned on).

Wastefuls always totally exploit the cell they are processing, taking all the energy possible from the resource, and leaving the cell as "waste". They gain 4 energy from "new" cells, and 2 energy from "recycled" cells, and nothing from "waste" cells.

Recyclers are conscientious, and only use half of the available resources in the cell, allowing the cell to rejuvenate the resources. Thus, "new" cells stay "new" after being processed, but the recycler only gains 2 energy. Recyclers also only take half (1 energy) from "recycled" cells, leaving the cell still in a recycled state. When a recycler encounters a "waste" cell, they take the effort to recycle it, but this actually costs them energy (controlled by the RECYCLING-WASTE-COST slider), rather than gaining them anything.

Additionally, resources are randomly regenerated in the environment (at a rate controlled by the RESOURCE-REGENERATION slider). This process causes cells change back into the "new" state. Cells in the "recycled" state are five times more likely to change back to the new state than those in the "waste" state. Although the factor of five is arbitrary, it is logical that squares that have been exploited/wasted are slower to regenerate.


Press the SETUP button to initialize the world. All cells are set to the "new" state, and recyclers and wastefuls are placed on random cells.

Press the GO button to run the model. Press GO ONCE to run a single time step (tick).

Use the NUM-RECYCLERS and NUM-WASTEFULS sliders to control the initial populations of recyclers and wastefuls.

The MAX-STORED-ENERGY slider determines the maximum amount of energy that an agent can store up. If processing a cell would cause the agent to have more than this maximum amount of energy, the agent does not process the cell.

The RECYCLING-WASTE-COST slider determines how much energy a recycler loses when it turns a "waste" cell into a "recycled" cell.

The RESOURCE-REGENERATION controls the rate at which the environment naturally regenerates resources. A value of 0 means that the environment does not regenerate, and a value of 100 means that the environment regenerates fairly quickly.

If the AGENTS-SEEK-RESOURCES? switch is ON, then agents look at the eight neighboring cells, and first try to move to a "new" cell. If none exists, they try to move to a "recycled" cell. If none exists, then they move to a random cell. If AGENTS-SEEK-RESOURCES? is switched OFF, then agents always move to a random neighboring cell.

If SHOW-ENERGY? is switched ON, then the energy for each individual agent is overlaid on the view.

The current number of recyclers and number of wastefuls are shown in the "RECYCLERS (BLUE)" and "WASTEFULS (RED)" monitors.

The populations over time are plotted in the POPULATION plot.

The "LAND USE" plot records the percentage of the cells that are in each state: new, recycled, and waste.


In this model there is a notion of carrying-capacity. That is, how many agents can the environment support in a relatively stable manner? The answer depends on which type of agent is being discussed. In this model the environment can support an arbitrarily large number of recyclers without any difficulty. However, there is a limit on the number of wastefuls that the environment can support. The carrying-capacity of wastefuls is dependent on several factors, particularly the RESOURCE-REGENERATION parameter, and the number of recycler agents that are in the world.


Set MAX-STORED-ENERGY to 50, RECYCLING-WASTE-COST to 0.5, and RESOURCE-REGENERATION to 25. Run the model with 25 recyclers and 25 wastefuls for 10,000 ticks. How many of each type survived? Now run it again for 10,000 ticks, this time with 50 recyclers and 25 wastefuls. How many of each survived?

Try running the model with no recyclers, and 50 wastefuls. Look at the LAND USE plot. The cells all start as "new", but as time passes, the number of "waste" cells increases and passes the number of "new" cells, rising as high as perhaps 75% of the land use. After this peak, the number of "waste" cells falls, until it is back down below 25% again. Look at this plot in comparison to the POPULATION plot above it -- how do the two relate to each other?


The MAX-STORED-ENERGY constraint exists because without a cap on the amount of energy agents can store, it generally gave the wastefuls too strong an advantage in the world. They would soak up vast quantities of energy (they acquire energy at a rate that is twice that of the recyclers), and then the recyclers would die off before the wastefuls had expended their reserves. See if you can find another way to keep the model somewhat in balance, instead of having a MAX-STORED-ENERGY cap.


The SHOW-ENERGY? feature of this model takes advantage of the fact that every turtle (and every patch) in NetLogo has a "label" property. This means that you can assign some text to be displayed next to a turtle. In this particular case, we show the energy level with the code: ASK TURTLES [ SET LABEL (ROUND ENERGY) ]

This first rounds the energy to the nearest whole number (so that we don't get long labels like "48.25"), and then sets each turtle's label to be the result.


This model is related to all of the other models in the "Urban Suite".

An early version of this model was inspired and based on the Cooperation model in the NetLogo models library. The Cooperation model discusses how cooperation might have arisen in the course of biological evolution.


The original version of this model was developed during the Sprawl/Swarm Class at Illinois Institute of Technology in Fall 2006 under the supervision of Sarah Dunn and Martin Felsen, by the following students: Anita Phetkhamphou and Tidza Causevic . See http://www.sprawlcity.us/ for more information about this course.

Further modifications and refinements were made by members of the Center for Connected Learning and Computer-Based Modeling before releasing it as an Urban Suite model.

The Urban Suite models were developed as part of the Procedural Modeling of Cities project, under the sponsorship of NSF ITR award 0326542, Electronic Arts & Maxis.

Please see the project web site ( http://ccl.northwestern.edu/cities/ ) for more information.


If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

  • Felsen, M. and Wilensky, U. (2007). NetLogo Urban Suite - Recycling model. http://ccl.northwestern.edu/netlogo/models/UrbanSuite-Recycling. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.


Copyright 2007 Uri Wilensky.


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

turtles-own [ energy ]
patches-own [ resource-type ]

breed [ recyclers recycler ]
breed [ wastefuls wasteful ]

to setup
  set-default-shape turtles "person"
  create-recyclers num-recyclers [
    set color blue
  create-wastefuls num-wastefuls [
    set color red
  ask turtles [
    set size 1.5  ;; easier to see
    setxy random-pxcor random-pycor
    set energy max-stored-energy / 2
  ask patches [
    set resource-type "new"

to go
  ask recyclers [
  ask wastefuls
  ask turtles [
    if (energy > max-stored-energy)
      [ set energy max-stored-energy ]
    if energy < 0
      [ die ]

  ifelse (show-energy?)
    [ ask turtles [ set label (round energy) ] ]
    [ ask turtles [ set label "" ] ]

  ask patches [ update-patch ]

to move  ;; turtle procedure
  let target-patch one-of neighbors
  if (agents-seek-resources?)
    let candidate-moves neighbors with [ resource-type = "new" ]
    ifelse any? candidate-moves
      [ set target-patch one-of candidate-moves ]
      set candidate-moves neighbors with [ resource-type = "recycled" ]
      if any? candidate-moves
        [ set target-patch one-of candidate-moves ]
  face target-patch
  move-to target-patch

  set energy (energy - 1)

to recycler-process-patch
  ifelse (resource-type = "new" )
    if (energy <= max-stored-energy - 2)
      [ set energy energy + 2 ]
    ifelse (resource-type = "recycled" )
      if (energy <= max-stored-energy - 1)
        set energy energy + 1
      set energy energy - recycling-waste-cost
      set resource-type "recycled"

to wasteful-process-patch
  ifelse (resource-type = "new" )
    if (energy <= max-stored-energy - 4)
      set energy energy + 4
     set resource-type "waste"
    if (resource-type = "recycled")
      if (energy <= max-stored-energy - 2)
        set energy energy + 2
        set resource-type "waste"
  ; if resource-type is "waste", then we gain nothing.

to update-patch
  ifelse (resource-type = "new")
    [ set pcolor green ]
  [ ifelse (resource-type = "recycled")
      [ set pcolor lime ]
      [ set pcolor yellow - 1 ]

to update-environment
  ask patches with [ resource-type = "recycled" ]
    if random 100 < (resource-regeneration / 10)
      [ set resource-type "new" ]
  ; waste is less likely to be renewed naturally by the environment
  ; in this model, we arbitrarily assume 5 times less likely
  ask patches with [ resource-type = "waste" ]
    if (random 5 = 0) and (random 100 < (resource-regeneration / 10))
      [ set resource-type "new" ]

; Copyright 2007 Uri Wilensky.
; See Info tab for full copyright and license.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 6 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky almost 7 years ago Updated version tag Download this version
Uri Wilensky almost 7 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky almost 8 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 9 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 9 years ago Urban Suite - Recycling Download this version

Attached files

File Type Description Last updated
Urban Suite - Recycling.png preview Preview for 'Urban Suite - Recycling' over 6 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.