- •Table of Contents
- •Chapter 1. Using GPSS World
- •Lesson 1 - The GPSS World Program
- •Lesson 2 - Running a Simulation
- •Lesson 3 - Problems
- •Lesson 4 - The Text Editor
- •Lesson 6 - The ADVANCE Block
- •Lesson 9 - GPSS World Commands
- •Lesson 10 - Manual Simulation
- •Lesson 11 - The Graphics Windows
- •Lesson 12 - Reading from and Writing to External Files
- •Lesson 14 - Reports
- •Lesson 15 - Session Journaling
- •Lesson 16 - Continuous Modeling
- •Lesson 17 - PLUS
- •Lesson 19 - Experiments
- •Chapter 2. Applications
- •1. TURNSTIL.GPS
- •2. TELEPHON.GPS
- •3. PERIODIC.GPS
- •4. TVREPAIR.GPS
- •5. QCONTROL.GPS
- •6. ORDERPNT.GPS
- •7. MANUFACT.GPS
- •8. TEXTILE.GPS
- •9. OILDEPOT.GPS
- •10. ASSEMBLY.GPS
- •11. ROBOTFMS.GPS
- •12. BICYCLE.GPS
- •13. STOCKCTL.GPS
- •14. LOCKSIMN.GPS
- •15. FOUNDRY.GPS
- •16. TAPEPREP.GPS
- •17. TRAFFIC.GPS
- •18. POWDER.GPS
- •19. QTHEORY.GPS
- •20. SUPERMRK.GPS
- •21. SHIPPORT.GPS
- •22. EXCHANGE.GPS
- •23. FMSMODEL.GPS
- •24. ETHERNET.GPS
- •25. PREDATOR.GPS
CLICK ON The X-Upper Right of Each Window
Otherwise, to end the session
CLICK ON The X-Upper Right of Main Window.
7. MANUFACT.GPS
Simulation of an electronics manufacturing system.
Problem Statement
A manufacturing department of an electronics company makes digital watches. In the dispatch department, the watches are packed by an automatic packing machine, in display packets, in the quantities ordered by retailers. The order size is given by the following function.
Order Size
Frequency .10 .25 .30 .15 .12 .05 .03
Order Size 6 12 18 24 30 36 |
48 |
The mean time between order arrivals is 15 minutes, exponentially distributed. The packing time per order is 120 seconds plus 10 seconds per watch packed in the order. The manufacturing department produces the digital watches in lot sizes of 60 units, in 455 minutes.
Simulate 5 days of the company operation to provide the following information:
1.The average number of orders waiting in the packing department.
2.The quantity of watches dispatched each day.
3.The distribution of transit times of orders.
Listing
; GPSS World Sample File - MANUFACT.GPS, by Gerard F. Cummings
***********************************************************************
*Manufacturing Company *
***********************************************************************
*Time Unit is one hour *
Sizeorder FUNCTION RN1,D7 ;Order size
.10,6/.35,12/.65,18/.80,24/.92,30/.97,36/1.0,48 Transit TABLE M1,.015,.015,20 ;Transit time Number TABLE X1,100,100,20 ;No. packed each day Ptime VARIABLE .0028#P1+0.0334 ;Packing time Amount EQU 1000 ;Initial stock amount
Stock STORAGE 4000 ;Warehouse holds
;4000 units
***********************************************************************
GENERATE (Exponential(1,0,0.25)) ;Order arrives ASSIGN 1,1,Sizeorder ;P1=order size
TEST GE S$Stock,P1,Stockout ;Is stock sufficient? LEAVE Stock,P1 ;Remove P1 from stock
QUEUE Packing
SEIZE Machine ;Get a machine DEPART Packing
ADVANCE V$Ptime ;Packing time RELEASE Machine ;Free the machine
SAVEVALUE 1+,P1 ;Accumulate no. packed TABULATE Transit ;Record transit time TERMINATE
Stockout TERMINATE
***********************************************************************
GENERATE 0.75,0.08334,1 ;Xact every 40+/-5 mins ENTER Stock,60 ;Make 60, Stock
;increased by 60
Stockad TERMINATE
***********************************************************************
GENERATE 8 ;Xact every day TABULATE Number
SAVEVALUE 1,0
TERMINATE 1
***********************************************************************
GENERATE ,,,1,10 ;Initial stock xact ENTER Stock,Amount ;Set initial stock TERMINATE
***********************************************************************
The model is organized into several segments. After the function, variable, and Storage Entities are defined, there are four more model segments. Transactions in the top segment represent orders, transactions in the next segment add lots of 60 watches to the inventory, transactions in the next segment tabulate daily sales and time the overall simulation in days, and the transaction in the bottom segment initializes the stock level to 1000.
Time units are in hours. The stock level is represented by S$Stock, the current Storage Content in the Storage Entity Stock. Therefore, we use LEAVE to take from inventory, ENTER to add to it. Unfilled orders are stockouts. The warehouse space available is 4000. The stock level, represented by S$Stock, is initialized to 1000 when the simulation starts by a high priority transaction in the final segment of the model. This transaction will be the very first one to move in the simulation..
Running the Simulation
To run the simulation and create a Standard Report,
CHOOSE File / Open
and in the dialog box
SELECT MANUFACT
and then
SELECT Open
Next, the simulation must be created.
CHOOSE Command / Create Simulation
then
CHOOSE Command / START and in the dialog box, replace the 1.
TYPE 5
and
SELECT OK
The simulation will end when 5 transactions have entered the TERMINATE 1 Block. This represents 5 days of operation.
When the simulation ends, GPSS World writes a report to the default report file, Manufact.1.1. As discussed in Chapter 1, the Report extension will vary depending on saved simulations and previously existing reports. For our purposes, we will assume that this is the first time the simulation has been created and run giving an extension of 1.1.
This report will be automatically displayed in a window. If you close the window, you can reopen it by using the GPSS World File / Open in the Main Menu. Then
you should choose Report in the "Files of type" drop down box at the bottom of the window. GPSS World reports are written in a special format. If you wish to edit the report, you will have to copy its contents to the clipboard and from there into a word processor. You will not be able to open the file directly in a word processor.
Discussion of Results
We can answer the original questions from data in the Standard Report:
∙The average number of orders waiting in the packing department was only 0.12. This is taken from the report for the Ave. Cont. value under the Queue Entity Packing.
∙The distribution of transit times of orders is given in the Table Transit.
∙The distribution of watches dispatched each day is given in the Table Number.
Inside the Simulation
Let us now explore the ending condition of the simulation which generated the Standard Report above. If you are not at the end of the simulation, please Retranslate the model and run it again.
Let's use the SHOW Command to look at some System Numeric Attributes. First, the number of orders received.
CHOOSE Command / SHOW
and in the dialog box
TYPE N1
SELECT OK
You’ll see the results (169) in the Status Line of the Main Window and in the Journal Window as well. Next, the number of times a stockout occurred.
CHOOSE Command / SHOW
and in the dialog box
TYPE N$Stockout
SELECT OK
Now, let’s open some graphics windows.
CHOOSE Window / Simulation Window / Storages Window
This is the Storages Window. The stock level is represented by the current content of the Storage Entity which you will see is 898. You will find this value under Storage In Use in the Storages Window.
The current stock level is quite high. If we cannot increase sales, we should reduce the production cutoff level.
Let’s explore the other graphics windows, but first close the Storages Window.
CLICK ON The X-Upper Right of Storages Window
then
CHOOSE Window / Simulation Window / Facilities Window
This shows that the utilization of the packing machine was low. The color of the icon tells us that the machine is currently in use. Take a look at other values that are available to you in the detailed side of this window. Perhaps a less expensive machine would do. Let’s look at the Transit Table
CHOOSE Window / Simulation Window / Table Window and in the drop-down box use the down arrow to find Transit
CLICK ON The down arrow in the Table selection box
CLICK ON Transit
SELECT OK
This shows the distribution of order transit times. Next, look at the Number Table.
CHOOSE Window / Simulation Window / Table Window and in the drop-down box the Table name Number is selected.
SELECT OK
The Number Table shows the histogram of watches packed each day. Before we go further, let’s close up the windows we have opened so far.
CLICK ON The X-Upper Right of Graphics Windows
Now, let’s do some magic. Let’s create an order when the inventory is near its maximum level. First, open the Blocks Window.
CHOOSE Window / Simulation Window / Blocks Window
Now, use your mouse to select the first TERMINATE Block in the model (the one immediately following the TABULATE Block or Block 12). Place the mouse pointer over the Block and
CLICK ON The Block Icon of the TERMINATE Block
Did you see the Block light up? Good. Now, let’s put a Stop Condition on the Block.
CLICK ON The Place Icon in the Debugging Toolbar
CHOOSE Command / START
and in the dialog box, replace the 1.
TYPE 5,NP
and
SELECT OK
When the simulation stops, move the active transaction up to the order entry segment.
CHOOSE Command / Custom
and in the dialog box
TYPE TRANSFER ,2
SELECT OK
Now, watch the new order by Stepping through the simulation.
PRESS p
several times. This is only the tip of the iceberg. We can apply ANY Block statement to the active transaction in manual simulation mode. We can manually SPLIT new transactions, make Facility and Storage Entities unavailable to represent an outage, we can even use EXECUTE to initiate any Block that exists in the model.
Feel free now to experiment with the parameters of the manufacturing system. You may feel that a different scheme may be best. Many judgments of the behavior of a system are subjective, and your notion of optimization may depend on many other factors. For this reason, it is not always safe to rely blindly on someone else’s opinion.
You may stop here or choose to go on to the next model.
If you wish to go on to the next lesson, close all windows related to this model.
CLICK ON The X-Upper Right of Each Window