Object GPSS on Object Pascal

 

 

 

 

 

 

 

 

 

Anatoliy G Korolov

7, Nauki St., Apt. 77

The Institute of Technology

Severodonetsk, Lugansk Reg., 93400, Ukraine.

 

 

 

 

 

 

 

 

 


††††††††††††††† Anatoliy G. Korolyov.

††††††††††††††† Object GPSS on Object pascal.

ABSTRACT

In the paper commands and blocks comparison for GPSS-World and Object GPSS is executed. Object GPSS is means for creation models in GPSS - style directly on Object Pascal. Each model represents as Include a file containing the description of all objects of model and a set of procedures: Initial, ModelTxt, Modeling, Report, and CloseAllObj. Practically all parts of model, except for "stuffing" of procedure ModelTxt, are created by the converter program. It is necessary to compile model together with a standard head part of the program and standard file GPSS_SYS for the modeling creation. Received the .EXE - file is model of concrete system and it is possible to execute experiments with it. It is easy to expand the set of procedures for modeling and visualization means by the customer for this system.

1 †††† Introduction

It is known, that simulation model is a powerful means for complex systems studying. For model simulation it is used some languages in particular the GPSS language. In the best way GPSS described in T. J. Schriber's known book ЂSimulation on GPSSї which also is known as Ђ the red book ї. This book is the fundamental manual on GPSS language. It perfectly describes as a problematic of simulation systems and methods of decision simulation tacks by this language.

GPSS exists more than 40 years and during the existence repeatedly was exposed to attacks as insufficiently flexible and archaic. But the approach incorporated in its basis was reliable enough to provide its viability within all these decades. GPSS was and remains rather effective for simple tasks decision devoted to simulation systems.

In the eightieth years corporation IBM has stopped to support GPSS. Therefore its further history was determined by work of its enthusiasts as Thomas J. Schriber, Springer Cox, Julian Reitman, James O. Henriksen, Peter Lorenz, Ingolf Stahl and a lot of others.

The importance of such language as GPSS for research of simulation systems is not subject to doubt. This language is widely used in European education.However long-term experience of teaching on this language in university has shown that for years of its development the language has incorporated a lot of negative that prevents it understands by students. This language even in the new version - GPSS World is badly combined with new opportunities that are given to the programmer by Windows system. To put it briefly the problem was to try to modernize GPSS and to expand its opportunities to use the Windows.

2††††† Specific proposals

Attempt to comprehend this problem as a whole has led to understanding of the following. It is need to immigrate opportunities of GPSS into one of the good programming languages which provides effective work with Windows.

It is natural that opportunity of such languages, as Microsoft C # and Object Pascal (Delphi) first at all were considered. Realization of mainframes GPSS is not too difficult. It includes work with lists of transactions and work with such objects, as queues, facilities, tables, and so on. Question on how to realize the order of blocks performance controlling by transactions has the obvious decision. It is necessary that all blocks of model were procedures and were in the operator Switch for C# or in the operator Case for Object Pascal. Then the choice of the necessary block (procedure) can be carried out by the number of the following block of the active transaction. After the block executing management is transferred to active transaction again.

It is natural that not any procedures can be used as blocks. They mast to provide correct work with lists of transactions, in particular with numbers of the current and following blocks of the active transaction. Thus blocks, commands, and system numerical attributes of GPSS it is possible to present as procedure and functions of C# or Object Pascal and the text of model on GPSS can be adequately submitted as sequence of corresponding procedures of the programming language.

