# Types of Modeling

Insight Maker is a multi-method modeling solution packaged within a fluid and cohesive software environment.

At one level, you can use Insight Maker purely to map out conceptual models: using casual loop diagrams or rich pictures to describe a system. In this mode, Insight Maker functions as a powerful diagraming tool that lets you illustrate a model and then easily share it with others.

Once you have a model diagram created, you can start to add behavior to the different components using Insight Maker's simulation engine. Insight Maker supports two different modeling paradigms that together can describe most of the models you could imagine:

**System Dynamics**: System Dynamics (sometimes called differential equation modeling or dynamical systems modeling) concerns itself with the high-level behavior of a system. It helps you understand the aggregate operations of system on a macro-scale. It is great for cutting away unnecessary detail and focusing on what is truly important in a model.**Agent Base Modeling**: Agent Based models allow you to model individual agents within a system. Where in System Dynamics you might only look at the population as a whole, in Agent Based Modeling you can model each individual in the population and explore the differences and interactions between these individuals.

System Dynamics and Agent Based Modeling complement each other. In Insight Maker you can use either approach or integrate both of them together into one seamless model. To understand the pros and cons of an Agent Based Model versus a System Dynamics model, we can explore how these two techniques might approach the same problem: modeling the spread of an infectious disease in a population.

### An Example: SIR Disease Model

For this example, let us model the spread of a disease such as the flu. We can classify people in this model as being in one of three states:

**Susceptible**: Healthy and susceptible to catching the disease**Infected**: Infected with the disease and able to spread it to susceptible individuals**Recovered**: No longer infected with the disease and temporarily immune to the disease (for diseases like the flu, a temporary immunity will be conferred after infection which will fade with time)

The commonly used acronym to describe this type of model -- SIR -- comes from the initials of these three states.

Individuals will move between the three states: moving from susceptible to infected to recovered and back to susceptible. The movement from susceptible to infected will be governed by some infection rate equation that takes into account the status of currently infected individuals. The movement from infected to recovered and back to susceptible will be governed by the average duration of the disease and the average duration of the immunity conferred by it.

#### System Dynamics Implementation

Using the System Dynamics methodology, we model each of the three states using a Stock primitive that stores
the number of individuals currently in that state. So, for instance, we have a Susceptible Stock storing the
portion of the population that is currently in the susceptible state. We then use Flows to move individuals
between the Stocks based on different factors. For instance, for the flow moving individuals between the
Infected and Recovered Stocks, we would use an equation such as *[Infected]*1/[Average Infection
Duration]*. If the average infection duration was ten days, this would move roughly 10% of the infected
population every day.

The following embedded model illustrates the full System Dynamics implementation of this model. Please note the smooth aggregate curves in the resulting simulations.

#### Agent Based Implementation

To create the Agent Based Modeling implementation of this disease model, we first create an agent definition that defines the behavior of a single individual in our model. We use three State primitives in this model, one to represent each of the three disease states a person can be in. We connect these states with Transition primitives that instruct how a single individual moves between the states. Where in the System Dynamics models we had flows with rates, in the Agent Based models there are transitions that are given probabilities. These probabilities determine when the transition will be activated and the agent will switch states.

The Agent Based approach allows us to implement features in this model that would simply be impossible using System Dynamics. For instance, we can look at the geographic proximity of agents and use this to affect our transmission probability. Susceptible agents that are closer to infected agents are more likely to become sick than those that are farther away. Similarly, we could look at social structure: how the connections between agents will influence their probability of coming into contact with the infection and falling ill. All this would simply not be possible to look at using System Dynamics.

The following embedded model illustrates the full Agent Based Modeling implementation of this model. An added twist included here is that the susceptible agents will actually try to run away from the infected agents!