0% found this document useful (0 votes)
8 views19 pages

Simulation Language

A simulation language is a specialized programming language designed for creating simulation models for specific situations, such as queuing or manufacturing systems. Key features include random number generation, simulation clock management, and data analysis capabilities, which facilitate easier model development and modification. GPSS, a notable simulation language, allows users to create block diagrams for modeling systems like barber shops, providing a user-friendly approach for analysts without extensive programming skills.

Uploaded by

Dikesh katwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views19 pages

Simulation Language

A simulation language is a specialized programming language designed for creating simulation models for specific situations, such as queuing or manufacturing systems. Key features include random number generation, simulation clock management, and data analysis capabilities, which facilitate easier model development and modification. GPSS, a notable simulation language, allows users to create block diagrams for modeling systems like barber shops, providing a user-friendly approach for analysts without extensive programming skills.

Uploaded by

Dikesh katwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

SIMULATION LANGUAGE

Dikesh katuwal
Simulation Language

■ A simulation language is a special purpose language structured to


meet the programming requirements of the simulation models of a
specific class of situations.
■ The analyst develops the simulation model, employing this special
purpose language, which is applicable over a class of applications.
■ For example, the simulation language GPSS is applicable to queuing
like situations while SIMAN (SIMulation ANalysis) and SLAM II are
more appropriate for simulating the manufacturing and material
handling systems.
Important features

■ The important features of simulation language can be identified as follows:


■ Generation of large streams of random numbers
■ Generation of random variates from a large number of probability
distributions
■ Determining the length of simulation run and length of wrapping (covering)
up period
■ Advancing the simulation clock
■ Scanning the event list to determine the next earliest event to occur
■ Collecting data
■ Analyzing data and setting confidence intervals
Important features

■ These common features, which have to be invariably modeled in all


simulations, are perhaps the cause of the development of special simulation
software. Simulation software packages are designed to meet the following
objectives:
■ To conveniently describe the elements, which commonly appear in
simulation, such as the generation of random deviates.
■ Flexibility of changing the design configuration of the system so as to
consider alternate configuration.
■ Internal timing and control mechanism, for book keeping of the vital
information during the simulation run.
■ To obtain conveniently, the data and statistics on the behavior of the
system.
Merits of Simulation
Language
■ Since most of the features to be programmed are in-built, simulation
languages take comparatively less programming time and effort.
■ Since simulation language consists of blocks, specially constructed to
simulate the common features, they provide a natural framework for
simulation modelling.
■ The simulation models coded in simulation language can easily be
changed and modified.
■ The error detection and analysis is done automatically in simulation
languages.
■ The simulation models developed in simulation languages, especially the
specific application packages, called simulators, are very easy to use.
Desirable Features of Simulation
Software

■ Modelling Flexibility
■ Ease of Modelling
■ Fast Execution Speed
■ Compatibility of various Computer Systems
■ Statistical Capabilities
■ Capability of Animation
■ Report Presentation Capabilities
GPSS (General Purpose Simulation
System)

■ GPSS, which stands for General Purpose Simulation System. This


language was developed primarily by Geoffrey Gordon at IBM around
1960, and has contributed important concepts to every commercial
discrete event Computer Simulation Language developed ever since.
■ GPSS is a discrete time simulation general-purpose programming
language, where a simulation clock advances in discrete steps. A
system is modeled as transactions enter the system and are passed
from one service (represented by blocs) to another.
■ This is particularly well-suited for problems such as a factory. GPSS is
less flexible than simulation languages such as Simulate and
SIMSCRIPT but it is easier to use and more popular
GPSS (General Purpose
Simulation System)
■ GPSS was designed especially for analysis who were not necessarily
computer programmer. It is particularly suited for modeling traffic and
queuing systems.
■ A GPSS programmer does not write a program in the same sense as
SIMSCRIPT programmer does instead, he construct a block diagram – a
network of interconnected blocks, each performing a special simulation
oriented function.
■ GPSS provides a set of 48 different blocks to choose from each of which can
be used repeatedly.
■ Each block has a name and specific task to perform. Moving through the
system of block are entities called transaction are customer, messenger,
machine parts, vehicle, etc
Basic Structure
■ A transaction is a GPSS object with a number of attributes. A
transaction is like a customer entering into the process for service.
■ A single transaction may represent several individual entities. Each
transaction has to be generated either one at a time or in batches.
Once they appear into the system, they must be contained exactly in
one action Block. However, a Block may contain many transactions
GPSS – Blocks
A barber shop simulator

We are modeling a barber shop with the following qualities:


1. The shop contains one barber and one barber’s chair, open for eight hours in a day.
2.Customers arrive on average every 18 minutes, with the arrival time varying
between 12 and 24 minutes.
3.If the barber is busy, the customer will wait in a queue.
4.Once the barber is free, the next customer will have a haircut.
5.Each haircut takes between 12 and 18 minutes, with the average being 15 minutes.
6.Once the haircut is done, the customer will leave the shop
We want to answer these questions:
■ How utilised is the barber through the day?
■ How long does the queue get?
■ On average, how long does a customer have to wait.
A barber shop simulator
GENERATE 18,6 CREATE CUSTOMERS
QUEUE 2 CUSTOMERS QUEUE UP IF NECESSARY

SEIZE 3 ENGAGE THE BARBER WHEN HE BECOMES AVAILABLE

DEPART 2 CUSTOMER LEAVES THE QUEUE

ADVANCE 15,3 CUSTOMER GETS HIS HAIR CUT

RELEASE 3 RELEASE THE BARBER

TERMINATE 0 LEAVE THE BARBER SHOP

GENERATE 480 GENERATE A TIMER AFTER 8 HOURS OF SIMULATED TIME


*

TERMINATE 1 SHUT OFF THE RUN

START 1 CARRY OUT THE SIMULATION


A barber shop simulator
■ GENERATE 18,6 means generate a transaction - a barber shop customer - every 18 minutes ± 6
minutes.
■ QUEUE 2 defines a queue with ID 2, denoting the queue where customers will wait.
■ SEIZE 3 defines a facility with ID 3. The facility is the barber and this line means if the barber is
free, the next customer occupies the barber until released.
■ DEPART 2 says that the customer leaves the queue when occupying the barber.
■ ADVANCE 15,3 means that transactions in this state only move on after 15 minutes ± 3 minutes -
modeling the time taken for a haircut. After that
■ RELEASE 3 shows that the customer no longer occupies the barber and
■ TERMINATE 0 ends the transaction, showing that the customer has left the shop.
■ That is all that is needed for the basic simulation, but if run like this it would never stop, as we have
not modeled the 8 hour period the shop is open.
■ To do this we generate a new transaction with
■ GENERATE 480, which means generate a transaction after 480 minutes, ie 8 hours. The next line,
■ TERMINATE 1, stops the simulation after this transaction is generated.
■ A manufacturing shop is turning out parts at 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
Simscript language
Title Lorem Ipsum dolor

LOREM IPSUM LOREM IPSUM LOREM IPSUM


DOLOR DOLOR DOLOR

You might also like