NetLogo Workshop Complexity And Business Analytics October 10, 2008, UM-Dearborn David Bowen, WSU Physics Slides and model files will.

Slides:



Advertisements
Similar presentations
Agents and Pervasive Computing Group Università di Modena e Reggio Emilia System Requirements NetLogo is designed: to run almost any type of computer.
Advertisements

13 giugno 2006Master in economia e politica sanitaria - Simulazione per la sanità 1 _Strumenti, seguito _______________________________________ Un modello.
How to View User Counts on Sharp Copiers with Account Controls Enabled.
Netlogo and its Relatives Logo (Papert) –Language for teaching mathematics graphically –Tell turtle how to move Starlogo (Resnick) & StarlogoT (Wilensky)
®® Microsoft Windows 7 for Power Users Tutorial 2 Customizing Microsoft Windows 7.
New Mexico Computer Science For All Breeds and Shapes in NetLogo Maureen Psaila-Dombrowski.
Chapter 6 Multiform Projects Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
1 An Introduction to IBM SPSS PSY450 Experimental Psychology Dr. Dwight Hennessy.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
2-Day Introduction to Agent-Based Modelling Day 2: Session 5 Variables and Debugging.
®® Microsoft Windows 7 for Power Users Tutorial 2p1 Customizing Microsoft Windows 7.
Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics.
Department of Computer Science What is NetLogo UH-DMML  Multi-agent programmable modeling environment  Well suited for modeling complex systems evolving.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
I Can… Define basic file management and related terms Identify levels of a file system Identify and explain ways to view files in Windows OS Explain the.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
JQuery Page Slider. Our goal is to get to the functionality of the Panic Coda web site.Panic Coda web site.
Using Dreamweaver. Slide 1 Dreamweaver has 2 screens that do different things The Document window where you create your WebPages The Site window where.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
by Chris Brown under Prof. Susan Rodger Duke University June 2012
NetLogo Dr. Feng Gu. NetLogo NetLogo is a programmable modeling environment for simulating natural and social phenomena, authored by Uri Wilensky in 1999.
CSS Sprites. What are sprites? In the early days of video games, memory for graphics was very low. So to make things load quickly and make graphics look.
1/28/2010 Network Plus Windows Networking Network Identification Identifies name and type of network. Installed adapters –Performed during Windows installation.
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
2-Day Introduction to Agent-Based Modelling Day 2: Session 8 Exploring Model Collections, NetLogo Lists, Further Resources.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
MICROSOFT WORD GETTING STARTED WITH WORD. CONTENTS 1.STARTING THE PROGRAMSTARTING THE PROGRAM 2.BASIC TEXT EDITINGBASIC TEXT EDITING 3.SAVING A DOCUMENTSAVING.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Playing Music in Alice By David Yan Under the direction of Professor Susan Rodger July 2015.
An Introduction to NetLogo Gabriel Wurzer, Vienna University of Technology AnthropologischeGesellschaftWien.
File Management Organizing files and folders. In this tutorial you will learn how to:  Create folders  Name files and folders  Organize your files.
Faculty Webpage Design Minimum Requirements. Go to: then High Schoolhttp://gcsc.groupfusion.net/
Models in NetLogo Day 3 COLQ 201 Multiagent modeling Harry Howard Tulane University.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
Microsoft Office 2008 for Mac – Illustrated Unit C: Understanding File Management.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Multiform Projects.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
Using Windows Explorer Windows explorer is different from Internet Explorer It is a Windows program designed to let you explore your hard drive and manage.
Chapter Two Creating a First Project in Visual Basic.
New Mexico Computer Science For All Variables and Scope Maureen Psaila-Dombrowski.
1 More About HTML Tables and Images. 22 Objectives You will be able to Create tables in HTML. Include images in your HTML page. Create links to other.
PowerPoint Basics Tutorial 4: Interactivity & Media PowerPoint can communicate with the outside world by linking to different applications, managing different.
PowerPoint Basics Tutorial 1: Objects These tutorials will introduce you to the most basic and useful functions of Microsoft PowerPoint We’re going.
Tutorial 3 Adding and Formatting Text with CSS Styles.
Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains.
Installing Parental Filter Version By NWSP.
The desktop (overview) Working with desktop icons The desktop is the main screen area that you see after you turn on your computer and log on to Windows.
Creating and Editing a Web Page
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Building a Website: Layout Fall Overall Structure: Home Page Title Section Title Frame Picture UNCP Math Menu Content Footer Contact Information.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
M10 WS11:Krankenhausbedarfsplanung The World as We See It given by Gabriel Wurzer and Wolfgang E. Lorenz
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
How to use Drupal Awdhesh Kumar (Team Leader) Presentation Topic.
1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
M10 WS11:Krankenhausbedarfsplanung More, More and Even-More More given by Gabriel Wurzer and Wolfgang E. Lorenz
Management Information Systems
Management Information Systems
An introduction to Netlogo agent-based software
Windows Internet Explorer 7-Illustrated Essentials
creating a ecosystems model in net logo
Presentation transcript:

