Nanoverse is a tool for creating spatially explicit models. In general, this means that an individual exists at a location in space, and that there is a defined set of locations adjacent to that space. We say that adjacent spaces are connected. The set of all locations and their connections to one another is called the topology of the space.
Nanoverse supports regular spaces in 1, 2 and 3 dimensions. Regular means that every location in space has the same number of neighbors (except maybe the boundaries). The space has three properties: connectivity, shape and boundaries.
Lattice connectivity refers to how many neighbors each location has, and where they are relative to the location. On a square lattice (graph paper), individuals have four neighbors; on a cubic lattice, they have six. A triangular (hexagonal) lattice also has six neighbors. The former is in three dimensions, however, while the latter has two. This can have significant effects on simulation dynamics, so it's important to be able to try them all easily. The lattice connectivity is specified by the
Lattice shape refers to the extent of the lattice. It specifies the number of sides that the lattice has, and the length of each of those sides. The shape must match the connectivity, although there is some flexibility here. For example, both a triangular lattice and a rectangular lattice can be assigned to a rectangular shape, but only a triangular lattice can be assigned to a hexagonal shape. Shape is specified by the
The lattice boundary refers to what happens when you get to the edge of the space. Is there just nowhere to go? Do you wrap around? Or are you allowed to just leave? If so, what happens when you do? Unlike lattice shape and connectivity, the boundary is specified for each Nanoverse layer (see below). It is controlled by the
An Nanoverse simulation will have one or more layers. Each layer is completely independent by default. Layers can be coupled, however: something at coordinate x in layer 1 is in some sense collocated with something at xin layer 2, even though they are otherwise independent. This makes it possible to build up a simulation as a collection of separate processes, which are connected in only specific (and controllable) ways.
There are two kinds of layers in Nanoverse: agent layers, which contain discrete, autonomous individuals, and continuum layers, which are scalar fields that can represent the state of a numerical equation.
An agent layer represents a collection of locations at which agents can exist. In NetLogo, these locations are called “patches” and the agents are called “turtles”–the agent layer is exactly the same. Agents occupy exactly one location, and no two agents can occupy the same space.
Agents are unaware of any global information, such as the actual coordinate value of their current location, or the overall population of the agent layer. They are, however, aware of their immediate environment, and of course can be coupled to agents and other things on other layers.
A continuum layer represents an environmental property with an associated numerical value. Examples include nutrient concentration (biology), air quality (urban planning), or mineral density (geology). Continuum layers can be coupled to agent layers: agents can influence the value of the continuum at their current location, and they can also use that value to inform their behavior.
In addition to direct manipulation by agents, continuum layers can be updated through global transformations, like diffusion or decay. When a transformation is applied, an algorithm alters the state of the continuum layer by solving for a new steady state, taking into account the operator. Operations can be applied individually, or accumulated and applied all at once. Either way, the steady state must be well-defined: if the value fails to converge to a steady state at any location in the system, Nanoverse will throw an error.
Agents represent individuals. Agents can have internal state variables to represent quantities like health or size, and they can have behaviors. Behaviors are named instructions to the agent. These may cause the agent to change the values of their internal state, to manipulate a continuum, or to invoke the behaviors of other agents.
Note: time is going to be handled extremely differently in the next release. For more information on planned changes to the platform design, see Planned Changes.
There are three concepts of time that are relevant in Nanoverse: logical time, simulation time, and wall clock time.
Logical time, also called a “cycle” or “step,” refers to the number of cycles of the main loop that have taken place. During the main loop, Nanoverse visits each of the events scheduled in the
processes argument, and performs the specified
Process if and only if its conditions are met. After visiting the last
Process, the logical time is increased by one unit and Nanoverse starts again at the top of the
Simulation time is a user-defined time scale that corresponds to events taking place within the simulation. The simulation time is advanced manually using the
Wall clock time is the time of day in the physical world. The speed of your computer and the complexity of your model determines the relationship of wall clock time to logical time.
Events change the state of the simulation. Events that are associated with a specific agent, and which are defined relative to that agent, are called actions. Events that affect can affect the entire simulation, and which are defined relative to the coordinate system of the simulation, are called processes.
Actions are events that are associated with a specific agent. They are defined relative to the agent itself, and frequently have a
target (also defined in terms of the agent). For example, an action may target
VacantNeighbors, and so on. Actions can be grouped together into named sequences called
Actions represent a “bottom-up” approach to modeling in the sense that they change the global state of the system through locally made decisions. In that sense, it is important to note that actions are strictly relative to the agent; they are unaware of the simulation's coordinate system or the actor's location within it.
Processes are events that are defined at the level of the simulation itself. Processes can affect any agent or continuum value, and can even affect multiple layers simultaneously. There are many kinds of processes, including, but not limited to:
Processes are specified using the coordinate system of the simulation itself. They represent a “top-down” approach to modeling in that they transform the simulation through global alterations.
Agents can define one or more
behaviors. Behaviors associate an action or (ordered) sequence of actions with a unique, user-defined name. For example, the behavior
reproduce might be associated with the
Expand action. Or it might ask the agent to
Expand, and then, with a certain probability,
Expand again and then
Behaviors can be activated using
Trigger events. There is a
Trigger action and a
Trigger event. They do exactly the same thing: they ask one or more agents to perform a specific, named behavior. Each agent can have a different definition for that behavior, giving rise to a diversity of responses to the trigger. The triggered behavior may also contain more triggers in its action sequence, giving rise to complex, dynamic outcomes.
Nanoverse provides numerous tools for specifying visualizations and textual reports of your simulation's behavior. Like everything else in Nanoverse, visualizations are built up through a hierarchy of components. Calculating this output can be time-consuming, and of course the output takes up space on your hard disk. As such, you may wish to specify that particular reports or visualizations are generated only at particular times or in particular locales. This is accomplished through a special action,