Simulation and modeling - Old Questions
3. Consider that a machine tool in a manufacturing shop is turning out parts at the rate of one every 5 minutes. As they are finished, the parts go to an inspector, who takes 4±3 minutes to examine each one and rejects 10% of the parts. Now, develop a block diagram and write the code for simulating the above problem using GPSS, and also explain the function of each block used in the block diagram in detail. [3+3+4]
Answer
AI is thinking...
The block diagram for given problem using GPSS is given below:
A GENERATE block is used to represent the output of the machine by creating one transaction every five units of time. A QUEUE block places the transaction in the queue and SEIZE block allows a transaction to engage a facility if it is available. If more than one inspector is available, the transaction leaves the queue which is denoted by DEPART block and enters into ADVANCE block. An 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 equal probability given to each value. Upon completion of the inspection, RELEASE block allows a transaction to disengage the facility and transaction go to a TRANSFER block with a selection factor of 0.1, so that 90 % of the parts go to the next location called ACC, to represent accepted parts and 10 % go to another location called REJ to represent rejects. Both locations reached from the TRANSFER block are TERMINATE blocks.
Now,
Code for simulating the given problem using GPSS:
GENERATE 5, 0
QUEUE 1
SEIZE 1
DEPART 1
ADVANCE 4, 3
RELEASE 1
TRANSFER 0.1 ACC REJ
ACC TERMINATE 1
REJ TERMINATE 1