NetLogo Workshop Complexity And Business Analytics October 10, 2008, UM-Dearborn David Bowen, WSU Physics Slides and model files will be at > NetLogo workshop

10/10/08NetLogo Workshop2 As a result of this workshop, (I hope) you will be able to: 12:30 – 2:10 Describe agent-based modeling Download & install NetLogo Find & use existing models installed with NetLogo & on NetLogo website 2:30 – 4:10 Modify an existing NetLogo model Build a new NetLogo model

NetLogo Workshop Part 1 Agent-based modeling Download and Install Find and run

10/10/08NetLogo Workshop4 Agent-Based Modeling What is agent-based modeling?  Simulating a set of acting/interacting agents  Examples of agents: people, organs, molecules, planets, family units, corporations, ribosomes  Modeler assigns (programs): oCharacteristics or properties of agent Homogenous or diverse agents oRules or methods of interaction Example: Preferentially link to the most popular agent (the one that already has the most links)

10/10/08NetLogo Workshop5 Agent-Based Modeling What is agent-based modeling?  Agent-based modeling environment/toolkit: oSteps agents through actions/interactions oDisplays agents, charts indicators, saves data  NetLogo has four basic types of agents A: always oA Observer: sees all oA Turtles (agents), modeler can create subtypes oS Links between turtles, can have subtypes oA Patches or pieces of background Can be “invisible” but sometimes important (grass in Sheep and Wolves)

10/10/08NetLogo Workshop6 Agent-Based Modeling Where is agent-based modeling used?  Everywhere, e.g. all academic departments  Natural systems (science, engineering etc.) oMany existing simulation techniques, question is purpose, strengths, weaknesses  Social systems (humanities, social science, business/marketing etc.) oOften the best or only laboratory available

10/10/08NetLogo Workshop7 Agent-Based Modeling Types of use  Real-world simulation, optimization  Research  Classroom: learning, demo, homework Alternatives to making your own models  Models Library downloads with installation  Publicly available models  Modify and existing model

10/10/08NetLogo Workshop8 Agent-Based Modeling About NetLogo  Uri Wilensky et al. at Center for Connected Learning and Computer-Based Modeling at Northwestern University  “Low floors, high ceilings”  Free download  Java-based (run anywhere) but private Java copy  Discussion forums, technical support, continuous development

10/10/08NetLogo Workshop9 Download and Install URL: ccl.northwestern.edu/netlogo/ccl.northwestern.edu/netlogo/ Notice: mail lists, Resources (more models) Download on the left Save to desktop (because of rights on these computers, elsewhere you can accept the default) Double-click on downloaded file to install (NetLogo4.0.3Installer.exe) Location: up-arrow to desktop, add \NetLogo > Next Accept all other defaults

10/10/08NetLogo Workshop10 Run Start > All Programs > NetLogo > NetLogo Notice:  File menu item (top left) – Models Library, etc  Interface – “the model”  Information – How to use & change the model  Procedures – the code

