0% found this document useful (0 votes)
3 views51 pages

SIMAN Language Overview and Modeling Techniques

The document describes the characteristics of the simulation language SIMAN. SIMAN divides the simulation model into two parts: the system model, which describes the logical sequence of the process, and the experiment model, which defines the quantitative characteristics and desired outcomes. SIMAN uses variables, probability distributions, and macroinstructions to model systems. Processing a SIMAN model involves editing, compiling, and executing the system model, the experiment model, and the simulation program to generate and

Translated by

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

SIMAN Language Overview and Modeling Techniques

The document describes the characteristics of the simulation language SIMAN. SIMAN divides the simulation model into two parts: the system model, which describes the logical sequence of the process, and the experiment model, which defines the quantitative characteristics and desired outcomes. SIMAN uses variables, probability distributions, and macroinstructions to model systems. Processing a SIMAN model involves editing, compiling, and executing the system model, the experiment model, and the simulation program to generate and

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

TABLE OF CONTENTS

1 M
SIAN
LANGUAGE
1
2
1. CHARACTER SIT
CIS OF S M
IAN MODEN LIG
1.2.1 VARIABLES IN SIMAN AND PROBABILISTIC DISTRIBUTIONS..............................................3
1.2.2 MODIFIERS
1.2.3 SYNTACTICS OF THE SIMAN....................................................................................................................5
1.2.4 CHARACTERISTICS OF OPERAND TYPES ...............................................................5
................................................................31
.......S
.Y
.S
..T.E
.M
........M...O
..D
.E
..L.
41. EXPER MIENT MODEL
51. CONS DIER
22
.A
.T
O
.I.N
..S
.......O..N
.......T
.H
..E
.......O
..P
.E
..R
.A
.T
O
.I.N
........O
..F
.......S
M
.I.A
..N
..
1
6. ED TOI N, COMP LIATO
IN, L NIKNIG AND RUNN NIG PR 2.5
O
...G
...R
...A
..M
....S
.........N
.I..........S
.M
.I...A
..N
...
1.6.1 EDITING OF THE SYSTEM MODEL....................................................................................25
1.6.2 EDITING THE EXPERIMENT MODEL.........................................................................26
1.6.3 LINK OF THE SYSTEM AND EXPERIMENT FILES ......................................................27
1.6.4 PROGRAM EXECUTION...................................................................................................27
17. ANALYSS I OF RESULTS N I A SM I ULATO I N EXPERM I ENT
1.7.1 ELIMINATION OF INITIAL BIAS..............................................................29
1.7.2 REPETITION OF RUNS ......................................................................................................30
[Link] Systems with Termination............................................................................................................................... 31
[Link] Systems without Termination................................................................................................................................ 31
8
1. APPC
LIA
T
OIN EXAMPLES
1.8.1 EXAMPLE1...................................................................................................................................33
1.8.2 EXAMPLE2
1.8.3 EXAMPLE3...................................................................................................................................37
1.8.4 EXAMPLE4...................................................................................................................................39
91. OUTPUT PROCESSOR: OUTPT
1.9.1 OUTPUT PROCESSOR INSTRUCTIONS.........................................................................44
1.9.2 EXAMPLE......................................................................................................................................48
SIMULATION TECHNIQUES

1SIMAN LANGUAGE

11.N
ITRODUCTO
IN

The SIMAN language (SIMulation ANalysis), as a software product, began to


used in 1984. It is a simulation language based on FORTRAN, and it relies on
in the previous developments of GPSS (General Purpose Simulation System) and GASP
General Application Simulation Program

The SIMAN language is capable of modeling combined discrete-continuous processes, and


has a set of features that makes it particularly useful in modeling
production systems, especially when they contain components
important related to materials handling.

The structure of the models in SIMAN is based on a theoretical-conceptual approach which


makes a fundamental distinction between two components of the simulation model: the model
of the system and the model of the experiment. The system model defines and describes the
static and dynamic characteristics of the system to be simulated, while the model of
experiment defines the experimental conditions under which the
simulation runs to generate the desired output information. This approach exploits
the fact that for a specific system model there can be different models of
experiment resulting in different sets of output information. From this
form, separating the model of the system from that of the experiment, can be developed
different simulation runs changing only the model of the experiment, since the
the system remains unchanged.

The primary technique that language uses for modeling systems with changes
discrete is the orientation to the process, in which the model is constructed following the
functional operation of the system to be simulated. A second variant is the orientation towards
event, in which the user includes their own FORTRAN subroutines to represent their
specific events.

As shown in Figure 1, a simulation using SIMAN is divided into three parts.


different: the model processing, the experiment processing, and the run of
simulation with the analysis of the results. To execute these three parts, the SIMAN has
with five individual processing programs that interact through four
files.

The processor of the model (MODEL) is used to process the system model.
previously edited. The generated file is called model file.

2. The experiment processor (EXPMT) operates on the editing of the model of


experiment. The generated file is called the experiment file.

3. The linker program (LINKER) combines the model file with that of

1
SIMULATION TECHNIQUES
experiment, producing the simulation program file ready for the
bullfights.

4. The program file is the input for the simulation run processor.
(SIMAN), which executes them and stores the results in the output data file.

5. The output processor analyzes, organizes, and presents the information contained in the
output data file.

This division of the processor programs is very useful since only one of the five is
executes each time, which reduces memory requirements and, at the same time, allows creating and
save the files obtained in a timely manner.

Figure 1.1 Processing a simulation model using SIMAN

The language has 32 macroinstructions for system modeling and 15


elements for constructing the experiment model, also allows including the
FORTRAN subroutines that you wish.

[Link]
ITC
IS OFMODELN
IG N
I SM
I AN

SIMAN is a simulation language for microcomputers that is made up of a


set of macroinstructions that facilitate modeling, programming, and
analysis of results of a simulation.

2
SIMULATION TECHNIQUES
The SIMAN is characterized by dividing the simulation model into two parts (or sets of
instructions in SIMAN language):

System model.

2. Experiment model.

The system model refers to that part which describes the logical sequence of the process.
what is desired to be simulated using SIMAN instructions.

The model of the experiment is the part that defines the quantitative characteristics it takes.
each of the components described in the system model is determined as well
the same, the results desired in the simulation through SIMAN.

1.2.1 VARIABLES IN SIMAN AND PROBABILITY DISTRIBUTIONS

SIMAN allows defining the attributes of the entities, using variables assigned by the
user, system variables or functions and random variables of the language, those that
described in the following tables:

Attributes Description
A(I) Real value of attribute I of the active entity.
M Attribute of the entity that denotes the number of the station where
is located the same.
Table 1.1 Description of the attributes of the entities

User-assigned variables Description


X(I) Real value of the global variable of system I.
J System index variable, integer.
P(I,K) Value of parameter number K in index variable I.
Table 1.2 Description of user-assigned variables

Variables SIMAN Description


TNOW Time in progress in the system.
NE(I) Number of entities going to station I.
NQ(I) Number of entities waiting in queue I.
NC(I) Value of the counter I.
NR(I) Number of occupied units of resource I.
NT(I) Number of occupied units of conveyor I.
MR(I) Number of units of resource I.
MT(I) Number of units of the transporter I.
LC(I) Length of the occupied cells on conveyor I.
Table 1.3 Description of the system variables or functions

3
SIMULATION TECHNIQUES

Random distributions Description


EX(IP,IS) Exponential distribution.
UN(PT,IS) Uniform distribution.
TR(IP,IS) Triangular distribution.
RN(IP,IS) Normal distribution.
NP(IP,IS) Poisson distribution.
DP(IP,IS) Discrete probability distribution.
RL(IP,IS) Lognormal distribution.
GA(IP,IS) Gamma distribution.
BE(IP,IS) Beta distribution.
WE(IP,IS) Weibull distribution.
CO(IP) A constant.
RA(IS) Uniform random number in the interval 0-1.
ED(I) Experimental distribution number I.
Table 1.4 Description of random distributions

Where:

IP: Relationship parameter. Establishes the relationship between the distribution in the system model.
and the distribution parameters in the experiment model.

IS: Indicator of the chain from which we will obtain the random numbers, it must be
understood between 1 and 9.

1.2.2 MODIFIERS

Modifiers are placed after the last operand in the instruction line,
separating from these by two points, and they can be one or more of the following keywords:
DISPOSE, MARK(MA) or NEXT(LABEL). The modifiers are separated from each other by means of
of commas. Below is a brief description regarding the use of each
one of them:

DISPOSE: Destroys the entities at the output of the previous instruction.

MARK(MA): Marks the MA attribute of the entity with its arrival time.
previous instruction.

NEXT(LABEL): The output entity of the preceding instruction is directed to the


instruction named LABEL.

If DISPOSE and NEXT(LABEL) are omitted, it is assumed that the output entities are directed
sequentially to the next instruction.

4
SIMULATION TECHNIQUES

1.2.3 SYNTAX OF SIMAN

In order to use the SIMAN language in a specific application and introduce it into the
machine with a view to its execution, it is recommended to take the following aspects into account
syntactic

1. The instructions may be divided into one or more line segments. A


A line segment is a grouping of operands within an instruction line.
The number of line segments and operands within each line segment
It depends on the type of instruction.

2. The line segments are separated by two colons (:). Each field of
the operator separates from the previous field with a comma (,). To specify the end of
each instruction uses the semicolon (;).

3. The operands can be specific or optional depending on each


instruction. Every optional operand has a pre-established assumed input, which
it is assigned by omitting the input field. However, commas are always
necessary to separate blank fields within a line segment.

4. A line with a semicolon (;) in the first column is ignored and can be
used for comments.

5. All whites within an instruction are ignored, except those that are
inside a label or field name. Spaces can be used to
separate an entry instruction through one or more lines.

6. Each input instruction is restricted from column 1 to 74. In addition, a


operating cannot be divided between two input lines.

7. This manual distinguishes the instructions used in the system model


and the experiment's, referring to the system instructions as instructions and
elements, to those of the experiment.

8. The possibility of writing will be specified in the elements of the experiment model.
line segments, with the same characteristics as the one shown, through the
word REPEAT.

1.2.4 CHARACTERISTICS OF THE TYPES OF OPERANDS

The characteristics of the operands of SIMAN are described below.

INTEGER CONSTANT: Any whole number. (E.g.: 10).

REAL CONSTANT: Rational number that contains a decimal point. It can be


specified with the FORTRAN format F or E. (e.g.: 10.3, 1.E-2).

5
SIMULATION TECHNIQUES
LABEL: A string of alphanumeric characters that begins with an alphabetic one. Its
Maximum length is 8 characters. (E.g.: CONTINUE, EXIT).

