A Second Resources Example

The resource facilities in Simulation Studio provide more advanced functionality than demonstrated in the previous simple banking system example. To illustrate some of this additional functionality, the previous bank system model has been extended by using other resource related blocks. The basic premise remains the same for this model—customers arrive at the bank and wait to be served by a bank teller. However, in this new model there are three bank tellers, not all of which are available during the entire simulation run. This model also collects utilization statistics for the bank teller resource entities.

Figure 9.6 shows the new model. The most obvious difference between this resource model and the previous one is the addition of the Resource Agenda, Resource Scheduler, and Resource Stats Collector blocks. The not-so-obvious difference is the creation, storage, and allocation approach used here for the three bank teller resources.

Figure 9.6: Resources Model That Uses Scheduling

Resources Model That Uses Scheduling


There are two options for creating the three bank teller resources. Recall the EntityTypes tab on the Create Teller block properties dialog box which displays the BankTellers resource entity type. (See Figure 9.5.) All resource entities have an attribute named ResourceUnits. The default value for ResourceUnits is 1. This model requires three bank teller resources. So the options are either to create three BankTeller resource entity objects, each with a ResourceUnits value of 1, or to create one BankTeller resource entity object with a ResourceUnits value of 3. To demonstrate additional resource features of Simulation Studio, this model uses the latter approach.

The Create Teller block generates one BankTeller resource entity object and passes it to the Teller Pool block just as in the previous model. This time the resource entity object has 3 ResourceUnits associated with it instead of 1. To make efficient use of the ResourceUnits in the BankTeller resource entity object, it is necessary to use the Resource Pool block’s merging and splitting resource entities capabilities. Selecting the Merge/Split resource units among resource entities of same type check box in the Block Properties for Teller Pool dialog box (see Figure 9.7) enables the block to look at the ResourceUnits attribute of its held resource entities and possibly subdivide a resource entity into two resource entities, one of which matches the needs of an incoming resource request. In this example the Seize Teller block requests a BankTeller resource entity with one ResourceUnit. With the merge/split option selected, the Teller Pool block can take a BankTeller resource entity with a ResourceUnits value of 3 and create a new BankTeller resource entity object with a ResourceUnits value of 1 and decrease the ResourceUnits value of the existing BankTeller resource entity (already in the pool) to 2. The new BankTeller resource entity object (with a ResourceUnits value of 1) is sent to the Seize Teller block to satisfy its request.

Similarly, when the BankTeller resource entity object returns to the Teller Pool block, its ResourceUnits can be merged with a BankTeller resource entity already in the pool and the incoming BankTeller resource entity object is disposed.

Figure 9.7: Teller Pool Block Properties Dialog Box

Teller Pool Block Properties Dialog Box


For this model, all three bank tellers might not be available during the entire simulation—maybe they take a staggered lunch break. The previous model used a total simulation time of 9 hours (540 minutes). Assume for this model that for the first 4 hours (240 minutes) of the work day all three bank tellers are available. For the next hour two of the tellers go on lunch break and when they return the third teller takes an hour lunch break. When the third teller returns from lunch break, all three tellers are available for the remainder of the work day.

A Resource Agenda block and a Resource Scheduler block are used together to implement the scheduling functionality in this model. A Resource Agenda block is used to create a list of resource adjustment actions (collectively known as a resource agenda) to be performed during the simulation run. The resource agenda information is passed to a Resource Scheduler block to arrange and perform the resource adjustment actions on specific resource entities. The resource agenda for this model is shown in Figure 9.8. Each row or entry in the agenda represents a resource adjustment action and consists of three pieces of information: Duration, Value, and Value Type. A complete description of each of these fields is available in the Resource Agenda block description in Appendix A: Templates. For this model these entries are used to represent the changes in the number of bank tellers available throughout the simulation period.

Figure 9.8: Resource Agenda Block Properties Dialog Box

Resource Agenda Block Properties Dialog Box


The Resource Scheduler block receives the resource agenda at the beginning of the simulation run through its InAgenda input value port, and the scheduler performs the sequence of resource adjustments on a specified group of targeted resource entities. The block properties dialog box associated with the Resource Scheduler block in this model is shown in Figure 9.9. Each row in the Appointments table is called an appointment. The details for using the Resource Scheduler block can be found in Appendix A: Templates. Only the Start Time, Agenda. and Search Targets By fields are discussed here. The Start Time field specifies the simulation time to activate the associated agenda. The Agenda field supplies the name of the incoming agenda to use for this appointment. (Multiple Resource Agenda blocks can be linked to the same Resource Scheduler block, each sending a named agenda to the scheduler.) The Entity Type field under Search Targets By indicates which resource entities the associated agenda in the appointment applies to. For this model the agenda created in the Resource Agenda block is activated at a Start Time of 0 (when the simulation run begins) and is applied to the BankTellers resource entity objects in the model. The Immediate Actions options selected here indicate that resource entities that are in a seized state are not preempted. (For additional discussion on preemption, see the section Preempting Resource Entities.)

Figure 9.9: Resource Scheduler Block Properties Dialog Box

Resource Scheduler Block Properties Dialog Box


The final new block added to this resource model is the Resource Stats Collector block. As you might expect, this block is used to collect statistics on resource entities during a simulation run. The Resource Stats Collector requires a minimum of two pieces of information: the resource entities you want to collect statistics on and the statistics you want to collect. The Resource Stats Collector block properties dialog box provides separate tabs for you to enter this information. The Groups tab is used to identify the targeted resource entities for statistics collection. (See Figure 9.10.) In this case instances of the BankTellers Entity Type have been targeted. The Statistics tab is used to specify the details on the individual statistics you want to collect. (See Figure 9.11.) Values in the Statistics column are selected from a list that contains the names of the resource statistics available in Simulation Studio. The details for all the columns in this table can be found in the Resource Stats Collector block overview in Appendix A: Templates.

Figure 9.10: Groups Tab in Resource Stats Collector Block Properties Dialog Box

Groups Tab in Resource Stats Collector Block Properties Dialog Box


Figure 9.11: Statistics Tab in Resource Stats Collector Block Properties Dialog Box

Statistics Tab in Resource Stats Collector Block Properties Dialog Box


The Resource Stats Collector block provides an option to have the statistics saved to a file at the end of each run (that option was selected for this example). You can also attach a plot block to the OutData outport of the Resource Stats Collector block to display the statistics during the simulation run.

This example provides a glimpse into the modeling capabilities and potential applications of the Resource Agenda, Resource Scheduler and Resource Stats Collector blocks in simulation models. Although these blocks are more sophisticated than many of the previously demonstrated blocks, they also provide powerful and flexible modeling functionality.