# Continuous Simulation

In *continuous* simulations, the states of simulation objects change continuously, as modeled by differential equations, and numerically discretized with
the help of *fixed-increment* time progression. *Continuous dynamic systems* (like physical systems with material objects
moving in space) can only be captured by a continuous simulation model, while *discrete dynamic systems* (like predator-prey
ecosystems) can be captured either in a more abstract manner by a *continuous simulation model* (like the
Lotka-Volterra equations)
or in a more realistic manner by a *discrete event simulation model* since birth, death and predator-prey encounters are
discrete events.

Notice that the concept of continuous simulation does not require using a continuous time model and a continuous space model, nor does it require using only continuous state variables (in the form of attributes with a floating-point number range), though when describing a continuous dynamic system with a continuous simulation model it is natural to use a continuous time and space model and attributes with a floating-point number range for representing continuous state variables.

Summary: The term "continuous" in *continuous simulation* does not refer to the underlying time and space models,
nor does it refer to the range of state variables. Rather, it exclusively refers to the nature of state changes, and we could therefore
also speak of *continuous state change simulation*.

## General Approaches to Continuous Simulation

Two prominent general approaches to continuous simulation are: *System Dynamics* and *Modelica*.

### System Dynamics

In System Dynamics, a *discrete* dynamic system is modeled with the help of differential equations described in the form of
*stock-flow models*.

A web-based simulation platform supporting System Dynamics is Insight Maker. Any System Dynamics modeling framework could also be used for modeling continuous dynamic systems such as physical systems. However, typical application domains of System Dynamics are biology and social sciences, where systems are essentially discrete.

### Modelica

... is the name of a *declarative, equation-based* modeling approach defining a general-purpose language
for continuous simulation. The Modelica paradigm is supported by many commercial and also by open source tools, mainly used in science and engineering.

## Examples of System Dynamics Models

Notice that for all typical System Dynamics examples we could also have a Discrete Event Simulation model (often called "agent-based" or "individual-based" model since not based on modeling aggregates, but rather on modeling individuals).

- Predator-Prey Model
- Based on the Lotka-Volterra equations.
- Susceptible-Infected-Recovered (SIR) Disease Model
- An epidemiological model that computes the theoretical number of individuals infected with a contagious disease in a closed population over time. See also a discrete SIR model.
- World3
- A
*System Dynamics*model of the interactions between population, industrial growth, food production and limits in the ecosystems of the Earth. Reconstructed with Insight Maker. Originally due to the*Club of Rome*, see The Limits to Growth.

## Examples of Physics Simulation Models

- Solar System
- A simulation that is programmed with CSS 3D animations.
- Galaxy
- A spiral galaxy with 5000 stars (by Jonas Wagner, 2010-08-18).
- Mass-Spring Physics
- A 3D Double Pendulum
- In this Modelica example, the pendulum consists of two cylinders.