Overview of SAS Simulation Studio


A Simple M/M/1 Queueing Model

To illustrate some of the basic concepts involved in building models in Simulation Studio, consider a model of a simple banking system with one teller. 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. 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). This simple banking system is an example of an M/M/1 queueing system.

For a queueing system such as this one, the following statistics might be of interest:

  • average time a customer waits in line

  • length of the queue

  • number of customers served in one day

Figure 2.1: An M/M/1 Queueing Model

An M/M/1 Queueing Model


Figure 2.1 shows a Simulation Studio model of the banking system. All the blocks used in this example can be found in the basic template of blocks provided by Simulation Studio. (The labels of blocks in Figure 2.1 have been changed from their default labels to reflect their role in this model. The default labels match the block type.) Customer arrivals to the bank are modeled using an Entity Generator block An M/M/1 Queueing Model labeled Arriving Customers in Figure 2.1. The Entity Generator block has an input value port for the interarrival time. (See Ports for more information about ports.) The Numeric Source block An M/M/1 Queueing Model labeled InterArrival Time generates a sample from the exponential distribution (representing the next interarrival time) and the Entity Generator block pulls that value through the InterArrivalTime port.

Figure 2.2 shows the dialog box for the Interarrival Time block. Since time in Simulation Studio is dimensionless, you can use hours or minutes or any other time unit in any Simulation Studio model, as long as you use the same units consistently throughout the model.

Figure 2.2: Numeric Source Block Dialog Box

Numeric Source Block Dialog Box


When the entity that represents a customer leaves the Arriving Customers Entity Generator block, it is pushed to the FIFO Queue block An M/M/1 Queueing Model . The movement of the entity down the link does not advance the simulation clock. If the queue has a limited capacity and is full when the entity arrives, the entity is pushed out the Entity Generator block’s OutBalk port. If the queue is not full, the FIFO Queue block attempts to push the entity to the Server block An M/M/1 Queueing Model labeled Teller. If the Teller is available, it accepts the entity; otherwise, the entity waits in the queue. When the Teller becomes available, it requests an entity from the queue.

When the entity arrives at the Teller block An M/M/1 Queueing Model , a service time is sampled from the second Numeric Source block (labeled Service Time) and pulled by the Teller through the InServiceTime port. After the entity completes its service, it is pushed out to the Disposer block An M/M/1 Queueing Model where it leaves the system. The Teller then requests another entity from the queue.