HELP (Программа GPSS), страница 9

2018-01-12СтудИзба

Описание файла

Файл "HELP" внутри архива находится в следующих папках: Программа GPSS, GPSS. Документ из архива "Программа GPSS", который расположен в категории "". Всё это находится в предмете "моделирование систем" из 8 семестр, которые можно найти в файловом архиве РТУ МИРЭА. Не смотря на прямую связь этого архива с РТУ МИРЭА, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "моделирование систем" в общих файлах.

Онлайн просмотр документа "HELP"

Текст 9 страницы из документа "HELP"

An example of a DoCommand invocation is:

DoCommand(“START 1000”);

The DoCommand Library Function is peculiar in that its argument string is compiled in global scope. This means that you cannot reference local variables in an argument of a DoCommand invocation. Instead, if you need to pass local values to DoCommand, you must use PLUS string commands to create an argument string including evaluated results. As an example of this, here's the "Run Execution Procedure"

created by the Automatic Experiment Generators to log run information to the Journal:

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

* The Run Execution Procedure *

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

PROCEDURE SEM_GetResult() BEGIN

/* Run Simulation and Log Results. */

/* Treatments have already been set for this run. */

TEMPORARY CurrentYield,ShowString,CommandString;

/* Run Procedure Call */

RunProc(SEM_NextRunNumber);

/* Place Run Results in Journal. */ ShowString = PolyCatenate(“un “,String(SEM_NextRunNumber),”. “, “” );

ShowString = PolyCatenate(ShowString,” Yield=”,String(CurrentYield),”. “);

ShowString = PolyCatenate(ShowString,” Factor1=”,String(Factor1), “;” );

ShowString = PolyCatenate(ShowString,” Factor2=”,String(Factor2), “;” );

ShowString = PolyCatenate(ShowString,” Factor3=”,String(Factor3), “;” );

CommandString = PolyCatenate(“SHOW “””,ShowString,””””, “” );

DoCommand(CommandString);

SEM_NextRunNumber = SEM_NextRunNumber + 1;

RETURN CurrentYield;

END;

Figure 13-6. Using a DoCommand in a PLUS Procedure

This procedure issues a SHOW Command in 3 steps. It records the result and conditions of the run in the Journal. First it creates a temporary string, ShowString, which contains variables evaluated locally. Second, it builds the overall string with the completed SHOW Command in the temporary variable CommandString. Finally, it invokes the DoCommand library procedure. Normal Procedures such as this can only invoke DoCommand when a CONDUCT Command is in effect. In other words, such Procedures must be called either directly, or indirectly, by a PLUS Experiment.

In experiments with many runs, it is convenient to use a PLUS Procedure to do the set up of each simulation run in the experiment. Such a procedure initializes the random number generators and issues commands that control the simulation. Then, you can set up your high level PLUS Experiment to call the Run Procedure each time a simulation is to be run.

An example of the default Run Procedure created by the Experiment Generators is in Section 13.4. 2. Even when GPSS World Creates the Experiment for you, it is up to you to modify the Run Procedure to fit the run conditions of your own simulation project.

13.3.3 The Result Matrix

The primary source of information from an experiment is kept in the Result Matrix. In order for the ANOVA library procedure to analyze the results of an Experiment, you must assure that the Result Matrix has been set up appropriately.

In GPSS World, a Matrix Entity can have up to 6 dimensions. There is no arbitrary limit on the size of each dimension other than that imposed by the virtual memory of the computer. However, one of the most important jobs in setting up a GPSS World Experiment is the selection of factors. Each factor to be included in the Experiment is assigned to one of the dimensions of the Result Matrix. In addition, depending on the design of the experiment, you will probably want to use one dimension for replicates, which must be large enough to handle the runs in the largest cell. For each dimension used for a factor, the size at least as large as the number the treatment levels of that factor. That is because there must be a place in the Result Matrix for each run. There can be any number of these treatments up to the limits imposed by the virtual memory of your computer.

