Skip to content
EX-804 · SIMULATION LAB/Quick Revision Short Notes

SIMULATION LAB (EX-804) - Unit 2 Short Notes

UNIT 2: SIMULATION MODELING & ANALYSIS

2.1 Fundamentals of Discrete-Event Simulation (DES)

Core Concepts & Terminology

  • System: A set of interacting entities pursuing a common objective.

  • Model: An abstract, simplified representation of a system.

  • Simulation: The process of experimenting with a model over time to understand system behavior.

  • Discrete-Event Simulation (DES): A simulation where the state of the system changes at discrete points in time (events). Contrast with Continuous (state changes continuously) and Monte Carlo (static, probabilistic).

  • Key DES Components:

    | Component | Description | Example | | :--- | :--- | :--- | | Entity | Dynamic object that moves through the system. | Customer, Job, Part | | Attribute | Characteristic of an entity. | Priority, Type, Size | | Resource | Static object that provides service. | Server, Machine, Agent | | Queue | Holding area for entities waiting for a resource. | Line, Buffer | | Activity | A period of time where an entity occupies a resource. | Service Time | | State Variables | Variables describing the system at an instant. | # in queue, resource state | | Event List | Scheduled future events (time, type). | Arrival at 10:05, Departure at 10:12 |

The Simulation Process Lifecycle

A structured, iterative approach:

  1. Problem Definition & Objectives: What is the question? (e.g., "Reduce average wait time by 15%")

  2. Data Collection & Input Analysis: Gather data, fit distributions (Exponential, Normal, etc.).

  3. Model Conceptualization & Logical Design: Create flowcharts/block diagrams.

    DiagramCANVAS: A simple flowchart with Create -> Queue -> Seize Resource -> Delay -> Release Resource -> Dispose
  4. Model Implementation: Build the model in software (coding/module connection).

  5. Verification & Validation (V&V): "Did we build the model right?" & "Did we build the right model?"

  6. Experimental Design & Output Analysis: Define runs (replications, warm-up), analyze results statistically.

  7. Documentation & Presentation: Report findings, recommendations, limitations.

2.2 Simulation Software & Tool Proficiency

Software Architecture (Generic)

  • Modules/Blocks: Building blocks (Create, Process, Dispose, Decide, Assign).

  • Flowchart View: Visual model construction.

  • Data/Spreadsheet View: Define parameters, attributes, resources, schedules.

  • Run Controller: Set replication length, warm-up period, number of replications.

  • Report/Output Viewer: Built-in statistics and custom reports.

Building Basic Models

  • Entity Flow: Create (arrival process) → Process/Seize-Delay-Release → Dispose.

  • Resources: Defined in data sheet. Seize (request), Release (free). Can define capacity.

  • Queues: Automatically created by Seize if no resource available. Logic: FIFO (default), LIFO, Priority (based on attribute).

  • Routing: Decide (probability/condition), Route (assign to specific destination), Branch (split into multiple paths).

  • Entity Grouping: BATCH (combine entities), SEPARATE (split batch), MATCH (pair entities).

Input Data Integration

  • Statistical Distributions: Fit to real data. Common: Exponential (interarrival), Normal/LogNormal (service), Uniform, Triangular, Empirical (from data file).

  • External Data: Import CSV/Excel for arrival schedules, attribute values, or resource schedules.

  • Expression Builder: Use for dynamic logic (e.g., IF(Attribute1=1, RouteA, RouteB)).

2.3 Model Verification & Validation (V&V)

Verification (Building the Model Right) Validation (Building the Right Model)
Focus: Model implementation is free of errors and matches conceptual design. Focus: Model accurately represents the real-world system.
Techniques: <br> • Debugging/Tracing: Step through model execution.<br> • Modular Testing: Test sub-models individually.<br> • "Animation Check": Watch for illogical behavior.<br> • Code/Logic Review. Techniques: <br> • Face Validity: Expert/stakeholder review.<br> • Calibration: Adjust inputs until outputs match reality.<br> • Historical Data Validation: Compare model output to past system performance.<br> • Sensitivity Analysis: Test robustness of outputs to input changes.

2.4 Experimental Design & Output Analysis

