SlideServe
Menu
Préférences
© SlideServe · v2026

Exploring Netlogo

didina avatar
14 diapositives · 405 Views · Jul 21, 2014

Exploring Netlogo. Beth Fulton. April 2012. Essential Components. Patches (environment) Turtles (agents) breeds (different kinds) Links Observers Built-in tools, features to help (keep manual handy ) variables: color , location observer’s = globals routines (primitives)

Exploring Netlogo - slide 1
01 / 14Exploring Netlogo
1 / 17

Télécharger la présentation

Exploring Netlogo
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Exploring Netlogo Beth Fulton April 2012

  2. Essential Components • Patches (environment) • Turtles (agents) • breeds (different kinds) • Links • Observers • Built-in tools, features to help (keep manual handy) • variables: color, location • observer’s = globals • routines (primitives) • commands (act); reporters (calculate statistic & report)

  3. Description of model Coding window Netlogo GUI GUI (controls) Specific queries (Advanced)

  4. Netlogo GUI Speed Turn off map updates for super speedy run ALWAYS press first (initialisation) Start (Stop) Set parameters

  5. Netlogo GUI Aggregate time series plot Aggregate indicator (statistic)

  6. turtle = agent Coding Key Points Check code syntax Globals & attributes Setup Go Routines called by Go

  7. turtle = agent Coding Key Points primitive ;; Comment

  8. Coding hints • Use Netlogo dictionary: (icon for relevancy) • turtle • link • observer • patch • Each block of code has a context (kind of agent that can execute it) • e.g. can’t use patch primitives in turtle context • button related routine = observer context • change context ask XXX [XXX context]

  9. Coding hints let local variable set (first time) by the entity creating it (only works within the procedure or [ ] where the local variable is defined set to set value of existing variable of get the value of a variable belonging to another entity one-of for single case of if want list from agentset ask get another entity to change the value of its variable

  10. Globals Needed For • For global variables (define world) • Fixed parameters used by all (so only enter once) • Interface sliders, switches etc refer to globals • Any parameter to be changed in batch runs • Use carefully as run the risk of in appropriate sets • For agent level variables use patches-own turtles-own links-own

  11. When all else fails export-world writes ALL variable values to one file import-world reads in ALL variable values (“hot start” model) • Can also export plot contents etc • file is more refined way of getting specific output

  12. Psuedo code trips Netlogo C to end [ ] varvar + abc ; ifelsething_to_test [ do xyz ] ;; true case [do ijk ] ;; false case void () { return } { } var = var + abc; OR var += abc; // OR /* */ if (thing_to_test) { do xyz; // true case } else { do ijk; // false case } Spaces important !!

  13. Lets Play

  14. Thank you • CMAR Beth FultonSenior Research Scientist t +61 3 6232 5018 ebeth.fulton@csiro.au wwww.cmar.csiro.au