If your experiment has more than one result metric, you need only define a separate Result Matrix for each one, and then utilize the ANOVA Procedure for each.

Viewing a Result Matrix

GPSS World Matrices can be viewed in a Matrix Window or printed in a Standard Report. Since GPSS World is unable to view all 6 dimensions at one time, it presents only a two dimensional slice in a Matrix Window. A small Dialogue Box is used to select the slice of the Matrix that is to appear.

Figure 13-7. The Matrix Cross Section Selection Dialog

Figure 7 presents the dialog that allows the selection of a slice through a higher order Matrix Entity. In this case we have a 3 by 4 by 2 3-dimensional Result Matrix. To use it, first select the two dimensions to form the Rows and Columns of the Matrix Window, then use the index of the remaining dimensions to select deeper slices, other than the first. It may be helpful to think of a loaf of bread seen head-on. The row and column numbers indicate where on the slice we are, and the index of the third dimension chooses the slice. In Matrices with 4 or more dimensions, an index value would be needed for each dimension not participating as a row or column.

Once the Matrix Window, itself, is open you will have the chance to scroll to any location within that slice. Matrix Windows are updated dynamically, and any number of Matrix Windows can be open at the same time.

The other way to view the elements of a Matrix Entity is to include the results in the Standard Report. Page 2 of the Settings of a Model or Simulation Object ( Edit / Settings ) has a checkbox which when checked, puts a line for each element of the Matrix in subsequent Standard Reports.

Initialization of a Result Matrix

Variables within GPSS World can take on a variety of data types without user intervention. Behind the scenes, values are converted from one form to another as needed. For example, a string is converted to a real number if the operator using that value requires a real argument.

Variables and Matrix elements can take on the value UNSPECIFIED to indicate that no value has yet been assigned to it. UNSPECIFIED is not a string and will cause an Error Stop if an operator encounters it while evaluating an expression.

For compatibility reasons, when GPSS Matrices are created or CLEARed, they are given the value of 0. However, a Result Matrix should have all elements initialized to the UNSPECIFIED state before the Experiment is executed. In this way, the ANOVA library procedure can detect when runs are missing. Otherwise, a 0 value is taken to be the result of a run of the experiment. The INITIAL Command now supports the initialization of a Matrix to UNSPECIFIED.

INITIAL MatrixName,UNSPECIFIED

This Command causes all elements in the matrix to be set to the UNSPECIFIED state. Normally, you should place the initialization statement outside the Experiment, itself. This is what GPSS World does when it generates a Screening Experiment.

In addition to showing which data is missing, the use of the UNSPECIFIED state in the Results Matrix allows an Experiment to be saved and restarted without repeating runs that have already been completed. To be restartable, the Experiment should test the destination element for UNSPECIFIED before calling the Run Procedure. Automatically generated Screening Experiments use this method.

Here's another example of the creation and initialization of a Result Matrix.

MyResults MATRIX ,3,5,4,3

INITIAL MyResults,UNSPECIFIED

Figure 13-8. GPSS Statements Initializing a Result Matrix

In this example a Result Matrix is created which can hold the results of an experiment with 4 factors, or one with 3 factors with replicates. Factor A can have up to 3 treatment levels, factor B can have up to 5, and so on,

The INITIAL Statement sets all elements in the Matrixto "UNSPECIFIED". This allows the ANOVA routine to detect elements in the matrix where no results are available.

13.3.4 ANOVA Library Procedure

The final step in a User Experiment is usually the analysis of results. By calling GPSS World’s ANOVA library procedure, most of the work is done for you. The ANOVA Procedure can handle a multiway Analysis of Variance considering up to 6 factors and up to 3-way interactions of all combinations of main factors.

There are 3 arguments to the ANOVA Procedure. The first is the name of the Result Matrix, which is described in more detail, below.

