Sie sind auf Seite 1von 11

Lecture Seven

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.

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.

GPSS Programs
The 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.

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.

Cotd.

Contd.
Example of some blocks :
A,B

ADVANCE

TRANSFER

A
TERMINATE

A,B
GENERATE

C,D,E

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.

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.

Action Times
Two blocks are involved for the expenditure of time. i) ADVANCE ii) 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.

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 43 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.

A block diagram representing the system

Das könnte Ihnen auch gefallen