Simulation Language.pdf

11
Lecture Seven

description

Simulation Language

Transcript of Simulation Language.pdf

Page 1: Simulation Language.pdf

Lecture Seven

Page 2: Simulation Language.pdf

Simulation Languages• A number of programming languages have been

produced to simplify the task of writing system simulation programs.

• These programs embody a language with which to describe the system, and a programming system that will establish a system image and execute a simulation algorithm.

• Each language is based upon a set of concepts used for describing the system.

Page 3: Simulation Language.pdf

Cotd.The two most widely used simulation languages are:

i) GPSS ii) SIMPCRIPT

• GPSS has been written specially for users with little or no programming experience, while SIMSCRIPT requires programming skill to the level where the user is able to program in FORTRAN or ALGOL.

• The simplifications of GPSS result in some loss of flexibility, while SIMSCRIPT requires more programming skill, it is capable of representing more complex data structure and can execute more complex decision rules.

Page 4: Simulation Language.pdf

GPSS ProgramsThe general purpose simulation system(GPSS) language has been developed over many years, principally by the IBM Corporation in 1961.General description: • The system to be simulated in GPSS is described as

a block diagram in which the blocks represent the activities, and the lines joining the blocks indicate the sequence in which the activities can be executed.

• Where there is a choice of activities, more than one line leaves a block and the condition for the choice is stated at the block.

Page 5: Simulation Language.pdf

Cotd.• Each block has a precise meaning.

• Each block represents a characteristics action of system.

• Each block has given a name that is descriptive of the block action and is represented by a symbol.

• Each block type has coding instructions and control statements.

• Each block has a number of data fields.

Page 6: Simulation Language.pdf

Contd.

• Example of some blocks :

ADVANCE TRANSFER

TERMINATE GENERATE

A,B

AA,B

C,D,E

Page 7: Simulation Language.pdf

Transactions

Moving through the system being simulated are entities that depend upon the nature of the system.

For example, In communication system, movement of message is an entity.

In road transport system, motor vehicle is an entity.

In data processing system, record is an entity.

In GPSS, the entities are called transactions.

Page 8: Simulation Language.pdf

Contd.

• Transactions are created at one or more generate blocks and are removed from the simulation at TERMINATE blocks.

• Many transactions simultaneously moving through the block diagram.

• Transfer of transaction occurs when some change of system condition takes place.

• An Identification number called a location is given to each block , and the movement of transactions is usually from one block to the block with the next highest location.

Page 9: Simulation Language.pdf

Action Times

• Two blocks are involved for the expenditure of time. i) ADVANCEii) GENERATE

ADVANCE: It is concerned with representing time. The program computes an interval of time called action time for each transaction as it enters an ADVANCE block.

GENERATE: It creates transactions. The action time at the GENERATE block controls the interval between successive arrivals of transactions. Action time is fixed or random variable. It is defined by mean and modifier. If modifier is zero, action time is constant. If modifier is not zero, action time is random variable.

Page 10: Simulation Language.pdf

Simulation of a manufacturing shop

• A machine tool in a manufacturing shop is turning out parts at the rate of one every 5 minutes. As they are finished, the parts go to an inspector, who takes 4±3 minutes to examine each one and rejects about 10%of the parts. Each part will be represented by one transaction, and the time unit selected for the problem is 1 minute.

Page 11: Simulation Language.pdf

A block diagram representing the system