Lab No.3 Decide Module: SSUET/QR/11

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

SSUET/QR/11

Simulation and modeling (CE- 409)

LAB NO.3

Decide Module
OBJECTIVE:
To analyze decide module and its types.

THEORY
Decide Module: Decide modules can be added to the flowchart view via dragging and
dropping (see Editing Create Modules for a demonstration) and edited by double
clicking on the module. There are 4 types of Decide modules.
There are four types of Decide modules:

 2-way by Chance
 2-way by Condition
 N-way by Chance
 N-way by Condition

2-Way by Chance: This type of Decide module will route entities one of two ways
according to a given percentage. The percentage is specified by the user and relates to
the proportion of entities that are routed to the True exit point.

2-Way by Condition: This type of Decide module will route entities one of two ways
depending on the condition. There are multiple types of conditions.

Variable: Arena evaluates a variable-based expression and routes to the True exit point
if the expression is true or the False exit point otherwise
Attribute: Arena evaluates an attribute-based expression and routes to the True exit point if the
expression is true or the False exit point otherwise.

PROMPT:

Name—Unique module identifier. This name is displayed on the module shape.

Type—Indicates whether the decision is based on a condition (if X>Y) or by


chance/percentage (60% yes, 40% no). The type can be specified as either 2-way or N-
way. 2-way allows for one condition or probability (plus the "false" exit). N-way allows for
any number of conditions or probabilities to be specified as well as an "else" exit.

Conditions – Defines one or more conditions used to direct entities to different modules.
Applies only when Type is N-way by Condition.

Percentages – Defines one or more percentages used to direct entities to different


modules. Applies only when Type is N-way by Chance.

21
SSUET/QR/11
Simulation and modeling (CE- 409)

Percent True—Value that will be checked to determine the percentage of entities sent
out a given true exit.

If—Type of conditions that are available for evaluation.

Named—specifies either the name of the variable, attribute, or entity type that will be
evaluated when an entity enters the module. Does not apply when Type is Expression.

Row—specifies the row index for a variable array.

Column—specifies the column index for a variable array.

Is—Evaluator for the condition. Applies only to Attribute and Variable conditions

EXAMPLE:

Example 1—2-way by Chance

Prompt Entry
Name Satisfied Customers
Type 2-way by Chance
Percent True 90

In this example, the Satisfied Customers module is being used to model whether or not
a customer (entity) is happy with their previous services Approximately 90 percent of all
customers will be satisfied and will leave from the "true" exit at the right of the module.
The other 10 percent of unhappy customers will exit from the bottom "false" exit.

Example 2—2-way by Condition—Variable

Prompt Entry
Name Choose Wait Room
Type 2-way by Condition
If Variable
Named Prod Maintenance Flag
Is ==
Value 0

In this example, the user defined variable, Prod Maintenance Flag, is used to determine
how entities should flow through the model. When the entity enters this Decide module,
the value of the variable is evaluated. If Prod Maintenance Flag equals 0, the entity will

22
SSUET/QR/11
Simulation and modeling (CE- 409)

be sent out the "true" exit, which directs it to another area in the model. If the variable
does not equal zero, the incoming entity will be sent out the "false" exit, which may be
connected to other system logic.

Example 3—N-way by Condition—Entity Type

Prompt Entry
Name To ICU
Type By Condition
If Entity Type
Named Critical Patient
If Entity Type
Named Stable Patient

In this example, incoming entities are evaluated based on their entity type. This module
will send all Critical Patient entities out the first exit, which may send them to the ICU
area of the model. All Stable Patient entities are directed out the second exit. All
patients that are not critical or stable will be sent from the "else" exit at the bottom of the
module to some other area of processing.

Example:

Consider the example of simulating queuing at a supermarket. If the entity


attribute QueueNumber is equal to 2 then that entity will be routed to the True exit point
which leads to processing at Counter 2.

23
SSUET/QR/11
Simulation and modeling (CE- 409)

Entity:

Arena will route all of entites of the specifed entity type to the True exit point and all other
entity types to the False exit point.

Consider the example of simluating an egg sorting factory. Suppose an egg can be a size
6 egg or a size 7 egg depending on its weight. If an egg has the Entity Type defined as
'size 6 egg' then that entity will be routed to the True exit point which leads to
the Collection of Size 6 Eggs while all other eggs are routed to the False exit point which
leads to the Collection of Size 7 Eggs.

24
SSUET/QR/11
Simulation and modeling (CE- 409)

Expression:

Arena evaluates the expression and routes to the True exit point if the expression is true
or the False exit point otherwise.

Consider the example of simulating the operations within an egg sorting factory over
several weeks. Employees are rostered to work Monday to Friday however employees
do not work on the weekend. The simluation must determine that it is not the weekend in
order to simulate employees arriving for work. we can determine if the day is Sunday = 1,
Monday = 2, etc (up to Saturday Day 7) the following Decide module could be used to
determine if the factory should open for business.

NB: In plain English the above expression says: If the current day of the week is less
than 1 (which means it is a Sunday) or is greater than 7 (which means it is a Saturday)
route to the True exit point.

25
SSUET/QR/11
Simulation and modeling (CE- 409)

N-way by condition:

LAB TASK
1. Create part machine that works on part to decide whether they are good or bad.
2. Decide if part is good, exit the system, and if part is bad decide further.
a)Change entity picture.
3. Decide to trash the part or not. If bad part is greater than 5 than trash and exit
otherwise back to machine.
4. Make a model of Movie Rental system
Description: Customer enters the store and decide which type of movie they
would like to rent. After making this decision, they proceed to the appropriate part
of the store, and make their selections. After renting a movie, the customer is
faced with the decision of whether or not they would like to buy some popcorn. If
they decide to buy popcorn, they go to the popcorn cart and get it, then go to the
checkout line. If they decide not to get popcorn, they go directly to the checkout
line.

26

You might also like