teaching contemporary mathematics conference january 25, 2013 christine belledin nc school of...

7
Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics Getting Started with Computer Simulations using NetLogo

Upload: posy-mosley

Post on 24-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Teaching Contemporary Mathematics ConferenceJanuary 25, 2013

Christine BelledinNC School of Science and Mathematics

Getting Started with Computer Simulations

using NetLogo

Page 2: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Patches

The Basics – Three Types Agents

Turtles

Links

Page 3: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Variable Definitions Global variables Agentset-specific variables

Setup Procedures Clear variables Use patches and turtles to create environment Reset tick counter

Go Procedures Define steps that are carries out on the agents at each tick Use subroutines to add structure and clarity

The Basics – Program Structure

Page 4: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

NetLogo tutorials My students work independently through the tutorials from the NetLogo

website. Tutorial 1: Students learn to use and explore existing models Tutorial 2: Students learn to write command and modify existing models Tutorial 3: Students build a simple NetLogo model

For less experiences students, you may want to complete Tutorial 3 together as a class.

Write a program as a class Show students the Fire model from the NetLogo library. Introduce modified problem (see next slide) and develop model First homework: students make one addition/modification to our class model

How I start NetLogo in my classroom

Page 5: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Suppose 30% of the wooded areas along the western edge of a region catch fire. There are 5 houses scattered throughout the area. In each step, if a neighbor of a patch is on fire, then the patch has a 50% chance of catching fire. Which house is most likely to burn?

Modeling the Spread of a Fire

Page 6: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Step 1: Create the environment. Turn patches green and brown Randomly place houses Set fires along western edge

Step 2: Spread the fire. Spread the fire through the green patches Show a house burns by turning grey

Step 3: Make improvements. Identify problems in the simulation and address them Try to have a stopping point for the simulation

Step 4: Add in extras. Allow user to input forest density, number of houses, etc. Report the impact of the fire numerically or graphically

Break the problem into steps

Page 7: Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics

Start with the NetLogo tutorials from the NetLogo User Manual Explore existing models from the Models Library

Look through the code of a few models and try to understand the logic

Try making modifications to existing models Search the “Code Examples” section for simple examples of particular

behaviors Use the NetLogo dictionary to search for relevant commands Check out the NetLogo Resources page for collections of models Recommended book:

Agent-Based and Individual-Based Modeling: A Practical Introduction (2011) by Steven F. Railsback and Volker Grimm

Recommendations for learning more about NetLogo and ABM