KEYWORD: Alphabetical chain that contains a specific meaning in


SIMAN. (e.g.: DISPOSE).

VARIABLE or ATTRIBUTE: Variable SIMAN or attribute. (E.g.: NQ(1), A(1)).

EXPRESSION: Computed expression with SIMAN variables using the + operators


(sum), - (difference), * (multiplication), / (division) and ** (exponentiation), with
groupings in parentheses (e.g.: A(1)*(X(1)-2)**2).

CONDITION: Instruction that relates expressions using the operators '.OR.'


.OR.
(greater than), ".LE." (less than or equal), ".GE." (greater than or equal), and ".NE." (not equal), with
groups formed using parentheses "()".

3S
[Link]

The following describes some instructions of SIMAN, its components and application.
These can appear in any order within the structure of the simulation program.
according to the requirements of the model designed by the user, without forgetting that it must respond
to a logical sequence of events and processes.

[Link] (Creation of entities).

CREATE, NB: TBC, MC: MODIFIERS;

NB: Number of entities arriving in each group, specified as a constant integer


o X(K), where K is an integer. Assumed: 1.

TBC: Time between the creation of entity groups, specified as an expression.


Assumed: 1.

MC: Maximum number of groups that can be created, specified as a constant.


enter X(K) where K is an integer. Assumed: Infinite.

Example:

CREATE, X(1): EX(2,1),12;

The number of entities in each arrival group is specified by variable X(1). The
The time between arrivals follows an exponential distribution with a rate parameter of 2 and is
Use the string of random numbers 1. The maximum number of groups of entities created
It is 12.

6
SIMULATION TECHNIQUES
[Link] (Assignment of values to variables and attributes).

ASSIGN: VAR = VALUE: MODIFIERS;

A(I), X(I), P(I,K), J, M.


VALUE: A numerical expression.

Example:

ASSIGN: J = (M**2 - 1) / 3;

The index variable J takes the value of the expression on the right where M is the value of the
attribute of the season in which the entity is located.

[Link](Queues).

QUEUE, IFL, QC, LBALK: MODIFIERS;

IFL: File number in which the entities are waiting.

QC: Queue capacity, specified as A(I), X(I) or I. Assumed: Infinite.

LBALK: Label of the instruction to which the entities that cannot wait are sent
the tail. Assumed: the entities that cannot wait are destroyed.

Example:

QUEUE, 1, X(3), SAL;

The entities arriving at the instruction are placed in file 1. The capacity of the queue
is given by the current value of X(3). The entities that arrive at the instruction when the
the stack is full, they are sent to the instruction with label SAL.

[Link] (Entity delay for a defined period of time).

DELAY

DURATION: An expression that describes the delay time. Assumed: 0.0.

Example:

DELAY: A(1);

The entity's delay time is the value of attribute 1 of it. It is assumed that the
the value of A(1) was previously assigned using an ASSIGN instruction with the time of
desired delay.

7
Simulation Techniques
[Link],SIGNAL (Delay of entities for an indefinite period).

The WAIT instruction must be preceded by a QUEUE instruction.

WAIT: NSIG: MODIFIERS;

NSIG: MODIFIERS;

NSIG: The signal code, specified as A(I), X(I), or I.

Example:

QUEUE, 1;
WAIT: A(1);
|
SIGNAL: 2;
The entities that arrive at the WAIT block are placed in file 1. The signal code of
each entity in the file is given by the first attribute of the entity. When an entity
above the SIGNAL block, all the entities in file 1 that have A(1) = 2 are
removed from this and released by the WAIT block.

6. TALLY, COUNT (Record of observations).

The TALLY instruction statistically records the value of a specified variable each time
arrival at the instruction. The variable to register can be any valid expression in
SIMAN, INT(K) or BET(K). Where K is an integer. INT(K) records TNOW - A(K) and BET(K)
register TNOW - X(K).

The COUNT instruction increments a counter by a specified value at each arrival of the
entity and can be used to end the simulation run when the counter
reach a certain value that is specified in the experiment model.

N: Identifier number of the specified tally as A(I), X(I), or I.

VAR: Value to be registered specified as a SIMAN or INT(K) expression or


BET(K), where K is an integer.

Example:

TALLY: 1, INT(2);

The value TNOW - A(2) is stored in tally number 1 as each entity arrives at the
Instruction. It is assumed that A(2) has been marked with the value of TNOW in an instruction.
previous. Each observation corresponds to the simulated time elapsed since the
instruction in which the entity was marked until the TALLY instruction.

8
SIMULATION TECHNIQUES
N

N: Counter number specified as A(I), X(I) or I.

INC: Increment of the specified counter as A(I), X(I) or I. Assumed: 1.

Example:

1, 1

Counter number 1 increases by 1 each time an entity reaches this instruction.


If the new total count is greater than or equal to the limit of counter #1 in the model of
experiment ends the run.

[Link], RELEASE (Simple resources).

The SEIZE instruction is used to determine the resource needs used by


the entity. It must always be preceded by the QUEUE instruction. RELEASE frees the
resources used by the entity.

SEIZE

RNAME

PR: Resource request priority, specified as A(I), X(I) or I. Assumed: 1.

Name of the resource to be used.

NR: Integer number of necessary resource units, specified as A(I), X(I) or I.


Assumed: 1.

Example:

QUEUE, 1;
SEIZE: WORKERS, 2;
DELAY: UN(1,1);
RELEASE: WORKERS, 2;

The entities that arrive at the queue try to take 2 units of the resource WORKERS. If
When they arrive, there are no units available; they wait in file 1 until there are 2.
available units. On the other hand, the entities that take 2 units of WORKERS will go
to the DELAY instruction where they are delayed for a random amount of time that follows a
uniform distribution with relationship parameter 1 and uses the random number string 1.
This delay time represents the time required by the entity to complete the
service. Then, the entity proceeds to the RELEASE instruction where it releases two units.
of WORKERS, those that remain available to be assigned to other entities in a
instruction SEIZE.

9
Simulation Techniques
[Link], ROUTE (Submodel of a set of stations or workstations).

STATION, N1-N2: MODIFIERS;

N1: Lower index of the range of the stations included in the submodel, specified as
an integer.

N2: Upper index of the range of the stations included in the submodel, specified as
An integer. Assumed: N1.

DURATION

DURATION: Time it takes to send an entity to the NS station, specified as


a constant or expression. Assumed: 0.0.

NS: Number of the instruction STATION to which the entity will be sent,
specified as A(I), X(I) or I.

Example:

EX(2,1), 6;
|
STATION, 1-6;

ROUTE sends the entities to station 6 with a transit time that follows a
exponential distribution. STATION denotes the submodel of stations 1 to 6. All
The entities sent to the stations within this range must enter according to this instruction.

9. ALTER, PREEMPT (Variation of the quantities and priorities of the resources).

ALTER: RNAME, CC: MODIFIERS;

Name of the resource whose availability will vary, including the index of
resource (if any).

CC: Change of resource capacity, specified as A(I), X(I) or I.

Example:

ALTER: WORKER, -1;

The number of units of the WORKER resource decreases by 1.

PREEMPT, PR: RNAME, NA, LSEND: MODIFIERS;

PR: Resource request priority. Integer specified as A(I), X(I) or I.


Assumed: 1.

Name of the resource to be prioritized.

10
Simulation Techniques
NA: Number of the entity's attribute, which is initially using the resource, in which
the remaining service time that the entity has yet to receive is stored at that moment
in what is displaced from the resource.

LSEND: Label of the instruction where the entity that has been displaced will wait.
Assumed: QUEUE of the previous SEIZE (or PREEMPT) where the resource was assigned.

Unlike the SEIZE block, PREEMPT can allocate resources that are being used.
at that moment by an entity, if the one requesting has a higher priority. The
activities in PREEMPT are more prioritized the lower the priority number is.
Just assign one resource unit.

Example:

PREEMPT, A(1): TOOL, 2, REWORK;

The entities that arrive try to ensure the right of priority for a unit of the resource.
TOOL, taking into account the priority specified in its first attribute. The
time remaining for the entity that is temporarily deprived of the resource TOOL
it is stored in its second attribute and is sent to the REWORK instruction.

10. RESOURCES(N)(Indexed resources).

Indexed resources are used in submodels and are characterized by a common name and
an index in parentheses. For example: MACH(1) and MACH(2), where MACH(1) can
represent 2 identical lathes at station 1 and MACH(2) represent 5 identical drills in
station 2.

When the station attribute M is used in a QUEUE-SIZE combination or


QUEUE-PREEMPT, in both the file number and the resource index must be
specified as a function of M.

Example:

STATION, 1-10;
QUEUE, M;
SEIZE: MACH(M);
DELAY: UN(A(1),1);
RELEASE: MACH(M);

When an entity goes through the STATION instruction, the station attribute is
automatically updated. In the example, between the values 1 and 10. The entities change to
the combination QUEUE-SEIZE where they try to take a unit of the resource MACH(M). If
all the units of this resource are occupied, the entity waits in the file M until
a unit of this resource is released. When using a unit of MACH(M), the entity continues
to the DELAY instruction where a time is delayed that follows a uniform distribution.
Subsequently, the entity reaches RELEASE where it releases one unit of the MACH(M) resource.

11
SIMULATION TECHNIQUES
[Link](Alternatives).

Upon reaching an entity at the BRANCH instruction, copies of it are sent to each of the
selected branches. To the copy of the entity sent to the first branch
selected from the BRANCH we will call primary entity of the BRANCH, and to the copies
sent to the remaining branches: secondary entities of the BRANCH.

The branches associated with BRANCH can be of 3 types:

a. The probability associated with the expression WITH, P, which is selected randomly
with probability P. The sum of the probabilities given in the different alternatives
WITH must be, at most, 1.

b. The determinism associated with the expressions ALWAYS or ELSE. If specified


ALWAYS, a copy of the entity will always be sent to the branch in question. If it
specified is ELSE, a copy of the entity will be sent if and only if any of the
Previous branches to this one have not been selected.

c. The conditional, specified by IF, C, which is selected if the condition that C


the specification is true.

BRANCH
WITH, P, LABEL:
ALWAYS 'o ELSE, LABEL;

MAXTAKE: Maximum number of branches to which the copies will be sent


arrival entities, specified as an integer. Assumed: Infinite.

P: Probability of selecting a probabilistic branching, specified as a


constant or expression between 0 and 1.

C: Condition that contains relational and logical operators.

Label of the instruction to which a copy of the entity will be sent.

Example:

BRANCH, 2:
IF A(1) IS EQUAL TO 1, CONTINUE:
WITH, A(2), RESTART:
ELSE, EXIT;

