Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti.

Similar presentations


Presentation on theme: "1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti."— Presentation transcript:

1 1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione Ponsigli@unina.itDII University of Naples Federico II Laboratorio di Simulazione ad Agenti Sistemi per la Gestione Aziendale 2013/2014 Research Methodologies: Agent-Based Systems and Social Simulation

2 2 Summary Main tools for agent-based simulation Main tools for agent-based simulation Characteristics of NetLogo Characteristics of NetLogo The Netlogo Interface and the User Manual The Netlogo Interface and the User Manual Example 1: Segregation Example 1: Segregation Example 2 : Wolf – Sheep predation Example 2 : Wolf – Sheep predation Example 3 : Ants Example 3 : Ants

3 3 Tools for agent-based simulation Main platforms: Swarm ( www.swarm.org); Swarm ( www.swarm.org); www.swarm.org JAS ( jaslibrary.sourceforge.net); JAS ( jaslibrary.sourceforge.net); Repast (repast.sourceforge.net); Repast (repast.sourceforge.net); NetLogo (ccl.northwestern.edu/netlogo); NetLogo (ccl.northwestern.edu/netlogo); Agentsheets (www.agentsheets.com). Agentsheets (www.agentsheets.com).

4 4 Main features of Swarm Developed at Santa Fe Institute in ’90; Developed at Santa Fe Institute in ’90; Two possible programming languages: Objective C and Java; Two possible programming languages: Objective C and Java; The toolkit is made by: a simulation environment, The toolkit is made by: a simulation environment, a graphical interface, a graphical interface, a library of objects usable to make models. a library of objects usable to make models.

5 5 NetLogo Developed at Center for Connected Learning and Computer-Based Modeling at the end of ’90; Developed at Center for Connected Learning and Computer-Based Modeling at the end of ’90; NetLogo offers an interactive development environment and a simple programming language; NetLogo offers an interactive development environment and a simple programming language; the programming language is LOGO. the programming language is LOGO.

6 6 NetLogo NetLogo offers a wide library of developed models (Models Library) useful to: - understand the logic of modeling; - run different simulation settings; - modify the code of a model.

7 7 Let start with laboratory Download NetLogo 5.0.4 Download NetLogo 5.0.4 Open NetLogo (an “untitled file” will appear) Open NetLogo (an “untitled file” will appear) Give a look to the Models Library (in the “File” menu) Give a look to the Models Library (in the “File” menu) Open the User Manual (in the “Help” menu) Open the User Manual (in the “Help” menu)

8 8 Focus The world of NetLogo The world of NetLogo The Interface The Interface The structure of the User Manual The structure of the User Manual Using interface elements and objects Using interface elements and objects

9 9 The world of NetLogo The world is made by agents, that follow instructions and act in different ways, but all simultaneously; The world is made by agents, that follow instructions and act in different ways, but all simultaneously; Three types of agents: Three types of agents: - turtles (they can move around the world); - turtles (they can move around the world); - patches (constitute the ground of the world, they don’t move but are “alive”); - patches (constitute the ground of the world, they don’t move but are “alive”); - observer (it is a looking over the world); - observer (it is a looking over the world); Each turtle is identified by a “who” ID number and by its coordinates (xcor; ycor); Each turtle is identified by a “who” ID number and by its coordinates (xcor; ycor); Each patch is identified by its coordinates (pxcor; pycor); Each patch is identified by its coordinates (pxcor; pycor); The coordinates of patches identify the distance of patches from the origin of the world; The coordinates of patches identify the distance of patches from the origin of the world; The total number of patches in the world is determined by the setting of min-pxcor, max-pxcor, min-pycor, max-pycor; The total number of patches in the world is determined by the setting of min-pxcor, max-pxcor, min-pycor, max-pycor; The world can have different shapes: torus, box, horizontal cylinder, vertical cylinder (the default setting is a torus, it isn’t bounded, but “wraps”) The world can have different shapes: torus, box, horizontal cylinder, vertical cylinder (the default setting is a torus, it isn’t bounded, but “wraps”)

10 10 The NetLogo interface: the menus File: Through the file menu you can start a new file, open an existing one, choose a model in the models library, Import or export plots and files Tabs: This menu offers keyboard shortcuts for each tab: Interface Information Procedures Help: This menu permits to open the user manual in a web browser

11 11 The NetLogo interface: the tabs Interface Tab: is were you can watch your model going on. When you open a model the interface appears. Just the view is empty at the opening of the interface Information Tab: is were you can read information about a model included in the model library (what is it?, how to use it?, things to try, extending the model, NeTlogo features, related models, references) Procedures Tab: is were you can read the NetLogo code of the selected model

12 12 The NetLogo interface: main window

13 13 The elements of the main window of the interface Buttons: once-only buttons perform the related instructions at once. Forever buttons, when clicked, execute instructions over and over until you stop Buttons: once-only buttons perform the related instructions at once. Forever buttons, when clicked, execute instructions over and over until you stop Sliders: are global variables, which are accessible by all turtles. Sliders are used to modify values of variables (parameters) without change the code Sliders: are global variables, which are accessible by all turtles. Sliders are used to modify values of variables (parameters) without change the code Switches: represent a true/false global variable that the observer can set in the setup phase Switches: represent a true/false global variable that the observer can set in the setup phase Chooser: permits to choose a value for a global variable in a list of choices Chooser: permits to choose a value for a global variable in a list of choices Monitor: reports the value of a variable or of a complex expression Monitor: reports the value of a variable or of a complex expression Plot: plots graphs related to the running experiment Plot: plots graphs related to the running experiment Input:is an area related to globals variables represented by a string of number Input:is an area related to globals variables represented by a string of number Output: is a scrolling area of text that can be used to create a log of activity Output: is a scrolling area of text that can be used to create a log of activity Note: is a box in which you can add text to the main window of the interface Note: is a box in which you can add text to the main window of the interface

14 14 The NetLogo interface: the view Change dimensions of the world Modify the speed of simulationFreeze or unfreeze the view Edit the world of simulation and set the view Switch on the 3D view

15 15 The NetLogo interface: edit the world and the view Modify world properties Modify view settings

16 16 The NetLogo interface: edit the world and the view Modify world properties Modify view settings Play with the world and view

17 17 The User Manual The NetLogo User Manual is accessible from the menu, clicking on label “help”; The NetLogo User Manual is accessible from the menu, clicking on label “help”; The first part of the Manual is an introduction to NetLogo; The first part of the Manual is an introduction to NetLogo; The second part includes three tutorials to learn main elements of development environment; The second part includes three tutorials to learn main elements of development environment; The third part reports three main guides: The third part reports three main guides: - the interface guide; - the interface guide; - the programming guide - the programming guide (main procedures and commands) (main procedures and commands) - the primitives dictionary - the primitives dictionary (that reports in alphabetic order all the commands, reporters and procedures built-in NetLogo). There is also a transition guide useful to control the transition from previous versions of NetLogo

18 18 Three Models Segregation Segregation Wolf-Sheep predation Wolf-Sheep predation Ants Ants


Download ppt "1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti."

Similar presentations


Ads by Google