Bank Teller training exercises Windows by HC12061915391

VIEWS: 0 PAGES: 10

									Micro Computer Simulation                                                       Micro Saint for Windows



                            BANK TELLER MODEL DEVELOPMENT

Model Description

This simple queuing model illustrates many of the key concepts of discrete event simulation
modeling and Micro Saint Sharp features that address those concepts. The model is built in
stages beginning with a two node model that has customers arriving and being served by a bank
teller. The arrival rate changes during the lunch hour with customers arriving more frequently.
Customers are represented by entities that pass through the network. After customers arrive, they
can be served by a teller only if there is a teller available. Tellers are represented by a variable
indicating the current number of tellers available. When a teller begins serving a customer, the
current number of tellers available is decreased by one. When a teller finishes serving a
customer, the current number of tellers increases by one. When there are no tellers currently
available and a customer arrives, that customer must wait in a queue. Customers are removed
from the queue when a teller becomes available on a first in, first out basis. The goal in the stage
of model development is simply to determine how many tellers are needed to keep the queue
from building continually.

In the second stage of model development we add data collection capabilities to the model.
There are two basic types of data that we collect. First is the average amount of time spent
waiting in the queue by customers and the longest time spent in the queue by any one customer.
Other pieces of data are needed in order to calculate these values such as the amount of time
spent waiting by each customer and the amount of time spent waiting in the queue by all
customers. Next we collect data on the utilization of the tellers. Data collection "Snapshots" are
added to the model in this stage to store the information on average and maximum wait times and
on the utilization of the tellers. At the end of this stage of model development, students can
optimize the utilization of the tellers as well as the time spent waiting in the queue.

The final stage is to modify the bank teller model to simulate a variable number of banking
transactions for each customer.

Simulation Concepts

1. Generating multiple entities at variable rates.

2. Resource availability as a constraint for task execution.

3. Keeping track of individual entities traveling through the task network.

3. Data collection.

Micro Saint Sharp Features Covered

Decision Types Rules and logic for selecting following tasks.

Job Queues How to set them up and collect data on entities that must wait in queues.

Release Conditions Conditions under which tasks are allowed to execute.

Task Effects Expressions that change variable values as tasks execute.


Bank Teller                                                                                          1
Micro Computer Simulation                                                    Micro Saint for Windows




Event Queue Schedule of events that will happen as the model executes.

Snapshots of Execution Ways to store variable values at specified times during model execution.




Bank Teller                                                                                       2
Micro Computer Simulation                                                       Micro Saint for Windows



                            BANK TELLER MODEL - EXERCISE # 1

Exercise Description

In this exercise, students will build the basic bank teller network and adding timing information
to the two nodes. The time for the first task will be exponentially distributed with a variable
mean time that will change two times during model execution. The execution of the first task
represents the interarrival rate of customers. A variable named "rate" is used to represent the
mean value for the exponential distribution. The value for "rate" is established at time 0.0 and
changed at times 120 and 240 during model execution via the creation of Secnario Events. This
task is followed by itself, to generate a new entity, and by task two as long as the simulation
clock is less than 480 (minutes). After that time, no more new entities are generated.

Each customer that arrives at the bank is assigned a "Tag" value. This is used to keep track of
how long customers wait for service and to allow customers to enter the queue when there is not
a teller available. The Tag value is assigned at the end of the first task.

After customers arrive at the bank they can execute the second task, "Serve Customer" if there is
a teller available. The variable "tellers" keeps track of the number of tellers currently available
to serve the customers. As a customer begins the "Serve Customer" task, the value of the
"tellers" variable is decremented by one. When the value of the variable "tellers" is zero,
customers must wait in the queue that is in front of the "Serve Customer" task. When the "Serve
Customer" task ends, the value for the "tellers" variable is incremented by one allowing a
customer to be released from the queue to enter the "Serve Customer" task. The initial value for
the "tellers" variable is established as a Scenario Event that occurs at time 0.0.

Simulation Concepts

1. Generating multiple entities to execute the task network.

2. Keeping track of each entity as it executes the network.

3. Setting up queuing situations (i.e. conditions when a task can and cannot execute).

4. Changing variable values as a result of task execution.

Micro Saint Sharp Features Covered

Multiple Decision Types More than one task begins execution as a result of the completion of
        the previous task.

Tag Variable An assigned value for each entity stays with that entity throughout execution of the
       model. This value is used to keep track of each entity.

Job Queue A place for entities to wait until the conditions for executing a task are met.
       Information can be collected on entities as they wait in job queues.

Release Condition Conditions that must be met before a task can execute. A release condition
        must be True (non-zero) before a task can execute.



Bank Teller                                                                                           3
Micro Computer Simulation                                                      Micro Saint for Windows



