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

TYPE 500

SELECT OK

The simulation will end when 500 transactions have entered the TERMINATE 1 Block. This represents 500 days of operation.

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

From the Tables Tsmall, Tmedium and Tlarge we see histograms of the transit times for small, medium, and large ships, respectively. The average transits times were about 44, 74, and 115 hours.

The Berth utilizations were 52%, 49% and 54% for Berths 1, 2, and 3, respectively.

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 / Storages Window

This is the Storages Window. It gives utilization and queuing information on the Berths. Notice how the color of the icons corresponds to the amount of Storage in use. Look at the histograms of transit times for small, medium, and large ships one after the other. First, for the small ships,

CHOOSE Window / Simulation Window / Table Window and in the drop-down box in the dialog box

CLICK ON The Down Arrow at the Right End of the Box

CLICK ON Tsmall

SELECT OK

and for the medium ships

CHOOSE Window / Simulation Window / Table Window and in the drop-down box in the dialog box

CLICK ON The Down Arrow at the Right End of the Box

CLICK ON Tmedium

SELECT OK

and for the large ships

CHOOSE Window / Simulation Window / Table Window and since Tlarge is already selected in the drop-down box in the dialog box

SELECT OK

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

When you are done, 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.

22. EXCHANGE.GPS

Simulation of a PBX.

A private automatic branch exchange telephone system has 200 extensions, 30 internal lines, and 30 external lines, 8 signaling units and one operator. Telephone calls last 150 seconds on average, normally distributed with a standard deviation of 30 seconds. The interarrival time of external calls varies inversely with the number of extensions (2500/number of extensions ), exponentially distributed. The interarrival time of internal calls is inversely proportional to the number of free extensions (1260/number of free extensions + 1). The destination of these calls may be internal (66.6%) or external (33.3%). The operator is not required for calls which originate internally. A signaling unit, and an internal line is required for internal calls, and an external line for external calls.

Fifteen percent of extensions are engaged when tried, and twenty percent are not answered.

The time required to signal is 7±2 seconds, and to ring through to an extension is 6±2 seconds. A caller waits 4±1 seconds to check an engaged tone. The service of an operator takes 9±3 seconds.

Simulate the operation of the private branch exchange telephone system for 1 hour.

1.Determine the utilization of the operator, signaling units, internal and external lines, and the extensions.

2.Sample the number of internal and external calls being processed every minute.

3.Are the number of internal and external lines, and signaling units sufficient?

;GPSS World Sample File - EXCHANGE.GPS, by Gerard F. Cummings

**********************************************************************

* PBX Telephone System Model * * Time is in seconds *

**********************************************************************

Transit TABLE M1,20,20,20

**********************************************************************

Extensions STORAGE 200 Extlines STORAGE 30 Intlines STORAGE 30 Signals STORAGE 8 Operator STORAGE 1

**********************************************************************

* Define variables

Internal VARIABLE 1260/(1+R$Extensions)

External VARIABLE 2500/(R$Extensions+S$Extensions)

*

*Tables for number of calls in progress Callsint TABLE S$Intlines,2,2,20 Callsext TABLE S$Extlines,2,2,20

**********************************************************************

* Generate calls originating internally

GENERATE (Exponential(1,0,V$Internal)),0,20 ;Calls origin

;internal

ENTER Extensions ;An extension is involved QUEUE Inside ;Queue for signal unit

ENTER Signals ;Get a signaling unit DEPART Inside ;Leave the queue ADVANCE 7,2 ;Time to signal

LEAVE Signals ;Leave the signal unit

TRANSFER .333,,Intout ;33% are internal to ext

*

Intint TEST GE R$Intlines,1,Breakoff ;Test int line available ENTER Intlines ;Get and internal line

ADVANCE 4,1 ;Check if engaged

TRANSFER .15,,Busy ;Some extensions engaged

Aline ENTER Extensions ;Another extension involved ADVANCE 6,2 ;Time to ring extension

TRANSFER .2,,Nogood ;20% not answered ADVANCE (Normal(2,150,30)) ;Call duration Nogood LEAVE Extensions ;Leave extension Busy LEAVE Intlines ;Leave internal line TRANSFER ,Breakoff

***********************************************************************

* Model internal to external calls

Intout TEST GE R$Extlines,1,Breakoff ;Is an ext line available? ENTER Extlines ;Get an external line

ADVANCE 4,1 ;Time to check if engaged TRANSFER .200,,Nobody ;20% are engaged ADVANCE 6,2 ;Time to answer

TRANSFER .200,,Nobody ;20% do not answer ADVANCE (Normal(2,150,30)) ;Call duration TABULATE Transit ;Record transit time Nobody LEAVE Extlines ;Leave external line

Breakoff LEAVE Extensions ;Free the extension TERMINATE

***********************************************************************

* Process calls originating externally *

GENERATE (Exponential(1,0,V$External)) ;Calls of external ; origin

TEST GE R$Extlines,1,Nonefree ;Ext line available? ENTER Extlines ;Get an ext line

QUEUE Outsider ;Queue for operator ENTER Operator ;Get an operator DEPART Outsider ;Depart the queue ADVANCE 9,3 ;Operator service LEAVE Operator ;Leave the operator ADVANCE 4,1 ;Is it engaged?

