![]() This code may be freely copied, distributed, altered, or otherwise used by anyone for any legal purpose. If (other-node != nobody) and link-with other-node = nobodyĬreate-link-with other-node Įnd Copyright 2004 Uri Wilensky. make sure we got another node, and that we aren't connected to it, and that it isn't connected to us ![]() to goĪsk turtles Įnd to form-random-edge node procedure pick a random other node Here we create and delete edges totally at random, except that we never go below 10 edges. So we set out-edges and in-edges to the empty list.Įnd This procedure demos the creation and deletion of edges. Initially, my-nodes have no connecting edges. These shapes were drawn using the Shapes Editor, on the Tools menu. It also shows how to generate a network with "hubs", where the distribution of the number of edges the nodes have follows a power law. Owen Densmore's "Layout" model, available from the NetLogo User Community Models web page ( ), shows how to make the nodes and edges automatically reposition themselves into a pleasing-looking layout. This makes the model run a lot faster, since we don't need to see each edge appear and disappear individually. Some examples include: spatial and temporal planning, diagnosis, decision support. In the GO button, the "Force display update after each iteration" checkbox is turned off. The use of agent-based simulation models in NetLogo for research is. This makes the network "bipartite." (You might position the two kinds of nodes in two straight lines.) Make two kinds of nodes, differentiated by color, then only allow edges to connect two nodes that are different colors. Make some nodes into "hubs" (with lots of edges). Only connect nodes that are spatially close to each other. Make sure each node has at least one edge going in or out. A simple modification of a NetLogo model for the subject 'Computacin Social y Personalizacin' ('Social Computing and Personalisation') of the 'Grado en Ciencia de Datos e Inteligencia Artificial' ('Degree in Data Science and Artificial Intelligence') of the Universidad Politcnica de Madrid (UPM). Connect every node to every other node. Try other rules for connecting nodes besides totally randomly. Try calculating some statistics about the network that forms, for example the average degree. Use the turtle variable LABEL to label the nodes and/or edges with some information. Position the nodes in a circle, instead of randomly. You can use it as the basis for your own model that actually does something with them. This example doesn't do anything in particular with the nodes and edges. Our hope is that this contribution will increase the accessibility of NetLogo to computational researchers and domain scientists. The network consists of a collection of nodes, some of which are connected by edges. We also provide an example on how a complete batch of parallelized NetLogo simulations can be easily executed and reported on, with a few lines of code by allowing NL4Py to manage the details of parallelization. This example demonstrates how to make a network in NetLogo. The only significant difference from the 2D code is that we spread the nodes around the world in 3D space. This is a 3D version of the 2D model Network Example. Do you have questions or comments about this model?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |