0% found this document useful (0 votes)
80 views35 pages

Computer Simulation Techniques (Chapter One)

Computer simulation techniques are essential for modeling and analyzing complex systems across various fields such as business, healthcare, and transportation. The Operations Research approach to simulation involves problem formulation, model construction, validation, solution evaluation, and implementation. Key features of simulation models include focusing on relevant subsystems, managing controllable and uncontrollable variables, and utilizing both deterministic and stochastic models.

Uploaded by

nadaj2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views35 pages

Computer Simulation Techniques (Chapter One)

Computer simulation techniques are essential for modeling and analyzing complex systems across various fields such as business, healthcare, and transportation. The Operations Research approach to simulation involves problem formulation, model construction, validation, solution evaluation, and implementation. Key features of simulation models include focusing on relevant subsystems, managing controllable and uncontrollable variables, and utilizing both deterministic and stochastic models.

Uploaded by

nadaj2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Computer Simulation

Techniques
Computer Simulation Techniques – An Effective
Tool for Modeling and Analyzing Complex
Systems

Introduction:
In today’s world, characterized by complexity and constant change, computer simulation has
become an essential tool for solving problems and making effective decisions. Simulation is the
process of designing a model that represents the behavior of a real or hypothetical system over
time, with the aim of studying its performance and evaluating the impact of various variables on
it. Simulation relies on constructing models that mimic reality using computational techniques,
allowing for the study of the effects of different decisions before their actual implementation.
This helps reduce risks and costs associated with real-world experimentation.
The Importance of Simulation in Practical
Applications:
Computer simulation is used across various fields, including:
• Business Management and Supply Chains : Companies can use simulation to determine the
best inventory management strategies and optimize production processes.
• Industry and Manufacturing : Simulation helps analyze production flow, identify weak
points, and improve operational efficiency.
• Healthcare : It is used to simulate patient flow within hospitals to enhance service delivery
and reduce waiting times.
• Transportation Systems: Simulation helps analyze traffic congestion and develop solutions
for traffic control.
• Networks and Communications: It is used to evaluate the efficiency of protocols and
determine the optimal performance for data transmission.
Introduction

• The OR Approach
• The Operations Research (OR) approach to solving problems involves the
following steps:
1) Problem Formulation: Define the problem to be solved.
2) Model Construction: Create a model that represents the real-life system using
symbols, equations, or computer programs.
3) Model Validation: Ensure the model accurately reflects the real-life system.
4) Solution Evaluation: Use the model to evaluate various solutions or
alternatives.
5) Implementation and Maintenance: Apply the chosen solution and monitor its
performance over time.
* These steps are iterative; one often revisits earlier steps during the process.
Model building is central to the OR approach.
Models can be classified as:
▪ Iconic Models: Exact replicas of real-life systems but on a smaller scale (e.g.,
model airplanes).
▪ Analogue Models: Represent real-life systems using different properties (e.g.,
hydraulic systems representing electrical systems).
▪ Symbolic Models: Represent systems through mathematical equations or
computer programs (e.g., simulation models).
This diagram shows how a system is broken down into different levels of detail when building a simulation
model.

Shaded parts represent important parts of the system that are included in the simulation.