The first branching (conditional) is taken if the first attribute is met.


entity is equal to one. The second branching (probabilistic) is taken with the probability
given by the second attribute of the entity. The last branch (deterministic) is taken if
none of the previous branches has been taken.

12
SIMULATION TECHNIQUES
12. REQUEST, TRANSPORT, FREE (Carriers).

The term carrier denotes a general class of mobile resources that can be
assigned to the entities. Each carrier has its location in a specific station.
of the system and requires time to travel from one station to another. Among the objects that
could be modeled as carriers are: cranes, wheelbarrows, and the
mechanical manipulators.

Before every REQUEST instruction there must be a QUEUE instruction. As long as


use the station attribute M in the QUEUE-REQUEST combination, the number of the
The file and the index of the transporter must be specified as a function of M.

CARRIER SELECTION RULES

CYC: Select the first available conveyor unit, starting with the
successor of the last selected unit.

RAN: Randomly selects the units of the available transporter.

Select the available carrier unit with the lowest index.

SDS: Select the nearest carrier to the station.

LDS: Select the furthest transporter from the station.

UR(K): Selects the carrier with index UR. UR is calculated in a function.


FORTRAN.

ER(N): Select the carrier unit based on rule number N,


specified in the experiment model.

REQUEST, PR: TUNIT: MODIFIERS;

PR: Priority for the carrier request. Integer, specified as A(I),


X(I) or I. Assumed: 1.

TUNIT: Transport unit, specified by the index M (+, -) K, or with the


parameters (TSR, NA) added, where: TSR is the carrier selection rule
specified as CYC, RAN, POR, SDS, LDS, UR(K) or ER(N) and NA is the number of
attribute of the requesting entity in which the index of the carrier unit is assigned
selected.

TUNIT

FREE: TUNIT: MODIFIERS;

TUNIT: Transport unit, specified as an indexed name using the


index A(I), X(I) or I.

NS: Destination station number, specified as A(I), X(I) or I.

13
SIMULATION TECHNIQUES
Example:

QUEUE, 1;
REQUEST: CART(SDS, 1);
cart A(1), 2
|
STATION, 2;
|
FREE: CART(A(1));

An entity that arrives at the REQUEST instruction requests the carrier unit CART.
that is closest and available. If there are no available units, the entity
wait in file 1. Otherwise, the nearest available CART unit will
assigns to the entity and the index of the selected unit is stored in attribute 1 of the
same. The entity exits the REQUEST block followed by a corresponding delay of the
time required by the selected unit to travel from the station where it is located
towards where the entity is. Then the entity enters the TRANSPORT instruction where
is transported with CART(A(1)) to station number 2. The travel time to station 2 is
calculated by SIMAN based on the distance from where the entity is located to
station 2 and the CART speed, which are specified in the model of
experiment. Upon arriving at station 2, the entity continues until the instruction FREE, where
CART(A(1)) is freed. This unit of CART becomes available to be assigned to others.
entities in the REQUEST block.

4E
1. XPER
M
IENTMODEL

Through this model, it is possible to specify the experimental conditions in which


unfold the simulation that is being analyzed and that has been described in the model of the
system. This specification is provided through elements.

Below is a set of elements that can be combined to describe


the specific experimental conditions of a simulation run. Note that of a
the same simulation model can yield different results by changing the elements
in the model of the experiment.

1. Element PROJECT

It is used to identify the summary statistical report of the SIMAN that creates
the running processor automatically, when this element is included in the model of the
experiment.

PROJECT

Report Title, specified as an alphanumeric field with undefined length


more than 20 characters. Assumed: white.

ANALYST: Name of the analyst, specified as an alphanumeric field with no length


more than 20 characters. Assumed: white.

14
SIMULATION TECHNIQUES

MONTH/DAY/YEAR: Entry date, specified with 3 integers separated by /. Assumed:


January 1, 2000

Example:

PROJECT

2. DISCRETE Element

Define variables associated with discrete systems and discrete component models.

DISCRETE, MENT, MATB, NFIL, NSTA;

MENT: Maximum number of entities that can be simultaneously in the system,


specified with a constant integer. Assumed: 0.

MATB: Maximum number of general-purpose attributes associated with an entity,


specified as an integer constant. Assumed: 0.

NFIL: Number of files in the system, specified as a constant integer. Assumed:


0.

NSTA: Number of stations in the system, specified as a constant integer.


Assumed: 0.

Example:

DISCRETE, 100, 3, 3;

There are 100 records available, meaning there can be 100 entities simultaneously in
the system. Each entity has 3 attributes which are denoted as: A(1), A(2) and A(3) and
3 files are reserved in the system.

3. Element TALLIES

Define the report identifier and the output unit of the recorded statistics in
discrete models. TALLIES is included whenever the TALLY instruction is used or
when the TALLY subroutine is used in discrete event models.

N, ID, NUNIT: REPEATED;

N: TALLY number, specified as an integer constant.

ID: Report identifier, specified as an alphanumeric string no longer than 16


characters. Assumed: white.

NUNIT: Number of the output unit in which the observations will be stored
individuals, specified by a constant integer. This value is increased

15
SIMULATION TECHNIQUES
automatically to 1 in the next run. If not specified, they are not saved.
observations.

Example:

The report identifier for TALLY number 1 is TIME IN QUEUE. Since it is not
no specific output unit is defined, individual observations are destroyed.

4. COUNTERS Element

Define the report identifier and the count limit of the counters used in
discrete models. COUNTERS is included whenever the COUNT instruction is used or
when the COUNT subroutine is used in discrete event models.

COUNTERS: N, ID, LIMIT: REPETICION;

N: Counter number specified as an integer constant.

Report identifier, specified as an alphanumeric string no longer than 16


characters. Assumed: white.

LIMIT: Maximum value that the counter can reach.

Example:

COUNTERS: 1, TRABAJOS RECHAZ., 500;

The identifier of counter number 1 is REJECTED WORKS. and its counting limit is
500. When counter 1 reaches 500, the simulation run stops.

5. Element RESOURCES

Define las características del recurso, incluyendo su nombre y capacidad inicial.

The resource number must be assigned consecutively, starting at 1 following the


order of appearance that is represented in the system model. This is used instead of the
name of the resource as an argument in the SIMAN variables.

N, RNAME, NCAP: REPETITION;

N: Number of the resource specified as an integer constant.

Resource name.

NCAP: Initial capacity of the resource specified as an integer constant. Assumed: 1.

To define indexed resources, the only difference is that N is given by the range.
N1-N2 where N1 and N2 are integers that define the smallest and largest number of the resource.

16
SIMULATION TECHNIQUES
The range of resource numbers assigned to a resource name defines the dimension of
indexed resource. If the range is specified from N1 to N2, then N2-N1+1 are the types of
defined resources, each of which has the same name and can be addressed
for indexes from 1 to N2-N1+1.

Example:

RESOURCES:
1, lathe:
2-3, DRILL, 2, 4:
4-7, WORKER, 3;

This element defines 7 different resources. The first is a simple resource called LATHE,
with an initial capacity of 1. The other resources are indexed. The second is recognized as
DRILL(1) with an initial capacity of 2 and the third as DRILL(2) with a
initial capacity of 4. The resources from 4 to 7 are called: WORKER(1), WORKER(2),
WORKER(3) and WORKER(4) each with an initial capacity of 3 units.

6. Element PARAMETERS

Define the parameters associated with the SIMAN random variables.

The number and meaning of the parameters depend on the random variable that is
referenced with the signaling parameter within the distribution. As shown in
the following table:

Distribution P1 P2 P3
Exponential (EX) Media - -
Erlang (ER) Media K -
Uniform (UN) Minimum Maximum -
Triangular (TR) Minimum Medium Maximum
Normal (RN) Media Deviation -
Lognormal (RL) Media Deviation -
Gamma (GA) Beta Alpha -
Beta (BE) Theta Phi -
Poisson (NP) Media - -
Weibull (WE) Beta Alpha -
Empirical (DP) Prob. Acum., Value, - -
..., Repetition
Constant (CO) Constant Value - -
Table 1.5 Description of the parameters associated with the random variables SIMAN

PARAMETERS: N, P, ... , P: REPETITION;

N: Number of the signaling parameter specified as an integer constant.

Value of the parameter of the distribution being analyzed, specified as a constant.


real.

17
SIMULATION TECHNIQUES
Example:

PARAMETERS:
1, 3.0, 1.2
2, 0.3, 1, 0.9, 2, 1.0, 3;

Two parameters are specified. If the first refers to a normal distribution (ND)
corresponds to an average of 3.0 and a standard deviation of 1.2. If the second pair of meters
signaling refers to a discrete probability distribution (DP) the random variable
Take the value of 1, 2, or 3 with accumulated probabilities of 0.3, 0.9, and 1.0 respectively.

7. REPLICATE Element

This element specifies the number of runs to be executed, the start time of the first one.
race, the maximum length, in time, of each race and the initialization in the conditions
to be considered among the runs. If this element is omitted, a single run is executed that
must be finalized through another means.

REPLICATE, NRUN, TBEG, DTRUN, ISYS, ISTAT;

NRUN: Number of simulation runs to be executed, specified as a


integer constant. Assumed: 1.

TBEG: Start time of the first run, specified as a real constant.


Assumed: 0.0.

DTRUN: Maximum length of each run, specified as a real constant. Assumed:


Infinite.

ISYS: Option to reset or not the system state for each run, specified as
YES, NO. Assumed: YES.

ISTAT: Option to eliminate or not the previous observations between runs, specified
like YES, NO. Assumed: YES.

Example:

REPLICATE, 5, 0, 100, NO;

There will be 5 runs, the first of which starts with TNOW = 0. Each run will have a
maximum length of 100 and the system state will not be reset between runs.

The statistics in the 5 summary reports will correspond to the record of the observations.
during 500 units of operating time of the system, with observations grouped into
5 intervals of length 100 each.

8. DSTAT Element

It is used to obtain a temporal statistic of the discrete change variables in a


system.

18
SIMULATION TECHNIQUES
DSTAT: N, DVAR, ID, NUNIT: REPETITION;

N: DSTAT number specified as an integer.

DVAR: Discrete exchange variable to which the time statistics are recorded.
permanence, specified as X(K), NE(K), NQ(K), NR(K), NT(K), LC(K), MR(K) or
MT(K) where K is an integer (see tables 2 and 3 to recall its meaning).

ID: Identifier for the output in the summary report, specified with a maximum of 16
alphanumeric characters. Assumed: white.

NUNIT: Output unit in which the changes of each variable are recorded, specified by
an integer constant. Its value is automatically incremented by one in the following
races. If not specified, the values are destroyed.

