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

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 e since that is used when all information has been typed in the 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 us 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 graphics 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 Table is already in the drop-down box

SELECT OK

This is the Table Window for the Inventory Table. This table 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’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 the selected Savevalues.

CHOOSE Command / Custom

and in the dialog box

TYPE INITIAL X$Point,300

then

PRESS e

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

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.

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