Beginning Effects Expressions that change the value of variables in the model as a result of a
       task beginning execution.

Ending Effects Expressions that change the value of variables in the model as a result of a task
       completing execution.

Scenario Events Expressions to be executed at specified times during or before model execution
        that establish variable values. Scenario events are added to the Event Queue display
        prior to model execution.




Bank Teller                                                                                         4
Micro Computer Simulation                                                          Micro Saint for Windows



                                       BANK TELLER MODEL

Exercise # 1 - Build the Basic Model

Bank Teller is a very simple queuing model that produces a surprising amount of information. It
also demonstrates the basic concepts for setting up queues, managing resources, and collecting
wait time and utilization data.

     1. If necessary, from the File menu, select "New".

     2. Build the basic network diagram shown below.




The first task in the Bank Teller model is a classic spinner task used to generate entities (in this
case customers) that are served by the tellers in task 2. It is always followed by task 2 and is
followed by itself as long as the clock is less than 480.

     3. To display the Task Description for task 1, double click on it.

The arrival rate of customers will vary dependent on the time of day. During lunch, the arrival
rate will increase. We will use a variable named "rate" as the mean time value for this task.

     4. Click on “Timing” tab

     5. Place the typing cursor in the "Mean Time" field and enter the following expression:

                            return rate;

     6. Click on "Normal" in the "Time Distribution" field and select "Exponential" from the
        combo box.

     7. Click on the tab marked “Main”

     8. In the "Ending Effect" field, enter the following expression:

                            Entity.Tag += 1;

     9. Click on the tab marked “Paths”.

     10. Click in the "Decision Type" field and drag to select "Multiple".

     11. In the box with the heading "Customer Arrives (1) -> Customer Arrives(1)" with the
         description box labeled “Decision Code:” enter:

                            return Clock < 480;



Bank Teller                                                                                             5
Micro Computer Simulation                                                        Micro Saint for Windows



     12. Close the window by clicking the “X” in the upper right hand corner of the description
         window.

     13. Open the Task Description window for task 2.

     14. Click on the “Timing” tab

     15. In the "Mean Time" field, enter:

                            return 6.0;

     16. In the "Standard Deviation" field, enter:

                            return 2.0;

     17. Click "Normal" in the "Time Distribution" field, and drag to select "Gamma".

     18. Click on the “Main” tab

     19. In the "Beginning Effect" field for task 2, enter the following expression:

                            tellers -= 1;

     20. In the "Ending Effect" field, enter:

                            tellers += 1;

     21. In the "Release Condition" field, enter:

                            return tellers > 0;

     22. Close the Task Description window by clicking the “X” in the upper left hand corner.

     23. From the Tree View window, double-click on the “Variables” top node.

     24. Click the "Add Variable" item from the “Add Network Object” menu in the drop down
         menu “Edit” (Alternately you could right click on the variable list and select “Add
         Variable” from the shortcut menu).

     25. In the input box type: tellers

     26. Check to make sure in the Properties Grid window, in the "Type" field, that "Integer" is
         selected.

     27. Follow steps 24-26 to add the following variables:

                            Name                     Type
                            rate                     Floating Point
                            maxtellers               Integer



Bank Teller                                                                                           6
Micro Computer Simulation                                                        Micro Saint for Windows



     28. Close the Variable Catalog window.

     Now we need to add scenario events that establish values for the number of tellers and the
     arrival rates for customers.

     29. From the Tree View menu, double click on the "Scenario Events" top node.

     30. Click the "Add Scenario Event" item from the “Add Network Object” menu in the drop
         down menu “Edit” Type the name of the scenario event and select OK from the Add
         Scenario Event Popup(Alternately you could right click on the variable list and select
         “Add Scenario Event” from the shortcut menu).

     31. Double click on the scenario event that was added to the list.

     32. Place the typing cursor in the "Code:" box and enter the following:

                            maxtellers:= 2; tellers = maxtellers; rate = 3;

     33. Close the Scenario Description window, clicking on the “X” in the upper right hand
         corner of the description window.

     34. Click the "Add Scenario Event" item from the “Add” menu in the drop down menu
         “Edit” (Alternately you could right click on the variable list and select “Add Scenario
         Event” from the shortcut menu).

     35. Double click on the scenario event that was added to the list.

     36. In the "Start Time" field, type: 120

     37. In the "Code:" box, enter:

                            rate = 2;

     38. Add another event at time 240 to enter the following expression:

                            rate = 3;

     39. From the File menu, select "Save" and enter a name for your model.

This completes the basic model. Execute it a few times using different values for the variable
"maxtellers". To change the value, double click on the first event in the Event Queue.

See how the number of tellers affects the size of the queue.




