linercab.blogg.se

Netlogo lput
Netlogo lput




netlogo lput

If link-neighbor? self [ we can't link to someone we already share an edge with set partner new-node so set to self so we redoįd 1 create-link-with partner Įnd connects the two nodes to make-edge Ĭreate-link-with node2 Ifelse ( random-float 1 < prob-pref) if pref attachment Set new-node self set the new-node global repeat m [ new edge is green, old edges are gray ask links Repeat m insert nodes into array ask other turtles with [Įnd Main Procedures to go CODE globals [ĭegrees this is an array that contains each node in proportion to its degreeĬa reset-ticks set degrees initialize the array to be empty set-default-shape turtles "circle" initially create a fully-connected clique of (m+1) nodes crt (m + 1 ) In other publications, please use: Copyright 2005 Uri Wilensky. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL. To refer to this model in academic publications, please use: Wilensky, U. Why is this? Does the degree to which the log-log plot resembles a straight line grow as you add more node to the network? CREDITS AND REFERENCES What is the shape of the histogram in the top plot? What do you see in log-log plot? Notice that the log-log plot is only a straight line for a limited range of values.

netlogo lput

Turn off the LAYOUT? switch and freeze the view to speed up the model, then allow a large network to form. How many nodes are “hubs”, that is, have many connections? How many have only a few? Does some low degree node ever become a hub? How often? One simple way to think about power laws is that if there is one node with a degree distribution of 1000, then there will be ten nodes with a degree distribution of 100, and 100 nodes with a degree distribution of 10. When degree distribution follows a power law, it appears as a straight line on the log-log plot. The bottom plot shows the same data, but both axes are on a logarithmic scale. The top plot is a histogram of the degree of each node. You can see the degree distribution of the network in this model by looking at the plots. Barabasi originally described this mechanism for creating networks, but there are other mechanisms of creating scale-free networks and so the networks created by the mechanism implemented in this model are referred to as Barabasi scale-free networks. Power law distributions are different from normal distributions in that they do not have a peak at the average, and they are more likely to contain extreme values (see Barabasi 2002 for a further description of the frequency and significance of scale-free networks). These are networks in which the distribution of the number of connections of each node is not a normal distribution – instead it follows what is a called a power law distribution. The networks that result from running this model are often called “scale-free” or “power law” networks. You can press REDO-LAYOUT at any time even if you had LAYOUT? switched on and it will try to make the network easier to see. If you have LAYOUT? switched off, and then want the network to have a more appealing layout, press the REDO-LAYOUT button which will run the layout-step procedure until you press the button again. The LAYOUT? switch has the greatest effect on the speed of the model. If you want the model to run faster, you can turn off the LAYOUT? and PLOT? switches and/or freeze the view (using the on/off button in the control strip over the view). If you press it again the nodes will return to equal size. The RESIZE-NODES button will make all of the nodes take on a size representative of their degree distribution. The PLOT? switch turns off the plots which speeds up the model. The LAYOUT? switch controls whether or not a spring layout is applied to the network. Pressing the GO ONCE button adds one new node. Then nodes are added one by one, and connect to previously added nodes. m is the number of edges each new node comes in with.

netlogo lput

The model starts with (m + 1) nodes, which are all connected to each other. Most typically this could be an academic paper citation network, or a network of court cases (that is, the edges are only added from the very newest node to the nodes that were there before). Nodes appear one by one, and when they arrive, they add edges to existing nodes. Then open the model file from within the NetLogo application. If the model does not start, download the NetLogo desktop application and the model file: Make sure you have Java enabled in your browser.






Netlogo lput