Difference between revisions of "Modeling 101"

From Numerus
Jump to navigation Jump to search
Line 14: Line 14:
Agent based models study the interaction of objects in space. Agents are objects with a specific set of rules, and can represent anything from ants to grains of sand. They move and interact in a simulated region of space. The interaction between the Agents, and sometimes their interaction with the landscape, are the core of this field.  
Agent based models study the interaction of objects in space. Agents are objects with a specific set of rules, and can represent anything from ants to grains of sand. They move and interact in a simulated region of space. The interaction between the Agents, and sometimes their interaction with the landscape, are the core of this field.  


Agent Based Models are a useful tool for describing how complex behavior emerges from the interactions of the individual components. The classic agent based model is a flock of birds organizing itself based on the simple rules followed by each agent. Nova includes a number of examples including the Game of Life, the SIR model, and Antz.
Agent Based Models are a useful tool for describing how complex behavior emerges from the interactions of the individual components. The classic agent based model is a flock of birds organizing itself based on the simple rules followed by each agent. NMB includes a number of examples including the Game of Life, the SIR model, and Antz.


===Advantages and Disadvantages===
===Advantages and Disadvantages===
Agent Based Models are a tool, and like any tool they are better at solving some problems and worse at solving others. They tend to be a bit harder both conceptually and practically to put together, since they have more components to them than simple analytical models. Despite this, however, they generally require a smaller base of knowledge about the system that someone is trying to model. It is easy, for example, to know that someone who is sick has a certain probability of infecting someone they interact with. It is more difficult to come up with an equation to demonstrate the rate at which someone infects other people without knowing how often they interact, how contagious they are, and whether or not people they interact with are susceptible to infection or not. In this situation, it makes sense simulate a spatial dimension in order to make up for information that is not necessarily obvious. Another situation in which agent based models shine is large systems whose group behavior is important. In the flocking model discussed above, the individual behavior of the birds is meaningless and even distracting. But when seen in the context of the larger group, important trends appear from the noise that define the model's behavior.
Agent Based Models are a tool, and like any tool they are better at solving some problems and worse at solving others. They tend to be a bit harder both conceptually and practically to put together, since they have more components to them than simple analytical models. Despite this, however, they generally require a smaller base of knowledge about the system that someone is trying to model. It is easy, for example, to know that someone who is sick has a certain probability of infecting someone they interact with. It is more difficult to come up with an equation to demonstrate the rate at which someone infects other people without knowing how often they interact, how contagious they are, and whether or not people they interact with are susceptible to infection or not. In this situation, it makes sense simulate a spatial dimension in order to make up for information that is not necessarily obvious. Another situation in which agent based models shine is large systems whose group behavior is important. In the flocking model discussed above, the individual behavior of the birds is meaningless and even distracting. But when seen in the context of the larger group, important trends appear from the noise that define the model's behavior.


===Agent Based Models in Nova===
===Agent Based Models in NMB===
Agent based models in Nova are models that make use of either an agent vector or a cell matrix. Models that use both of these are known as Sim Worlds. The game of Life is an example of a model that uses only a cell matrix, with the cells turning “off” and “on” or “alive” and “dead” depending on the state of each individual patch’s neighbors. The SIR model is an example of an agent vector, with agents moving about an open space in three possible states, Susceptible, Infected, and Recovered. The Antz model is a more complicated model that uses both an agent vector and a cell matrix in order to simulate how ants collect food and leave a path for other ants to follow in order to find the same food.
Agent based models in NMB are models that make use of either an agent vector or a cell matrix. Models that use both of these are known as Sim Worlds. The game of Life is an example of a model that uses only a cell matrix, with the cells turning “off” and “on” or “alive” and “dead” depending on the state of each individual patch’s neighbors. The SIR model is an example of an agent vector, with agents moving about an open space in three possible states, Susceptible, Infected, and Recovered. The Antz model is a more complicated model that uses both an agent vector and a cell matrix in order to simulate how ants collect food and leave a path for other ants to follow in order to find the same food.


Nova has a lot of tools that make agent based models simpler and more robust. In particular, it is very easy to have access to all agents and cells from each individual agent, and to incorporate a wide variety of local and global effects. It also makes it simple to set up multiple Sim Worlds in order to see various outcomes simultaneously. It is also built on arrays and methods, which makes it simple to work on a small level to tweak the model to the user’s liking. On the other hand, the visual side of Nova makes it so that it is easy to quickly and efficiently set up the shell of an agent based model and immediately get down to the more important details involved in the model. A savvy Nova programmer will begin an agent based model visually and slowly transition over to handling the methods and functions in a more programming heavy reference frame.
NMB has a lot of tools that make agent based models simpler and more robust. In particular, it is very easy to have access to all agents and cells from each individual agent, and to incorporate a wide variety of local and global effects. It also makes it simple to set up multiple Sim Worlds in order to see various outcomes simultaneously. It is also built on arrays and methods, which makes it simple to work on a small level to tweak the model to the user’s liking. On the other hand, the visual side of NMB makes it so that it is easy to quickly and efficiently set up the shell of an agent based model and immediately get down to the more important details involved in the model. A savvy NMB programmer will begin an agent based model visually and slowly transition over to handling the methods and functions in a more programming heavy reference frame.


==Basic Model Design==
==Basic Model Design==

Revision as of 16:18, 5 October 2017

Dynamical System Models

Dynamical system models represent systems that change over time. Typical examples include a population of organisms, the flow of money in the economy, or a manufacturing process. What each of these diverse ‘systems’ have in common is that they change over time.

