1 Introduction To Simulation

Simulation and Modeling · Unit 1 · 6 hrs

Introduction to Simulation

Exam-focused notes for Introduction to Simulation (Simulation and Modeling, CSC328): what the TU syllabus asks and how it has actually been tested, with 12 solved past questions from this unit.

Introduction to Simulation in short

Simulation and modeling begins with the idea of a system: a bounded piece of the world worth studying in isolation, and the artificial history that a computer can generate to stand in for watching that system run in real life.

Introduction to Simulation: notes

System and System Environment

A system is a simplified representation of a set of components with specified boundaries, studied over a defined span of time. It stands for a real world entity, generalized and abstracted so that only the features relevant to the problem at hand are kept. Every system carries an implicit time constraint: the interval over which it is allowed to change state. Choosing the boundary matters: too tight excludes components necessary to explain the system's behaviour, too loose pulls in interactions that are hard to track and increase error. The system environment is everything outside the boundary that can still affect it. A system is closed if it is not affected by events from the environment, and open if it is; most systems worth simulating, a bank, a factory floor, a network, are open systems.

Components of System

Every system is described with a recurring vocabulary: state, a variable characterizing an attribute at a given instant, such as the number of jobs waiting; activity or event, an occurrence at a point in time that may change the state, called endogenous if its cause is inside the boundary and exogenous if it comes from the environment; entity, an object that passes through the system, such as a customer or job; queue, any place where entities wait for something to happen; scheduling, attaching a new future event to an event already on the simulation's event list; and random variable, a quantity whose value is uncertain until observed. These six ideas recur in every discrete-event model built later in this subject.

Discrete and Continuous System

A discrete system is one whose state variables change only at a discrete, countable set of time points. A banking system is the standard example: the number of customers waiting jumps by one at the instant a customer arrives or is served, staying constant in between, so plotted against time it looks like a staircase. A continuous system is one whose state variables change continuously with time, such as the water level behind a dam, which falls gradually through a dry season and rises gradually during the monsoon, tracing a smooth curve rather than a staircase. Whether a real system is treated as discrete or continuous is a modeling choice as much as a physical fact.

What this unit covers

  • System and System Environment
  • Components of System
  • Discrete and Continuous System
  • System Simulation
  • Model of a System
  • Types of Model
  • Use of Differential and Partial differential equations in Modeling
  • Advantages, Disadvantages and Limitations of Simulation
  • Application Areas
  • Phases in Simulation Study

Types of Model

2082 · 5 marks

Explain static mathematical model with suitable example. [5]

A static mathematical model is a type of mathematical model that represents a system at a particular point in time, where the system attribute values do not change over time. It uses symbolic notation and mathematical equations to represent the system, where variables represent system attributes ...

Open this answer on its own page →

2081 · 5 marks

Difference between static physical and dynamic physical models. [5]

A physical model is a type of simulation model where system attributes are represented by physical measures (such as voltage), and system activities are governed by physical laws. Physical models are classified into two types: Static and Dynamic. --- A static physical model is a scaled-down repre...

Open this answer on its own page →

2079 · 5 marks

Describe dynamic physical model in detail with the help of suitable example. [5]