Use: Helps identify which parts to focus on when designing a simulation model.
OR models are typically symbolic and can be further categorized into:
▪ Deterministic Models: Contain no element of randomness (e.g., linear
programming).
▪ Stochastic Models: Involve randomness (e.g., queueing theory, stochastic
processes, simulation techniques).
Simulation techniques rely heavily on randomness but can also be deterministic.
They are flexible, easy to apply, and useful when other models fail.
Building a Simulation Model
When simulating a real-life system, one does not simulate the entire
system but focuses on subsystems relevant to the problem. This involves
modeling parts of the system at varying levels of detail, as depicted in
Beard's managerial pyramid.
Key Features of a System:
1) Environment: Each system is part of a larger system.
2) Interdependency: Activities do not occur in isolation.
3) Subsystems: Systems can be broken down into smaller subsystems.
4) Organization: Systems consist of organized components that interact
to achieve their function.
5) Change: The state of a system evolves over time.
Variables in a System:
1) Uncontrollable Variables: Fixed inputs (e.g., arrival times, service
times).
2) Controllable Variables: Inputs that can be manipulated (e.g.,
number of servers).
3) Exogenous Variables: Values unaffected by the simulation (e.g.,
arrival intervals).
4) Endogenous Variables: Values determined during the simulation
(e.g., waiting times).
Status Variables: These define the state of the system at any given time
and form the backbone of a simulation model.
Basic Simulation Methodology: Examples
1- The Machine Interference Problem
This problem models machines that operate for a period and then break
down, requiring repair by a single repairman. Machines are served on a
FIFO basis, and the total downtime includes queuing and repair times.
Key Events:
1. Machine Breakdown (Arrival Event): A machine breaks down and
joins the repair queue.
2. Repair Completion (Departure Event): A machine is repaired and
becomes operational.
Shows the time cycle of the machine between start, stop and maintenance.
Represents the queue system where machines are repaired by the repairman.
Shows how a machine failure event is handled and enters the queue.
Shows how a machine repair event is handled and leaves the queue.
Shows the event control process within the simulation, where the next event is determined and the
time state of the system is updated.
Usefulness: These diagrams help in understanding how the simulation runs step by step.
Clocks:
• Each machine has a clock indicating its breakdown time.
• A clock tracks the repair completion time.
• A master clock keeps track of the simulated time.
2- Token-Based Access Scheme
This example simulates a computer network where nodes share a medium
controlled by a token. A node cannot transmit unless it holds the token. The token
visits nodes in a logical sequence, and each node can hold the token for up to T
units of time.
Key Events:
1. Arrival Event: A packet arrives at a queue.
2. Service Completion Event: A packet finishes transmission.
3. Token Arrival Event: The token arrives at a queue.
4. Time-Out Event: The token is surrendered after time T.
Shows a network of nodes connected over a shared medium, where tokens are passed between nodes.
Shows how nodes can be considered as separate queue systems, where the token acts as a server.
Shows how the event of a packet arriving at a particular queue is handled.
Shows how the event of a packet being sent from a particular queue is handled.
Shows how the time allotted for a node to hold a token is handled.
Shows how the token is passed to the next node.
Shows the process of controlling events within the simulation, such as determining the next event
and updating variables.
Clocks:
• Arrival time clocks (ATi) for each queue.
• Departure time clocks (DTi) for each queue.
• Time-out clock (TOUT) for the token.
• Arrival time clock for the token at the next queue (ANH).
3- Two-Stage Manufacturing System
This example models a two-stage manufacturing system:
• Stage 1: An infinite-capacity queue served by a single server.
• Stage 2: A finite-capacity queue served by another server.
If Stage 2's queue is full, Server 1 becomes blocked until space becomes
available. Servers may also break down and require repair.
Key Events:
1. Arrival at Queue 1.
2. Service Completion at Server 1.
3. Service Completion at Server 2.
4. Server Breakdown/Repair Events.
Problems and Assignments
Hand Simulations: Modify parameters such as repair
times, number of repairmen, or breakdown rules for
the examples provided.
Computer Simulations: Write programs to simulate
the examples and print output showing clock values
and status parameters after each event.
Example: Bank Teller Problem
We have a bank where customers arrive at regular intervals, and there is only
one employee providing service. Customers are served in the order they
arrive (FIFO - First-In-First-Out), meaning the first customer to arrive gets
served first.
Given Data:
•A new customer arrives every 5 minutes.
•Each customer requires 3 minutes to complete their service.
•If the employee is busy, the customer waits in the queue.
•We track arrival time, service start time, and service completion time for
each customer.
Step-by-Step Manual Solution Using a Time Table:
The following table shows how the queue changes over time:
Results Analysis:

1) At MC = 2, Customer 1 arrived and was immediately served, finishing at MC


= 5.
2) At MC = 5, Customer 2 arrived and was served immediately, finishing at MC
= 8.
3) At MC = 7, Customer 3 arrived but had to wait because the employee was busy
with Customer 2.
4) At MC = 8, Customer 3 was served after Customer 2 finished, completing
service at MC = 11.
5) At MC = 10, Customer 4 arrived but had to wait for Customer 3 to finish
service at MC = 11.
Initiate simulation

Arrival Next Departure


event

MC=CLi MC=CL4

n=0 No n=n+1 n =n-1

yes
yes
n =0 R =0
R=1
No

CL4=MC+3
CL4=MC+3 A
CLi=MC+5
A

You might also like