Вы находитесь на странице: 1из 13

Document Type:Arena Manuals

Code: -

Number of pages: 8

Date: 2014-03-02

Arena Learning Cards:


Decide Block
Student: Jordan Snchez Ruiz

LogiSim
Logstica i Simulaci
Centre per a l'anlisi i millora de processos de fabricaci,
logstics i de serveis mitjanant simulaci (UPC / UAB /
CSIC)

Index
1.Decide Block
Description....................................................................................................1
2.Properties of the Decide Block.........................................................................4
3.Examples...........................................................................................................
..................4........................................................................................................6
3.1.Probability 1...............................................................................................6
3.2.Probability 2...............................................................................................7
3.3.Condition 1.................................................................................................9
3.4.Condition 2...............................................................................................10

1. Decide Block Description


The decide block is the responsible of route different entities towards different
actions through a logical condition or a probability.
A decision model using Petri Nets is shown in figure 1. The place node P1 is
called the decision (or conflict) and keeps the tokens until one of the active
transitions T2, T3 or T4 fires and consumes the token.

Figure 1: Non conditional input transition and Create block

Arena Learning Cards

2. Properties of the Decide Block


The properties of the decide block are grouped in:

Name: Block name identifier, each block in the model must have a
unique and significant name. This name is chosen by the modeller. As an
example, if the decide block represents the of buying a public transport
ticket or already having one a good identifier can be "Should buy a
ticket". Each time a block is inserted in the Arena model it will be named
by default and the modeller has to change the defaulted name.
Type: Select the type of condition the decide block will calculate. There
are four different types of conditions. Two of them belong to the Chance
category that implements a probabilistic decision where the different
paths are chosen from a discrete probability density distribution. In the
Chance category one can choose from the 2-way chance where there are
two possible output paths (representing a true / false) or the N-way
chance where there are more than two possible output paths. The second
category is the Condition that implements a first order logical condition.
As the Chance category one can choose from the 2-way condition that
implements a classical if-then-else or a N-way condition that implements
a multiple choice as an if-then-elif-elif-...-elif-else.
Depending on the type selected there will be different other options:
Percent True (2-way by chance): Represents the percentage of
probability that an entity has to take the true output path. Automatically
Arena computes the rest of probability that an entity has to take the false
output path.
Create Block - 3

Percentages (N-way by chance): Is the list of percentages of


probability that an entity has to take each of the output paths. This
probabilities do not have to add a 100% because Arena will compute the
rest of the probabilities and automatically it will generate an else output
path.
If (2-way by condition): Is the logical condition to compute to
determine if an entity has to take the true output path or the false output
path.
Conditions (N-way by condition): Represents the lists of logical
conditions that will be evaluated. Each condition represents an output
path and Arena automatically generates an else output path. Arena
computes and evaluates the conditions begging at the first condition
(that correspond to the first output path), then the second, the third until
the salt one. If one of the conditions evaluates to true the entity exits
through that output path, if no, the entity will exit through the else output
path (generated by Arena).

Arena Learning Cards

3. Examples
On the subject website you will find four different Arena models called:

probability-1.doe
probability-2.doe
condition-1.doe
condition-2.doe you can use and modify them to answer the next proposed
questions.

3.1. Probability 1
This model implements a two way by chance and provide two output paths to
the entities. To check the probability of the decide block there are two display
blocks in the model that calculate the percentage of entities following each
path. To solve a mathematical problem at the start of the simulation caused by
a division by zero (at the beginning of the simulation there are zero entities) a
MAX function is used to calculate the percentages.
Answer the following questions:
Model again the Arena model using Petri Nets.

Decide
Porcentaje<1
0%

True

False

Analyse the output percentages calculated in the statistics of the model.


Do they actually fit the model? Proof your answer.
El modelo en la seccin del bloque Decide est programado de tal forma
que solo selecciona las salidas de un 10% de probabilidad por lo que el
resto de resultados son false. A pesar de ello los valores obtenidos dan a
conocer que hay un 11% de la seccin true esto es debido al error de
muestreo, para llegar a un dato ms exacto se necesita ms das de
muestreo. Actualmente se simula con una largada de replicacin de 24
horas.
Modify the model to provide equal probabilities to both output paths.

Para obtener una igualdad de resultados en el que tanto la seccin True