A dynamic physical model is one which changes with time or which is a function of time. Unlike static models, dynamic physical models capture the behavior of a system as it evolves over time due to system activities. In a physical model, system attributes are represented by physical measures (suc...

Open this answer on its own page →

2078 · 10 marks

What do you understand by dynamic mathematical model? Explain with example. Differentiate it with static mathematical model.[10]

Show solved answer

Dynamic Mathematical Model

Definition

A mathematical model uses symbolic notation and mathematical equations to represent a system. The system attributes are represented by variables and the system activities are represented by mathematical functions.

A dynamic mathematical model is a mathematical model in which the system attributes (variables) change with time, i.e., the model is a function of time. The state of the system at any given moment depends on previous states and the passage of time. Dynamic models capture the behavior and evolution of a system over time.

In simple terms: a dynamic mathematical model describes how a system changes from one state to another as time progresses.


Example of Dynamic Mathematical Model

Example 1: Population Growth Model

The population of a city changes with time. This can be modeled as:

$$\frac{dP}{dt} = rP$$

Where:

  • $P$ = population at time $t$
  • $r$ = growth rate constant
  • $t$ = time

The solution gives:

$$P(t) = P_0 \cdot e^{rt}$$

Here, $P$ is a function of time $t$, so the value of the attribute (population) changes continuously. This is a dynamic mathematical model.


Example 2: Simple Harmonic Motion (Spring-Mass System)

$$m\frac{d^2x}{dt^2} + kx = 0$$

Where:

  • $m$ = mass
  • $k$ = spring constant
  • $x$ = displacement (changes with time)

The displacement $x$ changes with time, making this a dynamic mathematical model.


Example 3: Bank Account with Interest

$$A(t) = P\left(1 + \frac{r}{n}\right)^{nt}$$

The amount $A$ changes as time $t$ increases, representing a dynamic behavior.


Differentiation: Dynamic vs Static Mathematical Model

BasisStatic Mathematical ModelDynamic Mathematical Model
DefinitionModel in which system attribute values do not change over timeModel in which system attribute values change with time
Time DependencyIndependent of timeDependent on time
NatureRepresents a fixed/steady state of the systemRepresents the evolving state of the system
VariablesVariables are constant or fixedVariables are functions of time
Mathematical FormAlgebraic equationsDifferential equations or time-based functions
Example$f(x) = mx + c$ (equation of a line)$P(t) = P_0 e^{rt}$ (population growth)
ComplexityRelatively simplerMore complex due to time dimension
Use CaseUsed when system is in equilibriumUsed when system behavior over time is important
OutputSingle snapshot of the systemContinuous or discrete output over time
SimulationDoes not require time-step simulationRequires time-step based simulation

Summary

  • A static mathematical model gives a fixed relationship between variables (e.g., $y = mx + c$), where the system does not evolve with time.
  • A dynamic mathematical model captures how a system evolves over time using differential equations or time-dependent functions (e.g., $\frac{dP}{dt} = rP$).
  • Dynamic models are essential in simulation because most real-world systems (weather, population, economics, engineering systems) are inherently time-varying.
Open this answer on its own page →

2076 · 10 marks

What do you understand by static mathematical model? Explain with example. Differentiate between stochastic and deterministic activities.[10]

--- As stated in the course notes: "A mathematical model uses symbolic notation and mathematical equations to represent a system. The system attributes are represented by variables and the activities are represented by mathematical functions." A mathematical model is therefore an abstract represe...

Open this answer on its own page →

Phases in Simulation Study

2081 · 5 marks

Describe different phases of simulation study with help of flowchart. [5]

Show solved answer

Phases of Simulation Study

Definition

A simulation study is a systematic process of building, validating, and using a simulation model to analyze a real-world system. It involves a series of well-defined phases that guide the analyst from problem identification to final implementation.


Flowchart of Phases in Simulation Study

         +---------------------------+
         |   1. Problem Formulation  |
         +---------------------------+
                      |
                      v
         +---------------------------+
         | 2. Setting Objectives &   |
         |    Overall Project Plan   |
         +---------------------------+
                      |
                      v
         +---------------------------+
         |  3. Model Conceptualization|
         +---------------------------+
                      |
                      v
         +---------------------------+
         |    4. Data Collection     |
         +---------------------------+
                      |
                      v
         +---------------------------+
         |   5. Model Translation    |
         +---------------------------+
                      |
                      v
         +---------------------------+
         |     6. Verification       |
         +-------------+-------------+
                       |
              [Program works?]
              /              \
            NO                YES
            |                  |
     (Go back to            v
      Step 5)   +---------------------------+
                |      7. Validation        |
                +-------------+-------------+
                              |
                   [Represents real system?]
                   /                    \
                 NO                     YES
                 |                       |
         (Go back to                     v
          Step 3/4)      +---------------------------+
                         |  8. Experimental Design   |
                         +---------------------------+
                                      |
                                      v
                         +---------------------------+
                         | 9. Production Runs &      |
                         |       Analysis            |
                         +---------------------------+
                                      |
                              [More runs needed?]
                              /               \
                            YES               NO
                            |                  |
                    (Go back to                v
                     Step 8)   +---------------------------+
                               | 10. Document and Report   |
                               +---------------------------+
                                            |
                                            v
                               +---------------------------+
                               |    11. Implementation     |
                               +---------------------------+

Description of Each Phase

1. Problem Formulation

  • Clearly state the problem to be studied.
  • Define the boundaries and scope of the system to be simulated.

2. Setting Objectives and Overall Project Plan

  • Define what questions the simulation should answer.
  • Plan how to approach the problem, including resources, timeline, and team.

3. Model Conceptualization

  • Establish a reasonable conceptual model of the system.
  • Identify key components, variables, and their relationships.

4. Data Collection

  • Collect all data necessary to run the simulation.
  • This includes arrival rates, service rates, arrival processes, queue disciplines, etc.

5. Model Translation

  • Convert the conceptual model into a simulation programming language (e.g., GPSS, SIMSCRIPT, or general-purpose languages).

6. Verification

  • Check whether the program works properly.
  • Ensure the model is correctly translated into the computer program (debugging).

7. Validation

  • Check whether the simulation model accurately represents the real system.
  • Compare simulation outputs with real-world data.

8. Experimental Design

  • Decide:
    • How many simulation runs to perform?
    • How long each run should last?
    • What input variations (parameters) to test?

9. Production Runs and Analysis

  • Actually run the simulation.
  • Collect and statistically analyze the output data.

10. Repetition

  • If results are inconclusive or more accuracy is needed, repeat the experiments with different random numbers or parameter settings.

11. Document and Report

  • Document the model, assumptions, data, and results.
  • Report findings to decision-makers.

12. Implementation

  • If simulation results show it is advantageous, implement the new system or policy in the real world.

Summary Table

PhaseActivity
1Problem Formulation
2Objectives and Project Plan
3Model Conceptualization
4Data Collection
5Model Translation
6Verification
7Validation
8Experimental Design
9Production Runs and Analysis
10Repetition
11Document and Report
12Implementation

These phases ensure that the simulation study is systematic, reliable, and produces valid results that can be confidently applied to real-world decision making.

Open this answer on its own page →

2080 · 5 marks

What are steps involved in simulation study? Explain. [5]

Show solved answer

Steps Involved in a Simulation Study

A simulation study is a systematic process of building, validating, and using a simulation model to analyze a real-world system. The following are the 12 key steps involved:


1. Problem Formulation

Clearly state and define the problem to be studied. This involves understanding what the system does, what questions need to be answered, and what the scope of the study is.


2. Setting of Objectives and Overall Project Plan

Define the goals of the simulation study and plan how to approach the problem. This includes deciding what performance measures to evaluate and setting timelines and resources.


3. Model Conceptualization

Establish a reasonable conceptual model of the system. This involves identifying the components, entities, events, and relationships that are important to represent the real system.


4. Data Collection

Collect all necessary data required to run the simulation, such as:

  • Arrival rates and arrival processes
  • Service rates and service time distributions
  • System capacity and other parameters

5. Model Translation

Convert the conceptual model into a programming language or simulation software (e.g., SIMSCRIPT, GPSS, Arena). This produces the computerized representation of the model.


6. Verification

Check whether the program works properly as intended. The goal is to ensure that the computerized model correctly reflects the conceptual model. Techniques include:

  • Having the code reviewed by someone other than its developer
  • Checking output for reasonableness under various input settings

7. Validation

Check whether the simulation model accurately represents the real system. This ensures that the model behaves like the actual system under study, often by comparing simulation output with real-world data.


8. Experimental Design

Plan the simulation experiments by deciding:

  • How many runs to perform
  • How long each run should last
  • What input variations (scenarios) to test

9. Production Runs and Analysis

Actually run the simulation, collect the output data, and analyze the results to draw conclusions about the system's behavior and performance.


10. Repetition

If the results are not satisfactory or more information is needed, repeat the experiments with modified parameters or a refined model.


11. Documentation and Reporting

Document the entire simulation study and report the findings. This includes the model description, assumptions made, results obtained, and conclusions drawn.


12. Implementation

If the simulation results show that a new system or policy is advantageous, implement the simulated system in the real world. The simulation study thus serves as a decision-support tool.


Summary Diagram

Problem Formulation
        |
Setting Objectives & Plan
        |
Model Conceptualization
        |
Data Collection
        |
Model Translation
        |
Verification --> (fix errors) --> loop back
        |
Validation --> (not valid) --> loop back
        |
Experimental Design
        |
Production Runs & Analysis
        |
Repetition (if needed)
        |
Documentation & Reporting
        |
Implementation

These steps ensure that the simulation study is carried out in a structured, reliable, and meaningful manner, producing results that can be trusted for real-world decision making.

Open this answer on its own page →

2078 · 5 marks

Describe the phases in simulation. [5]

Simulation is not a single-step process; it follows a systematic sequence of phases to ensure that the model accurately represents the real system and produces reliable results. A simulation study is commonly divided into the following 12 phases: --- Clearly state and define the problem to be stu...

Open this answer on its own page →

Model of a System

2080 · 10 marks

Why model of a system is built? What is static model? Differentiate between static and dynamic mathematical models in simulation.[10]

--- A model is a simplified representation of a real system used to study, analyze, and predict system behavior without directly experimenting on the actual system. Simulation and modeling are useful for the following key reasons: Reason Explanation --------------------- Cost Reduction Experiment...

Open this answer on its own page →

Discrete and Continuous System

2079 · 5 marks

Differentiate between discrete and continuous system. [5]

A discrete system is one in which the state variables change only at a discrete set of points in time. The system changes state instantaneously at specific moments, and remains unchanged between those moments. Example: A banking system where the number of customers changes only when a customer ar...

Open this answer on its own page →

System and System Environment

2076 · 5 marks

Write short notes on (any two): a. System and its environment b. Simulation run statistics [5]

A system is defined as a collection of entities (people, machines, etc.) that interact together toward the accomplishment of some logical end. Every system exists and operates within an environment, which consists of all elements that lie outside the system boundary but can influence the behavior...

Open this answer on its own page →

Advantages, Disadvantages and Limitations of Simulation

2076 · 5 marks

Discuss the merits and demerits of system simulation. [5]

Simulation is the imitation of the operation of a real-world process or system over time. It involves generating an artificial history of the system and observing it to draw inferences about the real system. --- Merit Explanation ----------------------- 1 Testing new designs without acquiring res...

Open this answer on its own page →