Example:

DSTAT: 1, NQ(1), LONG. OF COLA;

Variable number 1 is the length of queue 1 of the system and is shown by the identifier.
LONG TAIL. The values taken by the variable are not stored.

9. TRACE Element

It is used to obtain traces that detail the movement of the entities of an instruction to
the other and the processing of each entity (resources used, variable assignment, etc.)
in each instruction.

TRACE, DTBT, DTFT, TC, VAR, ..., VAR;

DTBT: Time after the start moment of the simulation from which it will begin the
trace. Assumed: 0.0.

DTFT: Time after the start of the simulation at which the trace must end.
Assumed: Infinite.

TC: Research condition, specified as a condition. Assumed: investigate it.


everything.

VAR: Name of any SIMAN variable or attribute that is to be displayed during the
investigation. Up to 4 can be specified. Assumed: do not show the values.

Example:

TRACE, 0, 10, [Link].2, A(1), NQ(1), M;

The trace will start with TNOW = 0 and will end 10 time units later. This will
It will be carried out only for stations 1 and 2. The values of A(1), NQ(1), and M are specified.
as auxiliary output variables that are to be displayed during the trace.

19
SIMULATION TECHNIQUES
10. Element Rankings

It is used to determine the selection rule for the elements within a file.

SELECTION RULES

FIFO: Entities are selected based on the insertion time in the file. They have
highest priority the earliest insertions.

LIFO: Entities are selected based on the time of insertion in the file. They have
latest insertions are the highest priority.

LVF(K): Entities are selected based on the value of attribute number K of the
entity. Those with the lowest value in this attribute have higher priority.

HVF(K): Entities are selected according to the value of attribute number K of the
entity. Those with the highest value in this attribute have greater priority.

RANKINGS: N, MRANK: ... ;

N: File number or range of files (N1-N2) to which the criterion applies


selection.

MRANK: Selection criterion specified as FIFO, LIFO, HVF(K), LVF(K), where K


it is an integer.

Example:

RANKINGS: 1-5, LVF(2): 6, LIFO;

In files 1 to 5, the entities are selected according to the value they have in the
attribute 2, prioritizing the one with the lowest value. In file 6, the selections are made
entities according to LIFO. The other files that are not specified use the selection rule.
of FIFO entities.

11. Element TRANSPORTERS

Define the characteristics of the carriers used in the simulation model.

N: Number of the carrier assigned to this type, specified as an integer.

TNAME: Name of the carrier, specified as alphanumeric characters with a


maximum length of 8.

TCAP: Number of available units of this type of transporter, specified as a


whole. Assumed: 1.

20
SIMULATION TECHNIQUES
NDS: Distance relationship number. Relate this element to the element
DISTANCES, specified as an integer. Assumed: 1.

VEL: Speed of each conveyor unit specified as an integer.


Assumed: 1.0.

P-S: Initial position and status of each unit of the transporter, where P is an integer that gives the
station number and S is the status character A or I corresponding to active or inactive.
Assumed: the first station in the distance set and A or the last P-S that entered for this
type of carrier.

Example:

TRANSPORTERS
1, CRANE, 3, 1, 1.0, 1-A, 2-A, 2-I:
2, CART, 1, 2, 3.0;

Two types of carriers are defined, the first is called CRANE and has a capacity of 3.
The travel distances between the pairs of stations that the CRANE units can
visit, are specified in DISTANCES with the number of distance relationships 1. The
The speed of each of the three CRANE units is 1.0. CRANE(1) starts at the station.
1 and is active, CRANE(2) starts at station 2 and is active and CRANE(3) starts at the
station 2 and it is inactive. The speed of CART is 3.0; as the P-S field is
omitted, TRAILER starts active at the first station listed in the number of
distance signage 2.

12. Element DISTANCES

It is used with the TRANSPORTERS element to define travel distances between all.
the pairs of stations that the transporter can visit.

N, ML-MU, dij, ... : REPETITION;

N: Number of distance relationships, specified as an integer.

ML-MU: Range of the number of stations included in the set, specified as


integers.

dij: Distance between station i and station j, specified as an integer. The values dij (j>i)
they represent the elements of the distance matrix, taken by rows with each dij separated
by commas (,) and each line separated by a slash (/)

Example:

1, 1-5, 10, 2, 7, 5/ 7, 3, 4/ 2, 6/ 3;

This element defines the relationship number of distances 1, that is, the distances between all
the pairs of stations in the range of 1 to 5, with the distances given in the following
upper triangular matrix:

21
SIMULATION TECHNIQUES
Of A 2 3 4 5
1 10 2 7 5
2 - 7 3 4
3 - - 2 6
4 - - - 3

5C
1. ONS
D
IERA
T
OINSONTHEOPERA
T
OINOFS
M
I AN

In the execution of a simulation run, it is possible that two or more entities must arrive.
simultaneously to different blocks, and the order in which those simultaneous events are
processed can affect the results of the simulation more or less.

In the simplest cases, the presence of simultaneous events does not pose a problem, but
In complex models, it is important for the analyst to understand the tie-breaking rules.
used by SIMAN to process simultaneous events.

The order in which moving entities are processed is controlled by the 'schedule'
of events" from SIMAN. This is an ordered sequence in time of event records.
that the SIMAN uses to keep track of each entity in the system. The event registration
for an entity, define the next block that the entity will enter and the moment when it must
do it. The event logs of all entities are stored in the calendar of
events (event file) which indicates the next action to be executed.

The SIMAN executes the simulation by repeatedly taking the next event from the calendar of
events and processing the movement of the entity through all the blocks that is possible until
that it encounters some kind of delay or is destroyed. The SIMAN continues this
process moving an entity each time until the simulation run ends. Only
There are exceptions to this process when simultaneous events occur, being considered
the following cases:

Two or more entities are created (CREATE) at the same time.

b. Two or more entities exit DELAY blocks at the same time.

c. One or more entities are created (CREATE) and one or more entities exit blocks.
DELAY at the same time.

Two or more entities are branched simultaneously in BRANCH blocks.

One or more entities are removed or copied from QUEUE blocks to blocks
HOLD, such as: REMOVE, COPY or MATCH.

In the first three cases, the tiebreaker rule applied processes the events in the same way.
order in which they appear on the events calendar.

In the fourth case, the entities are processed in the same order in which they are specified.
in the BRANCH block.

22
SIMULATION TECHNIQUES
In the last case, the removed or copied entities are processed in reverse order to how they are.
removed or copied, that is, the last entity removed or copied is the first to be
processed.

Example:

The following example shows how the tiebreaker rules work.


using the trace (TRACE) of the variables NQ(1), NC(1) and NC(2).

SYSTEM MODEL

BEGIN;
CREATE, 2;
QUEUE, 1: DETACH;

CREATE;
BRANCH:
ALWAYS, FIRST:
ALWAYS, SECOND;
FIRST REMOVE: 1, 1, ONE: DISPOSE;
SECOND REMOVE: 1, 1, TWO: DISPOSE;
UNO 1
DOS COUNT: 2, 1: DISPOSE;
END;

EXPERIMENT MODEL

BEGIN;
PROJECT
DISCRETE, 100, 0, 1;
1
TRACE, 0, 1, ,NQ(1), NC(1), NC(2);
END;

SUMMARY REPORT

SIMAN System Trace Beginning at Time .000

Time Event or Block System Status Change


-------------------------------------------------------------------------------
NQ(1) NC(1) NC(2)

23
SIMULATION TECHNIQUES
-------------------------------------------------------------------------------

0.0000E+00
CREATE Entity batch size 2 created
QUEUE Entity placed in file 1
1,000 .000 .000

0.0000E+00
QUEUE Entity placed in file 1
2,000,000,000

.0000E+00
CREATE Entity batch size 1 created
BRANCH Selection made from 2 of 2 branches
Deterministic, entity sent to PRIMERO
Deterministic, entity sent to SECOND
FIRST REMOVE Entity 1 removed from 1 and sent to ONE
Entity Disposed
1,000 0.000 .000

.0000E+00
UNO COUNT Counter 1 incremented by 1 1 to
Entity Disposed
1,000 1.000 .000
0.0000E+00
SECOND REMOVE Entity 1 removed from 1 and sent to DOS
Entity Disposed
.000 1,000 .000

.0000E+00
TWO COUNT Counter 2 incremented by 1 to
1
Entity Disposed
.000 1.000 1,000

SIMAN Summary Report

Run Number 1 of 1

Project: SAMPLE_TRACE
Analyst: AUTHOR
5/10/1998

Run ended at time: .0000E+00

24
SIMULATION TECHNIQUES
Counters
-----------
Number Identifier Count Limit
-------------------------------------------------
1 ACCOUNTANT1 1 Infinite
2 COUNTER2 1 Infinite

2 Second(s)

Stop - Program terminated.

61. EDT
IN
IG,COMPL
IATO
IN,LN
IKAGE AND RUNNN
IG OF PROGRAMS N
I SM
I AN

Considering the general characteristics of language, instructions, and elements


Most commonly used explained above, we proceed to detail the logical sequence that must be followed.
to edit the models on the microcomputer as well as for their compilation, linking, and
race with a view to achieving the desired results.

1.6.1 EDITION OF THE SYSTEM MODEL

Using any program editor, the system model can be edited.


developed.

The first instruction that must appear in column 1 is BEGIN, which has the following
format:

BEGIN, BSEQ, ISEQ, ILIST;

BSEQ: Sequence number assigned to the first block in the model. Assumed: 10.

ISEQ: Increment added to the previous sequence number. Assumed: 10.

YES, NO, specify whether the model listing will be generated or not. Assumed: YES.

BEGIN is followed by the input instructions that define the system model with the
next format:

Columns Description

1-8 Instruction labels.

10-74 Operands within a line segment separated by commas;


line segments separated by colons, the modifiers of the
block (if any) following the last line segment; the instruction
ends with a semicolon.

25
SIMULATION TECHNIQUES
Comments should follow a semicolon in column 1.

The last instruction of the model must be the instruction END written in columns 1-3,
followed by a semicolon in column 4. END; is the last instruction read by the
system processor.

When editing the simulation model in a certain program, let’s call it


[Link], you must type MODEL. MODEL is the system processor that reads the
model of the system in the form of instructions ([Link]) and generate a list and a
system file given an assumed name EXAMPLE.M.

MODEL needs to know the name of the previously edited program, so it must be
to type

EXAMPLE [Link]

MODEL checks the syntax of the input instructions. If any error is detected, it gives a
message immediately after the instruction in which it has been found.