10/10/08NetLogo Workshop11 Models Library File > Models Library  Checked except for (unverified) Biology > Heatbugs (famous)  Double-click model name or picture to open  Setup then Go (Go again pauses)  Information – what the model is doing  Procedures oTurtles-own establishes properties (characteristics) oButton name starts “to” procedure with that name o; for comment, can be whole or last part of line

10/10/08NetLogo Workshop12 Models Library File > Models Library > Computer Science > Cellular Automata > Life Cellular Automaton  Here, patches = cells, no turtles oDark = cell alive, background color = dead  Cell with 3 live neighbors comes to life  Live cell with two live neighbors continues to live oOtherwise cell dies

10/10/08NetLogo Workshop13 Models Library Social Science > Party (famous in another form)  Schelling model – two types of people oHere, men and women oOriginally, Black and White oOtherwise the same – properties and methods  How comfortable are these agents with those of the other type – slider  Even a slight preference can lead to complete segregation

10/10/08NetLogo Workshop14 Models Library File > Models Library > Networks > Small Worlds (famous – six degrees of separation)  Uses links  Path along links from one agent to another  Setup = ring, links to 2 nearest on each side  Average path length for all pairs of agents  Even a few links across the ring reduces the average path length significantly  Significant in organizations, e.g. businesses

10/10/08NetLogo Workshop15 Models Library File > Open > Biology > Wolf Sheep Predation Different kinds of agents, including patches Click grass? Switch to On Boom-and-bust cycles very common

10/10/08NetLogo Workshop16 Models on NetLogo site URL: ccl.northwestern.edu/netlogo/ > Community Modelsccl.northwestern.edu/netlogo/ Possible problems if models are written for earlier versions of NetLogo  My Two-color gas works with  My Brownian motion doesn’t

10/10/08NetLogo Workshop17 NetLogo Models on the Web Solves problems with old versions since Java Virtual Machine (VM) downloaded also (but different versions can coexist) > Classroom Modelswww.is.wayne.edu/drbowen/  Brownian motion works  Big Bang model Other things NetLogo can do

10/10/08NetLogo Workshop18 Extensions Array, Table, GoGo, Profiler, GIS, Sample, and Sound are in the standard installation In Extensions subfolder of NetLogo installation folder Each is explained in Help > NetLogoUser Manual > Extensions Some (GIS, Table) come with existing models

NetLogo Workshop Part 2 Modify Roll your own

10/10/08NetLogo Workshop20 Programming Resources Help > User Manual  Tutorials  Interface Guide – World, Menu items, Controls oWorld - Settings: size, wrapping Vs reflecting  Programming Guide – big picture oTypes: observer (starts off), turtle, patch, link oWhat can I do with agents?  NetLogo Dictionary – the nitty gritty oAlphabetical list oBy type

10/10/08NetLogo Workshop21 Modify One File > Model Library > Computer Science > Cellular Automata > Life Procedures – scan to numbers 3 and 2 On the way  patches-own – creates properties for patches oBuilt-in: pxcor, pycor, pcolor oliving? - ? makes this logical (true/false only) 3  4, 2  3 File > Save As a new name, e.g. LifeDB on desktop

10/10/08NetLogo Workshop22 Modify Life Add a slider to vary number on interface Click on down-arrow to select slider  Global variable init-number, 1 to 5, value 2  Then right-click to Select, squeeze it in In Procedures, 2  init-number, 3  init-number + 1 / Save, Setup then Go

10/10/08NetLogo Workshop23 Modify Life You now load this modified version from the desktop or by double-clicking the desktop icon  “Back home” you can keep the.NLOGO file in any folder you choose

10/10/08NetLogo Workshop24 Modify Small Worlds File > Models Library > Networks > Small Worlds On interface, put in a slider:  Global variable init-links  Minimum 1  Increment 1  Maximum 3  Value 2 Save on desktop under a new name  Add initials?

10/10/08NetLogo Workshop25 Modify Small Worlds Procedures, scroll through (bigger than Life)  Find to setup, then see make-turtles then wire-them (this creates the links)  About 75% down (Find?) find to wire-them  What we want to do: oAlways link to n+1 oIf init-links = 2 or 3 then also link to n + 2 oIf init-links = 3 then also link to n + 3  Dictionary: if condition [ commands ]