Bank Teller                                                                                           7
Micro Computer Simulation                                                        Micro Saint for Windows



                            BANK TELLER MODEL - EXERCISE # 2

Exercise Description

In this exercise, students will enter expressions to collect data on the average and maximum
amount of time that customers spent waiting for service and to calculate the average utilization of
the tellers. Teller utilization is calculated to be the ratio of the total amount of time providing
service to customers to the total amount of time available serve customers.

The wait time information is collected by storing the time that each customer enters the queue
and then calculating the amount of time in the queue when that customer leaves. Then, by
adding up the time spent in the queue by all customers and then dividing by the number of
customers we obtain an average time in queue. This average includes those customers who didn't
have to wait in the queue at all. If we wanted to calculate an average wait time that includes only
those customers who actually had to wait, we would have to increment a counter variable when
customers enter the queue and divide by the value of that variable.

In a similar fashion, we calculate the utilization of tellers by storing the time when each customer
begins the "Serve Customer" task and then calculate the service time for that customer at the end
of the task. We then accumulate those times and divide by the total time available and the
number of tellers ( total service time / (total time * total number of tellers)).

Simulation Concepts

1. Calculating time spent executing a portion of a network.

2. Keeping track of data for individual entities.

3. Calculating simple utilization of a variable (tellers).

4. Storing variable values for analysis after model execution.

Micro Saint Sharp Features Covered

Entering Effects Expressions that change the value of variables in a model as a result of entities
        entering a queue.

Departing Effects Expressions that change the value of variables in a model as a result of entities
        leaving a queue.

Array Variables Used to store values for entities that are generated in the model. In this model,
       single dimension arrays are indexed by the "tag" value for each entity.




Bank Teller                                                                                           8
Micro Computer Simulation                                                        Micro Saint for Windows



                                          BANK TELLER MODEL

Exercise # 2 - Data Collection

Next we will collect and store data on the average and maximum time customers spent waiting
for service and the utilization of the tellers.

     1. Double click on the “Entity Attributes" top node in the Tree View window.

     2. Click the "Add Entity Attribute" item from the “Add Network Object” menu in the drop
        down menu “Edit” (Alternately you could right click on the entity attribute list and select
        “Add Entity Attribute” from the shortcut menu).

     3. In the input box type: waited

     4. In the Properties Grid window in the "Type" field, select "Floating Point" from the
        combo box.

     5. Add the following Entity Attribute:

                            Name                     Type
                            served                   Floating Point

     6. Add the following additional data collection variables to the catalog.

                            Name                     Type
                            waitotal                 Floating Point
                            avwait                   Floating Point
                            maxwait                  Floating Point
                            servetotal               Floating Point
                            utilization              Floating Point

     7. Double click task 2 in the network diagram to bring up its description box.

     8.       Click on the “Queue” tab

     9. Select FIFO from the Queue Type combo box.

     10. In the "Entering Effect" field, enter the following expressions:

                            Entity.waited = Clock;

     11. In the "Departing Effect" field, enter the following expressions:

                            Entity.waited = Clock – Entity.waited;
                            waitotal = waitotal + Entity.waited;
                            avwait = waitotal / Entity.Tag;
                            if (Entity.waited > maxwait) {maxwait = Entity.waited;}

     12. Click on the “Main” tab.


Bank Teller                                                                                           9
Micro Computer Simulation                                                       Micro Saint for Windows




     13. In the "Beginning Effect" field, enter the following expression:

                            Entity.served = Clock;

     14. In the "Ending Effect" field, enter the following expressions:

                            Entity.served= Clock - Entity.served;
                            servetotal = servetotal + Entity.served;
                            utilization = servetotal / Clock / maxtellers;

     15. Close the Task Description window, using the “X” in the upper right hand corner.

     16. Right click on the snapshot list and select “Add Snapshot” from the shortcut menu.

     17. Rename Snapshot “EndRun” in the Properties Grid window

     18. Select “EndOfRun” from the “TriggerType” field in the Properties Grid window

     19. Add these other expressions to the snapshot “EndRun”:

                                    avwait
                                    maxwait
                                    utilization

     20. Click the "Add Chart" item from the “Add” menu in the drop down menu “Edit”
         (Alternately you could right click on the snapshot list and select “Add Chart” from the
         shortcut menu).

     21. Right click on the snapshot list and select “Add GraphSeries” from the shortcut menu.

     22. Enter the name “maxwait” for the Graph Series

     23. Add another graph series, set the graph series name to:

                                    avwait

     24. Execute the model. Watch the chart be dynamically created. When it completes, Right
         click on the snapshot and select “Show Result Data”.

     25. Save your model.




Bank Teller                                                                                         10

								
To top