2-Day Introduction to Agent-Based Modelling Day 2: Session 8 Exploring Model Collections, NetLogo Lists, Further Resources.

Slides:



Advertisements
Similar presentations
2-Day Introduction to Agent-Based Modelling Day 1: Session 2 NetLogo Style, Documentation, kinds of agents, reacting to other agents.
Advertisements

Introduction to Programming using Matlab Session 2 P DuffourJan 2008.
Click the Enter button to begin using the Compendium Click to continue.
DLC-MODS Workbook 1.2 Pinky says, “Hello.” Presented by University of Tennessee Libraries Digital Library Center Melanie Feltner-Reichert, Metadata Librarian.
Qualtrics Survey Kenyon A Beginner’s Guide.
Computing Concepts Advanced HTML: Tables and Forms.
1 More about the Confidence Interval of the Population Mean.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Agent-based model of a simple stable economy Alexandre Lomovtsev Advisor: Dr. Russell Abbott, Ph.D. California State University, Los Angeles Department.
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
THE BASICS OF THE WEB Davison Web Design. Introduction to the Web Main Ideas The Internet is a worldwide network of hardware. The World Wide Web is part.
2-Day Introduction to Agent-Based Modelling Day 2: Session 5 Variables and Debugging.
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.
2-Day Introduction to Agent-Based Modelling Day 1: Session 1 Introduction, commands, loops, conditionals.
MIS 3200 – Unit 6.2 Learning Objectives How to move data between pages – Using Query Strings How to control errors on web pages – Using Try-catch.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
ABM Frameworks Dr Andy Evans With additions from Dr Nick Malleson.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Caribou – Wolf Interactions OmMQ5Fc.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
KJOlinski.com - RapidHMI INTRODUCING RapidHMI AND PLCExplorer.
2-Day Introduction to Agent-Based Modelling Day 1: Session 4 Networks.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
CISC 1600 – Lecture 3.2 Simulations Complex Input & Output NetLogo.
JavaScript, Fourth Edition
Introduction to Sequence Diagrams
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
A Look Inside Some NetLogo Simulations Bruce Edmonds Centre for Policy Modelling Manchester Metropolitan University.
Chapter 10 Strings, Searches, Sorts, and Modifications Midterm Review By Ben Razon AP Computer Science Period 3.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
Keeping it Neat: Functions and JavaScript Source Files Chapter 7.
By Melissa Dalis Professor Susan Rodger Duke University June 2011 Multiplication Table.
Multi-Patch Cooperative Specialists With Tags Can Resist Strong Cheaters, Bruce Edmonds, Feb 2013, ECMS 2013, Aalesund, Norway, slide 1 Multi-Patch Cooperative.
2-Day Introduction to Agent-Based Modelling Day 2: Session 6 Mutual adaption.
CS285 Visual Basic 2 Department of Computing UniS 1 Statements in Visual Basic A statement is the fundamental syntactical element of a program smallest.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
Can I get your number? By Melissa Dalis Professor Susan Rodger Duke University June 2011.
CSCI 6962: Server-side Design and Programming JSF DataTables and Shopping Carts.
OLE Slide No. 1 Object Linking and Embedding H OLE H definition H add other information to documents H copy.
1 Quiz Template: Using the ‘ask user’ functions By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Advanced Tips And Tricks For Power Query
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
 Product Recommendations  Managing Product Recommendations  Types of Product Recommendations  Product Out of Stock  Out of Stock Management  Let.
UsersTraining StatisticsCommunication Tests Knowledge Board Welcome to the Knowledge Board interactive guide! We encourage you to start with a click on.
Online Surveys Jacqui James Malcolm Roberts School of Education.
2-Day Introduction to Agent-Based Modelling Day 2: Session 7 Social Science, Different Purposes and Changing Networks.
PHP Form Processing * referenced from
Linear Search Linear Search is a fundamental search algorithm. Linear search, also known as sequential search, is a process that checks every element in.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
1 4.2 Selection Logical Operators. 2 Learning Objectives Explain how the logical operator AND Boolean statements works. Directly testing if text boxes.
Using JSTOR May What is JSTOR?JSTOR 2.JSTOR demonstration −Searching JSTOR −Format of the journal content −Linking to content on JSTOR 3.Help.
Henrik Kjems-Nielsen ICES Secretariat InterCatch – the screen guide.
Advanced Taverna Aleksandra Pawlik University of Manchester materials by Katy Wolstencroft, Aleksandra Pawlik, Alan Williams
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
GUILLOU Frederic. Outline Introduction Motivations The basic recommendation system First phase : semantic similarities Second phase : communities Application.
1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti.
Core LIMS Training: Project Management
An introduction to Netlogo agent-based software
Performing What-if Analysis
Computer Science Projects Database Theory / Prototypes
ClicktoHuddle Training
creating a ecosystems model in net logo
Presentation transcript:

