2081

CSC328 · TU past paper

Simulation and Modeling 2081 question paper

The complete TU 2081 exam paper for Simulation and Modeling (CSC328), all 11 questions with solved model answers written to the mark scheme.

Tap a question to open its answer.

  1. 110 marksEstimation MethodsAnswer

    Why is it Necessary to Analyze Simulation Output? Explain Different Estimation Methods Used in Simulation Output Analysis [10]

    Why is it Necessary to Analyze Simulation Output? Estimation Methods in Simulation Output Analysis


    Why Analyze Simulation Output? (Necessity)

    Simulation models incorporate random variates and random number generators to mimic real-world stochastic behavior. As a result, the output produced by a simulation is itself random (stochastic) rather than deterministic. This fundamental characteristic makes statistical analysis of simulation output absolutely necessary.

    Key Reasons:

    1. Stochastic Nature of Output: Each simulation run produces different results due to random inputs. A single run cannot be trusted as a definitive answer.

    2. Need for Performance Estimation: We need to estimate performance parameters such as mean waiting time, throughput, or utilization with known precision. For discrete-time data (Y1, Y2, ..., Yn), the ordinary mean θ must be estimated properly.

    3. Bias Detection: The point estimator θ̂ is unbiased only if E(θ̂) = θ. If E(θ̂) ≠ θ, the estimator is biased and the bias E(θ̂) - θ must be identified and corrected.

    4. Initial Bias (Warm-up Problem): Simulations started from an idle or empty state introduce initial bias into the output. The first part of the simulation run may need to be ignored, and pilot runs should be used to judge how long the initial bias remains.

    5. Quantifying Uncertainty: Raw output values alone do not tell us how reliable our estimates are. Confidence intervals are needed to quantify uncertainty.

    6. Comparing Alternatives: To meaningfully compare two or more system designs, statistically valid output analysis is required.

    7. Determining Sufficient Sample Size: Without analysis, we cannot know whether enough data has been collected for valid conclusions.

    Without proper output analysis, decisions based on simulation results may be misleading, biased, or statistically invalid.


    Estimation Methods in Simulation Output Analysis

    The core estimation framework is as follows:

    • Discrete-time data: (Y1, Y2, ..., Yn) with ordinary mean θ
    • Continuous-time data: {Y(t), 0 ≤ t ≤ T} with time-weighted mean θ

    A. Point Estimation

    A point estimate is a single numerical value computed from simulation output to estimate an unknown population parameter θ.

    For discrete-time data:

    $$\hat{\theta} = \bar{Y} = \frac{1}{n} \sum_{i=1}^{n} Y_i$$

    Properties:

    • The estimator is unbiased if: E(θ̂) = θ
    • The estimator is biased if: E(θ̂) ≠ θ, and the quantity E(θ̂) - θ is called the bias

    Sample Variance (estimating spread):

    $$S^2 = \frac{1}{n-1} \sum_{i=1}^{n} (Y_i - \bar{Y})^2$$

    Limitation: A point estimate gives no information about the precision or reliability of the estimate.


    B. Interval Estimation (Confidence Intervals)

    An interval estimate provides a range within which the true parameter θ is expected to lie with a specified probability (confidence level 1 - α).

    Confidence interval for the mean:

    $$\bar{Y} \pm t_{n-1,, \alpha/2} \cdot \frac{S}{\sqrt{n}}$$

    Where:

    • t_{n-1, α/2} = critical value from the t-distribution with n-1 degrees of freedom
    • S = sample standard deviation
    • n = number of observations

    Common confidence levels: 90%, 95%, 99%

    Advantage: Provides both an estimate and a measure of its precision.


    C. Method of Independent Replications

    The simulation is run multiple independent times, each with a different random number seed.

    Procedure:

    1. Perform k independent replications
    2. Compute the output mean for each replication: Y̅₁, Y̅₂, ..., Y̅ₖ
    3. Compute the overall mean and confidence interval across replications

    Confidence interval:

    $$\bar{Y} \pm t_{k-1,, \alpha/2} \cdot \frac{S}{\sqrt{k}}$$

    Advantage: Observations across replications are independent, so standard statistical methods apply directly without approximation.

    Limitation: Each replication must go through a warm-up phase, which can be wasteful. One remedy is to start the system in a more representative state, or to ignore the initial section, to eliminate initial bias.


    D. Method of Batch Means

    A single long simulation run is divided into k equal-sized batches (sub-intervals).

    Procedure:

    1. Run the simulation for a long time T
    2. Divide the run into k batches, each of length m
    3. Compute the mean of each batch: Y̅₁, Y̅₂, ..., Y̅ₖ
    4. Treat these batch means as approximately independent observations
    5. Compute confidence interval using these k batch means

    Condition: Batch size m must be large enough to ensure approximate independence between batch means (to reduce autocorrelation).

    Advantage:

    • Avoids repeated warm-up phases
    • Efficient use of a single long run
    • Addresses the initial bias problem by discarding the initial warm-up period before batching (consistent with the recommendation to ignore the first part of the run)

    E. Method of Regenerative Analysis

    This method identifies regeneration points in the simulation, which are time points where the system probabilistically restarts in the same state.

    Procedure:

    1. Identify regeneration points (e.g., moments when the system becomes empty in a queue)
    2. Divide the simulation into regenerative cycles
    3. Each cycle is independent of the others and the cycles are identically distributed
    4. Perform the statistical analysis on the cycle averages

    Advantage: Produces strictly independent observations without any approximation.

    Limitation: Not every simulation has easily identifiable regeneration points.


    F. Autoregressive Method

    This method models the autocorrelation structure of the output data directly instead of trying to remove it.

    Procedure:

    1. Fit an autoregressive model to the time series of output observations
    2. Estimate the autocorrelation parameters from that fit
    3. Widen the confidence interval to account for the correlation between successive observations

    Advantage: Uses every observation of a single run, with no need to discard data or form batches.

    Limitation: Requires the correct autoregressive order to be identified, which is not always straightforward.


    Conclusion

    Analysing simulation output is essential because a simulation produces stochastic results that need statistical methods to be interpreted correctly. The choice of estimation method depends on whether the study is of a terminating or a steady-state simulation, and on the nature of the correlation in the output data. In practice, the method of independent replications and the method of batch means are the two most widely used.

  2. 210 marksSimulation LanguagesAnswer

    Consider that a machine tool in a manufacturing shop is turning out parts at the rate of two every 5 minutes. As they are finished, the parts go to an inspector, who takes 5±25 \pm 25±2 minutes to examine each one and reject about 15% of the parts. Now develop a block diagram and write the code for simulating the above problem using GPSS, and also explain the function of each block used in the block diagram in detail.[10]

    • Machine produces parts at the rate of 2 every 5 minutes (i.e., one part every 2.5 minutes) - Inspector takes 5 ± 2 minutes to examine each part - Inspector rejects 15% of parts (accepts 85%) --- --- --- - This block creates transaction...
  3. 310 marksNumericalTests for Randomness - Uniformity and indeAnswer

    Explain the independence and uniformity property of random number. For the following sample of random numbers, perform test for independence using K-S test. ($D_{0.05,10} = 0.41$) 0.35, 0.77, 0.12, 0.33, 0.88, 0.45, 0.19, 0.25, 0.91, 0.54[10]

    The random numbers $Ri$ are assumed to be drawn from a continuous uniform distribution over $[0,1]$: $$f(x) = \begin{cases} 1 & 0 \le x \le 1 \ 0 & \text{otherwise} \end{cases}$$ - $E(R) = \dfrac{1}{2}$, $\text{Var}(R) = \dfrac{1}{12}$ ...

  4. 45 marksTypes of ModelAnswer

    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...

  5. 55 marksPhases in Simulation StudyAnswer

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

    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.

  6. 65 marksFeaturesAnswer

    Explain markov chain with suitable example. What are diffrent application areas of markov chain? [5]

    Formal Definition: A Markov chain is a sequence of random variables X₁, X₂, X₃, ... with the Markov property, namely that, given the present state, the future and past states are independent. This property can be expressed mathematically...

  7. 75 marksCalibration and Validation of the modelsAnswer

    Explain iterative process of calibrating a simulation model. [5]

    Calibration of a simulation model is the iterative process of comparing the model's output with the real system's behavior and adjusting model parameters until the model accurately represents the real system. It is closely related to val...

  8. 85 marksVerification of Simulation ModelsAnswer

    Describe the process of model building, verification and validation in detail with example. [5]

    Model building is the process of constructing a conceptual and computational representation of a real-world system. The key steps involved are: Step Description ------------------- Problem Formulation Clearly state the problem to be stud...

  9. 95 marksQueuing notationAnswer

    Define traffic intensity and server utilization. Write down the Kendall's notation for queuing system with example. [5]

    --- Traffic intensity (denoted by ρ or P) is a dimensionless measure that represents the ratio of the mean arrival rate to the mean service rate in a queuing system. It indicates the load placed on the server. $$\rho = \frac{\lambda}{\mu...

  10. 105 marksAnalog ComputerAnswer

    What is analog computer? Explain with suitable example. [5]

    Analog computers are those computers that are unified with devices like adders and integrators so as to simulate the continuous mathematical model of a system, which generates continuous outputs. The electronic analog computer is based o...

  11. 115 marksCharacteristics and Structure of Basic QueAnswer

    Write short notes on: a. Queuing discipline b. Random variate [5]

    Short Notes

    a. Queuing Discipline (2.5 marks)

    Definition: The logical ordering of customers in a waiting line that determines which customer will be chosen for service next is called queuing discipline.

    The number of customers that can wait in a line is called system capacity. The simplest case is an unlimited queue which can accommodate any number of customers (unlimited capacity). However, many systems such as web servers and call centers have limits on the number of entities that can be in the queue at any given time. Arrivals that come when the queue is full are turned away.

    Common Types of Queuing Disciplines:

    1. FIFO (First In, First Out): Customers are served in the order they arrive. This is the most common and default discipline. Example: bank queues.

    2. LIFO (Last In, First Out): The most recently arrived customer is served first. Example: stack-based processing systems.

    3. SIRO (Service In Random Order): Customers are selected randomly from the waiting queue regardless of arrival order.

    Note in Kendall Notation: In the standard Kendall Notation (A/B/C/D/N/K), D represents the queuing discipline. If not specified, the default is FIFO. For example, M/D/2/FIFO/5/∞ represents a system with exponential arrivals, deterministic service, 2 servers, FIFO discipline, capacity of 5, and infinite population.


    b. Random Variate (2.5 marks)

    Definition: A random variate is a particular outcome or realization generated from a specified probability distribution. It is a value produced by a random variable when the underlying random experiment is performed.

    Key Points:

    • A random variate is used in simulation modeling to represent uncertain quantities such as inter-arrival times, service times, and processing durations.
    • Random variates are generated using techniques such as the Inverse Transform Method, Acceptance-Rejection Method, and Composition Method.
    • They are drawn from distributions such as Exponential (M), Deterministic (D), and Erlang (E) distributions, which are commonly used in queuing models.
    • In Markov Chain Monte Carlo (MCMC), sequences of random variates are generated to reflect complicated desired probability distributions.

    Example: If service time follows an exponential distribution with mean 1/μ, then a random variate for service time is generated as:

    $$x = -\frac{1}{\mu} \ln(U)$$

    where U is a uniform random number between 0 and 1.

    Random variates are essential in discrete event simulation to mimic real-world stochastic behavior of systems such as queuing networks.