![netlogo setxy netlogo setxy](https://i.stack.imgur.com/AlmvG.png)
Um agente um indivduo sinttico, autnomo, munido de um conjunto de caractersticas e regras que governam o seu comportamento e com a capacidade de tomar decises. Not quite as nice as embedding, but it’ll work. O NetLogo baseado num novo paradigma de modelao: o uso de agentes (cf. To use it just save what’s below as a text file with the extension to “.nlogo”. nlogo file is just a text file so I can put the whole thing in the post, including the GUI elements. NetLogo creates number turtles of the type breed- name with default color (blue), size (100 normal value), shape (turtle), and location (0,0). Set-current-plot "Totals" set-current-plot-pen "adoptions" plot count turtles with Many models made in NetLogo 3.0 or earlier use setxy random world-width random world. In lieu of embedding the whole simulation, here’s the “procedure” source code, which will only work if you hook the variables “constant-hazard” and “endogenous-hazard” and the plot-pen “Totals:adoption” to GUI elements. setxy shade-of shape shapes show show-turtle st show-link shuffle.
![netlogo setxy netlogo setxy](https://netlogor.predictiveecology.org/reference/setXY-1.png)
Even doing it locally on my mac, the embed doesn’t works in Safari (but does work in Chrome, Firefox, and Opera).
#NETLOGO SETXY HOW TO#
Note that in theory you can embed a NetLogo simulation in a webpage but I don’t know how to get WordPress to do this. So while this sim doesn’t do anything new it’s nice that I can extend it to do new things. (Actually the model library already has this in the form of the “virus on a network” model but the point is that it’s flexible). The really exciting thing though is that NetLogo makes it much easier to do simulations with network and/or spatial structure so I could refine the model to have structure. After just a few hours of reading the tutorial, I was able to write the script below, which is kind of a replication of an older Stata script. The world is two dimensional and is divided up into a grid of patches. I also need to plot an utility function and I was thinking to made it in this way : plot sum p of turtles with color red sum weight of links with. The main concept is the spread of the red idea: agents that receive a weight > 0.5 will become red. The basic “models library” includes biology models like wolf-sheep as well as some social science models that I already lecture on but didn’t have a dynamic illustration for, most notably Barabasi’s preferential attachment model and the team assembly model Uzzi et al developed on Broadway musicals. I am writing a netlogo model about diffusion on ideas in a weighted and directed graph. First each turtle runs the reporter random-xcor which will report a random number from the allowable range of turtle coordinates along the X axis. A reporter, as opposed to a command, reports a result. As part of my prep work for attending James Kitts’ “ Modeling Emergence” workshop at ASA I’ve been playing with NetLogo and there’s some really cool stuff in there. setxy random-xcor random-ycor is a command using reporters.