2-Day Introduction to Agent-Based Modelling Day 2: Session 8 Exploring Model Collections, NetLogo Lists, Further Resources

Data structures built into NetLogo Variables can have values in terms of: Numbers Strings (text) Colours Booleans (True/False) But also sometimes more complicated things: Lists of the above, [1 2 3] or [red blue red] Lists of lists of the above, [[1 2] [“A” “B”] True] You sometimes need to store and manipulate these more complex structures Other structures such as matrices, arrays and tables are available as extensions (see extensions section of the NetLogo manual) 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 2

List Primitives Making lists: Writing them explicitly: [grey violet] Making them as a result of a calculation: list (mean [food] of buyers) (mean [food] of buyers) Extracting from lists: First item from a list: first [grey violet] All but the first item: but-first [“a” “v” “w”] An item from a certain position in the list: item 3 [ ] (note: NetLogo lists start with position 0!!) 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 3

A simulation of a Peer-2-Peer file sharing network Computers are joined in a distributed fashion without central servers Files in their store can be downloaded by others in the network Nodes can send out queries for files they want – these go out to all its network neighbours If a node gets a query for one of its files, it sends it back to the originator of the query Otherwise nodes pass on queries it gets to its neighbours (unless the query has exceeded the maximum number of hops allowed) thus queries are distributed like gossip 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 4

File Collecting Behaviour Files are represented by integers: 0, 1, 2, …, up to the value of “max-file - 1” These are each distributed to random to start with Nodes are each given a base-target (a small integer above 1), it then seeks for numbers that are multiples of this, sending out queries in turn for each these As files become copied around it becomes increasingly easy to find them 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 5

Use of lists in this simulation To collect the files, each node has a list called “file- store”, as it gets files it adds it to this (at its front using first put – fput) –set file-store fput new-file file-store To check if it has a file is uses this –member? a-file file-store Each node also has a list of queries it has received called “messages” When it receives queries from others it adds them to the messages list (using fput as above) Then (once a time click) goes through the list of messages (using foreach) and either sends the file (if it has it) or passes on the query (unless it has reached its maximum allowed hops) 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 6

The Simulation Display 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 7 A node in the P2P network, grey when it has found none of its target “files”, then blue…green…yello w… red etc. as it finds more. The label of each node shows its list of “files”. Load the “8-p2p.nlogo” simulation

Model parameters population – number of nodes number-links-each – number of links of each node in the network (both initial number and a target number as the simulation progresses) num-hops – maximum number of times a query can be passed on before it “dies” max-file – the integer the number representing files go up to prob-newquery – the probability each time that each node initiates a new query for the next file in its set that it wants 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 8

Things to try Can you work out the conditions under which files are effectively shared to all that need it? Could you add that some nodes are cooperators (share their files) and some not (pass on queries but never send files)? What happens if you add some of the rules from the last example about changing network structure by nodes? 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 9

Recap of NetLogo Features Covered The Interface: view of world, sliders, buttons, plots, histograms, monitors, info tab, code An idea of the general structure of a typical simulation Use of agents, different breeds, their local variables, “ask”, using agent sets to select subsets of all agents Interacting with other agents in different ways Different programming contexts: observer, agent, patch, link, etc. and the effect in terms of kinds of procedure and variables Different ways of ‘peeking’ into a simulation to find what is happening Construction of networks, changing them and using them A little bit about NetLogo lists and their use A bit about extracting data from simulations 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 10

Resources for further learning (listed on the course website) The NetLogo website (tutorials etc.) Looking at other models, trying them out, looking at their code for ideas of how to program/organise a simulation (see collections of NetLogo models on the course website) The NetLogo user group – you can ask for help there when stuck (in moderation) The books mentioned on the course website, especially those with NetLogo examples The Journal of Artificial Societies and Social Simulation, for examples and discussions of how to simulate etc. The European Social Simulation Association: its summer school, its bi- annual conference, its newsletter Openabm.org – its model library and announcements The SimSoc mailing list for relevant announcements etc. The Facebook page for this course BUT, if you can get it, find someone who knows NetLogo programming who can help you when you get stuck (as we all do from time to time – even experts) 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 11

Any final questions? 2-Day Introduction to Agent-Based Modelling, Manchester, Feb/Mar 2013, slide 12

The Very End… Good Luck! 2-Day Introduction to Agent-Based Modelling Centre for Policy Modelling Manchester Metropolitan University Business School Institute for Social Change Cathie Marsh Centre for Census and Survey Research University of Manchester