If the MODEL detects any error, note the instruction in which it occurred and correct it in the
program that was initially created with the program editor ([Link]). Repeat
the entire previous procedure until no errors are detected. In this way,
EJEMPLO.M will be ready to be linked with EJEMPLO.E and run afterwards.

1.6.2 EDITING OF THE EXPERIMENT MODEL

The procedure for introducing the elements of the experiment is very similar to that of
introduction of the system instructions, differing only in the following
aspects:

In the program editor, all instructions (elements) are typed based on the
first column.

The elements can be written in any order, except DISCRETE and


CONTINUOUS that can only be preceded by PROJECT. That is, if it is created
[Link] with the program editor, then it must call EXPMT.
EXPMT is the processor of the experiment that reads the input instructions from the
experiment data ([Link]) and generate a list and a file of the
experiment that is given a presumed name EXAMPLE.E.

EXPMT needs to know the names of the previously edited program, in this case it
must type:

EXPMT [Link]

EXPMT performs the same checks as MODEL and the way to correct errors is the
same in both cases, until reaching (without errors) EXAMPLE.E ready to link.

26
SIMULATION TECHNIQUES
1.6.3 LINKING OF SYSTEM AND EXPERIMENT FILES

After the system and experiment files (EXAMPLE.M and


EXAMPLE.E) the program LINKER is called, which is responsible for linking both files
and it will result in an executable program if no errors are detected.

LINKER needs to know the name of the system file and the name of the experiment file.
putting the resulting linked file in a file named assumed EXAMPLE.P, the
which is already an executable program. In this case, you must type:

LINKER EXAMPLE.M EXAMPLE.E

Being EJEMPLO.P the executable program that will simulate the system with the data that is
specify.

If errors are detected with the LINKER, they must be corrected in the edited programs.
at the beginning and repeat the entire process again until obtaining the message: LINK COMPLETED,
the one who ensures that the program in question runs smoothly.

1.6.4 EXECUTION OF THE PROGRAM

The execution of the program file generated by the LINKER is carried out by calling the
SIMAN program.

Following SIMAN, you must type the name of the executable program file that is
wants to run. In this case:

EXAMPLE SIMAN.P

Having done this, the program will start running, which will ultimately generate a summary report.
SIMAN (if any) and the output files (if any).

If any error is detected during execution, an error message is printed that describes the
nature of this, a SIMAN summary report is printed and the execution of the
program.

71. ANALYSS
I OF RESULTS N
I A SM
I ULATO
IN EXPERM
I ENT

With the introduction of random variables in a simulation, the variables used for
measuring the behavior of a system also has the nature of random variables. The
measured values are nothing more than samples, and they should be used to estimate the parameters of
the distribution to which they belong.

A simulation study is usually planned as a series of runs that have the


objective of comparing a number of variants in the structure of a system or its conditions

27
SIMULATION TECHNIQUES
of operation. As a rule, the term experiment will mean the test of behavior
of a system under various sets of conditions. The term 'run' will mean the
execution of the simulation for one of the experimental configurations. An observation
it will be the measurement of a variable of the system.

Generally speaking, the statistical problems associated with a simulation study are
they are classified into two main classes:

a. Strategic planning problems related to the design of the


experiments.

b. Tactical planning problems, specifically related to the way in which


the simulation experiment must be conducted.

Strategic planning must determine the measurements that will serve to judge the
characteristics of the system and how to test the significance of differences in these
measures. Tactical planning must decide how to take the measurements in each run and
How many runs should each experiment consist of? In this case, it will be about the second.
aspect, since strategic planning is quite independent of the techniques of
simulation.

Since the simulation is a sampling experiment, it is important to interpret its


results within the framework of statistics. It is not possible to simply run a
simulation for a sample of arbitrary size and then interpret the results as
a "truth". Instead, the statistical accuracy of the results should be specified.
same.

As is known, when observations are taken of a random variable belonging to


a population that has a stationary probability distribution with mean M and variance S2,
~
the sample mean X it is also a random variable, according to what is established by the
central limit theorem, has a distribution that tends to the normal distribution with
mean M and variance S2/ n.

Taking the standard normal variable:

~
X−M
Z=
s/n

the confidence interval for the mean M can be defined as:


~ ~
Prob[X−Z / 2 s/n ≤ M ≤ X + Z s/n] = 1 - α

where the constant (1−α) is the confidence level and the interval:

~
H = X ± Z / 2 s/n

In practice, the population variance S2it is not usually known; in which case it is
replaced by an estimate given by the formula:

