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

Lesson 14 - Reports

The Report management system contains a number of unique capabilities. First you should know that reports are never automatically deleted and are always created unless you suppress them using NP as the B operand of the START Command. Each report is given a name that indicates the simulation that produced it. e.g., SAMPLE2.1.1, SAMPLE2.1.2, etc. The default name is derived from the file name of your model, the sequence number of the simulation created from that model and finally, the report number for that simulation version. These reports will remain even after the Session is ended.

If you choose to use a REPORT Command you can only use it interactively as

Report ,Now

You can no longer give your reports names. Since reports are specially formatted files, if you wish to name them differently, you can copy the report to the clipboard and from there to a file with the name you choose to assign. Reports have an extension of "gpr". The numbering scheme is meant to keep your reports ordered. If you wish to reset the simulation number, you can do so in the Settings Notebook.

CHOOSE File / Open

and

SELECT SAMPLE9

and

SELECT Open

CHOOSE Edit / Settings

CLICK ON The Random Numbers Page

The setting "Child Object Sequence Number" sets the number of the simulation. If you have saved simulations from this model, the number would be >1. You can reset it to any value. This is the value used in the report name.

When you start a new GPSS World Session, reports generated during that Session using the default name (simulation name plus simulation sequence number plus report sequence number) will be numbered starting with the first available sequence number after the highest number. Therefore, if you have deleted selected reports, you could have sequence numbers in a Session that are not contiguous.

The REPORT Command

REPORT ,NOW used in a Custom Command dialog box is used to produce a report interactively at any time. The A operand of the Report Command, as used in GPSS/PCtm, is no longer used.

The REPORT Settings

Now let’s look at some report settings.

Move to the Reports Page in the Model Settings Notebook.

CLICK ON The Reports Page

You can see the default information that is included in reports created by

running the simulation that we just created. You can try changing the choices if you like. Remember, you will have to create a new simulation if you want any changes to be used when you run the simulation.

Also, the settings are discussed in detail in chapter 2 of the GPSS World Reference Manual.

Let’s create a simulation from the opened model. first close the Settings Notebook.

CHOOSE Command / Create Simulation

Now, see how a report is generated

CHOOSE Command / START

We’ll use the 1 that’s already there.

SELECT OK

When the simulation completes, you’ll notice that a Report Window appears automatically as we expected. If you wish, you can increase the size of the window and examine the report more closely. For a detailed discussion of the items in the report, read Chapter 11 in the GPSS World Reference Manual.

Figure 14—1. The Report Window.

Let’s run the simulation one more time so we have two reports.

CHOOSE Command / START

We’ll use the 1 that’s already there.

SELECT OK

When the simulation ends, you should see a second Report Window. Next, let’s close one of the Report Windows.

CLICK ON The X-Upper Right - SAMPLE9.1.2 Window

CLICK ON No

when asked if you want to save the file. Then close the second report window, but save this one.

CLICK ON The X-Upper Right - SAMPLE9.1.1 Window

CLICK ON Yes

CHOOSE Save

Now let’s open the report again.

CHOOSE File / Open

CLICK ON The down arrow at the end of the Files of type box

SELECT Report

SELECT Sample9.1.1

SELECT Open

Examine this report now if you like. Remember that you can always print any report from a Report Window by using the File / Print option in the Main

Menu.

Let’s try using the REPORT, NOW Command. First, we’ll start the simulation running for a long time and interrupt it.

CHOOSE Command / Clear

CHOOSE Command / START

Replace the 1,

TYPE 11111

SELECT OK

Once the simulation is running, interrupt it.

PRESS o

CHOOSE Command / Custom

and

TYPE Report ,Now

SELECT OK

In this lesson, we’ve learned about the sequence numbering that is used for reports; have examined the settings for reports and the contents of the GPSS World Report. We have also used the Report, NOW command.

If you wish to go on to the next lesson, close all windows. Don’t forget to delete all the reports that we have created that you no longer wish to keep using the Windows file management system.

CLICK ON The X-Upper Right of Each Window

and answer the appropriate questions.

In the next lesson, we will look at the Simulation Journal use in GPSS World.

Lesson 15 - Session Journaling

This lesson considers the GPSS World Journal. We have used the Journal earlier in the this manual, but now we will examine it in a little more detail.

The Journal is a chronology of statements written to the Journal / Simulation Window. When you save a simulation, all messages in the Journal / Simulation Window are saved.

The Session Journal collects trace messages, error messages, and any interactive Commands.

Let’s use SAMPLE5 to study the Journal / Simulation Window.

CHOOSE File / Open

and

SELECT SAMPLE5

and

SELECT Open

When we create a simulation and run it, the Journal / Simulation Window will record any errors as well as any interactive actions such as SHOW or STEP commands. Now, let’s see how we can use the Journal Window for interactive debugging.

CHOOSE Command / Create Simulation

Let’s put a universal Stop Condition on the model so we can use the STEP Command and see the record in the Journal.

CHOOSE Command / Custom

and in the dialog box

TYPE Stop

SELECT OK

and then

CHOOSE Command / START

and in the dialog box replace the 1

TYPE 11

and

SELECT OK

The simulation will stop immediately. Let’s use the STEP command.

PRESS p

a few times. Then look at the Journal Window. You may want to enlarge its size or print it to look at the messages created. You can imagine how helpful this window can be in tracking down errors.

Now, if you aren’t going on to the next lesson, go ahead and end the GPSS

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