At the heart of a dynamical system model is a set of rules and equations that reflect how the system changes in a particular instant. By rendering these rules in a simulation program like Nova and letting it run, you can see how these momentary changes lead the system to develop.

Fundamental to a dynamical system model is an abstraction of the parts of the ‘system’. Choosing the appropriate level of abstraction is very important. For example, if we are building a population model of honey bees, should the entire population be stored in a single number or should they be divided by age class? What processes, such as birth and death, should be included in the model, and which ones can be ignored? These are the types of decisions modelers have to make.

In general, it is best practice to make the model as abstract as possible while still getting meaningful results. There are two primary reasons, the first being a simple matter of conserving processing power. But more importantly, aggressively simplifying the model also simplifies analysis. It is the classic issue of the map and the territory. As the map becomes more detailed it also becomes harder to interpret, until the map and the territory become indistinguishable: perfectly accurate and perfectly useless. The art of modeling is in choosing the necessary level of detail to answer the question being asked.

Goals of Modeling Dynamical Systems

Many people think the goal of modeling is prediction. Prediction is certainly desirable, but the reality is that few systems are simple enough to be predicted exactly. Error will always creep in, whether from subtle missing factors or uncertainty in raw data. But this doesn’t mean modeling is useless. Even though specific outcomes will always come with a high degree of uncertainty, models can tell us about sensitivity: which factors are important in the outcome. Modeling can also show where we are likely to see equilibrium points, and whether they will be stable or unstable. This can help answer very practical questions. Consider a model of a disease. Is the disease going to die out by itself or is it likely to explode? Are we better off trying to vaccinate people against it, or should we improve detection and treatment? What percentage of the population must be vulnerable to produce an outbreak? And given what we know, what are the most likely scenarios to plan for? These critical questions are precisely what computational modeling is designed to answer.

Agent Based Models

Agent based models study the interaction of objects in space. Agents are objects with a specific set of rules, and can represent anything from ants to grains of sand. They move and interact in a simulated region of space. The interaction between the Agents, and sometimes their interaction with the landscape, are the core of this field.

Agent Based Models are a useful tool for describing how complex behavior emerges from the interactions of the individual components. The classic agent based model is a flock of birds organizing itself based on the simple rules followed by each agent. NMB includes a number of examples including the Game of Life, the SIR model, and Antz.

Advantages and Disadvantages

Agent Based Models are a tool, and like any tool they are better at solving some problems and worse at solving others. They tend to be a bit harder both conceptually and practically to put together, since they have more components to them than simple analytical models. Despite this, however, they generally require a smaller base of knowledge about the system that someone is trying to model. It is easy, for example, to know that someone who is sick has a certain probability of infecting someone they interact with. It is more difficult to come up with an equation to demonstrate the rate at which someone infects other people without knowing how often they interact, how contagious they are, and whether or not people they interact with are susceptible to infection or not. In this situation, it makes sense simulate a spatial dimension in order to make up for information that is not necessarily obvious. Another situation in which agent based models shine is large systems whose group behavior is important. In the flocking model discussed above, the individual behavior of the birds is meaningless and even distracting. But when seen in the context of the larger group, important trends appear from the noise that define the model's behavior.

Agent Based Models in NMB

Agent based models in NMB are models that make use of either an agent vector or a cell matrix. Models that use both of these are known as Sim Worlds. The game of Life is an example of a model that uses only a cell matrix, with the cells turning “off” and “on” or “alive” and “dead” depending on the state of each individual patch’s neighbors. The SIR model is an example of an agent vector, with agents moving about an open space in three possible states, Susceptible, Infected, and Recovered. The Antz model is a more complicated model that uses both an agent vector and a cell matrix in order to simulate how ants collect food and leave a path for other ants to follow in order to find the same food.

NMB has a lot of tools that make agent based models simpler and more robust. In particular, it is very easy to have access to all agents and cells from each individual agent, and to incorporate a wide variety of local and global effects. It also makes it simple to set up multiple Sim Worlds in order to see various outcomes simultaneously. It is also built on arrays and methods, which makes it simple to work on a small level to tweak the model to the user’s liking. On the other hand, the visual side of NMB makes it so that it is easy to quickly and efficiently set up the shell of an agent based model and immediately get down to the more important details involved in the model. A savvy NMB programmer will begin an agent based model visually and slowly transition over to handling the methods and functions in a more programming heavy reference frame.

Basic Model Design

It is important to grasp the extent of the Nova platform in order to implement powerful and complex dynamical system and agent based models. As described above, Nova provides an impressive range and versatility of components to effectively execute both Dynamic Systems and Agent Based models. In addition, Nova has the capability to implement designs using specialized analysis like Perceptrons and other Neural Network prediction algorithms. To utilize Nova's capabilities we must first understand the basics of Nova's Chip component and Population Models.

Chip Basics

As the Nova Glossary states, a Chip is a Container component which contains a single Capsule instance. A Capsule is a prototype for a simulation unit. It contains base components and may contain other chips, inputs, and / or outputs. These definitions may appear a bit vague or broad, however, that is simply because Chips and Capsules are widely used in a variety of ways within Nova.

Chip structure and usage in Nova may best be understood through example. Click here for an example of using a preexisting model (from the Model Library) and manipulating the ideas of model layers and chips.

Population Model 101

See the Simple Population Model tutorial in the Model Library. This tutorial demonstrates fundamental Nova usage, including how to operate the Graphical User Interface, or GUI, and its algorithmic and mathematical design. You will see basic usage of the Modeling Canvas and the Dashboard as well as Nova's intuitive mathematical design.