Chapter 11:(Introduction to SIMSCRIPT)
11-2:: SIMSCRIPT System
Concept::
The system to be simulated is considered to consist of entities
having attributes that interact with activities.
q Temporary entities: The entities that are created and destroyed during the
execution of a simulation.
q Permanent entities: These entities remain during the run.
q Sets: Entities can form sets.
q Event routine: Each type of event is described by an event routine, each of
which is given a name and programmed as a separate closed subroutine.
q Endogenous (or internal) event: It arises from actions within the system.
q Exogenous (or external) event: It arises from actions in the system
environment.
q SIMSCRIPT program structure consists of
Entities
Permanent
Temporary
Sets
Event routines
Question: Describe the program structure
of a SIMSCRIPT program. (’01)
Answer:
The
SIMSCRIPT program consists of three primary elements:
1. A preamble giving a static description of
each modeling element is given.
It is purely
declarative. It includes no executable statements. All the modeling elements
(processes and resources) must be named in the preamble.
2. A main program where execution begins.
Resources must be created and initialized before they can use by processes.
This is usually accomplished in MAIN.
3. A process/event routine for each
process/event notice declared in the preamble.
11-3:: Organization of a
SIMSCRIPT program::
q Event notices: These are created when it is determined that an event is scheduled.
Each
event notice records the time the event is due to occur and the event routine
that is to execute the event.
Question:
Explain the execution cycle of a SIMSCRIPT program. (M.Sc.- ‘97)
Answer: The general manner in which the
simulation proceeds is illustrated in the following figure. The event notices
are filed in chronological order. When all events that can be executed at a
particular time have been processed, the clock is updated to the time of the
next event notice and control is passed to the event routine identified by the
notice. Each event notice records the time the event is due to occur and the
event routine that is to execute the event. If the event executed by a routine
results in another event, either at the current clock time or in the future,
the routine must create a new event notice and file it with the other notices.
+(Figure
11-1. SIMSCRIPT execution cycle. Page-249)
11-4:: Names and
Labels::
Names may consist of any combination of letters and digits
provided there is at least one letter. Period (“.”) can be used.
Example: AGE, AB12, PERSON.AGE ®
All are valid.
Labels: Labels are used for identifying programming statements
similarly consists of any combination of letters and numbers. Period (“.”) can
be used. Labels are identified by being enclosed between single quotation
marks.
Example: ‘LABEL1’,
‘AB12’, ‘1234’ ®
All are valid.’
11-5:: SIMSCRIPT
statements::
# Print statements:
PRINT n LINES AS FOLLOWS
PRINT n LINES THUS
# Print with the values of a
variable:
PRINT n LINES WITH X AND
Y LINE THIS
# Three digit integer * * *, Four digit real number with one
decimal place would be indicated by * * * .*
11-6:: Defining the
System::
# Preamble section: This section defines the system structure
and establishes the conditions under which the simulation will be run.
# Variables type: Real, Integer, Alphabetical
â
REAL, INTEGER, ALPHA, TEXT
Text à Used for process character strings.
NORMALLY, MODE IS
INTEGER (or ALPHA)
# Global variable: Global variable (that is available to all
routines) or system variable.
[à They are in the normal mode]
THE SYSTEM HAS X AND Y
[To separate items we can use commas
( ,) or the word AND (or both)]
# If we need to define variable other than normal mode. We use
DEFINE statement.
DEFINE name1, name2,
….., AS INTEGER VARIABLS
[If define does not use MODE then
default normal mode is used.]
# The permanent entities, temporary entities and event notice
are defined in lists, following the statements
PERMANEMT ENTITIES
TEMPORARY ENTITIES
EVENT NOTICES
Example: TEMPORARY ENTITIES
EVERY entity HAS attr1 AND attr2 …..
[80 characteristics line]
EVENT NOTICES
EVERY X HAS A attr1 A ……
# If no specified attribute is used other than the system’s
attributes (data)
Then: EVENT NOTICES INCLUDE …………
Declare ARRAY or TABLE
like entities:
DEFINE table AS AN INTEGER,
n-DIMENSIONAL VARIABLE
Question:
Describe the organization of a SIMCSRIPT program and explain its execution
cycle. (’97,’99,’01)
Answer:
Question:
Explain the term “Event notice”. (’97)
Answer:
Question:
Write s SIMSCRITPT script routine to find the next arrival of call. (’98)
Answer:
Question:
A mobile telephone company wants to simulate its system. The telephone system
uses TDM (time division multiplexing) for connections. The system can multiplex
only four simultaneous telephone calls and it has 100 subscribers. Draw the
state descriptor for the system and define each item of it. (’98)
Answer:
Question:
Describe ‘system’ concept while you are simulating a system using SIMSCRIPT.
Answer:
Question:
While simulating a Telephone System which entities do you consider as temporary
entity and permanent entity and why?
Answer:
Question:
Describe the programs structure of a SIMSCRIPT program. (’01)
Answer:
Question:
Explain the following term with respect to SIMSCRIPT language:- (‘01)
i)
Event
notice.
Answer:
No comments:
Post a Comment