Types of Simulation Experiments

  • Warm-up Period (Transient Removal): Initial period where system state is not representative (e.g., empty queues). Must be truncated before collecting output data. Determined by batch means method or observing stability of key metrics.

  • Replication vs. Single Long Run:

    | Replication (Multiple Short Runs) | Single Long Run | | :--- | :--- | | Use for terminating systems (has natural end). | Use for non-terminating (steady-state) systems. | | Independent runs, different RNG streams. | One very long run. | | Output: Average of replication means. | Output: Time-average over long run. | | Allows calculation of confidence intervals easily. | Requires careful batch means for CI. |

  • What-If Scenarios: Compare alternatives (e.g., 2 servers vs. 3 servers) using statistical tests.

Output Data & Statistical Analysis

  • Types of Output:

    • Time-Persistent: Single value per replication (e.g., average wait time, max utilization).

    • Time-Series: Value at many time points (e.g., queue length over time).

  • Key Performance Indicators (KPIs):

    • Throughput: Entities processed per unit time.

    • Utilization: % time resource is busy. \boxed{\text{Utilization} = \frac{\text{Busy Time}}{\text{Total Time}}}

    • Cycle Time / Sojourn Time: Total time in system.

    • Waiting Time: Time spent in queue only.

    • Bottleneck Identification: Resource with highest utilization or longest queue.

  • Statistical Comparison of Alternatives:

    • Calculate mean and standard deviation of the KPI across n replications.

    • For large n (≥30), use t-test for difference in means:

$$t = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}$$

*   Compare |t| to critical t-value. If |t| > t_crit, means are **significantly different** at chosen confidence level (e.g., 95%).

*   **Confidence Interval (CI) for a Mean:**

$$\bar{X} \pm t_{\alpha/2, n-1} \times \frac{s}{\sqrt{n}}$$

> [!TIP] **Exam Tip:** Always state the confidence level (e.g., 95% CI). Non-overlapping CIs for two alternatives suggest a significant difference.

2.5 Advanced Modeling Concepts

Entity Routing & Logic

  • Conditional Routing: Based on entity attribute or expression (e.g., IF Type=Express, go to Fast Lane).

  • Scheduling: Use Schedule module or Assign with NOW to model time-based events (e.g., shift changes, breaks).

  • Submodels/Hierarchical Modeling: Group complex logic into a single submodel block for clarity.

Resource Management

  • Schedules/Shifts: Define resource availability over time (e.g., 8am-5pm).

  • Failures & Maintenance: Use Downtime or Break modules with scheduled or random failure distributions (MTTF, MTTR).

  • Preemptive Resources: Higher-priority entity can interrupt a lower-priority one in service.

Output Reporting & Customization

  • Built-in Reports: Standard tables for Entities, Resources, Queues, Processes.

  • Custom Reports/Plots: Use expression-based variables to track custom metrics (e.g., Total_Wait_Time).

  • VBA/Scripting: For advanced output manipulation, complex logic, or external file writing.

2.6 Case Studies & Application Domains

Domain Typical Model Elements Key Questions
Manufacturing Machines (resources), Jobs (entities), Buffers (queues), Conveyors. Cycle time, throughput, bottleneck machine, WIP level.
Service Servers, Customers, Queues, Schedules. Average wait, server utilization, abandonment rate.
Logistics/Warehousing Workers, Forklifts, Orders, Picking Stations. Order throughput, picker utilization, dock congestion.
Transportation Vehicles, Passengers, Terminals, Security Checkpoints. Passenger processing time, gate utilization, on-time performance.

2.7 Project Workflow & Best Practices

Lab Project Structure

  1. Proposal: Problem statement, objectives, conceptual model (flowchart), data sources.

  2. Interim Report: Screenshot of working model, verification notes (debugging steps), preliminary output.

  3. Final Report: Full model logic, detailed V&V (verification & validation methods used), experimental design (warm-up, replications), results with statistical analysis (tables, CIs, comparisons), conclusions, recommendations, limitations.

Common Pitfalls & Debugging

  • Infinite Loops: Entity routing deadlock (e.g., Decide always sends back).

  • Entity Starvation: Downstream module blocked, upstream continues creating.

  • Misinterpreted Output: Confusing average vs. maximum queue length; not removing warm-up period.

  • Debugging Strategy: Use animation at slow speed, add Record modules to log entity paths, check entity counts at module inputs/outputs.

  • Best Practice: Animation is critical for validation and communicating model logic to stakeholders.

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in