TRANSFER .15,,Engaged ;Some exts engaged ENTER Extensions ;Get an extension ADVANCE 6,2 ;Time to ring ext

TRANSFER .200,,Noperson ;20% No answer ADVANCE (Normal(2,150,30)) ;Call time TABULATE Transit ;Record transit time Noperson LEAVE Extensions ;Leave extension Engaged LEAVE Extlines ;Leave external line Nonefree TERMINATE

***********************************************************************

GENERATE 3600 ;Transaction each hr TERMINATE 1 ;Term timer xact GENERATE 60 ;One xact every min TABULATE Callsint ;No. of int calls TABULATE Callsext ;No. of ext calls TERMINATE

***********************************************************************

The model is organized into several segments. After the Storages, Tables, and Variables are defined, there are three more model segments. Transactions in the top segment represent calls originating internally, transactions in the second segment represent calls originating externally, and transactions in the bottom segment sample the calls in progress every minute, and time the simulation by decrementing the Termination Count once per simulated hour.

To run the simulation and create a Standard Report,

CHOOSE File / Open

and in the dialog box

SELECT EXCHANGE

and then

SELECT Open

Next, create the simulation

CHOOSE Command / Create Simulation

then

CHOOSE Command / START and in the dialog box, since we want to use 1 as the Termination Count.

SELECT OK

The simulation will end when a transaction has entered the TERMINATE 1 Block. This represents 1 hour of operation.

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

The utilizations of the operator, signaling units, internal lines, external lines, and the extensions were 69%, 11%, 31%, 44%, and 15%, respectively.

Sampled every minute, the average internal calls in progress were 9.47, and the average external calls in progress were 13.16. This information is found in the Tables section of the report.

From the utilization data, it would appear that the configuration of lines is sufficient at this level of call traffic. The external lines had the highest utilization, and it would be interesting to see if an increase in external lines would significantly improve the call delay times. In any case, the capacity of the system to handle a significant increase in traffic is in doubt. If such growth is likely, it would be prudent to experiment with the effects of increased call rates, and remedial actions.

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 in the dialog box

CLICK ON The Down Arrow at the Right End of the Box

CLICK ON Transit

SELECT OK

Each Table Window gives information on one of the particular Tables or Qtables defined in a model. The Table Transit shows the distribution of call completion times. The average was about 174 seconds. Let’s look at the next Table.

CHOOSE Window / Simulation Window / Table Window and in the drop-down box in the dialog box

CLICK ON The Down Arrow at the Right End of the Box

CLICK ON Callsint

SELECT OK

The Table Callsint shows the distribution of internally originated calls in progress, sampled every minute. What about external calls?

CHOOSE Window / Simulation Window / Table Window and in the drop-down box in the dialog box, CALLSEXT is already selected.

SELECT OK

The Table Callsext shows the distribution of externally originated calls in progress, sampled every minute. Now look at the resource utilizations.

CHOOSE Window / Simulation Window / Storages Window

The Storages Window shows statistics of the operator, extensions, external lines, internal lines, and signaling units. The set of external lines has the highest utilization of all the equipment. You may have to expand the window to see all of the Storages.

The Storage that represents the operator shows us that she/he was busy over 69% of the time.

Before we run the simulation again, let’s close up the windows that we have opened so far. Remember, it is best to only keep open the graphics windows that you are actively viewing.

CLICK ON The X-Upper Right of Each Window

Let’s look at how the busy lines change as calls come in.

CHOOSE Window / Simulation Window / Blocks Window

We can also view various values as the simulation runs.

CHOOSE Window / Simulation Window / Expressions Window

The Edit Expressions 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 e to go from the first to the second box as GPSS World then assumes that all values have been entered. Now, in the dialog box for the Label field

TYPE Clock

and in the Expression field

TYPE AC1

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 Expressions 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 Internal Lines

and in the Expression field, replace the current value

TYPE S$Intlines

CLICK ON View

CLICK ON Memorize

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

TYPE External Lines

and in the Expression field, replace the current value

TYPE S$Extlines

CLICK ON View

CLICK ON Memorize

Finally, let’s keep track of the Extensions.

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

TYPE Extensions

and in the Expression field, replace the current value

TYPE S$Extensions

CLICK ON View

CLICK ON Memorize

SELECT OK

Now, we’ll run the simulation and observe the values in the Expressions Window as well as the Block entry counts in the Blocks Window. Make sure you have positioned the windows so you can see the appropriate parts of both the Blocks Window and the Expressions Window. The best way to do this is to have the Model Window contracted and at the top of the screen. Then, the Expressions Window can be placed at the bottom left on top of the Blocks Window.

CHOOSE Command / START

and in the dialog box, replace the 1.

TYPE 15

SELECT OK

When you have seen enough, halt the simulation.

PRESS o

Please feel free to modify the parameters and Blocks of this simulation. The relationship between configuration costs and system behavior forms the basis for determining the optimum design. Don’t forget to clear the old statistics using either the CLEAR or RESET Commands.

When you are done, 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.

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