4 Discrete Event Simulation And Gpss

Simulation and Modeling · Unit 4

Discrete Event Simulation and GPSS

Exam-focused notes for Discrete Event Simulation and GPSS (Simulation and Modeling, BIT407): what the TU syllabus asks and how it has actually been tested, with 1 solved past questions from this unit.

Discrete Event Simulation and GPSS in short

In a discrete event simulation, the system state changes only when an event happens, such as a call arriving or ending. GPSS is a language made for this kind of model, and it is well suited to queues and telephone systems.

Discrete Event Simulation and GPSS: notes

Discrete event simulation principles

In discrete event simulation, time does not move in small steps. The clock jumps from one event to the next event. Nothing changes between two events, so no time is wasted.

Main parts of the model:

  • Entities: the things that move through the system, such as calls or customers.
  • Events: the points in time at which the state changes.
  • Event list: a list of future events, kept in time order.
  • Clock: the current simulation time.
  • Statistics: the counters that measure waiting time, queue length, and so on.

The simulation loop works as follows. Remove the earliest event from the list. Move the clock to its time. Run the event, which may add new events to the list. Repeat until the end time is reached.

Example: the first call arrives at time 2 and ends at time 9. The clock goes from 0 to 2, then from 2 to 9. Times 3 to 8 are skipped because nothing happens.

GPSS language and symbols

GPSS means General Purpose Simulation System. It was written at IBM for modelling queues and flows. A model is a flow chart of blocks. Moving objects called transactions travel from block to block.

Common blocks:

BlockMeaning
GENERATECreates transactions, such as arriving calls
TERMINATERemoves a transaction from the model
QUEUEStarts to measure a waiting line
DEPARTEnds the measurement when the transaction leaves the line
SEIZETakes a facility, which is a single server
RELEASEFrees the facility
ADVANCEHolds a transaction for a service or delay time
ENTERTakes space from a storage, which is a group of servers
LEAVEGives the space back to the storage
TRANSFERSends a transaction to another block

How the blocks work:

  • GENERATE 5,2 makes a transaction every 5 time units, plus or minus 2. The gap is uniform from 3 to 7.
  • ADVANCE 10,4 holds the transaction for a time from 6 to 14, with mean 10.
  • If a facility is busy, the transaction waits at the SEIZE block until it is free.
  • A QUEUE block must be paired with a DEPART block of the same name.
  • The model ends when the termination counter reaches zero.

A single server shop looks like this:

       GENERATE  10,4
       QUEUE     LINE
       SEIZE     CLERK
       DEPART    LINE
       ADVANCE   8,3
       RELEASE   CLERK
       TERMINATE 1
       START     100

GPSS collects the statistics for queues, facilities, and storages by itself.

What this unit covers

  • Discrete event simulation principles
  • GPSS language and symbols
  • Arrival patterns in simulation
  • Telephone system simulation using GPSS
  • Discrete system modeling examples

Arrival patterns in simulation

0 · 10 marks

What is arrival pattern in simulation? Describe the how telephone system can be simulated using GPSS symbols.[10]

Show solved answer

Model Answer: Arrival Pattern in Simulation and Telephone System Simulation in GPSS

Part 1: Arrival Pattern in Simulation

Definition: An arrival pattern in simulation refers to the sequence and timing at which entities (customers, jobs, calls, etc.) enter a system. It describes how frequently and at what intervals new entities arrive into the system being modeled.

Key Characteristics of Arrival Patterns:

  1. Deterministic Arrival: Entities arrive at fixed, predictable intervals (e.g., every 5 minutes)

  2. Stochastic/Random Arrival: Entities arrive randomly following a probability distribution:

    • Poisson distribution (most common for real-world systems)
    • Exponential distribution (inter-arrival times)
    • Normal distribution
    • Uniform distribution
  3. Arrival Rate: The average number of arrivals per unit time (λ)

  4. Inter-arrival Time: The time between consecutive arrivals

Importance:

  • Determines system load and congestion
  • Affects queue length and waiting times
  • Critical for accurate system performance prediction

Part 2: Telephone System Simulation Using GPSS Symbols

Overview: A telephone system can be modeled in GPSS where calls are transactions, telephone lines are servers, and switching equipment represents service facilities.

GPSS Symbols and Their Application:

GPSS SymbolTelephone System EquivalentFunction
GENERATECall arrival sourceCreates incoming calls at specified intervals
QUEUEWaiting line/bufferHolds calls waiting for available lines
SEIZETelephone line allocationAllocates an available telephone line to a call
DEPARTExit from queueCall leaves the waiting queue
ADVANCECall durationSimulates the time call is in progress
RELEASELine releaseFrees the telephone line after call ends
TERMINATECall endRemoves call from system
FACILITYTelephone line/trunkResource representing available lines

Basic Telephone System Model Structure:

GENERATE    A,B,C,D,E
            (Calls arrive with mean A, spread B)
            
QUEUE       WAITLINE
            (Calls queue if no lines available)
            
SEIZE       TRUNK
            (Allocate a telephone line)
            
DEPART      WAITLINE
            (Leave the queue)
            
ADVANCE     X,Y
            (Call duration: mean X, spread Y)
            
RELEASE     TRUNK
            (Free the telephone line)
            
TERMINATE   1
            (End the call transaction)

Example Scenario:

  • Calls arrive following Poisson distribution (mean 10 calls/hour)
  • System has 5 telephone lines (FACILITY: TRUNK, capacity 5)
  • Average call duration: 3 minutes
  • Calls unable to get a line wait in queue
  • Simulation tracks: queue length, line utilization, call blocking probability

Key Metrics Collected:

  • Average queue length
  • Average waiting time
  • Facility utilization (line occupancy)
  • Call blocking rate
  • System throughput

This GPSS model allows telephone system designers to optimize the number of lines needed to maintain acceptable service levels.

Open this answer on its own page →