Computer Simulation and Applications in Life Sciences: Dr. Michael Emmerich & Dr. Andre Deutz Liacs
Computer Simulation and Applications in Life Sciences: Dr. Michael Emmerich & Dr. Andre Deutz Liacs
G = 0.1 (A + (1-A/100) E)
G = 0.1 (A + (1-A/100) E)
Requirements
Mandatory:
Basic Undergraduate Skills in Applied
Mathematics (analysis, linear algebra)
Programming skills in imperative languages
Useful but not mandatory:
Interest in life sciences and systems science
Knowledge in probability theory
MATLAB
Part 1: Simulation and Systems
Simulation
of the fluid flow
In an chemical
reactor
Systems analysis
The system analyst analyses the world or parts of
the world viewing it as a system
His/Her aim can be to:
Design an artificial system
Change/optimize the system
Understand the system because of scientific curiosity,
and compare it to other systems
Stabilize the system and control it
or these things in combination ...
Computer Simulation is an important tool of the
system analyst
Simulation Definition 1
1. Simulation is a problem solving technique.
2. It is an experimental method.
3. Application of simulation is indicated in the
solution of problems of (a) systems design (b)
systems analysis.
4. Simulation is resorted to when the systems under
consideration cannot be analyzed using direct or
formal analytical methods.
[Claude McMillian, Richard Gonzales: Systems
Analysis, 1965, Irwin Inc]
Simulation - Definition II
Another important aspect about simulation is
captured in Shubiks definition:
! ? !
Simulation
! ! ?
Optimization
? ! !
System, Boundary, Environment
In general the environment: not influenced by system but it
influences system (interface: boundary), but this is often
an abstraction.
Open systems interact with their environment (via the
systems boundary), while closed systems do not.
However, the definition is not always used in the strict
sense: In physics closed means closed w.r.t. matter
exchange
Environment Environment
System
Find examples!
Boundary Boundary
Black-box view of a system (model)
Output
Decision System-(model) Variables
Variables (states variables, (observ-
(controllables) transformation laws) ables)
Environmental
Variables (uncontrollables)
System and Subsystems
A system consists usually of several
subsystems
The subsystem models may be very
different to the global model that connects
them
Multidisciplinary modeling: Coupling
different subsystem-models in one system
model
Example: Hydrodesalkylation plant
Unit operation
(subsystem model)
Scientific Philosophy
Application Domain
Why do we want to simulate a
system?
To understand it
To control it
To predict its behaviour (without risky/costly/impossible
testing)
To optimize it
To rationalize decisions, opinions (misuse possible here!)
To train people working with the system
To implement realistic computer games
To compress information
...
Find examples!
Some history
Prototypes as physical simulation models (e.g.
ship design)
Analog computers (especially in thermal
simulation electric circuits were used to simulate)
Digital Computers (.. this class)
SIMULA, Fortran were among the first simulation
languages
Today wide spectrum of mainly application specific
simulation languages
Fortran 90, C/C++, and MATLAB/SIMULINK often
used to implement simulators
System and Model
Models are never the same than the system but can show a
very similar behaviour
In practice, models are almost always simplifications of
the real world system
Models focus on aspect of the system that are needed to
explain the systems behaviour.
In scientific models Occams Razor principle is applied,
but oversimplification is lurking. It is the art to find a good
degree of complexity, as A. Einstein quotes:
"Make everything as simple as possible, but not simpler."
Explanatory models aim also for modeling the true
underlying behavior of a system, while predictive models
are measured solely by their ability to predict, no matter
wether the underlying model has a relationship with reality
or not.
Types of simulators: Iterated
function systems
A function is applied
on its own output,
repeatedly
Fractals, Cellular
automata are
important examples
Many examples in
natural system
simulation
Types of simulators: Finite automata
and petri nets
Finite automata are
token
characterized by state
transition diagrams
The state changes
transition
based on events
Petri nets allow for
coupling of different
states and simulation
place
of concurrent systems
Types of simulators: Discrete
Stochastic Process Simulation
0.6
Stochastic distribution of 0.2
the subsequent state is a
function of the current 0.5
state of a system
0.6
Discrete markov chain
analysis based on 0.2
transition graph is
predominant tool 0.5 1.0
0.4
Applications e.g. in
genetics and fault analysis
Types of simulators: Agent based
simulation
Multiple agents, each
of which is based on
the same simple rules
Emergent behavior is
difficult to be
predicted from rules
Applications in swarm
simulation and for
building evacuation
and traffic planning
Types of simulators: Discrete event
simulation
Typical example: processing of queues
Arrival times modeled by an stochastic distribution
System behavior simulated by means of object-oriented
computer program
How to generate/couple random variables?
Types of simulators: Continuous
simulation with differential
equations I - examples
dx/dt = k x Bacteria Population
growth: x=population size,
x K=positive constant
k
dx/dt = A x y B x
dy/dt = C x E x y Predator prey dynamics in
A Lotka Volterra model:
x=predator population
size, y = prey population
x C y size; A,B,C, and E:
-B -E positive constants
Types of simulators: Continuous
simulation with differential
equations II
Computing trajectories of
systems in continuous
time and space
(Partial) differential
equation solvers are main
technique
System diagrams used to
visualize dependences
between state variables
Types of simulators: (Non-)linear
equation systems solvers
E
Often the observed state
of a system is the system A B -D
in an equilibrium x y
In this case the solution of -C
a differential equation dx/dt = A C y + E x
system reduces to the
solution of a equation dy/dt = B x D
system as change rates are
zero dx/dt = 0, dy/dt =0 (Equilibruum)
Examples: chemical
equilibria, molecular A-Cy+Ex = 0
simulation, (hydro)statics,
economical equilibra of Bx D = 0
markets
(existence of solutions depends
on constants)
Types of simulators: Stochastic
continuous simulation
Differential equations
with stochastic variables
Ito Integrals and random
field simulation are
techniques
Applications in financial
market, biological
systems, brownian
motion, neurodynamics
Simulation Examples
growth simulation of plants, cities, etc (iterated function systems)
Evacuation strategies for buildings, football stadions (discrete event, cellular
automata)
analysis of pollutant dispersion using dispersion models (differential
equations)
design of complex systems such as logistics systems and queues (discrete
event simulation)
design of noise barriers to effect roadway noise mitigation (stochastic
simulation)
flight simulators to train pilots (computational geometry, differential
simulation)
weather forecasting (stochastic differential equations, cellular automata)
behavior of structures under stress and other conditions (nonlinear equation
systems)
design of chemical processing plants (nonlinear equation systems)
Strategic Management and Organizational Studies (discrete event simulation)
Reservoir simulation for the petroleum engineering (data driven modeling,
cellular automata)
Traffic engineering to plan or redesign parts of the street network (multi-agent,
cellular automata)
Simulation of cells and metabolic pathways in biology (differential equations)
Classification of simulators
Type of state Discrete Continuous
variables