6. ORDERPNT.GPS


Simulation of an order point inventory system.

 

Problem Statement

An inventory system is controlled by an order point, set at 600 units, and an economic order quantity of 500 units. The initial stock quantity is 700. Daily demand is in the range 40 to 63 units, evenly distributed. The lead-time from ordering to delivery of goods is one week (5 days).

Simulate the inventory system for a period of 100 days.

Determine the distribution of inventory and the actual daily sales.

 

Listing

; GPSS World Sample File - ORDERPNT.GPS, by Gerard F. Cummings
*********************************************************************
*
* Order Point Inventory System
*
*********************************************************************
* Initialize and define
INITIAL X$EOQ,500 ;Economic order qty.
INITIAL X$Point,600 ;Order point
INITIAL X$Stock,700 ;Set initial stock=700
Inventory TABLE X$Stock,0,50,20 ;Table of stock levels
Sales TABLE P$Demand,38,2,20 ;Table of sales levels
Var2 VARIABLE RN1@24+40
*********************************************************************
GENERATE ,,,1
Again TEST L X$Stock,X$Point ;Order placed on successful test
ADVANCE 5 ;Lead time = 1 week
SAVEVALUE Stock+,X$EOQ ;Economic order
TRANSFER ,Again ;Cycle transaction again
*********************************************************************
        GENERATE  1             ;Daily demand xact
        ASSIGN    Demand,V$Var2 ;Assign daily demand
        TABULATE  Inventory     ;Record inventory
        TEST GE   X$Stock,P$Demand ;Make sure order can be filled
        SAVEVALUE Stock-,P$Demand ;Remove demand from stock
        SAVEVALUE Sold,P$Demand ;X$Sold=Daily demand
        TABULATE  Sales         ;Record daily sales
        TERMINATE 1             ;Daily timer
*********************************************************************

The model is organized into several segments. The first GENERATE Block creates a single transaction which does the reordering. This transaction spends most of its time waiting to get into the refuse mode TEST Block labeled Again. This TEST Block detects when the stock level is below the order point. When it is, the waiting transaction passes into the ADVANCE Block, waits 5 days, adds an order to inventory and then waits for the next time the stock level is less than the order point.

The second GENERATE creates daily transactions which represent customer orders. If an order cannot be filled, it is denied entry into the TEST Block. You could surround each refuse mode TEST Block with a QUEUE and DEPART Block, if you wanted GPSS World to report the associated delays.

 

Running the Simulation

To run the simulation and create a Standard Report,

CHOOSE     File / Open

and in the dialog box

SELECT     Orderpnt

and then

SELECT     Open

Before we start the simulation, let’s set up a Plot through which we can view two of the model’s variables. First we must create the simulation in order to be able to access the Plot Window.

CHOOSE     Command / Create Simulation

then

CHOOSE     Window / Simulation Window / Plot Window

Then in the Edit Plot Window enter the information as shown below. You should be looking at a similar dialog box on your screen to the one shown below. We’ll plot the daily demand and the inventory level on the same plot. Remember to position the mouse pointer at the beginning of each box and click once before you begin to type. Do not press the [Enter] since that is used when all information has been typed in the box. You can, instead, use [Tab] to move from box to box.

Figure 6—1. The Edit Plot Window.

 

CLICK ON     Plot

CLICK ON     Memorize

Then enter the second set of values we wish to plot

Next to Label replace the current value

TYPE     Inventory Level

and for the Expression replace the current value

TYPE     X$Stock

and

CLICK ON     Plot

CLICK ON     Memorize

SELECT     OK

Adjust the Plot Window to a comfortable viewing size. Now, let’s get the simulation started.

CHOOSE     Command / START

and in the dialog box, replace the 1.

TYPE     100

SELECT     OK

The simulation completes after 100 days, and writes a Standard Report. The Plot Window is shown below as the simulation runs.

 

Figure 6—2. The Plot Window.

 

When the simulation ends, GPSS World writes a report to the default report file, Orderpnt.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

From the plot, the behavior of the inventory system is fairly clear. We can see the stock level vary. The Inventory Table in the Standard Report shows that the stock level never went below 300.

Inside the Simulation

Let's 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 the average stock level.

CHOOSE     Command / SHOW

and in the dialog box

TYPE     TB$Inventory

SELECT     OK

This shows the average stock level. It is a measure of how much money is tied up in inventory. At 612 it is relatively high. Perhaps we could save some money by fine tuning the inventory control system.

Now, let’s open some graphical windows. Before we do that, let’s minimize the Plot Window. We’ll want to be able to look at it later.

CLICK ON The Horizontal Line in Box-Upper Right of the Plot Window

then open the Inventory Table Window

CHOOSE     Window / Simulation Window / Table Window

and since the INVENTORY is already in the drop-down box

SELECT     OK

This is the Table Window for the Inventory Table. This histogram shows the distribution of daily stock levels.

Let’s watch a few more days’ activity.

CHOOSE     Command / START

and in the dialog box, replace the 1 and add NP to suppress the report.

TYPE     100,NP

SELECT     OK

Close the Table Window.

CLICK ON     The X-Upper Right of the Table Window

Turn now to the Blocks Window.

CHOOSE     Window / Simulation Window / Blocks Window

This model is extremely simple. The transaction in the top segment watches for a reorder condition, and the bottom segment creates transactions which represent daily sales. Run the simulation one more time watching the flow in the Blocks Window.

CHOOSE     Command / START

and in the dialog box, replace the 1 and add NP to suppress the report

TYPE     50,NP

SELECT     OK

Let the simulation run to completion.

Let’s try an adjustment to the system. Let’s use an order point or 300 instead of 600, and an initial stock of 400 instead of 700.

CHOOSE     Command / Custom

and in the dialog box

TYPE     CLEAR  OFF

SELECT     OK

The CLEAR Command removes all transactions. It also normally zeroes all Savevalue Entities, but in using the operand Off, we have caused it to retain the current values of the Savevalues. We will change some, but not all of them.

CHOOSE     Command / Custom

and in the dialog box

TYPE     INITIAL X$Point,300

then

PRESS    [Enter]

and in the same dialog box

TYPE     INITIAL X$Stock,400

and

SELECT     OK

We did not choose to change the order quantity. That will remain at 500.

Let’s take a look at the Plot when we run the simulation this time. First close the Blocks Window if you haven’t already done so.

The CLEAR Command will have zeroed the plot that was drawn on previous runs.

CLICK ON     The X-Upper Right of Blocks Window

Then in the Main Window

DOUBLE CLICK ON     The Icon for the Minimized Plot Window-lower left of Window

Now start the simulation.

CHOOSE     Command / START

and in the dialog box, replace the 1

TYPE     100,NP

SELECT     OK

However, we need to know if a stockout occurred. We can get more precise information from the Table Entity, Inventory.

CHOOSE     Window / Simulation Window / Table Window

and since INVENTORY shows in the drop-down box

SELECT     OK

Notice that the inventory never suffered an outage. This is apparent because the frequency class having a top value of 0 is empty. The boundary values of frequency classes are always included in the column just to the left of the value. Also, we see that the average stock level is only 329.1. This is quite an improvement over our first simulation.

Before reporting these results, we must prove that they are not due to random noise. Also, we may want to exclude starting conditions from the final statistics using the RESET Command. The GPSS World RESET and ANOVA Commands are discussed in Chapter 6 of the GPSS World Reference Manual, and in Lesson 13 of Chapter 1 of this manual.

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

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
Numbe r 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's 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 result, 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    [F5]

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

Otherwise, to end the session

CLICK ON    [The X-Upper Right of Main Window.

 

 

8. TEXTILE.GPS

 

Simulation of a textile factory.

 

Problem Statement

A textile factory produces fine mohair yarn in three departments. The first department draws and blends the raw material, in sliver form, and reduces it to a suitable thickness for spinning, in 5 reducer frames. The second department spins the yarn in one of 40 spinning frames. The final process is in the winding department, where the yarn is wound from spinning bobbins onto cones for dispatch. There are 8 winding frames, to perform the winding operation.

The factory works 8 hours per day. The unit of production is 10 kilograms of yarn. Reducing frames produce one unit every 38±2 minutes, while the spinning frames and winding frames produce one unit in 320±20 minutes and 64±4 minutes, respectively.

The initial inventory of reduced material is 50 units (in Savevalue Reduced), spun material is 25 units (in Savevalue Spun) and finished yarn is 25 units (in Savevalue Wound). The finished material is dispatched, in a container of capacity 200 units, every two days.

1. Simulate the production process in the textile factory for 5 days.

2. Find the distribution of the in-process inventories.

3. Determine the utilization of each of the three types of machines.

 

Listing

; GPSS World Sample File - TEXTILE.GPS, by Gerard F. Cummings
***********************************************************************
*
* Production System in a Textile Factory 

***********************************************************************
Reducers STORAGE 5 ;Represents 5 reducer frames
Spinners STORAGE 40 ;Represents 40 spinning frames
Winders STORAGE 8 ;Represents 8 winding frames
Reducing TABLE X$Reduced,20,20,20 ;Inventory reduced material
Spinning TABLE X$Spun,20,20,20 ;Inventory spun material
Winding TABLE X$Wound,20,20,20 ;Inventory wound material
INITIAL X$Reduced,50
INITIAL X$Spun,25
INITIAL X$Wound,25
**********************************************************************
        GENERATE  0.334,,1    ;Time unit is one hour
        QUEUE     One         ;Enter queue for reducing
        ENTER     Reducers    ;Get a machine
        DEPART    One         ;Depart the queue
        ADVANCE   0.634,0.334 ;Process time
        LEAVE     Reducers    ;Leave the machine
**********************************************************************
        SAVEVALUE Reduced+,1  ;Reduced inventory up by 1
        QUEUE     Two         ;Queue for spinning process
        ENTER     Spinners    ;Get a spinning machine
        DEPART    Two         ;Depart the queue
        ADVANCE   5.334,0.334 ;Process time
        LEAVE     Spinners    ;Free a machine
        SAVEVALUE Reduced-,1  ;Reduced inventory down 1
**********************************************************************
        SAVEVALUE Spun+,1     ;Spun inventory up by one
        QUEUE     Three       ;Queue for winding process
        ENTER     Winders     ;Get a winding machine
        DEPART    Three       ;Depart the queue
        ADVANCE   1.067,0.067 ;Process time
        LEAVE     Winders     ;Free a winding machine
        SAVEVALUE Spun-,1     ;Spun inventory down by 1
**********************************************************************
        SAVEVALUE Wound+,1    ;Wound inventory up by 1
        TERMINATE             ;Xact is finished
**********************************************************************
        GENERATE  8           ;One xact every day
        TABULATE  Reducing    ;Record inventory of
                              ; process
        TABULATE  Spinning    ;Record inventory of spun
                              ; material
        TABULATE  Winding     ;Record inventory of wound
                              ; material
        TERMINATE 1           ;One day has passed
***********************************************************************
        GENERATE 16           ;A xact every 2 days
        TEST GE   X$Wound,200,Notthere ;If not done don’t dispatch
        SAVEVALUE Wound-,200  ;200 Kgs produce delivered
        TERMINATE             ;Xact is finished
Notthere TERMINATE            ;Xact is finished
***********************************************************************

The model is organized into several segments. After the Storage Entities are defined and Savevalues initialized, there are three more model segments. Transactions in the top segment represent batches of yarn which pass through the reducing, spinning, and winding operations. Transactions in the middle segment tabulate daily inventories, and the transactions in the bottom segment dispatch a 200-kilogram lot of yarn, if a complete lot is available.

 

Running the Simulation

To run the simulation and create a Standard Report,

CHOOSE     File / Open

and in the dialog box

SELECT      Textile

and then

SELECT      Open

Next, we must create the simulation.

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, Textile.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

The distribution of the in-process inventories is given by the Tables Reducing, Spinning, and Winding. The utilization (Storages report) of reducers was about 39%, and that of the spinners 36%, and winders about 32%.

 

Inside the Simulation

Let’s 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 Expression Window to look at some System Numeric Attributes. First, look at the units of reduced material on hand.

CHOOSE      Window / Simulation Window / Expression Window

The Edit Expression Window opens. When you enter the value in the second box in this dialog box, you should place the mouse pointer in the small box and click once. Do not press [Enter] to go from the first to the second box as GPSS World then assumes that all values have been entered. You can, instead, use [Tab] to move from box to box. Now, in the dialog box for the Label field

TYPE      Reduced Material

and in the Expression field

TYPE      X$Reduced

CLICK ON      View

and

CLICK ON      Memorize

If we memorize all the expressions, we'll be able to close the window and open it again later with easy retrieval of all the values. Also if you save the simulation the values in the Expression Window will be saved with the simulation if they have been memorized. We're going to close this window and reopen it later so please memorize this expression and the ones that follow.

In the dialog box for the Label field replace the current value

TYPE      Spun Material

and in the Expression field, replace the current value

TYPE      X$Spun

CLICK ON      View

CLICK ON      Memorize

Finally, let’s keep track of the Wound material.

In the dialog box for the Label field, replace the current value

TYPE      Wound Material

and in the Expression field, replace the current value

TYPE      X$Wound

CLICK ON      View

CLICK ON      Memorize

SELECT      OK

This shows the inventory of each of the products. If this window is open while the simulation runs, the values are updated on-line. Next, let’s also open some graphics windows.

CHOOSE      Window / Simulation Window / Storages Window

This window gives information on machine usage. There are 1 reducer, 17 spinners, and 2 winders busy. The utilizations are between 30% and 40%. The Reducing, Spinning, and Winding Tables can be easily viewed.

CHOOSE      Window / Simulation Window / Table

and in the drop-down box REDUCING is already showing for the Table name

SELECT      OK

and expand the window to viewable size.

Figure 8—1. The Reducing Table Window.

 

You can open the next two Tables as well using the same method but selecting the names SPINNING and WINDING from the drop-down box.

Finally, let’s take a look at where transactions are.

CHOOSE      Window / Simulation Window / Blocks Window

Notice, that we can tell how many machines are busy by how many transactions are in the ADVANCE Blocks. This is consistent with the information in the Storages Window.

Now, look at the history of transactions in the simulation. You will see this in the Total Entry column of this window. Scroll down to the last Block in the model that is labeled Nothere, using the scroll bar on the right side of the window. Notice that this Block was entered twice. This means that on two occasions there was not enough finished yarn for the dispatcher. Clearly, the production of the factory needs to be increased. All the capital equipment is under utilized, and the production quotas are not being met. We should increase the rate that jobs are begun. Also, we could schedule a second shift of operation every workday.

Please feel free to modify the parameters and Blocks of this simulation.

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

Otherwise, to end the session

CLICK ON      The X-Upper Right of Main Window.

 

 

9. OILDEPOT.GPS

 

Simulation of an Oil Storage Depot.

 

Problem Statement

An oil storage depot distributes three grades of fuel, a) home heating oil, b) light industrial fuel oil, and c) diesel fuel for road vehicles. There is one pump for each grade of fuel, and the demand for each is the same. Orders for fuel oil vary between 3000 and 5000 gallons, in increments of 10 gallons, evenly distributed. The time required to fill fuel trucks is a function of the following.

1. The pumping rate (6, 5 and 7 minutes per 1000 gallons respectively).

2. The order size.

3. The number of vehicles in the depot (30 seconds extra per vehicle).

4. Setup time, a fixed time of two minutes.

The depot can hold a maximum of twelve trucks. The mean arrival rate of trucks is 18 minutes, modified by the following function.

 

Truck Arrival Rates

Frequency        .20   .40   .25   .15
Ratio to mean    .45   .60   1.5   2.0

1. Simulate the operation of the oil storage depot for 5 days.

2. Find the distribution of transit times of trucks.

3. What is the total quantity of fuel sold each day?

Listing

; GPSS World Sample File - OILDEPOT.GPS, by Gerard F. Cummings
****************************************************************
* Oil Storage and Distribution Depot 
* Time Unit Is One Minute 
****************************************************************
RMULT 5631,39941
Arr FUNCTION RN2,C5             ;Arrivals frequency
0,0/0.2,.45/.6,1/.85,1.5/1.0,2
Pumprate FUNCTION P$Type,L3 ;Mins to pump 1000 gals
1,6/2,5/3,7
Gals VARIABLE (RN1@201+300)#10
Type VARIABLE RN1@3+1
Pump VARIABLE (FN$Pumprate#P$Gals)/1000+S$Depot/2+2
Depot   STORAGE   12            ;Room for 12 trucks max
Transit TABLE M1,10,10,20       ;Time of truck in depot
Qty TABLE X$Gals,20000,20000,9  ;Qty of oil sold per day
****************************************************************
        GENERATE  18,FN$Arr     ;Truck arrivals
        ASSIGN    Gals,V$Gals   ;P$Gals=Number of gals
        ASSIGN    Type,V$Type   ;P$Type=Type of oil
        ENTER     Depot         ;Truck enters depot
        QUEUE     P$Type        ;Queue for type of oil
        SEIZE     P$Type        ;Get a pump
        DEPART    P$Type        ;Depart the queue
        ADVANCE   V$Pump        ;Service time pumping
        RELEASE   P$Type        ;Release the pump
        LEAVE     Depot         ;Truck leaves the depot
        SAVEVALUE Gals+,P$Gals  ;Tally no. of gals sold
        TABULATE  Transit       ;Table of transit times
        TERMINATE               ;Truck departs
****************************************************************
        GENERATE  480           ;One transaction per day
        TABULATE  Qty           ;Record no. of gals sold
        SAVEVALUE Sold+,X$Gals  ;Record total oil sold
        SAVEVALUE Gals,0        ;Savevalue set to 0
        TERMINATE 1             ;One day has passed
****************************************************************

The model is organized into several segments. After the Function, Variable, and Storage Entities are defined, there are two more model segments. Transactions in the top segment represent trucks which requisition oil. Transactions in the bottom segment tabulate daily sales, and decrement the Termination Count of the simulation.

Random functions are used to choose the fuel type and amount for each truck, which then must wait for the one pump which dispenses the proper grade of fuel. The time to pump is returned by the Variable Pump.

The quantity of fuel available for sale is assumed to be sufficient for daily sales. The model could easily be expanded to include the input of fuel into the depot.

 

Running the Simulation

To run the simulation and create a Standard Report,

CHOOSE     File / Open

and in the dialog box

SELECT      Oildepot

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, Oildepot.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

Let’s open windows on the two Tables in the model.

CHOOSE     Window / Simulation Window / Table Window

and in the drop-down box for the Table name

CLICK ON     The down arrow at the end of the box

SELECT     TRANSIT

SELECT     OK

and expand the window to viewable size. Then open the second window.

CHOOSE     Window / Simulation Window / Table Window

and since the drop-down box for the Table name shows the correct name, QTY

SELECT     OK

and expand the window to viewable size.

The Table Transit gives the distribution of waiting times of trucks at the depot. The mean was 35 minutes and the standard deviation was about 14 minutes.

The Table Qty gives the distribution of daily oil sales. The mean was 109490 gallons.

 

Inside the Simulation

Let’s 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 load a SHOW Command into a function key to see how the fuel type is chosen randomly from type 1, 2, and 3. Open the Model Settings Notebook as we have a number of times before.

CHOOSE     Edit / Settings

Use the mouse to choose the Function Keys page and enter the following next to F8.

TYPE     SHOW V$Type

SELECT     OK

Now, repeat the SHOW Command many times.

PRESS     [F8]

This shows how successive trucks are randomly assigned a fuel type based on the GPSS Variable, Type defined in the program.

Next, let’s look at the utilization (fractional busy time) of the depot, in parts per thousand. It has a total capacity of 12 trucks. In the Main Window menu,

CHOOSE     Command / SHOW

and in the dialog box

TYPE     SR$Depot

SELECT     OK

The value in the status line indicates the Storage Utilization (Depot Utilization) is only 17%. The utilization appears as parts per thousand. There doesn’t appear to be a bottleneck here. Let’s look at what’s happening at the pumps.

CHOOSE     Window / Simulation Window / Facilities Window

This is the Facilities Window. Each pump is represented by a Facility Entity. Notice that the utilizations are higher than that of the Storage which represents the truck capacity of the depot. Take a look at the Storages Window.

CHOOSE     Window / Simulation Window / Storages Window

This reviews the state of the Depot Storage Entity, and its relatively low utilization. It appears that any congestion in the distribution of oil would show up in the waiting lines for the pumps. However, the present simulation did not detect any serious bottlenecks. Under other truck arrival patterns, we might draw different conclusions.

Now, turn to the Tables. Since we have left the windows open as we have looked at new ones, just close up the Storages and Facilities Windows and the two Windows for the Tables in this model should be visible. Usually, it is a good idea to only keep open the windows that you are actively viewing.

CLICK ON     The X-Upper Right of Each Window

Let’s see what happens when the mean truck arrival rate is doubled. Make the following change to your model in the Model Window.

Using the Editor, in the Model Window, change operand A of the first GENERATE Block from 18 to 9. Editing is described in Lesson 4 of the first chapter of this manual.

Next, Retranslate the model.

CHOOSE     Command / Retranslate

As you run the next simulation, open the Storages Window, Facilities Window, and Table Windows, occasionally returning to the Blocks Window to observe the distribution of transactions. We’ll run the simulation a little longer so you’ll have time to move from window to window.

CHOOSE     Command / START

and in the dialog box replace the 1

TYPE     100000,NP

and

SELECT     OK

Things aren’t going very well, are they? Pumps 1 & 3 are busy almost all the time, and a waiting line of trucks is building up outside the depot. At this traffic load, we need to carefully evaluate our alternatives. Would we need more pumps?

Please feel free to modify the parameters and Blocks of this simulation, as we did in the first 7 examples of this chapter. Don’t forget that you can interrupt the simulation, and make changes on the spot to named values, make more extensive changes followed by a almost instantaneous retranslating of the model or redirect transactions with Manual Simulation.

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

Otherwise, to end the session

CLICK ON     The X-Upper Right of Main Window.

 

10. ASSEMBLY.GPS

 

Simulation of a pump assembly process.

 

Problem Statement

A manufacturer makes centrifugal pump units which are assembled to customer orders. The orders arrive on average, every 5 hours, exponentially distributed. When the order arrives, two copies are made. The original order is used to obtain a motor from stock and prepare it for assembly (200±100 minutes). The first copy is used to order and adapt a pump (180±120 minutes), and the second copy is used to initiate the manufacture of the baseplate (80±20 minutes).

When the pump and the baseplate are ready, a test fitting is carried out (50±10 minutes). All three components are assembled, when they are available. The unit is then dismantled, and the pump and motor are painted, and the baseplate is galvanized. Final assembly then takes place (150±30 minutes).

1. Investigate the utilization of the manufacturing facilities.

2. Determine the transit times and delays, of customers’ orders.

3. What Facility will be a bottleneck, if orders increase significantly?

4. Simulate the assembly of 50 motor-pump units.

 

Listing

; GPSS World Sample File - ASSEMBLY.GPS, by Gerard F. Cummings
***********************************************************************
* Assembly of Motor Pump and Baseplate 
***********************************************************************
*
Transit TABLE M1,200,200,20
***********************************************************************
        GENERATE  (Exponential(1,0,300)) ;New order arrives
        SPLIT     2,Factory,1   ;Make 2 copies of order
***********************************************************************
* Purchase Motor Original Transaction Goes Here, P1=1
        QUEUE     Motor         ;Queue for motor
        SEIZE     Motor         ;Get a Facility
        DEPART    Motor         ;Depart the queue
        ADVANCE   200,100       ;Take motor from stock
        RELEASE   Motor         ;Free the Facility
        TRANSFER  ,Tryout       ;Send to trial assembly
***********************************************************************
Factory TEST E    P1,2,Baseplate ;Is P1=2 ?
        QUEUE     Pumps         ;Join the Queue (P1=2)
        SEIZE     Pumps         ;Get a Facility
        DEPART    Pumps         ;Depart the Queue
        ADVANCE   180,120       ;Prepare the Pump
Pump    MATCH     Plate         ;Wait for baseplate
        ADVANCE   50,10         ;Check pump on baseplate
        RELEASE   Pumps         ;Free the Facility
        TRANSFER  ,Tryout       ;Send for a tryout
***********************************************************************
Baseplate QUEUE   Base          ;Join Queue P1 must=3
        SEIZE     Base          ;Get a Facility
        DEPART    Base          ;Depart the Queue
        ADVANCE   80,20         ;Make the baseplate
Plate   MATCH     Pump          ;Wait for the pump unit
        ADVANCE   50,10         ;Check the pump on baseplate
        RELEASE   Base          ;Free the Facility
***********************************************************************
Tryout  GATHER    3             ;Gather 3 units to tryout
        ADVANCE   60            ;Trial assembly
        TEST E    P1,1,Finish   ;Is it the motor?(P1=1)
***********************************************************************
        SEIZE     Paint1        ;Get first paint Facility
        ADVANCE   100,20        ;Paint the motor
        RELEASE   Paint1        ;Free paint Facility 1
        TRANSFER  ,Build        ;Send for assembly
***********************************************************************
Finish  TEST E    P1,2,Basplate ;Is it the pump?(P1=2)
        SEIZE     Paint2        ;Get paint Facility 2
        ADVANCE   120,30        ;Paint the Pump
        RELEASE   Paint2        ;Free paint Facility 2
        TRANSFER  ,Build        ;Send for assembly
Basplate SEIZE    Galvanize     ;Get a Facility
        ADVANCE   120,30        ;Galvanize baseplate
        RELEASE   Galvanize     ;Free the Facility
***********************************************************************
Build   ASSEMBLE  3             ;Collect 3 units
        ADVANCE   150,30        ;Assemble unit
        TABULATE  Transit       ;Record transit time
        TERMINATE 1             ;One unit completed

 

Transactions represent orders. When an order is received, 2 offspring transactions are created by a SPLIT Block. This allows individual orders for the motor, pump, and baseplate to proceed at the same time. Orders representing the pump and the baseplate wait for each other at the MATCH Blocks labeled Pump and Plate. When both have arrived, an initial assembly delay is simulated. After all three orders have arrived at the GATHER Block an ADVANCE Block represents the trial assembly. Then the three orders are again separated for finishing. The ASSEMBLE Block labeled Build causes final assembly to be delayed until all components are ready.

The Table Transit represents the distribution of order completion times.

 

Running the Simulation

To run the simulation and create a Standard Report,

CHOOSE     File / Open

SELECT      Assembly

and then

SELECT      Open

Next, create the simulation.

CHOOSE      Command / Create Simulation

then

CHOOSE      Command / START

and in the dialog box, replace the 1

TYPE      50

and

SELECT      OK

The simulation will end when 50 order completion times have been tabulated.

When the simulation ends, GPSS World writes a report to the default report file, Assembly.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

From the Standard Report, we see that the Facilities representing capital equipment have utilizations from 31% to 73%. The order completion times are represented in the Table Transit. The mean was 877.79 minutes, with a standard deviation of around 256.86.

The Facilities representing the pump station and the base station have the highest utilizations. If all activity is increased proportionately, they will be the first to saturate.

 

Inside the Simulation

Let 's 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.

Now, let’s open some graphics windows.

CHOOSE      Window / Simulation Window / Table Window

and in the drop-down box, TRANSIT is already selected.

SELECT      OK

Expand the Table to a comfortable viewing size. This is the Transit Table, a histogram of order completion times. The mean order completion time was 877.79 minutes.

 

Figure 10—1. The Transit Table Window

 

Next, look at the Facilities.

CHOOSE      Window / Simulation Window / Facilities Window

To see all of the Facilities you may have to open the window to a larger size or use the scroll bar on the side of the window to move up and down in the window.

Look at the Facility utilization listing on the right side of the window. The Pumps and Base Facilities were highest at 72% and 73% respectively and are currently busy (red icon). Painting and Galvanizing have much lower usage and are currently not in use (gray icon).

Let’s take a look at how transactions travel inside the simulation. First, close the windows we no longer wish to observe. Make sure to keep the Journal / Simulation Window open. If you close this window, you can no longer run the simulation.

CLICK ON      The X-Upper Right of Each Window

then

CHOOSE      Window / Simulation Window / Blocks Window

Now, select the first GENERATE Block with your mouse by positioning the mouse over the Block and clicking once. Then,

CLICK ON      The Place Icon in the Debug Toolbar

This will cause the next simulation to stop just before any transaction attempts to enter the Block. Now, let’s start the simulation running after you have sized the Blocks Window to a comfortable viewing size.

CHOOSE      Command / START

and in the dialog box, replace the 1

TYPE      10,NP

and

SELECT      OK

The simulation is ready to start an order. Other orders may be unfinished, and still in the simulation.

PRESS     [F2]

several times. The simulation will stop each time just before another order enters the simulation. However, each time you continue, you may see parts of two different orders circulating in the simulation. Often, just after one transaction enters an ADVANCE Block, a new one will become active.

Now, when the simulation stops, turn on the Trace Indicator of the active transaction.

CHOOSE      Command / Custom

and in the dialog box

TYPE      TRACE

SELECT      OK

Put the focus on the Journal Window and open it to a comfortable size for viewing.

PRESS     [F2]

several times until all the trace messages cease. Since offspring transactions get a copy of the parent transaction’s Trace Indicator, the trace messages have all the Block entry information pertaining to the processing of a single order.

Let’s explore a specific order in detail. Set the window focus on the Blocks Window. The simulation should currently be stopped at the GENERATE Block. Let’s Step through it and watch the progress of the order. First turn on the trace flag in this Transaction.

CHOOSE      Command / Custom

and in the dialog box

TYPE      TRACE

SELECT      OK

Make sure you can see both the Blocks and Journal Windows.

PRESS     [F5]

repeatedly Watch the new offspring transactions which represent component orders. MATCH, ASSEMBLE, and GATHER Blocks cause related transactions to wait for each other.

Please feel free to modify the parameters and Blocks of this simulation.

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

Otherwise, to end the session

CLICK ON      The X-Upper Right of Main Window.

 

 

[Table of Contents]