Object GPSS system is offered to your attention. It is realized on Object Pascal language and provides models creation in GPSS like Ц style. Every model is succession of objects descriptions and procedures descriptions on Object Pascal. For working with models in GPSS Ц like style it is need to use the Converter program as the Shell. It is important part of Object GPSS system. Example of the model witch creates by converter can look as follows. The text of the model is practically Object Pascal text. Any model builds on template base and so its text has some additional information.Lines of template is lines with С~ С. Some lines are generated automatically when you insert model objects.These lines begin from С{\Т. In this model describes Storages sto1 and sto2, Facility fac1, Queue qsys, Table tbl and Generator Gen.

Example

{~vb} Var

{\sto1} sto1:TStorage;

{\sto2} sto2:TStorage;

{\fac1} fac1:TFacility;

{\qsys} qsys:TQueue;

{\tbl} tbl:TTable;

{\Gen} Gen:TGenerate;

{~ve}

{~pfe}

{~ib} procedure Initial;begin

setstart(10000);

{\sto1} Init(sto1,'sto1',3);

{\sto2} Init(sto2,'sto2',5);

{\fac1} Init(fac1,'fac1');

{\qsys} Init(qsys,'qsys');

{\tbl} Init(tbl,'tbl',0,100,70);

{\Gen} Init(Gen,'Gen',Gen_,exponential(85) );

{~ie} end;

{~mtb}procedure ModelTxt;begin case ActiveBlock of

{\Gen} ::Gen_ *:Gen.Generate(exponential(85) );

†† *:qsys.queue;

†† *:ToPoint (2,Ac1,Tbl.a);

†† *:transfer ([lb1,lb2,lb3]);

::lb1 *:sto1.enter;

††† *:qsys.depart;

††† *:advance (490,450);

††† *:advance (15);

††† *:sto1.leave;

††† *:tbl.tabulate (m1);

††† *:terminate (1);

 

::lb2 *:sto2.enter;

††† *:qsys.depart;

††† *:advance (990,950);

††† *:advance (0);

††† *:sto2.leave;

††† *:tbl.tabulate (m1);

††† *:terminate (1);

 

::lb3 *:fac1.seize;

††† *:qsys.depart;

††† *:advance (500,400);

††† *:fac1.release;

††† *:tbl.tabulate (m1);

††† *:terminate (1);

 

{~mte} else modelerror;end;end;

{~mb} procedure Modeling;begin

start(GetTerm);

show (tbl);

{~me}end;

{~rb} procedure Report;begin

{~re} end;

{~cab} procedure CloseAllObj;begin

{~cae} end;

Practical all you text of model is the Уgreen textФ in procedure MoselTxt.It is essentially model.

Line setstart(10000); from procedure Initial defines number of served transactions.

Line start(GetTerm); start modeling with current number of served transactions.

Lineshow (tbl); show table as Histogram after modeling.

Symbols С*:Т are replaced by blocks number when you create model as .EXE Ц file.

The equivalent text on GPSS World language looks as follows:

sto1 storage 3

sto2 storage 5

tbltable m1,0,100,70

 

†† generate (exponential(1,0,85))

†† queue qsys

†† transfer all,lb1,lb3,7

lb1 enter sto1

††† depart qsys

††† advance 490,450

††† advance 15

††† leave sto1

††† tabulate tbl

††† terminate 1

 

lb2 enter sto2

††† depart qsys

††† advance 990,950

††† advance 0

††† leave sto2

††† tabulate tbl

††† terminate 1

 

lb3 seize fac1

††† depart qsys

††† advance 500,400

††† release fac1

††† tabulate tbl

††† terminate 1

start 10000

Any model on Object GPSS is the text on Object Pascal.As result, all opportunities of Object Pascal are accessible in you model.

In particular it is possible to use files for input and output of the data in such model. It†† is possible simply and naturally to show lines or functions. It is possible to describe arrays and matrixes of any objects of model in particular multi-channel devices, user lists, tables, and much other.

Here is simply and naturally to create EXE - files (programs) that are models of concrete systems of simulation. There are no problems to create of new blocks for construction of model including blocks that are necessary only for concrete model. Actually opportunities of the model developer are not limited by a set of available blocks of GPSS.

Some more value of text of model and a little bit greater processor time of modeling in comparison for example with GPSS World is much compensated by the expanded opportunities of system.

Directly in model it is possible to use the following base types of the data: Integer, Double, Boolean, String.In model X and P parameters can be values of any these 4 types.

In the developed system Object GPSS every model is Include - file that is inserted into the head program by the instruction to the compiler.

{$INCLUDE model}

The file Model.pas contains the description of concrete model Object GPSS on Object Pascal.It creates by the model text conversion. During conversion every two symbols С*:Т is replaced by number of block and С:Т.Every label (::Label) is converts to constant with value УNumber of BlockФ. For example for previous model it will be these constants:

Const

ModelName='E:\work\gpss\new paper\test1.obs' ;

Gen_=1;

lb1=4;

lb2=11;

lb3=18;

num_bl=23;

††††††† Number of blocks changes from 1 to 23.

File of head program Project ObjectGPSSProject.dpr together with model is compiled by DCC32 utility from Delphi with concrete model creation as EXE - file. It is possible to carry out experiments with this model.

All files of the project except for file Model.pas, basically do not depend from concrete model and instead of their codes it is possible to use DCU - files which is already compiled parts and which require only assembly to the uniform program.

Any model contains the following sections.

1. ††† The description of constants, variables and objects of model.

2. ††† Procedure Initial in which initialization of all variables and objects of model is executed.

3. ††† Procedure ModelTxt in which the model of system is described actually.

4. ††† Procedure Modeling in which concrete commands of manipulation with model are specified. It is modeling plan. This procedure is standard as rule.

5. ††† Procedure Report in which formation of target statistics for all addition objects and variables of model is executed. This procedure is empty as rule.

6.††† Procedure CloseAllObj in which destruction of all addition variables and objects of model is executed. This procedure is empty as rule.

In the procedure modeling it is possible to run model, and to prepare it for new modeling. In particular, it is possible to change values X - parameters, multi-channel devices, tables, variables and so on.

The concrete model provides the following experiments opportunities.

Start of model, that is execution of procedure Modeling with the specified value of counter Tg1.

Reschedule stop of modeling process. You can go on the current modeling.

Return model to an initial stage.

Reset of the collected model statistics.

Create of the full or partial report on modeling.

††††††† Select section of the information for the report.

You can view the graphic information.

You can stop of modeling.

The created program can be renamed or transferred into the other folder.

Standard model report may have the following parts:

Model Text

Blocks List

Current Transaction List

Future Transaction List

Synchronize Transaction List

Interrupt Transaction List

User Transaction List

P Ц Parameters List

X Ц Parameters List

Queue List

Storage List

User List

Facility List

Table List

Values List

Group List

For objects from classes the name of object then a point and then a name of procedure or function from a class should be specified. For example: fac1.seize - enter the facility with a name fac1.

The system Object GPSS contains the following classes of objects:

Class TXParam contains the basic operation and functions for X - parameters.

For X parameter value getting it may be used functions RX(Num), IX(Num), BX(Num), and SX(Num) which have real, integer, logic and string values accordingly. Though these parameters have numbers instead of numbers it is possible to use the integer named constants. Then the code of model becomes more evident. Instead of X - parameters it is possible to use variables and elements of arrays in this system. For variables blocks Let for real, integer, Boolean and string values are used.

X - Parameters - are typified, and therefore instead of block Savevalue - blocks RXLet, IXLet, BXLet, SXLet and RXAdd, IXAdd are used. These blocks have no enough parameters for polymorphism and so they have different names for different data types. You can assign a list of values to list of X Ц parameters.Blocks RXDelete, IXDelete, BXDelete, SXDelete can delete X Ц parameters. X - Parameters values can be changed at modeling time, and before new modeling. The blocks XSortNum, XSortVal copies numbers and values from X - parameters into dynamic arrays sorted by numbers or Values.There are number of other blocks, procedures and functions for X parameters.

The largest group of blocks, procedures and functions is Common Group. Its group has†† almost the same blocks, procedures and functions as GPSS Ц World. That is: M1 Ц age of the transaction, TG1 - the current value of the counter. For P Ц Parameter value getting it may be used functions RP, IP, BP and SP which have real, integer, logic and string values accordingly.

Though these parameters have numbers, instead of numbers always it is possible to use the integer named constants.Then the code of model becomes more evident.

P - Parameters - are typified, and therefore instead of block Assign blocks RPLet, IPLet, BPLet, and SPLet and RPAdd, IPAdd are used. You can assign a list of values to list of X Ц parameters. Blocks RPDelete, IPDelete, BPDelete, SPDelete can deletes P Ц parameters. There are number of other blocks, procedures and functions for P parameters. Blocks Let and Add can change values of variables.

Setting of new value of the counter TG1 is possible during modeling. (Block SETTG1).

Block Test provides a branching on any number of labels and also a delay of the transaction if it could not move to any label. Block Transfer can used as the block of transferto the subroutine, as the block of an unconditional moving of transaction, as block of transfer transaction according probability or as block of transfer transaction to any label where it will accept. Block Match can synchronize any number of blocks. Here there is the block for searching of specified transaction FindXN1. It determines the current and following block, and also the list in which transaction is. System has blocks for Reading and Writing data from and to file and function for getting objects by Number of object. This functions can use in subroutines.

Block Select writes numbers of transactions from the list into dynamic array if condition - function is true. List can be 'C', 'F', 'S', 'I '.In these case views the list of the current events, the list of future events, the list of synchronization, or the list of the interrupted transaction.

System has statistics functions and function which has result according to conditions or according to number. It has continuous and discrete functions which described by points. System can start modeling from accidental or setting value of random-number generator. There are some blocks for dynamic arrays.

The model can use blocks which are intended for use of opportunities of the head program. They makes on the basis of available blocks.

These are blocks ToPoint, ToString, ToValue and CurrentBlocks that shows the next point, the next value to string, the next value and the current information on blocks. Block Stop provides almost immediate termination of modeling. It is useful at debugging and in some other cases. If Stop executes then value of the counter Tg1 not change. Procedure CustomProc creates the list of names of custom procedures and the list of procedures. This procedures user will can execute from list of procedures. CustomProc usually use as additional like modeling procedures list. Procedure FormShow Ц Shows or Hides form. Procedure AppClose close application. Procedure SetDistance sets limit on number of blocks for one transaction moving without delay.By default it is 10000.This limit protects model from infinite looping.

Class TGENERATE describes generators of transactions that are actually blocks Generate. Each Generate block should be described and initialized. Block Generate can have the condition which determines whether the transaction to leave the block. Arrival of the new transaction planes only if the previous transaction has left the generator.

Class TTABLE describes the tables for gathering of statistics. It has procedures that can show tables as schedules and histograms.

Class TQUEUE describes queues. Its procedures and function is the same as in GPSS- World.

Class TSTORAGE describes multi-channel devices. It has blocks SetStorage that set new capacity limit for the device and the block SetGoto that transfer transition to other block of model from an entrance of the device or it interdicts transaction to enter into the multi-channel device.

Class TFACILITY describes single-channel devices. For such devices also there is block SetGoto and a little different set of blocks for realization of interruptions, and for availability and unavailability realization for the device. Namely: blocks Preempt, Return, Favail and Funavail are replaced with blocks Extract, ExtractPreempt, Preempt, Preempt0, Return, Return0 which delete the transaction served, interrupted on the device, interrupts service of the transaction with capture or without capture of the device, and also returns to service the transaction after interruption or returns devise to availability after the period of unavailability.

Classes TGROUP, TIGROUP, TSGROUP describe groups for double, integer and string data. Their procedures and function is the same as in GPSS- World.

††††††††††††††† Class TTGROUP describes groups of transactions. Its set of functions and procedures is appreciably expanded due to access to parameters of transactions from the list of the group. Selection of the necessary transactions and changes of their P - parameters values executes in accordance with separately described function of a choice and functions of calculation of values. This feature extends opportunities of blocks for working with groups of transaction. In this class blocks Scan and Alter are replaced with blocks RScan, IScan, BScan, SScan and RAlter, IAlter, BAlter, SAlter which finds and changes values of P - parameters. Block Select saves transactions number with true condition in dynamic array.

††††††† Class TUSER describes lists of the user. Its set of functions is appreciably expanded due to access to parameters of transactions from the list of the user. Selection of the necessary transactions executes in accordance with separately described function of a choice. This feature extends opportunities of blocks for working with lists of the user. Block Select saves transactions number with true condition in dynamic array.

Values for blocks or functions can be received from a dialog box or from component Memo in the main window. These are functions RInput, IInput, BInput, SInput, InputItem and RGet, IGet, BGet, SGet.

There are also a number of other blocks, procedures and functions for the models creation and for process of modeling executing.

New blocks may be creating as follows.It is possible simply to place the compound operator framed by key words Begin Ц End in procedure ModelTxt. Compound operator should contain blocks of Object GPSS, and should be arranged so that in any situations equally one block from the system was executed.

It is possible to describe this compound operator as procedure and then it can be used as the new block. For simplification of creation of new blocks you can use block NOP that does not do anything. It simply moves the active transaction to the next block of model.

The converter program for preparation models allows inserting and deleting descriptions of objects to model. It allows executing opening, editing and saving models in the text form. It can also execute Item УRunФ. Then you get Model as application.

When you creates new model first of all it is need to insert all necessary objects into model (item Edit/Insert Object) and then in procedure ModelTxt to Write-down the text of model. Then the model should be saved in a file on a disk, and then it is possible to begin experiments with it. If it is required to insert new objects later or to remove available it always can be made. Attention. Every block generate is object so it is need to insert it in model.You can not copy the Generate Block but you can move it to another place. Names of objects can be left such what they are offered by default or it is possible to enter new name. Types of objects get out from the list.

For model creation it is need to perform the follow steps.

1. To start the application converter.exe

2. To open available model or to create new.

3. To execute item УConvert and RunФ

If there are errors in model it is necessary to correct them in the application converter.exe and then again to execute step 3. If errors are not present, the application with concrete model is started and it is possible to carry out experiences with it.

If in the text of model it is string - {#I.. FileName} then converter can inserts contents of the file into model.

If in the text of model it is string - {#U.. File Name List} then converter can executes connection of models. Here File Name List - the list of model files through a comer. The equivalent sections of models in this case incorporate.

The part of a model text that contained between symbols "!-" and "!+" willbe hides in model. Statistics for blocks whoТs number is contained between symbols "!-" and "!+" willbe hides too.

In summary it is necessary to note that experiments with Object GPSS system has completely confirmed realness of all hopes assigned to it. It surely works and creates programs for concrete models on Object Pascal including rather difficult. The development models are easily to provide due to new blocks and functions. The system contains 12 types of objects, 104 blocks, 101 commands and 174 functions. But if you create simple models then you can use only a little part of all elements of Object GPSS system. The students learn Object GPSS system well.They actively use graphs of different functions and tables in there models.

3††††† Conclusions

††††††† Object GPSS system creates the model which is completely transparent.

The model can use all opportunities of the base programming language, in this case Ц Object Pascal.

The system can be easily expanded in any direction which it is necessary for model author.

Development of the system does not demand high qualification.

The system can be used also for training. Then its transparency and ease of development appears especially useful.

For development of models it is not necessary to know language Object Pascal. It is enough to know bases of any programming language and to study some procedures and functions which are in Object GPSS.

Sets of personal procedures and functions for modeling can be describes directly in model or in an additional file.

Estimating operating experience Object GPSS it is necessary to note that models on it look more naturally than on traditional versions GPSS, but model text is longer. The logic of models construction is more transparent and more corresponds to logic of usual programs. Thus the basic efforts of the models developer are spent for model instead of on struggle against "features" of GPSS.

††††††† The rich means of visualization, additional blocks of a showing and opportunity to suspend performance of model at any moment and to look full results of modeling assist in models debugging.

††††††† The Object GPSS system can be useful as for those who start to study modeling and wants that his models looked professionally and for those who develop complex models under the order.

††††††† Here some features where Object GPSS is better then other GPSS systems.

It can synchronize more then 2 transactions. If it is need to get randomize transaction from Group or from User list, you can select into dynamic array transactions from object which has true condition and then selected randomize transaction.Block Test tests more then 1 condition and so it more useful then block test in other GPSS systems. The block transfer can transfer transaction to any label where it will accept and so it more useful then block test in other GPSS systems. System allows access to P - to parameters and other parameters of any transaction if its number is known. System allows creation and destruction dynamically sets of P - parameters. Additional parameter allows an exit of the transaction from the generator. In the list of the user transactions ordered according to two parameters, the Real and Integer. You can execute modeling in a batch mode. You can input data dynamically by windows of input using. You can transfer transactions to the specified label when device or the multi-channel device is unavailable. You can dynamically change the capacity of the multi-channel device. Block stop executes stop of modeling. Contents of the counter TG1 do not change at that. You can show tables as graph of differential and integrated distribution. You can show various kinds of schedules as graph. Procedure SetDistance sets limit on number of blocks for one transaction moving without delay. This limit protects model from infinite looping. It is some other example of more efficient models on Object GPSS.

REFERENCES

Minuteman Software 2000. GPSS World Reference Manual. Holly Springs NC: Minuteman Software. < minuteman@nc.rr.com >

Ståhl, I. 2001. GPSS Ц 40 years of development. In Proceedings of the 2001 Winter Simulation Conference, ed B. A. Peters et al. Piscataway, New Jersey: IEEE. < ingolf.stahl@hhs.se>

Wolverine Software Corporation. 1996. SLX: An introduction for GPSS/H users. Alexandria, Virginia: Wolverine Software Corporation. < mail@wolverinesoftware.com>

Lorenz, P., H. Dorwarth, K.-C. Ritter, and T. J. Schriber. 1997. Towards a web based simulation environment. In Proceedings of the 1997 Winter Simulation Conference, ed. S. Andradottir, K. J. Healy, D. H. Withers, and B. L. Nelson. Piscataway, NJ: IEEE. < pelo@isg.cs.uni-magdeburg.de>

AUTHOR BIOGRAPHIE

Anatoliy G Korolyov is Associate Professor of the Institute of Technology, Severodonetsk, Ukraine.

He has a Ph.D. like Degree on Computer Science and Engineering from the Institute of Radio Engineering, Taganrog, Russia, 1979.

His research interests include Modeling, developing of simulation software, applied Graph Theory: namely matching, painting of graphs, isomorphism determination etc.

My address ObjectGPSS@Mail.Ru

In a subject of the letter by all means specify Object GPSS.

APPENDIX 1 FORMS and report

1         converter form

1         Main form

2         Report

Date Time Stamp= 23.11.2006 21:08:47

REPORT††† AnatoliyGk@Sti.Lg.Ua : Product Num 816920

E:\work\gpss\new paper\test1.obs

StartTime†††††††† 0.00000 EndTime†††† 860665.33472

 

{\Gen} ::Gen_ 1:Gen.Generate(exponential(85) );

†† 2:qsys.queue;

†† 3:ToPoint (2,Ac1,Tbl.a);

†† 4:transfer ([lb1,lb2,lb3]);

::lb1 5:sto1.enter;

††† 6:qsys.depart;

††† 7:advance (490,450);

††† 8:advance (15);

††† 9:sto1.leave;

††† 10:tbl.tabulate (m1);

††† 11:terminate (1);

 

::lb2 12:sto2.enter;

††† 13:qsys.depart;

††† 14:advance (990,950);

††† 15:advance (0);

††† 16:sto2.leave;

††† 17:tbl.tabulate (m1);

††† 18:terminate (1);

 

::lb3 19:fac1.seize;

††† 20:qsys.depart;

††† 21:advance (500,400);

††† 22:fac1.release;

††† 23:tbl.tabulate (m1);

††† 24:terminate (1);

 

††††††††††† BLOCK Report

††† Location†††† Total†† Current

†††††††† 1†††† 10020†††††††† 0

†††††††† 2†††† 10020†††††††† 0

†††††††† 3†††† 10020††††††† 12

†††††††† 4†††† 10008†††††††† 0

†††††††† 5††††† 4764†††††††† 0

†††††††† 6††††† 4764†††††††† 0

†††††††† 7††††† 4764†††††††† 2

†††††††† 8††††† 4762†††††††† 0

†††††††† 9††††† 4762†† ††††††0

††††††† 10††††† 4762†††††††† 0

††††††† 11††††† 4762†††††††† 0

††††††† 12††††† 3914†††††††† 0

††††††† 13††††† 3914†††††††† 0

††††††† 14††††† 3914†††††††† 5

††††††† 15††††† 3909†††††††† 0

††††††† 16††††† 3909†††††††† 0

††††††† 17††††† 3909†††††††† 0

††††††† 18††††† 3909†††††††† 0

††††††† 19††††† 1330†††††††† 0

††††††† 20††††† 1330†††††††† 0

††††††† 21††††† 1330†††††††† 1

††††††† 22††††† 1329†††††††† 0

††††††† 23††††† 1329†††††††† 0

††††††† 24††††† 1329†††††††† 0

††††††††† Report CURRENT LISTCount= 12

††††† Tran†††† Assem†††† Prior†† Current††††† Next†††††† TimeStamp†††††† TimeEnter†††††† Num Interrupt

†††† 10009†††† 10009†††††††† 0†††††††† 3†††††††† 4††† 859831.18136††† 859831.18136†††††††† 0†††††††† 0

†††† 10010†††† 10010†††††††† 0†††††††† 3††††††† 4††† 859880.05645††† 859880.05645†††††††† 0†††††††† 0

†††† 10011†††† 10011†††††††† 0†††††††† 3†††††††† 4††† 859970.26927††† 859970.26927†††††††† 0†††††††† 0

†††† 10012†††† 10012†††††††† 0†††††††† 3†††††††† 4††† 860102.99499††† 860102.99499†††††††† 0††††† †††0

†††† 10013†††† 10013†††††††† 0†††††††† 3†††††††† 4††† 860153.46055††† 860153.46055†††††††† 0†††††††† 0

†††† 10014†††† 10014†††††††† 0†††††††† 3†††††††† 4††† 860261.95935††† 860261.95935†††††††† 0†††††††† 0

†††† 10015†††† 10015†††††††† 0†††††††† 3†††† ††††4††† 860284.02654††† 860284.02654†††††††† 0†††††††† 0

†††† 10016†††† 10016†††††††† 0†††††††† 3†††††††† 4††† 860329.21126††† 860329.21126†††††††† 0†††††††† 0

†††† 10017†††† 10017†††††††† 0†††††††† 3†††††††† 4††† 860355.92388††† 860355.92388†††††††† 0†† ††††††0

†††† 10018†††† 10018†††††††† 0†††††††† 3†††††††† 4††† 860432.45097††† 860432.45097†††††††† 0†††††††† 0

†††† 10019†††† 10019†††††††† 0†††††††† 3†††††††† 4††† 860570.33832††† 860570.33832†††††††† 0†††††††† 0

†††† 10020†††† 10020†††††††† 0†††††††† 3†††††††4††† 860609.22856††† 860609.22856†††††††† 0†††††††† 0

††††††††† Report FUTURE LIST†† Count=9

††††† Tran†††† Assem†††† Prior†† Current††††† Next†††††† TimeStamp†††††††† EndTime†††††† Num Interrupt

†††† 10021†††† 10021†††††††† 0†††††††† 0†††††††† 1 †††860692.78465††† 860692.78465†††††††† 0†††††††† 0

†††† 10005†††† 10005†††††††† 0††††††† 21††††††† 22††† 859038.58591††† 860760.82872†††††††† 0†††††††† 0

††††† 9996††††† 9996†††††††† 0††††††† 14††††††† 15††† 858305.08946††† 860833.95840†††††††† 0†††††††† 0

†††† 10006†††† 10006†††††††† 0†††††††† 7†††††††† 8††† 859252.93453††† 860923.12015†††††††† 0†††††††† 0

†††† 10000†††† 10000†††††††† 0††††††† 14††††††† 15††† 858372.70061††† 861039.29143†††††††† 0†††††††† 0

††††† 9994††††† 9994†††††††† 0††††††† 14††††††† 15††† 857927.77874††† 861107.04018†††††††† 0†††††††† 0

††††† 9992††††† 9992†††††††† 0††††††† 14††††††† 15††† 857697.66805††† 861209.44542†††††††† 0†††††††† 0

†††† 10007†††† 10007†††††††† 0†††††††† 7†††††††† 8††† 859283.14575††† 861273.62559†††††††† 0††††† †††0

†††† 10008†††† 10008†††††††† 0††††††† 14††††††† 15††† 859709.67056††† 861903.67755†††††††† 0†††††††† 0

†† Storage†† Entries†† Current†††††† Max†††††† Min††††††† AverStor††††††† AverTime†††††††† Utility

††††† sto1††††† 4764†††††††† 2†††††††† 3†††††††† 0†††††††† 2.78522†††††† 503.17938†††††††† 0.92841

††† NextGo††††† Tran††††††††† AClock††† ACapacCapacity††† NumObj

†††††††† 0†††† 10004††† 860665.33472†††† 3.000†††††††† 3†††††††† 2

†† Storage†† Entries†† Current†††††† Max†††††† Min††††††† AverStor††††† ††AverTime†††††††† Utility

††††† sto2††††† 3914†††††††† 5†††††††† 5†††††††† 0†††††††† 4.52966†††††† 996.04529†††††††† 0.90593

††† NextGo††††† Tran††††††††† AClock††† ACapacCapacity††† NumObj

†††††††† 0†††† 10008††† 860584.49885†††† 5.000†††††††† 5†††††† ††3

Facility†† Entries†† Current†††††††† Utility††††††† AverTime††† NextGo††††† Tran†† IntTran††† NumObj

††††† fac1††††† 1330†††††††† 1†††††††† 0.77385†††††† 500.76916†††††††† 0†††† 10005†††††††† 0†††††††† 4

Queue†† Entries†† Current†††††† Max†††††† Min††††† Zero†††††† AverQueue††††††† AverTime†† AverTime(-Ze)††† NumObj

††††† qsys†††† 10020††††††† 12††††††† 32†††††††† 0††††† 3388†††††††† 3.88753†††††† 333.91839†††††† 504.50275††††† 5

Table†††††† tblEntries†††† 10000.00000

Mean††††† 1028.66150 StdDev†††††† 633.59663††† NumObj†††††††† 6

†††††††††† Range†††††† Frequency

†††††††† 0.00000†††††††† 0.00000

†††††† 100.00000†††††† 128.00000

†††††† 200.00000†††††† 372.00000

†††††† 300.00000†††††† 457.00000

†††††† 400.00000†††††† 528.00000

†††††† 500.00000†††† ††613.00000

†††††† 600.00000†††††† 690.00000

†††††† 700.00000†††††† 712.00000

†††††† 800.00000†††††† 779.00000

†††††† 900.00000†††††† 777.00000

††††† 1000.00000†††††† 687.00000

††††† 1100.00000†††††† 505.00000

††††† 1200.00000†††††† 454.00000

††††† 1300.00000†††††† 415.00000

††††† 1400.00000†††††† 353.00000

††††† 1500.00000†††††† 362.00000

††††† 1600.00000†††††† 301.00000

††††† 1700.00000†††††† 278.00000

††††† 1800.00000†††††† 269.00000

††††† 1900.00000†††††† 275.00000

††††† 2000.00000†††††† 235.00000

†††† 2100.00000†††††† 151.00000

††††† 2200.00000†††††† 124.00000

††††† 2300.00000††††††† 98.00000

††††† 2400.00000††††††† 90.00000

††††† 2500.00000††††††† 82.00000

††††† 2600.00000††††††† 57.00000

††††† 2700.00000††††††† 45.00000

††††† 2800.00000††††††† 37.00000

††††† 2900.00000††††††† 34.00000

††††† 3000.00000††††††† 26.00000

††††† 3100.00000††††††† 13.00000

††††† 3200.00000††††††† 13.00000

††††† 3300.00000††††††† 14.00000

††††† 3400.00000†††††††† 3.00000

††††† 3500.00000†††††††† 9.00000

††††† 3600.00000†††††††† 6.00000

††††† 3700.00000†††††††† 2.00000

††††† 3800.00000†††††††† 2.00000

††††† 3900.00000†††††††† 1.00000

††††† 4000.00000†††††††† 3.00000

††††† 4100.00000†††††††† 0.00000


 

3         line

 

4         Bar

 

APPENDIX 2 samples

Matches of 3 transactions

{~vb} Var

{\Gen} Gen:TGenerate;

{\Gen0} Gen0:TGenerate;

{\Tab} Tab:TTable;

{\Tab0} Tab0:TTable;

{\Tab1} Tab1:TTable;

{\Fac} Fac : TFacility;

{\Fac0} Fac0 : TFacility;

{\Fac1} Fac1 : TFacility;

{~ve}

{~pfe}

{~ib} procedure Initial;begin

{ Before Install }

setstart(1);

{\Gen} Init(Gen,'Gen',Gen_,700,540);

{\Gen0} Init(Gen0,'Gen0',Gen0_,100000);

{\Tab} Init(Tab,'Tab',0,100,100);

{\Tab0} Init(Tab0,'Tab0',0,100,100);

{\Tab1} Init(Tab1,'Tab1',0,100,100);

{\Fac} Init(Fac,'Fac');

{\Fac0} Init(Fac0,'Fac0');

{\Fac1} Init(Fac1,'Fac1');

{~ie}

{ After Install } end;

{~mtb}procedure ModelTxt;begin case ActiveBlock of

{\Gen} ::Gen_ *:Gen.Generate(700,540);

††††† *:split (1,ll1);

††††† *: Fac.Seize;

††††† *:advance (exponential(350));

::mm1 *:match ([mm2,mm3]);

†† ††*: Fac.Release;

††††† *:tab.tabulate (m1);

††††† *:terminate;

 

::ll1*:split (1,ll2);

†††††† *: Fac0.Seize;

†††††† *:advance (exponential(320));

::mm2*:match ([mm1,mm3]);

†††††† *: Fac0.Release;

††††† *:tab0.tabulate (m1);

††††† *:terminate;

 

::ll2 *:nop;

††††† *: Fac1.Seize;

††††† *:advance (exponential(290));

::mm3 *:match ([mm2,mm1]);

††††† *: Fac1.Release;

†††† *:tab1.tabulate (m1);

††††† *:terminate;

 

{\Gen0} ::Gen0_ *:Gen0.Generate(100000);

†††††††††††††† *:terminate(1);

 

{~mte} else modelerror;end;end;

{~mb} procedure Modeling;begin

start(GetTerm);

show(tab,1);

show(tab0,2);

show(tab1,3);

 

{~me}end;

{~rb} procedure Report;begin

{~re} end;

{~cab} procedure CloseAllObj;begin

{~cae} end;

 

The model first of all serves those transaction for which time which has been spend in queue, minimally deviates from the average time which has been spend in queue by transactions available in queue in current moment.

 

{~vb} Var

{\Fac} Fac : TFacility;

{\Use} Use : TUser;

{\Gen} Gen : TGenerate;

{\Tab} Tab : TTable;

{~ve}

Function getAvg:Double;

Begin Result:=use.m1 End;

 

Function getMin:Double;

Begin Result:=abs(use.m1-rp(1)) End;

Function getfnd:Boolean;

Begin Result:=abs(use.m1-rp(1))=rp(2) End;

 

{~pfe}

{~ib} procedure Initial;begin

setstart(1000);

{\Fac} Init(Fac,'Fac');

{\Use} Init(Use,'Use');

{\Gen} Init(Gen,'Gen',Gen_,exponential(100));

{\Tab} Init(Tab,'Tab',0,50,100);

{~ie} end;

{~mtb}procedure ModelTxt;begin case ActiveBlock of

{\Gen} ::Gen_ *:Gen.Generate(exponential(100));

*: Use.Link(AC1,!*+1);

::rr *: tab.tabulate(m1);

*: Fac.Seize;

*:Advance(exponential(70));

*: Fac.Release;

*:RPLet(1,use.avg(getavg));

*:RPLet(2,use.min(getmin));

*: Use.UnLink(rr,1,getfnd);

*:Terminate(1);

 

{~mte} else modelerror;end;end;

{~mb} procedure Modeling;begin

start(GetTerm);

show(tab,1);

{~me}end;

{~rb} procedure Report;begin

{~re} end;

{~cab} procedure CloseAllObj;begin

{~cae} end;

 

Return

 



Hosted by uCoz