10/10/08NetLogo Workshop26 Modify Small Worlds Error when running with init-links = 1; divide by zero  Divide by clustering-coefficient-of-lattice  divide by dum, protect dum from being zero oWe might eventually want a better fix

10/10/08NetLogo Workshop27 Modifying Models Find a model that does something close to what you want, and modify it to suit For these modified models, we should go back and update the information Structured and commented code helps – do this for yourself, too

10/10/08NetLogo Workshop28 Roll Your Own Decisions needed  System to be modeled  What do the agents represent?  What are the rules of action and interaction?  How will you approximate these rules for entry into the modeling environment?  What does a tick (cycle) represent?

10/10/08NetLogo Workshop29 Other You might want to change the World settings  Size  Location of 0, 0  Wrapping or box  Patch size (also determines size of world screen)

10/10/08NetLogo Workshop30 Programming in NetLogo Case-insensitive To set a equal to b: set a b Arithmetic operators must have space on either side: set a 3 * b Can use parentheses to control order Use [ ] to block code statements White space ignored after minimum space Routines start with to, end with end No number types Logical variables end in ?

10/10/08NetLogo Workshop31 Programming in NetLogo Context: who is acting?  ask turtles [ commands ] sets context to turtles oAgents can ask other agents or even other types of agents ask turtles [ … ask links [ … ]… ]  Only that particular agent can find the value or change a value that it owns  If one agent (e.g. a turtle) is acting, other turtles is set of all other turtles, one-of other turtles is a random other  stop to stop asking breed to subtype an agent: breed [ cats cat ]

10/10/08NetLogo Workshop32 Simple Model Model will:  Setup oCreate turtles with random headings (this is the default), positions, speed  Go oLet turtles go with speed and headings oRandomly change speed and headings  Sliders to control speed range and size of heading changes

10/10/08NetLogo Workshop33 Simple Model Built-in turtle variables (each turtle has its own)  breed (sub-type)  Color (defaults to random for each turtle)  Heading (degrees, 0 = up, 90 = right)  hidden?  label, label-color  pen-mode, pen-size  shape  size  Who (a number)  xcor, ycor (by default 0, 0)

10/10/08NetLogo Workshop34 Network Model Model will:  Setup oCreate a set of turtles with random positions oCreate a random set of links between the turtles Each turtle has same chance of having links  Go Once oPick a random turtle and a random one of its links, and replace it within one attached preferentially Higher chance of linking to a turtle with the most links

10/10/08NetLogo Workshop35 Network Model Start new model, save it to desktop as Network Go to Model Library, open Network > Preferential Attachment, copy layout and limit-magnitude to clipboard and then into Procedures window, and resave  Will make a better World plot

10/10/08NetLogo Workshop36 Network Model Agentset – a list set of agents  Defaults to a random order but can be sorted  Can be “traversed” – go through all agents in the list by asking  Can also pick a random agent from the list  If we want angentset to persist, must set it to a name we have previously declared in globals or locally If we have picked a turtle, other turtles is an agentset of all of the other turtles agentset

10/10/08NetLogo Workshop37 Agentsets and Lists Agentset: an unordered set of agents of any type, including breeds  Order is randomized on each use  Can ask agentset [ list of commands ]  Current agent in “ask” sequence: self List: an ordered list of any objects, including agents  Order is always the same unless you change it  Can be sorted, etc.  Current list item in “for each” sequence: ? Return to slide 36

10/10/08NetLogo Workshop38 Jumpers Transport Agents jump by patches left to right Have to wait at each patch for its individual wait count, can’t jump on top of another Setup:  Initialize patches with wait counts, color-code Go:  Turtles jump to right if wait count reached and that patch is empty  After jumping off last patch on right, turtle dies

10/10/08NetLogo Workshop39 And… 3D Numerical modeling (modeling number of agents, etc.) Flying behind a turtle Back