Simulation Model - Introduction

A simulation model is a mathematical model of a system or process that includes key inputs which affect it and the corresponding outputs that are affected by it. If the model explicitly includes uncertainty, we refer to it as a Monte Carlo simulation model. For example, it can calculate the impact of uncertain inputs and decisions we make on outcomes that we care about, such as profit and loss, investment returns, environmental consequences, and the like. Such a model can be created by writing code in a programming language, statements in a simulation modeling language, or formulas in a Microsoft Excel spreadsheet. Regardless of how it is expressed, a simulation model will include:

  • Model inputs that are uncertain numbers -- we'll call these uncertain variables
  • Intermediate calculations as required
  • Model outputs that depend on the inputs -- we'll call these uncertain functions

It's essential to realize that model outputs that depend on uncertain inputs are uncertain themselves -- hence we talk about uncertain variables and uncertain functions. When we perform a simulation with this model, we will test many different numeric values for the uncertain variables, and we'll obtain many different numeric values for the uncertain functions. We'll use statistics to analyze and summarize all the values for the uncertain functions (and, if we wish, the uncertain variables).

Creating Models in Excel or Custom Programs

An Excel spreadsheet can be a simple, yet powerful tool for creating your model -- especially when paired with Monte Carlo simulation software such as Risk Solver Platform. If your model is written in a programming language, Monte Carlo simulation toolkits like the one in Frontline's Solver SDK Platform provide powerful aids.

An example model in Excel using Risk Solver Platform might look like this, where cell B6 contains a formula =PsiTriangular(E9,G9,F9) to sample values for the uncertain variable Unit Cost, and cell B10 contains a formula =PsiMean(B9) to obtain the mean value of Net Profit across all trials of the simulation.

risk analysis model in Excel

A portion of an example model in the C# programming language using Solver SDK Platform might look like this, where the array Var[] receives sample values for the two uncertain variables X and Y, and the uncertain function values are computed and assigned to the Problem's FcnUncertain object Value property:

risk analysis model in C#

 

Choosing Sample Values for Uncertain Variables

We must also choose what random sample values to use for the uncertain variables. During a simulation, a new sample value will be drawn on each trial.  In the simplest case, we might generate random numbers between 0 and 1, and use these as sample values. But in most cases, the range of values, and chance that different values in the range will be drawn on each trial, must be tailored to the uncertain variable. To do this, we normally choose a probability distribution and appropriate parameters for the uncertain variable.

This is a key step in building a Monte Carlo simulation model.  To learn more about it, consult Probability Distributions for Simulation. We can choose:

Frontline's Risk Solver Platform supports all of these options for obtaining sample values for the uncertain variables in a simulation model.  

Next: Probability Distributions >

< Risk Analysis Tutorials Overview Page


To Learn More:

For instant access to our white papers, example models, full-text User Guides, and to download free 15-day trial versions of our software products whenever you're ready, register now with no obligation.

User type*
Email address*
Name
First Last
Company
University
Phone

Trial version passwords are sent to the above email address. Our Privacy Policy protects you.