como la False sean iguales, se modifica el bloque Decide donde
colocamos un porcentaje de True de un 50 que implica que la mitad de
las entradas ira a True y la otra mitad a False.

3.2. Probability 2
This model is very similar to the previous one, but using a n-way scheme. This
example illustrates the different paths that can be parametrized in this decide
module and the automatic else output path. As the previous model display
blocks are used to show the actual percentages of the entities.
Answer the following questions:

Arena Learning Cards

Model again the Arena model using Petri Nets.

Decide

False

Others

10
Path 1

18

30
Path 2

Path 3

23.67
Path 4

Modify the model and parametrise it to reach a 33% of probability for the
three
paths. What happens to the else path? How do you can prevent the
precision errors?
Al colocar 33% para las rutas 1, 2 y 3, el porcentaje restante pasa a la
ruta Other donde el mximo que en teora debera ser es de 1%. Despus
de aplicar la simulacin los valores obtenidos no llegan a ser los
esperados debido a que hay un margen de error. Este error es debido a la
cantidad de replicadas aplicadas en el sistema cuanto ms replicas ms
precisa es la simulacin.

Introduce in the model different probabilities summing all of the more


than a 100%. Which error signals arena?

Arena no puede simular porcentajes mayor de 1 lo que es igual que decir


mayor del 100%.

3.3. Condition 1
This model simulates an automatic teller machine (ATM) as the ones you can
find in a bank office. In this case we introduce a logical condition. If there are 5
people in the ATM queue the arriving client it will not wait and it will search for
another ATM in another office. To implement this condition the decide block has
been configured to use a 2-way condition evaluating the queue length. If the
queue length is less than 5, then the arriving client will proceed to the process
block. If the queue is equal or grater then 5, the client will exit the model
moving to a dispose block.
Answer the following questions:
How many clients leave the ATM? Answer this question simulating the
model with 10 different replications.
El nmero de clientes que dejan la caja automtica fue de 130 con un
nmero de replicaciones de 10. Con un nmero de replicaciones de 20 el
nmero aumenta a 149.
El nmero de persona que deja la caja seguir aumentando conforme se
aumente las replicaciones esto es debido a que el error de muestreo
aumenta.
How many ATMs are necessary to serve all clients, keeping the queues
low? Note that at greater number of ATM less patience have the clients;

Arena Learning Cards

so if there are two ATMs the maximum length of the queue is of three
people, if there are three ATMs the me maximum queue length is one and
for four or more ATMs there must be no queues.

Aplicando la condicin la cantidad de ATM necesarios para reducir colas y


que haya un gran nmero de clientes atendidos es la primera opcin.

3.4. Condition 2
This model implements a fuel station with two pumps in which arrive different
vehicles ro fuel up their tanks. The behaviour of the vehicles is:
1. If there are 6 vehicles waiting in the queue the vehicle leaves the station.
2. If there are less than 6 vehicles, the arriving one enters the station and
queues in the pump with less queue length.
3. If the queues are of equal length, the arriving one choose the pump
randomly.
Answer the following questions:
Explain the behaviour of the different conditions in the decide blocks

En esta condicin se indica que la suma de las colas de la bomba 1 y


bomba 2 no puede ser mayor de 6 en caso contrario el bloque Decide
enva a la entrada a la ruta de No Tanking

En este caso el bloque Decide verifica que la bomba 1 no sea mayor a la


bomba 2 y lo mismo con la bomba 1 en caso contrario enviara la entrada
a la bomba con menor cola para compensar la distribucin igualada.
The model does no behave as the behaviour explained before. What is
happening?

Arena Learning Cards

En la grfica se puede observar que la utilizacin de la bomba 2 es mayor


a la bomba 1 debido a que la mayor cantidad de las entradas van a esta
bomba. El porcentaje de utilizacin de la bomba 2 respecto a la bomba 1
es de un 8%. Este resultado es producido por que la realimentacin de la
simulacin en el caso de ELSE enva a la ruta de la bomba 2.
Modify the model to fit the described behaviour.
Para intentar arreglar el problema de la simulacin y que se ajuste al
pedido, se le aade un bloque de decisin en la ruta ELSE del primer
DECIDE el cual se encarga de que se fuerce un 50% de utilizacin en las
dos bombas.

Вам также может понравиться