![]() Tesfatsion & Judd 2006 Grimm & Railsback 2012 Nikolic, Dam & Kasmire 2013). As such, this approach has been applied across a wide variety of fields such as economics, ecology, or socio-technical systems (e.g. PyNetLogo’s features are demonstrated by controlling one of NetLogo’s example models from an interactive Python environment, then performing a global sensitivity analysis with parallel processing.Īgent-based models (ABMs) are a well-established method for the study of complex adaptive systems, in which the interactions of heterogeneous entities yield emergent large-scale behaviors. Given Python’s increasing popularity for scientific computing, this provides additional flexibility for modellers and analysts. To extend these capabilities to an additional user base, this paper presents the pyNetLogo connector, which allows NetLogo to be controlled from the Python general-purpose programming language. For instance, the popular NetLogo agent-based modelling software can be interfaced with Mathematica and R, letting modellers use the advanced analysis capabilities available in these programming languages. This process can benefit from the use of established software environments for data analysis and visualization. Many complex systems can only be investigated by modeling.Methods for testing and analyzing agent-based models have drawn increasing attention in the literature, in the context of efforts to establish standard frameworks for the development and documentation of models. For systems consisting of a large number of independent objects, such as crowd behavior, the development of multicellular organisms, or military operations, agent modeling is most appropriate. There are many systems designed for this, for example, the Russian proprietary AnyLogic. I want to talk about the NetLogo language, which has proven itself in education, but is also suitable for adult tasks. ![]() Logo syntax is minimalistic - a space-separated sequence of names and constants with a rare grouping using or (). Names refer to built-in or programmer-defined entities - functions, variablesĬommands (procedures) are declared to имя įunctions in NetLogo are called “reporters” and are declared slightly differently: are used to create lists and group commands in a block in most constructions, () are ordinary brackets for subexpressions. The compiler knows “arity” (“valency”) about each procedure or function and does not require using the grouping again. True, functions of higher orders may be mistaken - then he needs a hint in the form of parentheses. Then you can write add add inc 1 inc 2 inc 3and get a well-deserved nine. It works the same way map inc which returns a list of. And for add you already have to write brackets ( map add )Īgents come in three forms - turtles (turtle - how can they be without them), communications (link) and spots (patch - they are places in space). Agents of the same type are combined into the corresponding set (agentset) - turtles, links and pathes.įor turtles and relationships, you can specify a user-defined breed. Representatives of the same breed are also combined into a set. A new breed is created by the team breed where ninja is the name of the breed, and ninjas is the name of the collection that brings together all the agents of this breed. ![]() There is also a special agent - the observer. ![]() The turtles are created with the create-turtles command (with the argument the number of turtles to be created), and then found by the turtle index function. The agent is “first class value” if desired, it can be stored in a variable, but this is rarely required.Īn agent or set of agents can be the context for a team. #Netlogo breeds codeĮxecuting commands in the context of agents is the main mechanism for working with them.Īsk turtles This code will ask all the turtles to take a step forward. The breed can be set dynamically ask turtle 1 #Netlogo breeds PatchĪsk patch 17 13 And this will paint the field with coordinates (17,13) in soft pink.
0 Comments
Leave a Reply. |