Hands-On given by Gabriel Wurzer and Wolfgang E. Lorenz www.iemar.tuwien.ac.at
Previously: hospital-1 example with interaction hospital-1.zip on lecture site
Demographics The World Patches other Turtles Turtle initial population development The World consisting of Patches holding population hosting other Turtles of breed hospital Turtle of breed hospital with constant capacity (in units of population) with constant radius (in patches) with constant radius and capacity compute radius compute capacity check adequacy
Characterization Uses statistics (import as (list ..) or (list (list …) …) to generate population May also use absolute number of people per year (preferred) May calculate in excel, then transfer just the needed column to Netlogo (preferred) Maps to be used have to be tweaked (e.g. import three kinds of patches [RED, GREEN, BLUE] into NetLogo, clean the patch errors in NetLogo, export again)
hospital-2 example (also on lecture site) Zone 2 Zone 1 plots (new!) Zone 0
Creating Plots created in the user interface using give a descriptive name set x and y labels and min/max set „show legend“ one plot pen default is already created can create new ones with „Create“ can set pen mode to Line, Bar, Point
Using Plots choose plot with set-current-plot „plot-name“ choose pen with set-current-plot-pen „plot-pen-name“ draw using plotxy x-value y-value
Movement The World Patches other Turtles Turtle tools for interacting initial population demographic development The World consisting of Patches holding population hosting other Turtles of breed hospital Turtle of breed hospital tools for interacting with constant capacity (in units of population) with constant radius (in patches) with constant radius and capacity compute radius compute capacity check adequacy
Movement Moving through world, i.e. agents = patients or hospitals Prediction of „interesting“ parameters, here: expected treatments per hospital over time, and visualization of these Technically: setup setup hospitals setup population go demographics generate n patients requiring treatment: choose a hospital for each patient move patients to hospital (using a loop)
Loop? while there are still patients that need treatment (condition) ask these patients if distance to hospital > 1 then move closer towards hospital else hospital was reached: increase treatments remove patient from simulation loops are similar to a „go“ button, but not the same. why do we need them (guess?)
So far… The button repeats code until it is depressed unpressed again. There is no „go within go“, however. Repeating things inside go therefore has to take a while loop: to go create-patients […] while treatment is needed move patients to hospitals ] end Usage: while [ condition ] [ run these commands ]
hospital-3 (on lecture site) Try these
Hands-On: Outcome from work in lecture AgentsFindingHospital on lecture site
Thank you !