Está en la página 1de 19

Simulation

Definition
Simulation is the process of designing a model
of a real system and conducting experiments with this model for the purpose of either understanding the behavior of the system and/or evaluating various strategies for the operation of the system.

Simulation allows to
Model complex systems in a detailed way Describe the behavior of systems Construct theories or hypotheses that account for the observed behavior Use the model to predict future behavior, that is, the effects that will be produced by changes in the system Analyze proposed systems

Steps in a Simulation Study


1. Problem Formulation
1. Statement of the problem

2. Set Objectives & Project Plan


1. 2. 3. 4. Questions to be answered Is simulation appropriate? Methods, alternatives Allocation of resources
1. People, cost, time, etc.

Steps in a Simulation Study (contd)


3. Model Conceptualization
1. 2. 3. 4. Requires experience Begin simple and add complexity Capture essence of system Involve the user

4. Data Collection
1. Time consuming, begin early 2. Determine what is to be collected

Steps in a Simulation Study (contd)


5. Model translation
1. Computer form

6. Verification
1. Does the program represent model and run properly?

7. Validated?
1. Compare model to actual system 2. Does model replicate system?

Steps in a Simulation Study (contd)


8. Experimental Design
1. Determine alternatives to simulate 2. Time, initializations, etc.

9. Production & Analysis


1. Actual runs + Analysis of results 2. Determine performance measures

10. More Runs?

Steps in a Simulation Study (contd)


11. Documentation & Reporting 12. Implementation

Advantages
Can be used to study existing systems without disrupting the ongoing operations. Proposed systems can be tested before committing resources. Allows us to control time. Allows us to identify bottlenecks. Allows us to gain insight into which variables are most important to system performance.

Disadvantage
Model building is an art as well as a science. The quality of the analysis depends on the quality of the model and the skill of the modeler Simulation results are sometimes hard to interpret. Simulation analysis can be time consuming and expensive. Should not be used when an analytical method would provide for quicker results.

Types of Simulations
Variety of types, but main: emulation, Monte Carlo, trace driven, and discrete-event

MONTE CARLO SIMULATION

Monte Carlo Simulation


A static simulation has no time parameter
Runs until some equilibrium state reached

Used to model physical phenomena, evaluate probabilistic system, numerically estimate complex mathematical expression Driven with random number generator
So Monte Carlo simulation

Example, consider numerically determining the value of Area of circle = 2 for radius 1

Monte Carlo Simulation


Imagine throwing dart at square
Random x (0,1) Random y (0,1)

Count if inside
sqrt(x2+y2) < 1

Compute ratio R
in / (in + out)

Can repeat as many times as needed to get arbitrary precision

DISCRETE-EVENT SIMULATION

Why?
We need to conduct experiments "on some reality" and the reality - although pre-existing - is not available for our experiments.

What?
Discrete event model is way of representing continuous-time models to repeatedly consider every transition that may happen next, determine the time at which each will happen, and pick the one with minimum time.

Example

Cell with channel proteins

Three ions, A, B, and C, and counts of each, nA, nB, and nC Assume three channel types moving ions into the cell, with rates A+, B+, and C+, and three channel types moving the ions out of the cell, with rates nA A-, nB B-, and nCC-.

Pseudo-code

También podría gustarte