Gpss
Gpss
INTRODUCTION
TO GPSS
9-1
GPSS Programs
The General Purpose Simulation System language' has been developed over
many years. principally by the IBM Corporation. Originally published in 1961 (2),
it has evolved through sEveral versions (I), 5),(4), to the latest version, (3). It has
been implemented on several different manufacturers machines, and there
are
variations in the different implementations. With regard to the successive IBM
versions of the language, all but GPSS/360 and GPSS V, are obsolete. Of the two
current versions, GPSS/360 models can operate with GPSS V, with some minor
exceptions and modiñcations. GPSS V, however, is more powerful and has more
language statements and facilities. The differences are described in Appendix 7 of
3). If these extensions are avoided, GPSS V models will run under
The description given in this and the next GPSS/360.
chapter will be of GPSS V as imple
ented by the IBM
Corporation, (6), (, (8). Some of the more significant differ
ences between GPSS/360 and GPSS V will be noted. For simplicity, the language
will be called GPSS, except where comparisons are being made.
in earlier ersions of the
program, GPSS stood for General Purpose System Simulation.
197
i iuiasska
Introduction to GPSS | Ch.9
198
9-2
General Description
described as a block diagram in which
The system to be simulated in GPSS is
the blocks indicate the sequence
the blocks represent the activities, and lines joining
there is a choice ofl activities, more
in which the activities can be executed. Where
for the choice is stated at the block.
than one line leaves a block and the condition
is, of course, very familiar.
The use of block diagrams to describe systems
However, the form taken by a block diagram
description usually depends upon the
on this
person drawing the block diagram.
To base a programming language
meaning. The approach
descriptive method, each block must be given precise
a
the block diagrams drawn in this chapterwill name the block types, although thisis
not usually done by a programmer familiar
with GPSS. Coding instructions for all
in Table 9-1. Table 9-2
the described block types are similarly brought together
number of data fields. As
describes the control statements. Each block type has a
the blocks are described, the fields will be referred to as field A, B, C, and so on,
reflecting the order in which they are specified.
Moving through the system being simulated are entities that depend upon the
nature of the system. For example, a communication system is concerned with the
movement of messages, a road transportation system with motor vehicles, a data
processing system with records, and so on. In the simulation, these entities are
called transactions. The sequence of events in real time is reflected in the movement
of transactions from block to block in simulated time.
Transactions are created at one or more GENERATE blocks and are removed
from the simulation at TERMINATE blocks. There can be many transactions
simultaneously moving through the block diagram. Each transaction is always
posiioned at a block and most blocks can hold many transactions simultaneously.
The dransfer of a transaction from one block to another occurs instantaneously at a
specific time or when some change of system condition occurs.
A GPSS block diagram can consist of many blocks up to some limit prescribed
by the program (usually set to 1,000). An identification number called a location is
given to each block, and the movement of transactions is usually from one block to
the block with the next highest location. The locations are assigned automatically
by an assembly program within GPSS so that, when a problem is coded, the blocks
A. B
ADVANCE
A
LINK
SEIZE
A, B. C, D
X
B
B See
Table 10-2
GATE QUEUE TRANSFER
A, B
D
c. D.E
GENERATE RELEASE UNLINK
A. B.C
LEAVE SAVEVALUE
199
PSS
Operation C D F
201
TABLE1 GPSS Centrol
Location Operation A
B D
CLEAR
END
are listed in sequential order. Blocks that need to be identified in the programming
of problems (for example, as points to which a transfer is to be made) are given a
symbolic name. The assembly program will associate the name with the appropriate
location. Symbolic names of blocks and other entities of the program must be from
three to five non-blank characters of which the first three must be letters.
9-3
Action Times
Clock time is represented by an integral number, with the interval of real time
corresponding to a unit of time chosen by the program user. The unit of time is not
specifically stated but is implied by giving all times in terms of the same unit. One
block type called ADVANCE is concerned with representing the expenditure oftime.
The program computes an interval of time called an action time for each transaction
as it enters an ADVANCE block, and the transaction remains at the block for this
interval of simulated time before attempting to proceed. The only other block type
that employs action time is the GENERATE block, which creates transactions. The
action time at the GENERATE block controls the interval betweensucessivearrivals
of transactions.
The action time may be a fîxed interval (including zero) or a random variable,
and it caa be made to depend upon conditions in the system in various ways. An
GPSS/360 allows up to 100 parameters of either halfword or fullword size (but not both)
to be specified. If no speciñic assignment is made, 12 halfword parameters are assumed
Sec. 9-5 /Choice of Paths
203
fields are needed, the flag attached to the symbol for the GENERATE block, shown
in Fig. 9-1, is dropped.
9-4
Succession of Events
The program maintains records of when each transaction in the system is due to
move. It proceeds by completing all movements that are scheduled for execution
at a particular instant of time and that can logically be performed. Where there is
more than one transaction due to move, the program processes transactions in the
order of their priority class, and on a first-come, first-served basis within priority
class.
Normally, a transaction spends no time at a block other than at an ADVANCE
block. Once the program has begun moving a transaction, therefore, it continues to
move the transaction through the block diagram until one of several circumstances
arises. The transaction may enter an ADVANCE block with a non-zero action time,
in which case, the program will turn its attention to other transactions in the system
and return to that transaction when the action time has been expended. Secondly,
the conditions in the system may be such that the action the transaction is attempt-
ing to execute by entering a block cannot be performed at the current time. The
transaction is said to be blocked and it remains at the block it last entered. The
program will automatically detect when the blocking condition has been removed
and will start to move the transaction again at that time. A third possibility is that
the transaction enters a TERMINATE block, in which case it is removed from the
9-5
Choice of Paths
The TRANSFER block allows some location other than the next sequential
location to be selected. The choice is normally between two blocks referred to as
next blocks A and B (the terms exits I and 2 are also used). The method used for
The only other block type that can destroy a transaction is the ASSEM8LE block, which
waits for a specified number of transaction copies that were created at a SPLIT block to arrive
before allowing one copy to proceed while the rest are destroyed. See footnote 2, this chapter.
itigitit
Introduction to GPSS Ch.9
204
event of simultaneity.
9-6
Simulation of a Manufacturing Shop
described so far, consider the foilowing
To illustrate the features of the program
is turning out parts at
example. A machine tool in a manufacturing shop
simple to an inspector,
are finished, the parts go
the rate of one every 5 minutes. As they
about 10% of the parts.
who takes 4 3 minutes to examine each one and rejects
and the time unit selected for the
Each part will be represented by one transaction,
problem will be 1 minute.
is shown in Fig. 9-2. The usual
A block diagram representing the system
GENERATE 5. 0
ADVANCE 4.3
TRANSFER 0.
ACC REJ
TERMINATE
convention used in
drawing blocks is to place the block
the top of the block; the action time is indicated
location (where needed) at
in the center in the form T= a,
where a is the mean and b is the modifier; and the b
bottom of the block. selection factor is placed at the
A GENERATE Block is used to
represent the output of the machine by
one transaction
every five units of time. An creating
ADVANCE block with a mean of 4 and
modifier of 3 is used to represent inspection. The time spent on inspection will
therefore be any one of the values 1, 2, 3, 4, 5, 6, or 7, with
to cach vaiue. Upon completion of the
equal probability given
inspection, transactions go to a TRANSFER
block with a selection factor of 0.1, so that 90%
of the parts go to the next location
(exit 1) calied ACC, to represent accepted parts and 10% go to another location
(exit 2) called REJ to represent rejects. Since there is no further interest in
following
the history of the parts in this simulation, both locations reached from the
TRANSFER block are TERMINATE blocks.
The problem can be coded in a fixed format, as shown in Fig. 9-3. Column I iss
only used for a comment card. An in column i results in the statement being
printed in the output only. A field from columns 2 to 6 contains the location of the
block where it is necessary for it to be specified. The GPSS program will automat-
ically assign sequential location numbers as it reads the statements, so it is not
AMEASNRIMAsMorMoDEL
GENERAT ATEPART
ADvANCE
RANSFER AAGCE 5ELECT REJECTS
ACC.TERMINATE ACCEPTEO PARTS
REJTE,RMIAATE, . REJECTED PARTS
S.TART g0
CROSS-REF ER ENCE
BLOCKS
SYMBOL NUMBER REFERENCES
ACC
REJ
SIMULATE
GENERATE
ADVANCE ,3
TRANSFER 100,4,5
TERMINATE 1
TERMINATE 1
START 1000
The problem input is printed first, with the locations assigned by the program
isted to the left, and a sequential statement number on the right. A table of
symbolic locations is then given showing the locations assigned to each symbol. To
help the user, the number of the statements that refer to that symbol are also given.
A listing of the assembled problem then follows with all symbolic references
Teplaced by numbers.
The first line of output following the listings gives the timo at waich the simula-
tion stopped. The meaning of the absolute and relative times, which in this case
have the same value, will be explained in Sec. 9-10. The time is followed by a listing
of block counts. Two numbers are shown for each block of the model. On the left
Introduction to GPSS Ch. 9
208
Is a count of how many transactions were in the block at the time the simulation
stopped, and on the right is a figure showing the total number of transactions that
entered the block during the simulation. The results show that the total counts at
blocks 4 and 5 were 888 and 112 respectively, showing that of the 1,000 parts
inspected, 88.8 were accepted and 11.2% were rejected. In the present example,
this is the only output given. Other types of output will be described as more details
9-7
Facilities and Storages
Associated with the system being simulated are many permanent entities, such
as items of equipment, which operate on the transactions. Two types of permanent
entities are defined in GPSS to represent system equipment.
A facility is defined as an entity that can be engaged by a single transaction at a
time. A storage is defined as an entity that can be occupied by many transactions at
a time, up to some predetermined limit. A transaction controlling a facility, how
ever, can be interrupted or preempted by another transaction. In addition, both
facilities and storages can be made unavailable, as would occur if the equipment
they represent breaks down, and can be made available again, as occurs when a
repair has been made.
There can be many instances of each type of entity to a limit set by the program
(usually 300). Individual entities are identified by number, a separate number
sequence being used for each type. The number 0 for these, and all other GPSS
entities, is illegal. The user may assign the numbers, in any order, or he may use
symbolie names and let the assembly program assign the numbers. Some examples
of how the system entities might be interpreted in different systems are:
Sec. 9-7 / Facilities and Storages 209
A trunk means a cable, consisting of many wires, which can carry several messages
simultaneously and is therefore represented by a storage. A switch in this case is
assumed to pass only one message at a time and is represented by a facility.
Figure 9-1 shows four block types, SEIZE, RELEASE, ENTER, and LEAVE,
concerned with using facilities and storages. Field A in each case indicates which
facility or storage is intended, and the choice is usually marked in the fag attached
to the symbols of the blocks. The SEIZE block allows a transaction to engage a
storages.
To illustrate the use of these block types, consider again the manufacturing8
inspection time is 4 minutes and the
shop discussed before. Since the average
average generation rate of parts is one every 5 minutes, there will normally be only
one part inspected at a time. Occasionally, however, a new part can arrive before
the previous part has completed its inspection. With the diagram of Fig. 9-2, this
situation will result in more than one transaction being at the ADVANCE block at
one time, and the simulation must be interpreted as meaning that more than one
inspector is available.
inspector, it is necessary to represent the
Assuming that there is only one
inspector by a facility, to simulate the fact that only one part at a time can be
inspected. The block diagram will then appear as shown in Fig. 9-5. A SEIZE
block and a RELEASE block have been added to simulate the engaging and
disengaging of the inspector.
Coding and results for this model are given in Fig. 9-6. A line of output is given
for each facility, showing how many times it was seized, the average utilization
made of the facility, and the average time transactions held the facility. In this case,
ne results show that the inspector was busy for 73.5% of his time.
GENERATE s.0
SEIZE
ADVANCE 4,3
RELEASE
TRANSFER
ACC REJ
TERMINATE
PACILITIS
STORAGESs
9-8
Gathering Statistics
Certain block types in GPSS are constructed for the purpose of gathering
statistics about the system performance, rather than of representing system actions.
The QUEUE, DEPART, MARK, and TABULATE blocks shown in Fig. 9-1 serve
this purpose. They introduce two other entities of the GPSS program, queues and
tables. As with facilities and storages, there can be many such entities up to a
tables) and they indi-
queues and 100 for
are
prescribed limit (usually, 300 for
vidually identified by a number or symbolic name.
When the conditions for advancing a transaction are not satisfied, several
transactions may be kept waiting at a block. When the conditions are favorable,
first
they are allowed to move on, according to priority and usually by first-in,
a
In GPSS/360, only the parameter number is given. With parameters, more than one mar
timecan be carried, allowing transit times for
overlapping periods to be carried.
Sec.9-8/ Gathering Statistics
213
A more realistic situation is that parts will
hench if inspectiondoes not finish accumulate on the inspectors'
work
quickly enough. In that case, it would be of
interest to measure the size of the queue of
work that occurs. This can be done as
shown in Fig. 9-8, which expands
upon model 3. A
number 1 is placed immediately before the ENTER QUEUE block using queue
placed immediately after the ENTER block to removeblock, and a DEPART block
the part from the queue when
GENERATE 5.0
Pou
QUEUE
Po OF ENoH
ENTER
ATNAGAR EB
DEPART
MARK
ADVANCE 12.9
LEAVE
TA3ULATE
TRANSFER
ACC REJ
TERMINATE D
CREATE PARTS
GENERATE 5
QUEUE FOR AN INSPECTOR
EUE GET AN I:NSPECTOR
LNTER LEAVE QUEUE
DEPAR?
MARK 1NS FECT
12,9
ADVANCE FREE INSPECTOR
LEAVE 1EASURE TRANSIT TIME
TADULATE 1
1,ACC,PEEJ SELECT REJECTS
7RANSFER NCCEPTED PARTTS
'TER1INATE 1
ACC REJECTED PARTS
"'RIINATE 1
REJ
:UMBER OF INSPECTORS
SORAGE 3 TADULATION INTERVALS
TABLE 41,5,5,1
UN FOR 1000 PARTS
START 1000
s005 AbsoLUTC CLOCK 5005
RELATIVL CLOCK
BLOCK OOu.*TS BLOCK CURRENT TOTAL
TOTAL
sLOCK CURRENT
1000
108
1Uu
1 000
1000
1000
100
1000
1000
10v
892
STORAGES
9UEUES
TABLES
5RUD
PREQUENCY
PRCENT
OF TOTAL CUNULATIVE CUMU LATIVE ULTIPLE DEVTATN
F R EA"
PERCENThGL REAINDER OF MEAN
54 15.39 ,235
15.3 4.5 417
60 35.99 363
41,. 58. 6 4
2v 25.09 67.0 32. 1.251 555
9,49 96.5 1.669 1,47
J, 39 2.397
kiMAINIG 100,0 2.os6
PRLgULNCIES ARE ALLL ZERO
acnection begins. Any transaction that does not have to wait for an inspector to
hecome available will move through the queue without delay. Those that must wait
will do so in the OUEUE block," and the program will automatically measure the
length of stay in the queue. Figure 9-8 also shows a MARK and a TABULATE block
nlaced so that they will measure how long the parts take to be inspected. excluding
their waiting time in the queue. If the MARK block is omitted, the tabulated time
is the time since the transactions first entered the system.
Coding for this model, together with results, is shown in Fig. 9-9. Note that
another control statement, called TABLE, has been introduced. In the location
field, it identifies a table; and, in the A field, it indicates the quantity to be tabulated.
In the B, C, and D fields of the TABLE statement are the lower limit of the table, the
tabulation interval size, and the number of intervals, respectively. The definitions
of these terms are the same as those introduced in Sec. 8-10 and illustrated in Fig.
8-13. The symbol M1 in field A of the TABLE card indicates transit time tabulation
It will be seen in Fig. 9-9 that a line of output occurs for each queue, and a
table is printed in accordance with the speciñcations of the TABLE statement. The
TABULATE blocks can be used to gather a variety of other statistics, as will be
explained in Sec. 10-2.
9-9
Conditional Transfers
As a last example in this chapter, we illustrate the use of bth the conditional
and unconditional transfer modes of the TRANSFER block. Consider again the
case of three inspectors but suppose that the manufactured parts are put on a
conveyor, which carries the parts past inspectors, placed at intervals along the
conveyor. It takes 2 minutes for a part to reach the first inspeçtor; if he is free at the
time the part arrives, he takes it for inspection. If he is busy at that uime, the part
takes a further 2 minutes to reach the second inspector who will take the part if he
is not busy. Parts that pass the second inspector may get picked up by the third
inspector, who is a further 2 minutes along the conveyor belt; otherwise. they are
lost. To keep the model small, only the transit time of the parts will be recorded
and the possibility of the inspectors rejecting parts will be ignared.
A block diagram for the system is shown in Fig. 9-10. The movement of pirts
along the conveyor is represented by ADVANCE blocks. cach with an action time
of 2 minutes. As a transaction leaves an ADVANCE block, it tests whether an
nspector is available by entering a TRANSFER block with a selection factor set
The transaction does not have to s , in the QUEUE block in order to stay tn the queue.
ntroduction to GP$S I Ch.g
216
TRANSFER
blocks leads to a SEIZE bloeb
each of these
8OTH. Exit 1 of is free at the time thetran
of the inspectors.
If the inspector
take over the
exit 1 to tak
nsaction
senting one
t r a n s a c t i o n will
leave by way of facility. the
enters, the to the nextstage of
processine
the transaction will pass ay of
inspector is busy,
exit 2. to a single TABULATEblock
inspection, the transactions go
When parts finish Because of the rule by which transacti
ns
time is recorded.
where the transit
5,0
2.0
CONV2 CONV3
CONV1 20 BOTH
BOTH 20
12.
29
129
TAB
normally pass from one block to the next higher numbered block, only one of the
three RELEASE blocks that complete the inspection phase is able to pass the
transactions directly to the TABULATE block. The others pass the transactions to
TRANSFER blocks that send the transactions unconditionally to the TABULATE
block. It would be possible to have three separate TABULATE bioeks at
the exitof
each RELEASE bloCk, making the unconditional TRANSFER blocks unnecessary.
Fach TABULATE block can refer to the same table number, so that the two alterna-
tive ways of drawing the block diagram will lead to exactly the same statistics. This
principle-allowing the same GPSS entity to be referred to in more than one place
-applies to all entities.
Coding and results for the problem are shown in Fig. 9-11. An explanation of
the extra START statement shown in the coding will be given in the next section.
Note how the rule for normally moving transactions to successively mumbered
blocks causes the coding to be broken into several parts. Breaks are caused by both
the unconditional TRANSFER and the conditional TRANSFER blocks. A way of
simplifying block diagrams, such as this one, that have repetitive segments will be
discussed in Sec. 10-8.
9-10
Program Control Statements
The first statement of the GPSS input is a control statement with the word
SIMULATE in the operation field. Without this statement, the problem will be
assembled but not executed.
It is desirable to be able to stop and restart a simulation run and also repeat a
Simulation run with changes to some of the values in the model. When a GPSS
simuiation run is finished, therefore, the program does not immediately destroy the
model. Instead, it looks for more input following the START Statement, keeping
the model exactly as it was at the completion of the run. input following the
START statement can change the model. For example, a storage capacity could be
redefined by inserting a STORAGE statement that refers to the number of a
previously defined storage and gives the new value. The model could also be modi-
fed by changing existing blocks or addingg new blocks. When all such modifications
been read and the model is ready for rerunning another START statement will
nave
instruct the program to begin simulation again.
Certain control statements can be included between START statements to set
the conditions under which the rerun is made. A statement with the singie word
ESET in the operation field will wipe out all the statistics gathered so tar, but will
leave the system loaded with transactions. The purpose is to gather statistics in the
second run with the initial build-up period excluded. The output of the first run is
MODEL 5
MANUPACTURING SHOP
GENERATE CREATE PARTS
P1ACE ON CONVEYOR
ADVANCE MOVE TO PIRST INS PRCTOR
TRANSFER aOTH,,CONV1 G E T P I R S T INSPECTOR
SEIZE
ADVANCE 12,9 INSPECT
PREE INSPECTOR
RELEASE MEASURE TRANSIT TIME
TA TABULATE
TERMINATE 1
PLACR ON CONVEYOR
cOwV1 ADVANCE 2
SECOND IMSPECTOR
10 TRANSFER BOTH,,CONV2 MOVE TO ND INB PECTOR
SEI ZE 2 SECO
GET
INS PECT
ADVANCB 12,9 FREB INSPBCTOR
RELEASE
TRANSFER TAR
PLACE ON CONVEYOR
cONV2 ADVANCE 2
TRANSFEER BOTH,,CONV2 MOWE TO THIRD INBPECTOR
GET THID INSPECTOR
7 J
SBIZE
ADVANCE 12,9 INSPEC
FREE INSPPC TOR
9 RELEASE 3
20 TRANSFER TAB
21 cONV3 TERMI NATE
TABULATION INTERVALS
TABLE M1,5,5,100
INITIALIZE WITH TEN PARTS
START 10,NP
RESET
START 1000 MAIN RUN
FACILITIES
CABLES
TABLE
ESTRIES IN TABLE MEAN ARGUMENT sTANDARD
100 DEVIATION SUN OF ARGUMENES
15.693 5.757 13694.000
UPPER OBSERVED PER CENT CUMULATIVE CUMULATIVE MULTIPLE D2VIATION
LIHIT PREQUEMCY OP TOTAl
PERCENTAGE REMAINDER NEAN FROM NEAN
27
97.2 318
20.19 988
69 6.9 4.7
248 50.2 -.12
24,79 97.3 1.6
. 59 190,0 2.6 1.592
1,911 2.484
AEMAIAIG FREQU ENCIES ARE AL ERO
218
Sec.9-10/ Program Control Statements 219
not then of interest and is usually suppressed by putting the letters NP in the B field
of the START statement. This procedure has been followed in the simulation shown
in Fig. 9-11. One START statement has run the model for a total of 10 completed
transactions, and the output of this run has been suppressed. A RESET statem. *nt
has wiped out the statistics gathered in that run; the second START statement has
restarted the simulation from the point at which the tenth transaction finished and
has continued for a further 1,000 transactions. The results shown are the statistics
gathered during the second run.
The RESET statement also sets to zero a relative clock. When the run is com
pleted, the output marked ABSOLUTE CLOCK gives the time since the run
last RESET
began; the output marked RELATIVE CLOCK gives the time since the
statement. Ifthe RESET statement is not used. the two times are the same.
Another control statement, CLEAR, would not only wipe out the statistics of
but would also that,
wipe out the transactions in the system; so
the preceding run,
the rerun does in fact start the simulation from the beginning. This procedure
in
would be followed when the objective is to repeat the problem with change
a
START
CLEAR
START
SIMULATE statement appears only once, at the beginning of the input deck, even
Exereises
Give GPSS block diagrams and write programs for the following problems:
9-1 In the manufacturing shop model of Fig. 9-2, suppose that parts rejected by
the inspector are sent back for further work. Reworking takes 153
minutes and does not involve the machine that originally made the parts.
After correction, the parts are resubmitted for inspection. Simulate for 1.000
parts to be completed.
9-2 Parts are being made at the rate of one every 6 minutes. They are of two
types, A and B, and are mixed randomiy, with about 10% being type B. A
separate inspector is assigned to examine each type of part. The inspection of
A parts takes 4+2 minutes and B
parts take 20 + 10 mmutes. Both
inspectors reject about 10% of the parts they inspect. Simulate for a total of
1,000 typeA parts accepted.
9-3 Workers come to a supply store at the rate of one every 5 2 minutes. Their
requisitions are processed by one of two clerks who take 8 t 4 minutes for
each requisition. 1 he requisitions are then passed to a single storekeeper who
fills them one at a time, taking 4 3 minutes for each request. Simalatethe
queue of workers and measure the distribution of time taken for 1,000
requisitions to be filled.
9-4 People arrive at an exhibition at the rate of one every 3 t 2 minutes. There
are four galeries, All visitors go to gallery A. Eighty percent then go to
gallery B, the remainder go to galery C. All visitors to galleryC move on
gallery D and then leave. None of the visitors to gallery B goes to gallery C:
bowever, about 10% of them do go to gallery D before leaving. Tabulate the
distribution of the time it takes 1,000 visitors to pass through when the
average times spent in the galleries are as follows:
9-6 People arrive at the rate of one every 10 Sminutes to usea single telephone
If the telephone is busy, 50% of the peopls come back 5 minutes later to try
again. Therest give up. Assuming a call takes 6 t3 minutes, count how
many people will have given up by the time 1,000 calls have been completed.
9-6 People arrive at a cafeteria with an inter-arrival time of 10+5 seconds.
There are two serving areas, one for hot food and the other for sandwiches.
221
Ch.9 Bibliography
6
of the customers and it has servers.
The hot food area is selected by 80% and
area has only one server. Hot food takes
1 minute to serve
The sandwich
the customers
sandwiches take minute. When they have been served, The
which has seating capacity for 200 people.
move into the cafeteria, sandwich,
to eat a hot meal is 30 t 10 minutes and for a
average time distribution of time
for service and the
1 5 5 minutes. Measure the queues people to finish
to finish
from the time of arrival. Simulate for 1,000
eating,
their meal. are six
1 t t hours. There
arrive at a harbor at the rate of one every crane for
9-7 Ships need the services of a
to accommodate them. They also
berths of the ships stay
five cranes. After unloading, 10%
unloading and there are do not need the
the others leave immediately. Ships
to refuel before leaving; assuming it
Simulate the queues for berths and cranes
cranes for refueling. Simulate for 100
3 hours to unload and 1 hours to refuel.
takes 7 t
ships to clear the harbor.