Simulation and Modelling notes
Steps in a simulation Study:
Chapter 6: Queueing Models
1. What is a Queueing Model?
A queueing model represents a system where customers (entities) wait in a line (queue)
for service.
Examples: Banks, hospitals, traffic systems, and computer networks.
2. Components of a Queueing System
Customers: People, machines, orders, vehicles, etc.
Servers: Clerks, CPUs, repair technicians, etc.
Calling Population: The source of arriving customers (finite or infinite).
System Capacity: The maximum number of customers the system can handle.
Queue Discipline: The rule used to determine service order (FIFO, LIFO, Priority, etc.).
3. Types of Queueing Systems
Finite vs. Infinite Population: A finite system has a limited number of potential arrivals.
Single-Server vs. Multi-Server: One or multiple servers provide service to customers.
Balking, Reneging, and Jockeying:
o Balking: Customer leaves after seeing a long queue.
o Reneging: Customer waits but leaves after some time.
o Jockeying: Customer switches between queues.
4. Queueing Notation (Kendall’s Notation)
Format: A/B/c/N/K
o A: Arrival process (M = Markovian/exponential, D = Deterministic, G = General)
o B: Service time distribution
o c: Number of servers
o N: System capacity
o K: Population size
Example: M/M/1 (Single-server queue with Poisson arrivals and exponential service
time)
5. Performance Measures
L: Average number of customers in the system.
LQ: Average number of customers in the queue.
W: Average time spent in the system.
WQ: Average time spent in the queue.
ρ (Utilization Factor): Probability that a server is busy.
6. Little’s Law
L = λW: States that the average number of customers in the system (L) is equal to the
arrival rate (λ) multiplied by the average time spent in the system (W).
Chapter 7: Random-Number Generation
1. What are Random Numbers?
Used in simulation to model unpredictable events.
Should be uniformly distributed (between 0 and 1) and independent (no pattern).
2. Pseudo-Random Numbers
Computer-generated numbers that appear random but follow a pattern.
Generated using mathematical formulas (deterministic).
3. Properties of Good Random Numbers
1. Uniformity – Each number should be equally likely.
2. Independence – No predictable pattern.
3. Long Period – Should not repeat quickly.
4. Fast & Efficient Generation – Needed for large simulations.
4. Methods for Generating Random Numbers
Linear Congruential Method (LCM): Formula: Xn+1 = (aXn + c) mod m
Combined Linear Congruential Generators: Improves the period and randomness by
combining multiple LCMs.
5. Testing Random Numbers
Uniformity Tests:
o Chi-Square Test: Checks if numbers follow a uniform distribution.
o Kolmogorov-Smirnov Test: Compares the generated numbers to an ideal
uniform distribution.
Independence Tests:
o Autocorrelation Test: Checks if current numbers depend on previous ones.
6. Random-Number Streams
A stream is a separate sequence of random numbers.
Used to ensure repeatability and control randomness in different parts of a simulation.
Components of a System:
1. Entity – The main object being studied.
Example: Jobs in a manufacturing line.
2. Attribute – A property of an entity.
Example: Job priority or processing time.
3. Activity – A process an entity undergoes.
Example: A job being processed on a machine.
4. State – The system's current condition.
Example: Number of jobs in the queue.
5. Event – An action that changes the state.
Example: A new job arriving or a task completion.