Netlogo Field Guide

Total Page:16

File Type:pdf, Size:1020Kb

Netlogo Field Guide A Field Guide to NetLogo Steve Scott and Matt Koehler George Mason University Department of Computational Social Science Copyright © 2014. The MITRE Corporation. All Rights Reserved. About the Cover: The green sea turtle (Chelonia mydas) image on the cover was created by Jack Javech of the National Oceanographic and Atmospheric Administration (NOAA). NOAA's National Marine Fisheries Service (NMFS) and the U.S. Fish and Wildlife Service (FWS) work together to protect sea turtles, which are affected by numerous threats including fisheries bycatch, habitat destruction and degradation, marine pollution, and boat strikes. The NMFS, FWS, and numerous partners are actively involved in sea turtle conservation efforts, such as monitoring sea turtle nesting activity, protecting turtle nests and nesting beach habitat, and implementing and enforcing regulations to reduce bycatch of sea turtles. Visit the NMFS website at http://www.nmfs.noaa.gov/pr/species/turtles/ and the FWS website at http://www.fws.gov/northflorida/SeaTurtles/seaturtle-info.htm for further information about sea turtles and conservation efforts. i Table of Contents Preface ............................................................................................................................................. 1 About This Guide ........................................................................................................................ 1 About NetLogo ........................................................................................................................... 1 Prerequisites ................................................................................................................................ 1 Font Conventions ........................................................................................................................ 1 About the Programs in This Guide ............................................................................................. 1 How to Suggest Improvements ................................................................................................... 2 Other NetLogo References ......................................................................................................... 2 Acknowledgements ..................................................................................................................... 3 NetLogo Versioning .................................................................................................................... 3 1. Getting Started ........................................................................................................................ 5 Running NetLogo ........................................................................................................................ 5 Running a NetLogo Model from the Library .............................................................................. 6 Diving In: A Quick Hands-On Tour ......................................................................................... 10 A Guided Tour of the NetLogo Environment ........................................................................... 13 Summary ................................................................................................................................... 17 2. Agent-Based Modeling Concepts ......................................................................................... 18 3. Programming in NetLogo ..................................................................................................... 21 Agents ....................................................................................................................................... 21 Turtles (and Breeds) .............................................................................................................. 21 Patches .................................................................................................................................. 22 Links (and Breeds) ................................................................................................................ 23 Observer ................................................................................................................................ 24 Data Structures and Variables ................................................................................................... 24 Variables in NetLogo ............................................................................................................ 24 Global Variables (and Interface Objects) ............................................................................. 25 Local Variables ..................................................................................................................... 26 Agentsets ............................................................................................................................... 28 Lists ....................................................................................................................................... 29 Booleans ................................................................................................................................ 34 Neighbors .............................................................................................................................. 35 ii Interface Objects: Button, Slider, Switch, Chooser, Input, Monitor, Plot, Output, Note ......... 36 Button .................................................................................................................................... 37 Slider ..................................................................................................................................... 40 Switch ................................................................................................................................... 41 Chooser ................................................................................................................................. 42 Input Box .............................................................................................................................. 43 Monitor ................................................................................................................................. 44 Plot ........................................................................................................................................ 47 Output ................................................................................................................................... 53 Note ....................................................................................................................................... 53 Control Flow ............................................................................................................................. 54 Ask ........................................................................................................................................ 54 If and If-Then-Else ................................................................................................................ 54 While Loop ........................................................................................................................... 55 Repeat Loop .......................................................................................................................... 56 List Iteration .......................................................................................................................... 56 Procedures ................................................................................................................................. 58 User-Defined Procedures ...................................................................................................... 58 User-Defined Functions (Reporters) ..................................................................................... 59 Passing Parameters ................................................................................................................ 59 NetLogo Extensions (Arrays, Tables, Geographic Info Systems, Sounds, etc.) .................. 60 Input/Ouput ............................................................................................................................... 61 Console I/O ........................................................................................................................... 61 File I/O .................................................................................................................................. 65 4. Using Models for Research ................................................................................................... 70 Updating an Existing Model ..................................................................................................... 70 Running the Updated Model ..................................................................................................... 82 Experimenting with the Updated Model ................................................................................... 83 Managing Multiple Experiments Using BehaviorSpace ........................................................... 85 5. So, Your Model Doesn’t Work… ......................................................................................... 93 Introduction ............................................................................................................................... 93 Random Numbers ....................................................................................................................
Recommended publications
  • Agent-Based Architectures and Algorithms for Energy Management in Smart Gribs : Application to Smart Power Generation and Residential Demand Response Robin Roche
    Agent-Based Architectures and Algorithms for Energy Management in Smart Gribs : Application to Smart Power Generation and Residential Demand Response Robin Roche To cite this version: Robin Roche. Agent-Based Architectures and Algorithms for Energy Management in Smart Gribs : Application to Smart Power Generation and Residential Demand Response. Other. Université de Technologie de Belfort-Montbeliard, 2012. English. NNT : 2012BELF0191. tel-00864268 HAL Id: tel-00864268 https://tel.archives-ouvertes.fr/tel-00864268 Submitted on 20 Sep 2013 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Université de Technologie de Belfort–Montbéliard Institut de Recherche sur les Transports, l’Énergie et la Société Laboratoire Systèmes et Transports École Doctorale Sciences pour l’Ingénieur et Microtechniques Algorithmes et Architectures Multi-Agents pour la Gestion de l’Énergie dans les Réseaux Électriques Intelligents Application aux Centrales à Turbines à Gaz et à l’Effacement Diffus Résidentiel Thèse no191 présentée et soutenue publiquement en vue de l’obtention du titre de Docteur en Génie Électrique par Robin Roche le 7 décembre 2012 Membres du jury : M. Mohamed Benbouzid IUT de Brest, LBMS Président M. Nouredine Hadjsaid INP Grenoble, G2Elab Rapporteur M.
    [Show full text]
  • Easybuild Documentation Release 20210706.0 Ghent University
    EasyBuild Documentation Release 20210907.0 Ghent University Tue, 07 Sep 2021 08:55:25 Contents 1 What is EasyBuild? 3 2 Concepts and terminology 5 2.1 EasyBuild framework..........................................5 2.2 Easyblocks................................................6 2.3 Toolchains................................................7 2.3.1 system toolchain.......................................7 2.3.2 dummy toolchain (DEPRECATED) ..............................7 2.3.3 Common toolchains.......................................7 2.4 Easyconfig files..............................................7 2.5 Extensions................................................8 3 Typical workflow example: building and installing WRF9 3.1 Searching for available easyconfigs files.................................9 3.2 Getting an overview of planned installations.............................. 10 3.3 Installing a software stack........................................ 11 4 Getting started 13 4.1 Installing EasyBuild........................................... 13 4.1.1 Requirements.......................................... 14 4.1.2 Using pip to Install EasyBuild................................. 14 4.1.3 Installing EasyBuild with EasyBuild.............................. 17 4.1.4 Dependencies.......................................... 19 4.1.5 Sources............................................. 21 4.1.6 In case of installation issues. .................................. 22 4.2 Configuring EasyBuild.......................................... 22 4.2.1 Supported configuration
    [Show full text]
  • Use of Bio-Inspired Techniques to Solve Complex Engineering Problems: Industrial Automation Case Study
    Use of Bio-inspired Techniques to Solve Complex Engineering Problems: Industrial Automation Case Study José Fernando Lopes Barbosa Relatório de Projecto para obtenção do grau de Mestre em Engenharia Industrial ramo de especialização em Engenharia Electrotécnica Supervision: Prof. Dr. Paulo Leitão September, 2010 Dedication To Inês and Mariana ii Acknowledgements First of all I want to express my most grateful thanks to Professor Paulo Leitão for his knowledge, patient, support and constant motivation during the development of this work without which the conclusion was not possible. Next, I want to thank all my friends for their support, incentive and motivation. I also want to thank my parents for all the support and love throughout the years. A special thank to my beautiful grandmother that with her love and affection made me feel to be her special grandson. Finally, but not the least, I want to thank my wife Inês for her support and comprehension and to my daughter Mariana just to make me constantly smile. iii Abstract Nowadays local markets have disappeared and the world lives in a global economy. Due to this reality, every company virtually competes with all others companies in the world. In addition to this, markets constantly search products with higher quality at lower costs, with high customization. Also, products tend to have a shorter period of life, making the demanding more intense. With this scenario, companies, to remain competitive, must constantly adapt themselves to the market changes, i.e., companies must exhibit a great degree of self-organization and self-adaptation. Biology with the millions of years of evolution may offer inspiration to develop new algorithms, methods and techniques to solve real complex problems.
    [Show full text]
  • Cellular Automata Are Models of Distributed Dynamical Systems
    IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661,p-ISSN: 2278-8727, Volume 18, Issue 3, Ver. IV (May-Jun. 2016), PP 92-101 www.iosrjournals.org A New Multi-Agent Game Solver Miklos N Szilagyi Department of Electrical and Computer Engineering University of Arizona, Tucson, AZ 85721 Abstract: A new N-person game solver is presented in this work. The new software is an advance in the whole sate of art for the investigation of N-person games. It is now possible to investigate entire classes of games almost automatically. Moreover, this software makes it trivial to perform a systematic investigation of any game with a multidimensional parameter space. In addition, the payoff functions are no longer limited to quadratic expressions; any elementary mathematical function can easily be used, even in parameterized form. The experimental results are interesting and they very strongly depend on the initial conditions. Keywords: N-person games, Netlogo, Agent-based simulation, Prisoners’ Dilemma, Chicken Dilemma, Complexity. I. Introduction Many complex phenomena can be represented as N-person games in which the participating agents all interact with all the other agents directly or indirectly [1-4]. In the latter case the agents immediately interact only with their immediate neighbors. In this case the agents are simply cells in a cellular automaton. Cellular automata [5-7] are powerful tools for the study of simultaneous operation of a large number of agents, i. e. for the investigation of complex systems and phenomena. Therefore, they are quite suitable for the study of spatial N-person games.
    [Show full text]
  • KIMONO, a Descriptive Agent-Based Modelling Method for the Exploration of Complex Systems: an Application to Epidemiology
    KIMONO, a descriptive agent-based modelling method for the exploration of complex systems: an application to epidemiology. Edouard Amouroux To cite this version: Edouard Amouroux. KIMONO, a descriptive agent-based modelling method for the exploration of complex systems: an application to epidemiology.. Modeling and Simulation. Université Pierre et Marie Curie - Paris VI, 2011. English. tel-00630779 HAL Id: tel-00630779 https://tel.archives-ouvertes.fr/tel-00630779 Submitted on 5 Dec 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. THESE DE DOCTORAT DE L’UNIVERSITE PIERRE ET MARIE CURIE Spécialité: Informatique (Ecole doctorale: EDITE) Présentée par Edouard AMOUROUX Pour obtenir le grade de DOCTEUR de l’UNIVERSITÉ PIERRE ET MARIE CURIE Sujet de la thèse : KIMONO: une méthode de modélisation descriptive centrée agent pour l'explication des systèmes complexes, une application en épidémiologie soutenue le 30/09/2011 devant le jury composé de : M. Directeur de thèse: Alexis Drogoul, Directeur de Recherche, IRD - UMMISCO / IFI - MSI Rapporteurs: David
    [Show full text]
  • The Development and Improvement of Instructions
    MECHANICS OF ATHEROSCLEROSIS, HYPERTENSION INDUCED GROWTH, AND ARTERIAL REMODELING A Dissertation by HEATHER NAOMI HAYENGA Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY May 2011 Major Subject: Biomedical Engineering Mechanics of Atherosclerosis, Hypertension Induced Growth, and Arterial Remodeling Copyright 2011 Heather Naomi Hayenga MECHANICS OF ATHEROSCLEROSIS, HYPERTENSION INDUCED GROWTH, AND ARTERIAL REMODELING A Dissertation by HEATHER NAOMI HAYENGA Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Approved by: Chair of Committee, James E. Moore, Jr. Committee Members, Fred J. Clubb Roland R. Kaunas Alvin T. Yeh Head of Department, Gerald L. Cote May 2011 Major Subject: Biomedical Engineering iii ABSTRACT Mechanics of Atherosclerosis, Hypertension Induced Growth, and Arterial Remodeling. (December 2010) Heather Naomi Hayenga, B.S., University of California, Davis Chair of Advisory Committee: Dr. James E. Moore, Jr. In order to create informed predictive models that capture artery dependent responses during atherosclerosis progression and the long term response to hypertension, one needs to know the structural, biochemical and mechanical properties as a function of time in these diseased states. In the case of hypertension more is known about the mechanical changes; while, less is known about the structural changes over time. For atherosclerotic plaques, more is known about the structure and less about the mechanical properties. We established a congruent multi-scale model to predict the adapted salient arterial geometry, structure and biochemical response to an increase in pressure.
    [Show full text]
  • Partitioning Method for Emergent Behavior Systems Modeled by Agent-Based Simulations
    Old Dominion University ODU Digital Commons Computational Modeling & Simulation Computational Modeling & Simulation Engineering Theses & Dissertations Engineering Winter 2012 Partitioning Method for Emergent Behavior Systems Modeled by Agent-Based Simulations O. Thomas Holland Old Dominion University Follow this and additional works at: https://digitalcommons.odu.edu/msve_etds Part of the Computer Sciences Commons Recommended Citation Holland, O. T.. "Partitioning Method for Emergent Behavior Systems Modeled by Agent-Based Simulations" (2012). Doctor of Philosophy (PhD), Dissertation, Computational Modeling & Simulation Engineering, Old Dominion University, DOI: 10.25777/wqf0-ke57 https://digitalcommons.odu.edu/msve_etds/36 This Dissertation is brought to you for free and open access by the Computational Modeling & Simulation Engineering at ODU Digital Commons. It has been accepted for inclusion in Computational Modeling & Simulation Engineering Theses & Dissertations by an authorized administrator of ODU Digital Commons. For more information, please contact [email protected]. PARTITIONING METHOD FOR EMERGENT BEHAVIOR SYSTEMS MODELED BY AGENT-BASED SIMULATIONS by O. Thomas Holland B. S. E. E. 1983, Tennessee Technological University M. S. E. E. 1996, Virginia Polytechnic Institute and State University A Dissertation Submitted to the Faculty of Old Dominion University in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY MODELING AND SIMULATION OLD DOMINION UNIVERSITY December 2012 Approved by: John Sokolowski (Director) ^rederic D. McKenitfe (Member) -?Cndreas Tolk (Member) Bruce Copeland (Member) ABSTRACT PARTITIONING METHOD FOR EMERGENT BEHAVIOR SYSTEMS MODELED BY AGENT-BASED SIMULATIONS O. Thomas Holland Old Dominion University, 2012 Director: Dr. John Sokolowski Used to describe some interesting and usually unanticipated pattern or behavior, the term emergence is often associated with time-evolutionary systems comprised of relatively large numbers of interacting yet simple entities.
    [Show full text]
  • IDOL Connector Framework Server 12.0 Administration Guide
    Connector Framework Server Software Version 12.0 Administration Guide Document Release Date: June 2018 Software Release Date: June 2018 Administration Guide Legal notices Copyright notice © Copyright 2018 Micro Focus or one of its affiliates. The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Trademark notices Adobe™ is a trademark of Adobe Systems Incorporated. Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation. UNIX® is a registered trademark of The Open Group. Documentation updates The title page of this document contains the following identifying information: l Software Version number, which indicates the software version. l Document Release Date, which changes each time the document is updated. l Software Release Date, which indicates the release date of this version of the software. To verify you are using the most recent edition of a document, go to https://softwaresupport.softwaregrp.com/group/softwaresupport/search-result?doctype=online help. You will also receive new or updated editions of documentation if you subscribe to the appropriate product support service. Contact your Micro Focus sales representative for details. To check for new versions of software, go to https://www.hpe.com/software/entitlements. To check for recent software patches, go to https://softwaresupport.softwaregrp.com/patches. The sites listed in this section require you to sign in with a Software Passport.
    [Show full text]
  • Situated Socio-Cognitive and Ecological Simulation of the Triple-Helix Theory of Regional Innovation Dynamics
    Situated Socio-Cognitive and Ecological Simulation of the Triple-Helix Theory of Regional Innovation Dynamics by James R. Morris-King A dissertation submitted to the Graduate Faculty of Auburn University in partial fulfillment of the requirements for the Degree of Doctor of Philosophy Auburn, Alabama May 3, 2014 Keywords: triple-helix, agent, simulation Copyright 2014 by James R. Morris-King Approved by Levant Yilmaz, Chair, Associate Professor of Computer Science John A. Hamilton Jr., Professor of Computer Science David Umphress, Associate Professor of Computer Science Abstract This dissertation focuses on applying the concept of agent-based ecological simulation to the problem of developing and maintaining regional innovation economies. A simulation model based on a popular model of innovation, the Triple-Helix theory of public-private partnership, is presented. This theory guides the alignment of the three principle sectors of regional and national systems of innovation; academic research, industrial development, and government control. The development and maintenance of systems of innovation has been recognized to be a key driver of economic growth, but the underlying mechanisms which govern these systems have proven difficult for pure statistical analysis to capture. We introduce an agent-based modeling and simulation approach, which leverages eco- logical concepts better suited for describing the behavioral mechanisms of multi-agent, environmentally-situated complex adaptive systems. This model extends the basic formu- lation of the triple-helix to include a new environmentally situated actor, the researcher, which uses indirect signaling to discover and exploit grant-funding. This extension uses principles from classical Predator-Prey interaction and a variant of ant colony optimization, a non-deterministic search algorithm.
    [Show full text]
  • Comparative Programming Languages CM20253
    We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily
    [Show full text]
  • Netlogo 3.0.2 User Manual
    NetLogo 3.0.2 User Manual NetLogo 3.0.2 User Manual Table of Contents What is NetLogo?..............................................................................................................................1 Features...................................................................................................................................1 Copyright Information.......................................................................................................................3 Third party licenses..................................................................................................................3 What's New?.......................................................................................................................................7 Version 3.0.2 (November 23, 2005).........................................................................................7 Version 3.0 (September 2005).................................................................................................7 Version 2.1 (December 2004)................................................................................................11 Version 2.0.2 (August 2004)..................................................................................................11 Version 2.0 (December 2003)................................................................................................11 Version 1.3 (June 2003).........................................................................................................12 Version 1.2 (March
    [Show full text]
  • Netlogo 2.0.2 User Manual
    NetLogo 2.0.2 User Manual NetLogo 2.0.2 User Manual Table of Contents What is NetLogo?..............................................................................................................................1 Features...................................................................................................................................1 Copyright Information.......................................................................................................................3 What's New?.......................................................................................................................................5 Version 2.0.2 (August 6, 2004)................................................................................................5 Version 2.0.1 (May 7, 2004).....................................................................................................6 Version 2.0.0 (December 10, 2003).........................................................................................7 Version 1.3.1 (September 2003)............................................................................................10 Version 1.3 (June 2003).........................................................................................................11 Version 1.2 (March 2003)......................................................................................................11 Version 1.1 (July 2002)..........................................................................................................11 Version 1.0 (April
    [Show full text]