28
SIMULATION TECHNIQUES
n
~ 1 ~
S2 ( X iX2
n-1i 1

used in the interval is determined by the t distribution of


In this situation, the value of Z /2

Student; but if n≥30 the normal distribution can be used.

The method to determine the confidence interval seen earlier is based on the
following conditions:

a. The observations made must be independent.

b. The distribution from which the observations are taken must be stationary.

In general terms, many of the statistics of interest in a simulation do not hold.


under such conditions. For example, when one wishes to estimate the average waiting time in
a line with a service station, the simplest procedure is to accumulate the time of
wait for n entities and then divide the total by n, that is:

~
X(n) = 1 Xi
n i=1

As can be easily understood, the waiting times for each entity are not
independent, but depend on the waiting times of the preceding entities.
Any series of data with the property that one value affects others is called self.
correlated. This characteristic of autocorrelation does not have a determining influence.
in the calculation of the estimated mean value of a series of data; but the same does not happen with
the variance, which will no longer be related to the population variance due to the simple
expression of s2as occurs for a series of independent data.

Another problem that must be addressed is the fact that the distribution may not be
stationary. In particular, when a simulation run is started with the system in
a total situation of inactivity, for example, an entirely empty waiting line,
measured values during a running period will be biased, while as the measure of
the length of the run extends and the size of the sample increases, the effect of that
bias is disappearing. The above indicates that the sample mean values tend to a
stable value for a certain batch size.

1.7.1 ELIMINATION OF INITIAL BIAS

Two general approaches have been proposed to reduce the effect of initial bias in the
simulation runs:

a. The simulation can begin with the system in a more representative state.

b. The first part of each run can be ignored for the purposes of collection
information.

29
SIMULATION TECHNIQUES
In some simulation studies, particularly of existing systems, it may be available.
information that can be used to select better initial conditions than the
state of inactivity.

The most commonly used approach to avoid initial bias is to eliminate the first
section of the bullfight. The bullfight begins in a state of inactivity and is stopped afterwards.
for a certain period of time. The system state variables are maintained with their
values and the run starts again but now gathering information from the new
beginning. The usual practice is to schedule the simulation by collecting information from the
principle, and simply discard the statistics collected until the moment of restarting.
There are no simple rules to decide the size of the run to be eliminated, although it is recommended
conduct a pilot run starting from the inactive system and use a graph where
Plot the estimated value behavior against the run length, and observe the
value stabilization process.

1.7.2 REPEAT RUNS

This procedure is a way to obtain a measure of the variance of the sample mean.
It consists of repeating the runs with different random numbers for it.
sample size n, in order to produce a set of independent observations of the
~
sample mean X(n). Suppose that the run is repeated p times with independent series.
of random numbers. Let Xijthe i-th observation of the j-th run, and let the value of the
sample mean for the j-th run XjThen the estimated values sought are:

p p n
~ 1
M(n) = 1 Xj(n)= X ij
p j=1 np j=1i=1

p
~ 1 ~
S2(n)= ( X j(n) - M(n))2
p 1 j=1

These two estimates can be used to establish the confidence intervals.

The main disadvantage of this procedure is that at the beginning of each run it requires
an initial stabilization period. The way to eliminate this disadvantage is to carry out the
consecutive runs, using the final conditions of one run as conditions
initials of the next. In other words, there is only a long run which is divided into
a series of equal portions for the purpose of taking observations. The price paid
to avoid extra stabilization periods is the possibility that these observations do not
they are statistically independent. However, by running them sufficiently
Longer ones, the correlation between observations can be significantly reduced.

For both methods, the repetition of the runs should provide between 15 and 20 observations.
independent, those that will be sufficient for the establishment of the intervals. As
final aspect it is recommended that when the simulation involves the comparison of several
alternatives for the system, the appropriate procedure is to reproduce the same sequence of
random numbers for each alternative, which would allow for a better comparison base
for the behavior of the system under each alternative.

30
Simulation Techniques
The method for calculating the confidence interval H differs depending on whether it is being
simulating a system with or without an end. A system with an end is one that
presents a final event that is perfectly identifiable and defines the conclusion of the run.
simulation. An example of a system with a term is one that closes at regular intervals, for
for example a bank or a factory. An endless system is one that does not end or that
it operates continuously, for example, the emergency room of a hospital or a control center
telephone. For the purposes of the analysis, it will be considered with a term, for a defined period of
study, to those systems that are truly without end. For example, for the study of
the behavior of an assembly line operating continuously can be considered a
study period of 2 years (length of the run), and the event that ends the simulation
corresponds to the end of the adopted period.

[Link] Systems with Term

In systems with termination, the initial state of the system and the termination condition are
defined by the system itself, and it is of interest to determine the response period
transitory for that system subject to its initial material conditions.

Since the length of the run in systems with a termination cannot be manipulated, the
The only way to increase the sample size is by repeating runs.
using different series of random numbers and, although the observations within a
runs may be correlated, the observations between runs will be independent.
~
So, defining the sample as an observation ( X ) for each race, you can
use the expressions presented in section 7.2 and apply the statistical techniques
conventional.

[Link] Systems without Term

As defined earlier, termless systems are those that can operate.


indefinitely. For these systems, it is of interest to determine the behavior of the system
in its steady operating state. The system achieves this steady state after a
long period of operation and is independent of the system's startup state.

The steady state response is a boundary condition in the operation of the system, the
which is never fully achieved in a simulation experiment. The above is due to
the initial conditions, which must be set in every simulation experiment,
they introduce a bias in the results that have been previously addressed.

Two factors must be analyzed when deciding how many observations should be made.
ignored until reaching the stable operating state of the system. If it is overestimated the
the duration of the transient period then valid observations are lost for the
stable state. On the other hand, if this period is underestimated, then they are considered
observations that contribute to biasing the statistical results. Although proposals have been made
Some rules for selecting the truncation period, there is no completely method.
satisfactory and perhaps the most practical way to act is to estimate the truncation point
based on graphs or bar diagrams that follow the system's response over time. In
non-terminating systems can increase the sample size by extending the length
from a unique run or replicating the run with different random numbers.

31
SIMULATION TECHNIQUES
The most practical way to work is to extend the length of a single run and
divide it into N subruns that will be called batches. In this case, the
initial observations until reaching the steady state: then they are taken as observations
the average values of each batch and, to reduce the effect of autocorrelation between the
lots, a batch size is selected that is large in relation to the largest interval between
observations that produce a significant correlation. In this situation, they can already
apply the expressions presented in section 7.2.

There are two considerations when selecting the batch size in the
previous procedure. On one hand, a large batch size must be selected for
ensure the independence and normalcy in the sample (average value of each batch). On the other hand
Partly, it is desired to reduce the batch size to obtain a larger sample and achieve greater
precision in the confidence interval estimate. The adequacy of the lot size for
obtaining means of independent batches can be tested using a test proposed by
Fishman. Sea Xjthe average of the j-th batch and N the total number of batches in which it has been divided
the race. The average of the averages is calculated, that is:

N
~ ~
X= 1 Xj
N j = 1

and the variable

N-1
~ ~
( X jXj 1) 2
j=1
C B1- N
2(X -
~ 2
X)
~
j
j=1

Assuming that the Xjthey are independent and normally distributed, then CBhimself
distributes approximately normally with a mean of zero and variance equal to (N-2) / (N 2-1) for
values of N≥8. For large values of N (from 20 to 30) CBit can be used as a
estimate of the correlation between the means of adjacent batches.

Now a dozen hypotheses can be tested:

H0CB= 0
against
H1CB0/=

in which H is rejected0(independence) in favor of H1(correlation between batches) for a level


trustworthy if the statistician

CB
Z
(N-2)
(N 2-1)

is greater than Z /2 , where Z /2 it is determined from the standard normal distribution.

32
Simulation Techniques
It should be clarified that accepting H0against H1it
is not a conclusive indication that it exists
independence, but rather indicates that there is not enough evidence to ensure that there is
correlation between the batches.

8A
1. PPL
C
IA
TO
IN EXAMPLES

The following are some application examples, the system model is presented
and from the experiment, the mechanisms of operation of these are described along with the results
that are obtained by running it on the microcomputer using the simulation language
SIMAN.

1.8.1 EXAMPLE 1

In a television assembly plant, there is a quality control station at the end of the
line in which the functioning of the equipment is checked. If it is detected that any equipment
it needs adjustment, it is sent to an adjustment station where, after being adjusted, it is returned to
the control station to be checked again. The televisions that pass the control
They are packed and stored.

Consider that the time between the arrivals of the televisions at the control station follows a
uniform distribution between 3.5 and 7.5 minutes, that the inspection time is also
uniform between 6 and 12 minutes and that the time it takes to adjust is uniform between 20 and 40
minutes.

Statistically, it is known that 15% of televisions need some adjustment.

SYSTEM MODEL

BEGIN;
CREATE: UN(1,1): MARK(1);
INSPECT 1
SEIZE: INSPECTOR;
DELAY: UN(2,1);
RELEASE: INSPECTOR;
BRANCH, 1:
WITH, .15, ADJUST:
WITH, .85, PACKAGING;
ADJUST QUEUE, 2;
ADJUST
DELAY: UN(3,1);
RELEASE: ADJUST: NEXT(INSPECT);
PACKAGING TALLY: 1, INT(1): DISPOSE;
END

33
SIMULATION TECHNIQUES
EXPERIMENT MODEL

BEGIN;
PROJECT, TELEVISION SETS, AUTHOR, 4/6/98;
DISCRETE, 30, 1, 2;
PARAMETERS: 1, 3.5, 7.5: 2, 6, 12: 3, 20, 40;
1, INSPECTOR, 2: 2, ADJUST;
1
DSTAT: 1, NQ(1), COLA INSPECTION:
2, NQ(2), ADJUSTMENT ALLOWANCE:
3, NR(1), UTIL INSPECTION:
4, NR(2), ADJUSTMENT UTIL;
REPLICATE, 1, 0, 100;
END;

SUMMARY REPORT

SIMAN Summary Report

Run Number 1 of 1

Project: TELEVISIONS
Analyst: AUTHOR
4/6/1998

Run ended at time: .1000E+03

Tally Variables
--------------------
Number Identifier Average Standard Minimum Maximum Number
Deviation Value Value of Obs.
-------------------------------------------------------------------------------------------------------
1 TIME IN SYSTEM 8.37802 1.68165 6.37955 11.78709 19

Discrete Change Variables


--------------------------------
Number Identifier Average Time
Deviation Value Value Period
-------------------------------------------------------------------------------------------------------
1 COLA INSPECTION .06009 .23766 .00000 1.00000 100.00
2 COLA ADJUSTMENT .00000 .00000 .00000 .00000 100.00
3 UTIL INSPECTION 1.62702 .49062 .00000 2.00000 100.00
4 UTIL ADJUSTMENT .00000 .00000 .00000 .00000 100.00

4 Second(s)

Stop - Program terminated.

34
SIMULATION TECHNIQUES

1.8.2 EJEMPLO 2

A mechanical production system is composed of a drill and two lathes. The type of
Task 1 must be processed first by the drill and then by the lathe. The attention in the
The job queue is FIFO.

Determine the average time spent on processing each job and the number
average of jobs waiting for the lathe or drill. The following data is available:

Type of # of # of entities Time in Time in Time between


work groups by group the drill the lathe Arrival
1 12 5 3.0 Uniform 14.0
(2-3)
2 10 8 - Uniform Exponential
(1-2) (3.0)

The time data is given in minutes.

SYSTEM MODEL

In this example, since there are two entities with different characteristics, each one is created.
of them separately. Using attribute 1 to establish the type of each entity created.
In attribute 2, the value of TNOW is stored when the entities arrive at the system.
Subsequently, the resources needed by each entity are requested, used, and released.
processed and, in the end, the time that each of the entities has been in the
system.

BEGIN;
CREATE, 8: EX(3,1), 10: MARK(2);
ASSIGN: A(1)=2: NEXT(MAQUIN2);
;
CREATE, 5: 14,12: MARK(2);
ASSIGN: A(1)=1;
QUEUE, 1;
DRILL
DELAY: 3;
DRILL;
;
MACHINE2 QUEUE, 2;
SEIZE: TURN;
DELAY: UN(A(1),1);
RELEASE: RETURN;
TALLY: A(1), INT(2): DISPOSE;
END;

35
SIMULATION TECHNIQUES
EXPERIMENT MODEL

All the experimental characteristics of this process are given. That is, it is defined that
there will be a maximum of 100 entities simultaneously in the system, each with two attributes
of them. The identifiers for the statistical results that define the
behavior of time in the system of each type of entity. The variables are determined
SIMAN that will reflect the behavior of the system, the characteristics of the resources
used and the parameters of the random distributions defined in the system model.

BEGIN;
PROJECT
DISCRETE, 100, 2, 2;
TALLIES: 1, TIEMPO TRAB. 1: 2, TIEMPO TRAB. 2;
DSTAT: NQ(1), COLUMN DRILL:
3, NR(1), USE. DRILL: 4, NR(2), USE LATHE;
RESOURCES: 1, TALADRO, 1: 2, TORNO, 2;
1, 2, 3: 2, 1, 2: 3, 3;
END;

SUMMARY REPORT

SIMAN Summary Report


Run Number 1 of 1

Project: TITLE
Analyst: AUTHOR
11/23/1998
Run ended at time: .1822E+03

Tally Variables
-------------------
Number Identifier Average Standard Minimum Maximum Number
Deviation Value Value of Obs.
--------------------------------------------------------------------------------------------------------
1 WORK TIME 1 24.50852 9.89957 7.30772 49.81167 60
2 WORK TIME 2 15.50321 10.22390 1.32173 35.20122 80

Discrete Change Variables


--------------------------------
Number Identifier Average
Deviation Value Value Period
------------------------------------------------------------------------------------------------------
1 DRILL CHUCK 3.78679 1.89903 .00000 8.00000 182.21
2 COLA TURN 8.65328 12.37050 .00000 43.00000 182.21
3 UTIL. DRILL .98786 .10952 .00000 1.00000 182.21
4 TOOL AROUND 1.44903 0.64721 .00000 2.00000

Run Time: 19 Second(s)


Stop - Program terminated.

36
SIMULATION TECHNIQUES
1.8.3 EXAMPLE 3

Consider the emergency area of a hospital where patients arrive


they are classified into one of the 5 categories, depending on the severity of their illness. The
Patients in category 1 are the most serious and are sent immediately to a
bed where they wait for medical attention. Patients in the remaining categories must
wait at the reception, where admission data is taken, until there is a bed
available.

Patients arrive according to a Poisson distribution with an average time between


arrivals that vary throughout the day according to the following behavior:

Period 0-4 4-8 8-12 12-16 16-20 20-24


Time(h) 0.3 0.5 0.2 0.3 0.3 0.3

The emergency room has 3 beds and a nurse to take the admission information.
It also has 2 doctors from 8:00 AM to 12:00 PM and one doctor during the
early morning. The time it takes for the admission of patients from categories 2 to 5 is
0.15 hours, and the time spent on each patient is evenly distributed with
different parameters according to its category, as shown in the following
table:

Patient Category % of Total Lower Value (h) Superior Value (h)


1 8 0.25 0.35
2 13 0.20 0.30
3 33 0.15 0.25
4 20 0.10 0.20
5 26 0.05 0.15

Simulate the system for 168 hours to determine the time in the system for each patient.
category and the use of beds, the doctors and the nurse.

SYSTEM MODEL

BEGIN;
CREATE;
DAY DELAY: 8;
ALTER: DOCTOR, 1;
DELAY: 16;
ALTER: DOCTOR, -1;
ASSIGN: X(1) = X(1) + 24: NEXT(DIA);
;
CREATE: EX(6,1): MARK(2);
ASSIGN: X(2) = TNOW - X(1);
ASSIGN: P(6,1) = TF(1, X(2));
ASSIGN: A(1) = DP(7,2);
BRANCH, 1:
IF A(1) EQ 1, THEN:
ELSE, RECORD;

37
SIMULATION TECHNIQUES
REGISTER QUEUE, 1;
SEIZE: NURSE;
DELAY: .15;
RELEASE: NURSE;
BEDS QUEUE, 2;
SEIZE: BED;
QUEUE, 3;
SEIZE: DOCTOR;
DELAY: UN(A(1),3);
RELEASE: DOCTOR;
RELEASE: CAMA;
TALLY: A(1), INT(2): DISPOSE;
END;

EXPERIMENTAL MODEL

BEGIN;
EMERGENCY ROOM
DISCRETE, 100, 2, 3;
TABLES: 1, 0, 4, .3, .5, .3, .2, .3, .3, .3;
PARAMETERS: 1, .25, .35: 2, .20, .30:
3, .25, .15: 4, .10, .20:
5, .05, .15: 6, .3:
7, .08, 1, .21, 2, .54, 3, .74, 4, 1., 5;
RANKINGS: 1-3, LVF(1);
1
TALLIES: CATEGORIA 1
3, CATEGORIA 3: 4, CATEGORIA 4: 5, CATEGORIA 5;
DSTAT: NR(1)
3, NR(3), UTIL DOCTOR;
REPLICATE, 1, 0, 168;
END;

SUMMARY REPORT

SIMAN Summary Report

Run Number 1 of 1

EMERGENCY ROOM
Analyst: AUTHOR
9/25/1998

Run ended at time : .1680E+03

38
SIMULATION TECHNIQUES
Tally Variables
--------------------
Number Identifier Average Standard Minimum Maximum Number
Deviation Value Value of Obs.
--------------------------------------------------------------------------------------------------------
CATEGORY 1 .30884 .03605 .26094 .45143 43
2 CATEGORY 2 .46016 .07836 .35063 .73433 73
3 CATEGORY 3 .40207 .08174 .30023 .69485 188
4 CATEGORY 4 .40580 .21307 .25220 1.41257 117
5 CATEGORY 5 .39941 .34444 .20079 2.76027 150

Discrete Change Variables


---------------------------------
Number Identifier Average
Deviation Value Value Period
-------------------------------------------------------------------------------------------------------
1 USEFUL NURSE .47143 .49918 .00000 1.00000 168.00
2 BEDS .63413 .67211 .00000 3.00000 168.00
3 UTILITY DOCTOR .60243 .62106 .00000 2.00000 168.00

2 minutes and 19 seconds

1.8.4 EXAMPLE 4

Some parts are processed in an automated manufacturing system composed of two machines.
numerically controlled tools and an industrial robot. The processing of all the
tasks follow the same sequence, that is, machine 1 is always followed by machine 2.

The processing time of each machine is normally distributed with a mean of 42.
seconds and a standard deviation of 2 seconds. The tasks are carried out by the robot
from the arrival station to machine 1, processed in machine 1, then transported
by the robot to machine 2, processed by it and, finally, transported (by the robot) to the
departure station.

All material handling is carried out automatically by the robot controlled by


computer, which also responds to the transportation requirements from the station of
I arrive at the departure station. The transportation requirements are sent.
automatically to the robot when a task arrives in the system or finishes its service in a
machine. The priority rule that tasks at each service station are subjected to
FIFO.

The time required by the robot to insert or remove a part from a machine or to take or
releasing a piece at the arrival or departure station follows a uniform distribution between 6 and
8 seconds. The time between arrivals is exponentially distributed with a mean of 124.
seconds. The distance from the arrival station to the machines is 120 centimeters, the
distance between machines, of 100 centimeters and the distance between the last machine and the
departure station, 72 centimeters. The robot moves at 20 centimeters/second.

39
SIMULATION TECHNIQUES
Simulate the system for 14400 seconds to determine the allowed time for the piece.
remains in the system, the use of each machine and the robot and the number of pieces that
wait at the arrival station.

SYSTEM MODEL

To model this system, it is broken down into four submodels. These


submodels are connected through the material handling system, which is
composed of a transport unit called ROBOT. The ROBOT is used to move
the entities (tasks) through the four station submodels. The four stations
They are numbered from 1 to 4 and represent the arrival station, the stations of the two
machines and the departure station, respectively.

The first submodel represents the arrival of tasks to the system. An entity that represents
the entry of a task into the system is generated in the CREATE instruction and passes to the instruction
ASSIGN, where the station attribute takes the value 1. After that, the entity enters into the
QUEUE instruction, where it waits in file 1 until it is assigned a unit of
index resource MACHINE(1). Once this resource is assigned to the entity, it proceeds to the
second instruction QUEUE where it waits in file 2 with priority 1 for the transporter
ROBOT. The entity is then transported by the ROBOT from station 1 to station 2.

BEGIN;
;
; SUBMODEL OF ARRIVAL
;
CREATE: EX(3,1): MARK(1);
ASSIGN: M=1;
QUEUE, 1;
SEIZE: MACHINE(1);
QUEUE, 2;
REQUEST, 1: ROBOT;
DELAY:UN(1,1);
ROBOT, 2;
; SUBMODEL OF MACHINES 1 AND 2
;
STATION, 2-3;
DELAY: UN(1,1);
FREE: ROBOT;
DELAY: RN(2,1);
BRANCH, 1:
IF, [Link].2, GETMACH:
ELSE, GETROBOT;
GETMACH QUEUE, 3;
SEIZE: MACHINE(2);
GETROBOT QUEUE, 4;
REQUEST, 2: ROBOT;
DELAY: UN(1,1);
RELEASE: MACHINE(M-1);
TRANSPORT: ROBOT, M+1;
;

40
SIMULATION TECHNIQUES
; OUTPUT SUBMODEL
;
STATION, 4;
DELAY: UN(1,1);
FREE: ROBOT;
1
END;

The processing logic of a task is very similar in machine 1 and in machine 2, so


We use the macro capability of SIMAN to simultaneously model these two stations.
An entity that arrives at machine 1 or 2 enters the submodel of machines of the
instruction STATION with station number 2 or 3, respectively. The entity continues
to the DELAY block, where it is delayed for the time required to reach the machine.
Then the entity releases the ROBOT and enters the second instruction DELAY, where it is
delayed according to the processing time of the task on the machine. After this
the entity delays and moves to the BRANCH instruction, where it is sent to an instruction
QUEUE depending on the station attribute of the entity. If the entity is at the station
2 (machine 1), is sent to the instruction with label GETMACH2, otherwise, it is
sent to the instruction with the GETROBOT tag. An entity sent to GETMACH2
represents a task that has been completely processed by machine 1 and is waiting in the
file 3 because a unit of the resource MACHINE(2) is assigned to it. After that, the entity enters
in the QUEUE instruction called GETROBOT where it waits in file 4 with priority 2
the ROBOT. An entity sent directly from the BRANCH to GETROBOT represents
a task that has completely finished its processing on machine 2.

In both cases when the ROBOT's requirement is completed, the entity enters into a
DELAY block, where the time required by the ROBOT to extract the task is delayed.
the machine. The entity then releases the appropriate machine and it is later transported by the
ROBOT to the next station.

The task exit process is modeled in the fourth station submodel. An entity
enter the output submodel with a STATION instruction and proceed to an instruction
DELAY where the time required by the ROBOT to take the complete piece is delayed.
the departure station. Then the entity releases the ROBOT and a statistic is recorded of
task time in the system. At that moment the entity leaves the system.

To be edited and obtain the requested results at the beginning, the model of the experiment
would remain:

EXPERIMENT MODEL

BEGIN;
PROJECT
DISCRETE, 20, 1, 4, 4;
1
RESOURCES: 1-2, MACHINE;
1, ROBOT, 1, 1, 20.0, 1-A;
DSTAT: 1, NR(1), UTIL. MAQ. 1: 2, NR(2), UTIL. MAQ. 2:
3, NT(1), UTIL. ROBOT: 4, NQ(1), COLA ARRIBO;
DISTANCES: 1, 1-4, 120, 220, 292/ 100, 172/ 72;

41
Simulation Techniques
PARAMETERS: 1, 6, 8: 2, 42, 4: 3, 124;
REPLICATE, 1, 0, 14400;
END;

In the experiment model, after defining the name, the author, and the date of execution
From the summary report with the PROJECT element, it is defined in DISCRETE that there will be a
maximum of 20 entities simultaneously in the system, which have an attribute. To the
Here, 4 files or queues and 4 service stations are defined. With TALLIES, it
give the name that will identify the variable that you want to control statistically.
RESOURCES defines the resources indexed with the name MACHINE in which it is assumed
a unit of this resource. The characteristics of the ROBOT are defined in the element
TRANSPORTERS. This element specifies in the signaling number of distance 1,
una capacidad de 1, una velocidad de 20.0, la posición inicial en la estación 1 y el status
initial active. DISTANCES specifies the distances of the distance signaling number
1 among all the pairs of stations connected from 1 to 4. With PARAMETERS we
they specify the parameters that characterize the distributions used in the model of the
system, which are identified between both models by the signaling number of
parameter. Finally, a single run is specified to start with TNOW=0 and will end
with TNOW=14400.

SUMMARY REPORT

The SIMAN summary report is provided below. This report shows that the
machines 1 and 2 approximately 80 and 70% of the time, respectively, and that the ROBOT
an average of 74% of the available time was used. The utilization of the machines
includes the time required for the task to be transported and introduced into the machine, so
as the processing time that each one uses.

SIMAN Summary Report

Run Number 1 of 1

Project: FABRIC. AUTOMATIC


Analyst: USER NAME
6/27/1998

Run ended at time : .1440E+05

Tally Variables
-------------------
Number Identifier Average Standard Minimum Maximum Number
Deviation Value Value of Obs.
----------------------------------------------------------------------------------------------------------------
TIME IN SYSTEM. 279.38280 117.86910 130.64750 644.29690 111

42
SIMULATION TECHNIQUES
Discrete Change Variables
---------------------------------
Number Identifier Average Time
Deviation Value Value Period
-----------------------------------------------------------------------------------------------------------
1 UTIL. MACHINE 1 .75 .43 .00 1.00 14400.00
2 UTIL. MACH. 2 .62 .49 .00 1.00 14400.00
3 UTIL. ROBOT .62 .49 .00 1.00 14400.00
4 CANS ARRIVAL .82 1.13 .00 5.00 14400.00

1 Minute(s) and 4 Second(s)

Stop - Program terminated.

9O
1. UTPUTPROCESOR:OUTPT

In addition to the previously analyzed processors that allow arriving at the result of the
simulation, there is an interactive output processor, through which obtain
statistical graphs that facilitate the analysis of the desired variables.

In order to obtain the graphs, it is necessary to introduce certain changes in the model of
experiment:

1. Specify in the TALLIES and/or DSTAT element (depending on the variable that is going to
analyze) the number of the file in which you want to save the values of the variables
sampled, for each variable a different file number must be provided starting from the
11.

Example:

TALLIES: 1, TIEMPO EN SISTEMA, 11;

2. When are repetitions of runs (replicates) going to be carried out in the simulation?
it is necessary to include in the experiment model the OUTPUT element whose function is
define the output variables whose values must be stored at the end of each
replica to then calculate the confidence intervals. The description of this
the element is the following:

where

N: Output variable number, specified as an integer.

VAR: Output variable defined as a variable from tables 1, 2, 3, and 6 (below)


of this chapter.

NU: Output file number, specified as an integer.

43
SIMULATION TECHNIQUES
Example:

1, TAVG(1), 13;

Output Variable Description


TAVG(N) Obtain the average value of the variable N from the TALLY.
TSTD(N) Obtain the standard deviation of the variable N from the TALLY.
TMAX(N) Get the maximum value of the variable N from the TALLY.
TMIN(X) Obtain the minimum value of the variable N from the TALLY.
DAVG(N) Obtain the average value of variable N from the DSTAT.
DSTD(N) Obtain the standard deviation of variable N from the DSTAT.
DMAX(N) Obtain the maximum value of the variable N from the DSTAT.
DMIN(N) Obtain the minimum value of the variable N from the DSTAT.
DPRD(N) Get the time period for the N variable of the DSTAT.
Table 1.6 Output variables of the OUTPUT command

After the introduction of these changes, the model is compiled, linked, and runs from the
same shape, without any change being appreciated.

1.9.1 OUTPUT PROCESSOR INSTRUCTIONS

To obtain the graphical outputs, it is necessary to interact with the OUTPT processor. The
the first instruction to type is:

[Link], NOMBRE, NU;

where:

NAME: Name by which the auxiliary file is designated (optional).

UN: Optional whole number that indicates the auxiliary file where it will be stored
Output information of the processor OUTPT. The assumed value for NU is zero, in which
In case no auxiliary file is generated.

The following describes the format of some of the instructions that make possible the
graphic outputs.

2. PLOT

Generate the plotting of discrete or continuous variables over time. It is taken as a variable
Independent of the simulated timing. There can be up to 6 dependent variables. The
The result is obtained in a format of 80 columns with standard characters.

The operands are:

PLOT
MAXORD: REPETITION;

44
SIMULATION TECHNIQUES
TITLE: Plot title, specified with a maximum of 20 characters.

TIETIQ: Time axis label of the plot, specified with a maximum of 8


characters.

TIN: Start time of the plotting, specified as a constant.

TFIN: Time when the plotting ends, specified as a constant.

DTPLOT: Increase in time between plotting points, specified as a


constant.

NUI: File number in which the values of the variables are stored
dependent to plot.

VARETIQ: Label of the dependent variables to be plotted, specified with a


maximum of 8 characters.

SIMB: Symbol used to plot the dependent variable, specified with a character
alphabetical.

MINORD: Lower value of the dependent variable, specified as a constant, MIN or


MIN(NU), where NU is a constant. If MIN is specified, the value of the
minimum observation. If MIN(NU) is specified, the value of the lowest observation is used.
closer to NU. Assumed: MIN.

MAXORD: Maximum value of the dependent variable, specified as a constant, MAX,


or MAX(NU). If MAX(NU) is specified, the value of the highest observation is used plus
close to NU. Assumed: MAX.

3. BARCHART

Generate a bar graph of the variable being observed. This graph shows the
relative magnitude of the recorded observations of a variable. The bars are graphed
horizontally using asterisks and a format of 80 columns. The operands are:

BARCHART

Bar chart title, specified with a maximum of 20 characters.

LABEL: Label of the abscissa of the independent variable (number of observations) with a
maximum of 8 characters.

VARETIQ: Label of the abscissa of the dependent variable, with a maximum of 8 characters.

XIN: Initial observation number.

XFIN: Number of the final observation.

NUI: File number where the observations of the dependent variable are located.

45
SIMULATION TECHNIQUES
MINORD: Lower value of the dependent variable, specified as a constant not
positive.

MAXORD: Maximum value of the dependent variable, specified as a greater constant


how MINORD.

[Link]

Generate a histogram for the observations obtained from a variable. The histogram is a
graphical medium to summarize the behavior of a set of observations, grouping
these, in cells. Each cell is defined by boundaries: lower and upper. The observations
that are greater than or equal to the lower limit of the cell but less than the limit
superior, they are included in the cell. The difference between the limits is called the width of the
cell. The number of observations recorded in each cell is the absolute frequency of
the cell, and this number divided by the total number of observations is the frequency
relative to the cell. The accumulated frequency, both relative and absolute, is obtained
successively adding the relative and absolute frequencies of the cells.

The cells and the accumulated frequency of the cells are shown in tabular form and of
histogram.

In the histogram, the relative frequency of the cells is represented by means of bars.
horizontal (with *), and the cumulative relative frequency through a C.

The operands for the histogram are:

HISTOGRAM

Histogram title, specified with a maximum of 20 characters.

NCEL: Number of interior cells, specified as a constant.

LINF: Lower limit of the first interior cell, specified as a constant.

WIDTH: Width of each interior cell, specified as a constant.

NUI: File number where the observations for the histogram are located.

NUFRER: File number in which the relative frequencies are desired to be stored
calculated cells in the histogram. Assumed: they are not saved.

NUFREC: Number of the file in which the accumulated frequencies are to be stored
calculated cells in the histogram. Assumed: they are not saved.

[Link]

Create a table of values for any continuous or discrete variable sampled in the
simulation. The independent variable of the table can be the simulated time or the number
from the sampled observation. There can be up to 6 dependent variables per table, although

46
SIMULATION TECHNIQUES
All must depend on the same independent variable. The format of the instruction is the
next

TABLE

TITLE: Table title, maximum 20 characters.

IETIQ: Independent variable label.

XBEG: Initial value of the independent variable.

XEND: Final value of the independent variable.

DX: Increase of the independent variable. Assumed: 1.

NUI: Number of the file where the dependent variable is located.

DETIQ: Dependent variable label.

6. CORRELOGRAM

Generate a correlation diagram for a variable sampled in the simulation. The


instruction calculate the sample autocovariances and autocorrelations for a series of
values with intervals between observations from 1 to a specified value.

The operands of the instruction are:

CORRELOGRAM

TITLE: Diagram title, maximum of 20 characters.

NLAGS: Number of intervals to include in the diagram.

NUI: File number where the information of the sampled variable is found.

NUC: File number where the results of the correlogram are recorded (optional).
Assumed: they are not saved.

7. INTERVALS

Generate confidence intervals for a specified set of observations of a


sampled variable. The intervals correspond to a 95% confidence level. It is assumed
that the observations are independent and identically distributed. The operands are:

NUI

Table title, up to 20 characters.

NUI: File number where the values of the sampled variable are found.

47
Simulation Techniques
LABEL: Label assigned to the variable, 10 characters.

1.9.2 EXAMPLE

A construction crew is facing problems with the transportation of panels and beams
prefabricated from the construction center to the area of buildings where it is being
building.

The transportation system is made up of 4 trailers and 2 cranes, and operates in the way that it
describe below.

One of the cranes is situated in the prefabrication plant where its function is to load the
rasters, what it does in a random time with a normal distribution of mean 20 minutes and
standard deviation of 2 minutes.

Once loaded, the trailers head towards the building area with a trip of
randomly distributed duration between 16 and 20 minutes. In that area is
the second crane that unloads the trailers with an exponentially distributed time with
average of 18 minutes.

After unloading the trailers, they return to the prefabrication center and this trip continues.
a uniform distribution between 10 and 14 minutes.

Using SIMAN, determine the characteristics that identify the process.

SYSTEM MODEL

BEGIN;
CREATE: 10;
;
; SUBMODEL OF LOAD
QUEUE, 1;
SEIZE: CRANE1: MARK(1);
QUEUE, 2;
RASTRA
TALLY: 1, INT(1);
DELAY: RN(1,1);
RELEASE: GRUA1;
DELAY: UN(2,1);
;
; SUBMODEL OF DOWNLOAD
QUEUE, 3: MARK(2);
CRANE2;
DELAY: EX(3,1);
RELEASE: GRUA2;
TALLY: 2, INT(2);
DELAY: UN(4,1);
RELEASE: RASTRA;

48
SIMULATION TECHNIQUES
TALLY: 3, INT(3): DISPOSE;
END;

EXPERIMENT MODEL

BEGIN;
PROJECT
DISCRETE, 500, 3, 3;
TALLIES: TOW TRUCK WAIT TIME
3, CYCLE TIME, 31;
1
DSTAT: 1, NQ(3), QUEUE FOR DOWNLOAD, 41:
2, NR(1), CRANE UTIL1:
3, NR(2), UTIL CRANE2:
4, NR(3), RATION UTIL, 51;
TAVG(3), 61
1, 20, 2: 2, 16, 20: 3, 18: 4, 10, 14
REPLICATE, 10, 0, 600, NO;
END;

SUMMARY REPORT

SIMAN Summary Report


Run Number 1 of 10

TRANSPORT SYSTEM
AUTHOR
12/24/1998

Run ended at time : .6000E+03

Tally Variables
-------------------
Number Identifier Average Standard Minimum Maximum Number
Deviation Value Value of Obs.
---------------------------------------------------------------------------------------------------------------
1 WAIT TIME GR 180.79390 118.73620 .00000 357.06290 25
2 TIME IN DESCAR 40.33083 34.19781 .93954 115.46040 22
3 CYCLE TIME 95.27188 36.28565 49.46102 177.41360 22

Discrete Change Variables


--------------------------------
Number Identifier Average Standard Time
Deviation Value Value Period
-------------------------------------------------------------------------------------------------------------
1 TIRE FOR DISCHARGE .74442 .83807 .00000 2.00000 600.00
2 UTIL CRANE1 1.00000 0.00000 .00000 1.00000 600.00
3 UTILITY CRANE2 .74523 .43573 .00000 1.00000 600.00
4 RASTRA UTIL 3.41261 .78300 .00000 4.00000 600.00
Run Time: 12 Second(s)

49
SIMULATION TECHNIQUES

SIMAN Summary Report


Run Number 10 of 10

TRANSPORT SYSTEM
Analyst: AUTHOR
12/24/1998

Run ended at time : .6000E+04

Tally Variables
-------------------

Number Identifier Average Standard Minimum Maximum Number


Deviation Value Value of Obs.
-----------------------------------------------------------------------------------------------------------
1 WAIT TIME GR 3275.43 94.92 3050.13 3417.68 24
2 TIME IN DESCAR 37.19222 46.22782 .86572 165.55660 24
3 CYCLE TIME 95.78162 49.38702 48.22070 217.93900 25

Discrete Change Variables


--------------------------------
Number Identifier Average Standard
Deviation Value Value Period
----------------------------------------------------------------------------------------------------------
1 coat for download .71314 1.03540 .00000 3.00000 600.00
2 UTIL CRANE1 1.00000 .00000 1.00000 1.00000 600.00
3 UTILITY CRANE2 .62978 .48286 .00000 1.00000 600.00
4 RATION UTIL 3.25203 .78405 1.00000 4.00000 600.00

Run Time: 13 Second(s)

50

You might also like