The second argument is an optional dimension of the Result Matrix to be used for replicates. Each level in this dimension represents a run with distinct random number seeds. The ANOVA Procedure uses all information associated with the replicate dimension as part of the estimate of the Standard Error. This provides an estimate with more information and more Degrees of Freedom than had a replicate dimension not been used.

Some experimental designs do not use a replicate dimension. In that case, use a 0 as the second argument.

The third argument controls the factor interactions to be included in the statistical model. If the argument is 2, only 2-way interactions are included in the analysis. If the argument is 1, no interaction terms are included. A value of 3 or greater causes main effects, 2-way interactions, and 3-way interactions to be included in the statistical model. Four way interactions are not supported by GPSS World. The reason you would want to limit the interaction terms in the statistical model is this: when interaction terms are removed from the model, additional information and degrees of freedom become available for a better estimate of the Standard Error.

The main goal of the ANOVA Procedure is to create a standard ANOVA Table in the Journal, which indicates the resulting F statistic and its critical value. In addition, when you call the ANOVA Procedure from a PLUS routine, the Standard Error is returned when the ANOVA Procedure completes.

The ANOVA Table

Here we have an ANOVA table generated automatically by the library procedure in GPSS World.

Figure 13-9. An ANOVA Table

Each factor and interaction in the statistical model is represented by a distinct line in the ANOVA table. In each line we have the basic calculations and the F statistic for that effect.

The larger the F value the stronger the effect. It’s considered significant if it exceeds what is called “the critical value of F”, which is calculated for you by GPSS World. The ANOVA table above shows the effect of factor A to be significant and the effects from factor B and the AB interaction to be not significant.

It’s important to avoid Variance Reduction Techniques when using Analysis of Variance. They distort the variability introduced to simulate real-world randomness. Reducing the intrinsic variability of the observations causes the F statistics to be overstated.

When you do an Analysis of Variance, you should investigate the assumptions behind the analysis, such as normality and unchanging variance, which statisticians call ‘homoscedasticity’. GPSS World provides another feature for this purpose. If you create a GPSS Table Entity with a specific name, the ANOVA Procedure will fill it with the residuals of the Analysis of Variance. This is discussed in the next section.

The cell statistics report follows the ANOVA table, and it gives ranges and 95% Confidence Intervals for each Treatment Combination in the experiment, based on a pooled estimate of the Standard Error.

Although the Confidence Intervals associated with treatment combinations are not independent, the ranges can still be used as a check on the assumptions behind the ANOVA. When these vary wildly the homogeneity of variance in the residuals is in doubt. In that case, you may need to examine the data more closely before drawing your final conclusions. One way is to define a GPSS Table to collect the residuals calculated in the Analysis of Variance. The next section tells you how to do this.

13.3.5 The Table of Residuals

Whenthe ANOVA Procedure performs its analysis, it searches for a GPSS Table Entity of a special name. It looks for a Table Name the same as the name of the Result Matrix except that the string “_Residuals” is appended. If it finds a Table Entity of the derived name, the ANOVA Procedure tabulates the residuals of the analysis for the purpose of checking the assumptions used by ANOVA. For example, if you have a GPSS Table entity named MyResults_Residuals defined when you call ANOVA with a Result Matrix named MyResults, GPSS World will clear the Table and fill it with the residuals from the Analysis of Variance.

Skew and outliers can sometimes be detected in the Table of Residuals, and the lack of homogeneous variance (heteroscedasticity), when it occurs, is often apparent here and in the in the descriptive statistics report which follows the ANOVA Table.

13.4 The Automatic Experiment Generators

GPSS World can generate either screening or optimization experiments for you. You can use them to rule out irrelevant factors or to find the best treatment combination. The process inserts a PLUS Experiment into your Model Object and optionally loads a Function Key with the appropriate CONDUCT Command. It takes just 4 easy steps:

1. Fill out the dialog (Edit Menu) and Click OK.

2. Edit the Run Procedure and Click OK.

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5232
Авторов
на СтудИзбе
424
Средний доход
с одного платного файла
Обучение Подробнее