Lab No. 10: Search, Pickup and Dropoff Module

You might also like

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

Simulation and Modeling (CE-409) SSUET/QR/114

____________________________________________________________________________

LAB NO. 10

Search, Pickup and Dropoff Module

Objective: To analyze the Search, Pickup and Drop-off module.

Search module:

Description:

The Search module searches a queue, a group (batch) or an expression to find the entity
rank (for entities in a queue or group) or the value of the global variable J that satisfies
the specified search condition. When searching a queue or group, the value of the global
system variable J is set to the rank of the first entity that satisfies Search Condition, or to
0 if Search Condition is not satisfied. When searching an expression, the global system
variable J is set to the value of the first index value that satisfies the search condition or
to zero if no value of J in the specified range satisfies search condition.

When an entity arrives at a Search module, the index J is set to the starting index and the
search condition is then checked. If the search condition is satisfied, the search ends and
the current value of J is retained. Otherwise, the value of J is increased or decreased and
the condition is rechecked. This process repeats until search condition is satisfied or the
ending value is reached. If the condition is not met or there are no entities in the queue
or group, J is set equal to 0.

TYPICALUSES:

 Looking for a particular order number in a queue


 Searching a group for a certain part type
 Determining which process to enter based on availability of resources (search
an
expression)

PROMPT:

Prompt Description:

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

Type—Determination of what will be searched. Search options include entities in a


queue, entities within a group (batch) or some expression(s).

Queue Name—Name of the queue that will be searched. Applies only when the Type is
Search a Queue

82
Simulation and Modeling (CE-409) SSUET/QR/114
____________________________________________________________________________

Starting Value—starting rank in the queue or group or starting value for J in an


expression.

Ending Value—Ending rank in the queue or group or ending value for J in an expression

Search Condition—Condition containing the index J for searching expressions or


containing.

Example 1—Search a Queue

Prompt Entry
Name Find Lightest Package
Type Search a Queue
Queue Name Package. Queue
Starting Value 1
Ending Value NQ
Search Condition MIN(Weight)

In this example, the Find Lightest Package module will search a queue. A search is
made of all entities in queue Package. Queue to find the entity that contains the
minimum value of attribute Weight

Pickup module:

Description:

The Pickup module removes a number of consecutive entities from a given queue starting
at a specified rank in the queue. The entities that are picked up are added to the end of
the incoming entity’s group. Entities that are picked up are added to the temporary group
of the incoming entity. Once an entity is added to the temporary group, it will have its time
and cost data updated automatically as it moves through an processing steps in the
simulation.
TYPICAL USES:

 Gathering an order from various queue locations


 Gathering completed forms for an office order
 Picking up students at a bus stop for school

PROMPT:

Prompt Description:

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

83
Simulation and Modeling (CE-409) SSUET/QR/114
____________________________________________________________________________

Quantity—Number of entities to pick up.

Queue Name—Name of the queue from which the entities will be picked up, starting at
the specified rank.

Starting Rank—starting rank of the entities to pick up from the queue, Queue Name

Example 1—Basic Use

Prompt Entry
Name Pickup Forms
Quantity 1
Queue Name Forms.Queue
Starting Rank 1

The entity entering this Pickup Forms module will pick up the first entity in queue
Forms.Queue and add the entity to the end of the group.

Example 2—Selective Pickup

Prompt Entry
Name Get Red Ones
Quantity 1
Queue Name All
Colors.Queue
Starting Rank J

This module takes one entity from the All Colors.Queue and adds it to the group. The
rank of the entity that is selected is based on the value of the global system variable, J.
Typically, the value of J is set by using a Search module. The Search module will first
search the queue for a given set of conditions, such as for a specific value of an
attribute of an entity in the queue.

Dropoff module:

Description:

The Dropoff module removes a specified number of entities from the entity’s group
and sends them to another module, as specified by a graphical connection. Group user-
defined attribute value and internal attributes may be given to the dropped-off entities
based on a specified rule. There are two exit points from this module. Original incoming
entities will exit from the exit point at the middle right of the module. The entities that are
dropped off (members) from this module will exit from the bottom right of the module

84
Simulation and Modeling (CE-409) SSUET/QR/114
____________________________________________________________________________

TYPICAL USES:
 Loading shelves with product
 Separating a form for use in various departments

PROMPTS:

Prompt Description:

Name: Unique module identifier displayed on the module shape.

Quantity: Number of entities that will be dropped off from an incoming


representative grouped entity.

Starting Rank: Starting rank of the entities to be dropped off, based on the entities in
the
group.

Member Attributes: Method of determining how to assign the representative entity


attribute
values (other than costs/times) to the dropped-off original entities.

Attribute Name:Name of representative entity attribute(s) assigned to dropped-off


original entities of the group.

NG Variable:

The variable NG evaluates the group size for the current entity. This value can be used
to drop off all entities in a group and have the representative entity continue elsewhere.
Other variables are available to find the entity number and attribute values of grouped
entities.
Example 1—One Entity/Retain Original Entity Values
Prompt Entry
Name To Accounting
Quantity 1
Starting Rank 1
Member Retain Original Entity
Attributes Values

In this example, the representative entity will drop off the first entity in the group to a
specified location. The entity will retain its original entity values, such as Entity.Type,
Entity.CreateTime and user-defined attributes. Cost attributes were updated as the entity

85
Simulation and Modeling (CE-409) SSUET/QR/114
____________________________________________________________________________

went through any processes while being a group member (see remarks below). Time
attributes will reflect any new times that the entity has incurred as a part of the group.

Example 2—Multiple Entities/Take Specific Representative Values


Prompt Entry
Name Stock Shelves
Quantity NG - 1
Starting Rank 2
Member Take Specific
Attributes Representative Values
Attribute Color
Name

In this example, the representative entity will drop off all but one of the entities in the group
(NG is the number in the group), starting at rank 2 the second entity that entered the
group. The member entities that are dropped off will take on the "color" attribute of the
representative entity, but they will retain all of their other original entity values. As with
example 1, cost attributes were updated as the entity went through any processes while
being a group and time attributes will reflect any new times that the entities incurred as
parts of the group.

LAB TASK

Public bus Transportation System:

Design a model of public bus transportation simulates a bus that moves between different
points, picking up and dropping off passengers.

86

You might also like