CSC328 · 2080 · 10 marks
What is storage in GPSS? Describe the blocks associated to storage in GPSS. A machine tool in a manufacturing shop is turning out parts at the rate off one every 5 minutes. As they are finished the parts go on an inspector who takes 10±310 \pm 310±3 minutes to examine each one and rejects 1010%10 of
What is storage in GPSS? Describe the blocks associated to storage in GPSS. A machine tool in a manufacturing shop is turning out parts at the rate off one every 5 minutes. As they are finished the parts go on an inspector who takes 10±310 \pm 310±3 minutes to examine each one and rejects 1010%10 of the parts. Represent the system in GPSS using the concept of facility and run the simulation for 500 parts.[10]
Storage in GPSS and Manufacturing Shop Simulation
Given
- Part production rate: one part every $5$ minutes (deterministic inter-arrival time)
- Inspection time: $10 \pm 3$ minutes (uniform distribution, range $7$ to $13$ minutes)
- Rejection rate: $10%$ of parts rejected
- Simulation length: $500$ parts
- Modelling requirement: use the facility concept
- Theory requirement: define storage and describe storage-related blocks
All data required is present and readable.
Solution
Part 1: Storage in GPSS
Definition
A storage in GPSS represents a resource that can be occupied by more than one transaction at the same time, up to a fixed capacity $N$. Whereas a facility is a single-server resource that only one transaction can hold at a time, a storage is a multi-server resource (a pool of $N$ identical servers). It is used to model things like a group of machines, a set of parking spaces, a bank of clerks, or a buffer of finite size.
Blocks Associated with Storage
| Block | Typical form | Function |
|---|---|---|
| STORAGE (definition) | name STORAGE N | A statement that defines a storage entity and its capacity $N$ |
| ENTER | ENTER name, k | A transaction occupies $k$ units of the storage. If fewer than $k$ units are free, the transaction is held (queued) until they become available |
| LEAVE | LEAVE name, k | A transaction releases $k$ units of the storage, freeing them for waiting transactions |
If the amount k is omitted, it defaults to $1$.
Supporting blocks commonly used with storage
- QUEUE / DEPART to gather waiting-line statistics before ENTER and after LEAVE
- ADVANCE to represent the holding (service) time inside the storage
Facility vs Storage
| Feature | Facility | Storage |
|---|---|---|
| Capacity | $1$ | $N$ (multiple) |
| Occupy / free blocks | SEIZE / RELEASE | ENTER / LEAVE |
| Typical use | Single inspector or single machine | Pool of machines, group of servers |
Part 2: Manufacturing Shop Simulation (using a Facility)
System logic
Machine (1 part / 5 min) --> Queue --> Inspector (10±3 min) --> TRANSFER
|
90% ACCEPTED <---+---> 10% REJECTED
TERMINATE TERMINATE
Since there is only one inspector, the inspector is modelled as a facility using SEIZE/RELEASE.
GPSS Program
* ============================================
* MANUFACTURING SHOP INSPECTION SIMULATION
* Machine: 1 part every 5 minutes
* Inspector: 10 +/- 3 minutes, rejects 10%
* Run for 500 parts
* ============================================
SIMULATE
* --- MACHINE GENERATES PARTS ---
GENERATE 5,0 ; one part every 5 min (deterministic)
* --- INSPECTOR (FACILITY) ---
QUEUE INSPQ ; join inspection queue
SEIZE INSP ; seize the single inspector
DEPART INSPQ ; leave the queue
ADVANCE 10,3 ; inspection time 10 +/- 3 (7..13)
RELEASE INSP ; free the inspector
* --- DECISION: 10% REJECTED, 90% ACCEPTED ---
TRANSFER .100,ACC,REJ ; prob 0.100 -> REJ, else ACC
* --- ACCEPTED PARTS ---
ACC TERMINATE 1
* --- REJECTED PARTS ---
REJ TERMINATE 1
* --- RUN CONTROL ---
START 500
END
Explanation of Each Block
| Block | Parameters | Purpose |
|---|---|---|
GENERATE 5,0 | Mean $=5$, spread $=0$ | Creates exactly one part every $5$ minutes (deterministic) |
QUEUE INSPQ | Queue INSPQ | Part waits if inspector busy; records queue statistics |
SEIZE INSP | Facility INSP | Part captures the single inspector |
DEPART INSPQ | Queue INSPQ | Part leaves the queue after being served |
ADVANCE 10,3 | Mean $=10$, spread $=3$ | Uniform inspection time in range $[7, 13]$ minutes |
RELEASE INSP | Facility INSP | Frees inspector for the next part |
TRANSFER .100,ACC,REJ | $p = 0.100$ | With probability $0.10$ transaction goes to REJ; otherwise to ACC |
TERMINATE 1 (ACC/REJ) | Count $=1$ | Removes part and decrements termination counter |
START 500 | $500$ | Runs until $500$ parts are terminated |
Verification of numeric values
- ADVANCE range: $10 - 3 = 7$ minimum, $10 + 3 = 13$ maximum. Correct uniform interval $[7,13]$.
- TRANSFER probability operand
.100corresponds to $10%$ of parts routed to the reject branch, matching the stated $10%$ rejection. - Since each TERMINATE carries a count of $1$, the run stops after $500$ parts (accepted + rejected) have passed through, matching "run for 500 parts."
Expected proportions after 500 parts
- Accepted $\approx 0.90 \times 500 = 450$ parts
- Rejected $\approx 0.10 \times 500 = 50$ parts
These are the expected counts (subject to random variation of the RNG); the actual GPSS report gives the exact simulated figures.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.