Resources


Modeling the Banking System Using Mobile Resources

In Chapter 2: Overview of SAS Simulation Studio, a model of a simple banking system with one teller is used to illustrate some of the basic concepts that are involved in building models in Simulation Studio. In that example, the bank teller is modeled by using a stationary resource (in particular, a Server block). In this section, the same system is modeled by modeling the bank teller as a mobile resource (a resource entity). These two examples demonstrate the conceptual differences between stationary resources and mobile resources. All blocks that are used in these models can be found in the Standard and Resource templates.

To summarize the modeling requirements for this banking system, these models assume that customers arrive at the bank at a rate of 10 per hour (so that the interarrival time between customers is a sample from the exponential distribution with a mean of 6 minutes). Customers wait in a single line on a first-come, first-served basis. The models also assume that the teller has a service rate of 12 customers per hour (so that the service time for each customer is a sample from the exponential distribution with a mean of 5 minutes).

Figure 9.1 shows the original version of the model from Chapter 2: Overview of SAS Simulation Studio. The bank teller (represented by the Server block) is a stationary resource in the original model and is created during the model building phase. As a stationary resource, the bank teller never flows or moves through the model. A customer arrives at the bank teller, the bank teller services the customer, and the customer exits the system.

Figure 9.1: The Banking System Model Using Stationary Resources

The Banking System Model Using Stationary Resources


Figure 9.2 shows an alternative model of the same system. In this model, the bank teller is modeled as a resource entity. You can find the project files for this example (named docMM1Resources) in the projects\examples directory under your Simulation Studio installation directory. The following description of the model is a high-level overview. For more information about the individual blocks used in the model, see Appendix A: Templates.

Figure 9.2: The Banking System Model Using Mobile Resources

The Banking System Model Using Mobile Resources


The customer arrival process is the same as in the original model—an Entity Generator block creates customers and sends them to a Queue block to wait for service. To model the bank teller as a resource entity, first a new resource entity type named BankTellers is created by using the Entity Types dialog box, available by right-clicking on the model name in the project tree and selecting Entity Types. For more information about the Entity Types dialog box, see Chapter 8: Entities. Figure 9.3 shows the attributes that are associated with the BankTellers resource entity type. The ResourceUnits attribute has value 1 because there is only one teller.

Figure 9.3: BankTellers Entity Type

BankTellers Entity Type


In the Block Properties dialog box for the Entity Generator block labeled "Create Teller," the BankTellers entity type is selected from the list in the Name field of the EntityTypes tab, as shown in Figure 9.4.

Figure 9.4: EntityTypes Tab in the Create Teller Block Properties Dialog Box

EntityTypes Tab in the Create Teller Block Properties Dialog Box


Because the model requires only one bank teller, you set the Maximum Number of Entities field value to 1 on the Attributes tab of the Create Teller Block Properties dialog box, as shown in Figure 9.5. The bank teller resource entity must be created before the simulation clock begins to advance. Therefore, you need to set the Start Time property to 0 and also select the At Start Time option in the First Entity Creation area. As soon as the bank teller resource entity is created, it is sent to a Resource Pool block (labeled Teller Pool) to wait until it is needed by a customer entity.

Figure 9.5: Attributes Tab in the Create Teller Block Properties Dialog Box

Attributes Tab in the Create Teller Block Properties Dialog Box


In this example, a Seize block (labeled Seize Teller), a Resource Pool block (labeled Teller Pool), a Delay block (labeled Hold Teller), and a Release block (labeled Release Teller) work together to mimic the functionality of the Server block (labeled Teller) in the original model. When a customer entity arrives at the FIFO Queue block, the FIFO Queue block notifies the Seize Teller block that a customer is waiting. The Seize Teller block then checks whether the bank teller resource entity is available in the Teller Pool block. If it is not available, then the customer entity stays in the queue. If the bank teller resource entity is available, then the Seize Teller block accepts the customer entity from the Queue block, pulls the bank teller resource entity from the Teller Pool block, and attaches it to the customer entity (forming a hierarchy of entities). The customer entity is then sent to the Hold Teller block where the customer entity (along with the bank teller resource entity) is held until its service is completed. It is then routed to the Release Teller block. The Release Teller block extracts the bank teller resource entity from the customer entity and sends the customer entity to the Disposer block to exit the model. The bank teller resource entity is routed back to the Teller Pool block.

A quick inspection of the values in the Number Holder blocks in both models at the end of the simulation run shows that both the original model and the new resource entity model produce the same results.

For this simple banking system, it is not necessary to use a resource entity to model the bank teller. However, in a more realistic model of a banking system, it might be necessary to seize multiple resources simultaneously, to vary the number of available resources according to a schedule, or to preempt a resource either because of a failure or because a higher priority entity arrives. It is not possible to model these scenarios using only stationary resources. In general, mobile resources offer more modeling flexibility and options.