The Research Experience for Teachers Program /

Subject Area:Earth & Environmental Science

Computer Science Tools:NetLogo (available for free online)

Activity Title: “Using NetLogo to Explore Concepts of Pollution and Its Effects on Population” – Part 2

Grade Level:9-12

Time Required: 60 minutes

Recommended Group Size:2

Summary:Students will examine the code of aNetLogoPollution Simulation to discover why some elements of the simulation produce certain outcomes. They will also work with the code to add a new element (bicycles) to the simulation in order to reduce emissions (pollution).

Computer Science Connection:NetLogo and basic programing knowledge

Keywords:NetLogo, pollution, diffuse, birthrate, emissions

Pre-Requisite Knowledge:Basic knowledge of and/or experience with NetLogo and completion of “Using NetLogo to Explore Concepts of Pollution and Its Effects on Population” – Part 1

Educational Standard(s):

  • EEn.2.5.5 - Explain how human activities affect air quality.
  • EEn.2.7.3 - Explain how human activities impact the biosphere.

Learning Objectives: After this lesson students will be able to

  • Interpret NetLogo code to answer specific questions about the Pollution Simulation
  • Use logical reasoning, knowledge of pollution and its associated elements, and knowledge of NetLogo coding to introduce a new element (bicycles) into the simulation

Materials List:

  • Computer
  • NetLogo Software
  • Pollution Simulation (NetLogoin zip file)
  • Using NetLogo to Explore Concepts of Pollution and Its Effects on Population – Part 2 Lab Activity
  • Copy of previous day’s lab activity sheet (Pollution Simulation Lab Activity)
  • Example Pollution Simulation with Bicycles (NetLogo in zip file)

Introduction/Motivation:

Have a brief discussion with the whole class about the Pollution Simulation results from the previous day. Discuss other ways pollution can be reduced. If it doesn’t naturally come up in discussion,ask students about the idea of using bicycles instead of cars and what the results of such action would be.

Before the Activity:

  1. Download NetLogo from
  2. Make sure students have basic knowledge of NetLogo from a previous lesson. This does not have to be extensive knowledge, but it should be enough to where they understand the basic parts of a NetLogo simulation, the Information tab, and the Code tab.

Procedure:

  1. Open theNetLogoPollution Simulation.
  2. Work in teams of 2 to complete the Using NetLogo to Explore Concepts of Pollution and Its Effects on Population – Part 2 Lab Activity.
  3. Students turn in lab sheet and saved (under new name) simulation with their new coding.

Help for Working with Code:

  1. Humans begin with a health of 5. As they wander and “eat pollution,” their health declines. The specific sections of code that impact human’s health are as follows:

create-people initial-population [

setcolor black

randomize-position

sethealth 5

]

***********************************

to wander ;; person procedure

rtrandom-float 50

ltrandom-float 50

fd1

set health health - 0.1

end

to eat-pollution ;; person procedure

if ( pollution 0.5 )

[

sethealth (health - (pollution /10))

]

end

to maybe-die ;;die if you run out of health

if( health <=0 )

[ die]

end

  1. A sample NetLogo simulation with bicycles added is attached in the zip file for a reference. There are many ways to have the use of bicycles affect the population. This is just once way.

Assessment:

Each team will turn in completed Using NetLogo to Explore Concepts of Pollution and Its Effects on Population” – Part 2 Lab Activitysheet AND saved (under new name) simulation with their new coding.

Extension:

If time permits, student teams could present their new simulations to the class (on SMARTboard or ActivBoard) and class can vote on which was the most effective.

Reference(s):

  • Felsen, M. and Wilensky, U. (2007). NetLogo Urban Suite - Pollution model. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.