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

Gpss (Part II) : Block Statements

There are three main examples described in the document: 1) A cafeteria simulation where customers arrive and are served either hot food or sandwiches and then sit down to eat before leaving. 2) A beauty parlor simulation where customers arrive for hair services like cuts, dyeing, washing and styling using shared resources like hairdressers, wash basins and dryers before paying and leaving. 3) A switching center simulation where messages are generated and sent to one of two destinations (D1 or D2) through a main line and then individual lines while queues track waiting at different stages.

Uploaded by

Pravin C-restha
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 views3 pages

Gpss (Part II) : Block Statements

There are three main examples described in the document: 1) A cafeteria simulation where customers arrive and are served either hot food or sandwiches and then sit down to eat before leaving. 2) A beauty parlor simulation where customers arrive for hair services like cuts, dyeing, washing and styling using shared resources like hairdressers, wash basins and dryers before paying and leaving. 3) A switching center simulation where messages are generated and sent to one of two destinations (D1 or D2) through a main line and then individual lines while queues track waiting at different stages.

Uploaded by

Pravin C-restha
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/ 3

Block Statements

 SEIZE A and RELEASE A


a facility may be engaged by only one Xact at a time
GPSS 

 SEIZE engages facility


(Part II)  RELEASE disengages facility

 A operand specifies entity


Discrete Event Simulation
2005- 2006 Fall Term A

Prof. Dr. Nadir Yücel, Asst. Prof. Dr. A. Şima Uyar A

SEIZE RELEASE

Example Block Statements


 ENTER A,B and RELEASE A,B
 Modify the previous example using facilities:  a storage may be engaged by more than one Xact at a time
 has capacity
there is only 1 inspector  ENTER allows Xact to occupy space in storage
 LEAVE allows Xact to give up its space in storage
GENERATE 5
 A operand specifies storage, B specifies amount of capacity
SEIZE Insp units that will be occupied/freed
ADVANCE 4,3
RELEASE Insp
TRANSFER 0.1,Acc,Rej
A,B
Acc TERMINATE 1
Rej TERMINATE 1
A,B
START 1000
ENTER RELEASE

Example Block Statements


 QUEUE A and DEPART A
 Modify the previous example using storages:  for gathering queue statistics
 A operand specifies queue
there are 3 inspectors  QUEUE increases queue
GENERATE 5
 DEPART decreases queue
ENTER Ins,1
 program measures average/maximum queue lengths,
distribution of waiting time, etc
ADVANCE 4,3
LEAVE Ins,1
TRANSFER 0.1,Acc,Rej
A
Acc TERMINATE 1
Rej TERMINATE 1
A
Ins STORAGE 3 START 1000
QUEUE DEPART

1
Example Cafeteria Example
 Modify the previous example using storages and People arrive at a cafeteria with an interarrival time of 10±5
seconds. There are two serving areas: one for hot food and the
keeping queue statistics: there are 3 inspectors other for sandwiches. The hot food area is selected by 80% of
GENERATE 5
the customers and it has 6 servers. The sandwich area is selected
QUEUE Insq
by the remaining 20% of the customers and has only one server.
ENTER Ins,1
Hot food takes 1 minute to serve and sandwiches take ½
DEPART Insq
minutes. When they have been served, the customers move into
ADVANCE 4,3
the seating part of the cafeteria which has a seating capacity for
LEAVE Ins,1
200 people. The average time for eating hot food is 30 ±10
TRANSFER 0.1,Acc,Rej
minute and for a sandwich it is 15 ±5 minutes. When they have
Acc TERMINATE 1
finished eating, they leave the seating area and the cafeteria.
Rej TERMINATE 1
Measure the queues for service and simulate the system for 1000
START 1000 people to finish their meal and leave.
Ins STORAGE 3

Cafeteria Example Beauty Parlor Example


(base time unit is 1 minute)

In a beauty parlor, customers arrive with an interarrival rate of 10 ±5 minutes.


70% of the customers want their hair cut, washed and styled. The rest of the
Hf QUEUE Hfq customers want their hir dyed, washed and styled. There are 3 hairdressers
GENERATE 0.167,0.084
TRANSFER 0.8,Sw,Hf
ENTER Hfs,1 who can cut hair and 2 who can dye hair. There ae only two wash basins and
DEPART Hfq 2 hairdryers to be used in styling. After their hair is done, customers pay at the
Sw QUEUE Swq desk before they leave but there is only one desk and payment takes about
ADVANCE 1
ENTER Sws,1 3±1 minutes. Simulate the system for 200 customers to get serviced and leave
LEAVE Hfs,1
DEPART Swq
QUEUE Stq the beauty parlor. Measure the queues for statistics. (Note: When a hairdresser
ADVANCE 0.5 starts servig a customer, he completes the service for that customer before
ENTER St,1 starting a new one.) Average required times for each activity is given below:
LEAVE Sws,1
DEPART Stq
QUEUE Stq hair drying: 10±5 minutes
ADVANCE 30,10
ENTER St,1
LEAVE St,1 hair dyeing: 35±5 minutes
DEPART Stq hair washing: 5±1 minutes
TERMINATE 1
ADVANCE 15,5 hair styling: 15±5 minutes
Sws STORAGE 1
LEAVE St,1
Hfs STORAGE 6
TERMINATE 1
St STORAGE 200

START 1000

Switching Center Example Switching Center Example


(base time unit is 1 second)

Messages are being generated at the rate of every 7±3 seconds.


They are to be trasmitted to D1 with probability 0.7 and to D2 D2 QUEUE D2lq
with probability 0.3. All messages are first sent by a single main GENERATE 7,3
SEIZE D2l
line to a switching center, which then passes them onto their QUEUE Mlq
DEPART D2lq
final destinations (D1 or D2) by way of individual lines. Only SEIZE Mln
LEAVE Sw,1
one message cn be on any of the lines at a given time. There may DEPART Mlq
ADVANCE 11,9
be only a maximum of 300 messages in the switching center, ADVANCE 5.5,4.5
RELEASE D2l
RELEASE Mln
awaiting a free line. If a 301th message arrives, it is discarded TERMINATE1
TRANSFER Both,Swc,Go
from the system. The messages are uniformly distributed in size Swc ENTER Sw,1
Go TERMINATE 0
from 10 to 100 characters. The main line can send messages at TRANSFER 0.7,D2,D1
Sw STORAGE 300
the rate of 10 characters per second while the other two lines D1 QUEUE D1lq
send them at a rate of 5 characters per second. Simulate the SEIZE D1l
transmission of 1000 messages and measure the queues for DEPART D1lq
service. LEAVE Sw,1
ADVANCE 11,9 START 1000
RELEASE D1l
TERMINATE1

2
Manufacturing Shop Example Revisited
wish to simulate system for T time units and not for k Xacts to finish a service,
for example simulate for 8 hours (base time unit is 1 minute)

GENERATE 5
QUEUE Insq
ENTER Ins,1
DEPART Insq
ADVANCE 4,3
LEAVE Ins,1
TRANSFER 0.1,Acc,Rej
Acc TERMINATE 0
Rej TERMINATE 0
GENERATE 480
TERMINATE 1
Ins STORAGE 3
START 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy