Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Gpss tutorial.pdf
Скачиваний:
323
Добавлен:
15.04.2015
Размер:
1.4 Mб
Скачать

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 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 s

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

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]