to setup ca create-nodes Num-nodes setxy random-xcor random-ycor set. ![]() If (oldsum != summer) and (ticks > 2) [ print (word who ". post we will present several implementations of this algorithm in NetLogo. Print (word "= tick # " ticks " =")Īsk links Īsk links of end1 ] change single link weights as determinants to SUM of link weights as determinants, as in a neural net here, right (rt), self, setxy, turtle, turtle-set, turtles, turtles-at. Im learning NetLogo and Ive been thinking about how to code the following for a few. change influence going OUTWARD to influence coming INWARD The NetLogo Dictionary has a complete list of built-in instructions (i.e. Change p to +1 or -1Īsk group ]Īsk group ] for members = 100 and seed = 12345 we get diffusion for 5 ticksĪsk influences avoid tiny variations Lots of debugging lines, sorry for how sloppy it is but it runs. For 100 members and random-seed 12345 it takes 5 go steps to stabilize. This will default to being the display name as well. setxy random-float screen-size-x random-float screen-size-y. Put 'setup' in the resulting dialog's code box. 2 the basics of the NetLogo development environment. To do this, in the Interface Tab, click the Button icon, and with the cross-hair cursor, click where you want to place the 'setup' button. To assign-p assign probability to agents (0 or 1)Īsk turtles with ]Īsk turtles with [ asking members with p=1 and with out-links' weight > 0.5 to spread red ideaĮxcuse the sloppy code, I'm sick. First, we'll add a NetLogo button to call 'setup'. To assign-weight assign random-float weight to links in a range from 0 to 1Īsk influences Nw:generate-random group influences members 1 [ Nw:generate-watts-strogatz group influences members 1 1 [ To setup-small-world generate small-world network ![]() Nw:generate-preferential-attachment group influences members 1 [ To setup-pa generate preferential-attachment network Group-own probability to take or not red idea, related to turtles only Links-own weight of directed link, related to links only I would like to do it in a better way by increasing the value of p by adding the weighted value that each turtle receive from a red turtle or decreasing the value of p by substracting the weighted value that each turtle receive from a grey turtle.Ĭan anyone help me on implementing this? extensions network extentionīreed turtles are called groupĭirected-link-breed directed link are called influences However,I think that it is quite static and I need some advice. Such as, a summation of all the utility value of each agent (p * w). ![]() Plot sum of turtles with * sum of links with / (sum of turtles * sum of links with ) I also need to plot an utility function and I was thinking to made it in this way : The main concept is the spread of the red idea: agents that receive a weight > 0.5 will become red. The setxy command will move the agent to the position. I am writing a netlogo model about diffusion on ideas in a weighted and directed graph. Their colors are set to white, their size is set to 1.5 times the default size of the NetLogo agents.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |