<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What happens when you add a new teller?</title>
	<atom:link href="http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Sat, 11 Feb 2012 22:42:11 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: R.S.S.</title>
		<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/comment-page-1/#comment-126458</link>
		<dc:creator>R.S.S.</dc:creator>
		<pubDate>Fri, 30 Dec 2011 17:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=712#comment-126458</guid>
		<description>Queuing Theory is fun. Thank your U.S. Navy for a lot of work in the area.</description>
		<content:encoded><![CDATA[<p>Queuing Theory is fun. Thank your U.S. Navy for a lot of work in the area.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Anderson</title>
		<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/comment-page-1/#comment-126457</link>
		<dc:creator>David Anderson</dc:creator>
		<pubDate>Fri, 30 Dec 2011 17:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=712#comment-126457</guid>
		<description>I&#039;m totally on board with Exponential arrivals, but wouldn&#039;t M/G/1 but a more accurate representation of a bank queue?  Service times are probably much closer to Normal than Exponential.  I know M/M/1 is nice and clean, but probably not that accurate.  And the long tail of exponential service times is what creates lots of the backlog and excess waiting times.</description>
		<content:encoded><![CDATA[<p>I&#8217;m totally on board with Exponential arrivals, but wouldn&#8217;t M/G/1 but a more accurate representation of a bank queue?  Service times are probably much closer to Normal than Exponential.  I know M/M/1 is nice and clean, but probably not that accurate.  And the long tail of exponential service times is what creates lots of the backlog and excess waiting times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Gunther</title>
		<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/comment-page-1/#comment-16954</link>
		<dc:creator>Neil Gunther</dc:creator>
		<pubDate>Tue, 05 May 2009 02:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=712#comment-16954</guid>
		<description>I see that you discuss R elsewhere in your blog, so here is the PDQ-R (Pretty Damn Quick in R) code for the above Bank model.
&lt;code&gt;
# PDQ v5.0
# Created by NJG on Monday, May 4, 2009
library(pdq)
arrival_rate=5.8 * 2 # cust/hr
service_time=10.0/60 # 10 minutes
Init(&quot;M/M/m Blog Example&quot;)
#define the workflow
CreateOpen(&quot;deposit&quot;, arrival_rate) 
SetWUnit(&quot;Cust&quot;)
SetTUnit(&quot;Hour&quot;)
#define an m-server queue (here m = 2)
CreateMultiNode(2,&quot;teller&quot;, CEN, FCFS) 
#define the service demand on the server
SetDemand(&quot;teller&quot;, &quot;deposit&quot;, service_time) 
Solve(CANON)
Report()
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I see that you discuss R elsewhere in your blog, so here is the PDQ-R (Pretty Damn Quick in R) code for the above Bank model.<br />
<code><br />
# PDQ v5.0<br />
# Created by NJG on Monday, May 4, 2009<br />
library(pdq)<br />
arrival_rate=5.8 * 2 # cust/hr<br />
service_time=10.0/60 # 10 minutes<br />
Init("M/M/m Blog Example")<br />
#define the workflow<br />
CreateOpen("deposit", arrival_rate)<br />
SetWUnit("Cust")<br />
SetTUnit("Hour")<br />
#define an m-server queue (here m = 2)<br />
CreateMultiNode(2,"teller", CEN, FCFS)<br />
#define the service demand on the server<br />
SetDemand("teller", "deposit", service_time)<br />
Solve(CANON)<br />
Report()<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Gunther</title>
		<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/comment-page-1/#comment-16944</link>
		<dc:creator>Neil Gunther</dc:creator>
		<pubDate>Mon, 04 May 2009 21:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=712#comment-16944</guid>
		<description>This example is dramatic because the lone teller is already near saturation (arrival rate ~= service rate) and the queue is growing  unbounded. So naturally, adding 
another teller will halve the utilization of each and reduce the queue size significantly.

I used &lt;a href=&quot;http://www.perfdynamics.com/Tools/PDQcode.html&quot; rel=&quot;nofollow&quot;&gt;PDQ-R&lt;/a&gt; to check your calculations. See below, although the formatting might die in this little Reply box. The original waiting line has  28 people in steady state and indeed the residence time is 5 hrs. In the 2nd scenario, a customer only waits about 30% of the time and their mean waiting time is about 3 mins (0.0508 Hours), as you stated.

A more interesting question is, what happens if we now double the traffic rate into the bank with 2 tellers? See PDQ report 3. Even though the tellers will return to being as busy as the original lone teller, the waiting time is only 2.3757 Hours;
half that in scenario 1. Dual tellers really win!

The great feature of 2 tellers or a dual-core processor, is that the customer (or thread) at the *head* of the waiting line gets serviced by the next available teller.
The benefit over a single teller is due to the variation about the mean service period S. With an  exp service time dsn, the variance is the same magnitude as the mean. So, if one customer is opening a new bank account (long service period), other customers (with shorter transactions) can be serviced *in parallel* by the other teller. 

New question: What happens if a 3rd teller is added? :)

&lt;code&gt;
                =======================================
                ******    PDQ Model Results     *******
                =======================================

1. Single teller model.

Node Sched Resource   Workload   Class     Demand
---- ----- --------   --------   -----     ------
  1  MSQ   teller     deposit    TRANS     0.1667


                ******   RESOURCE Performance   *******

Metric          Resource     Work              Value   Unit
------          --------     ----              -----   ----
Throughput      teller       deposit          5.8000   Cust/Hour
Utilization     teller       deposit         96.6667   Percent
Queue length    teller       deposit         29.0000   Cust
Waiting line    teller       deposit         28.0333   Cust
Waiting time    teller       deposit          4.8333   Hour
Residence time  teller       deposit          5.0000   Hour


2. Add another teller.
                
Node Sched Resource   Workload   Class     Demand
---- ----- --------   --------   -----     ------
  2  MSQ   teller     deposit    TRANS     0.1667


                ******   RESOURCE Performance   *******

Metric          Resource     Work              Value   Unit
------          --------     ----              -----   ----
Throughput      teller       deposit          5.8000   Cust/Hour
Utilization     teller       deposit         48.3333   Percent
Queue length    teller       deposit          1.2613   Cust
Waiting line    teller       deposit          0.2947   Cust
Waiting time    teller       deposit          0.0508   Hour
Residence time  teller       deposit          0.2175   Hour


3. Double the customer traffic as well.

Node Sched Resource   Workload   Class     Demand
---- ----- --------   --------   -----     ------
  2  MSQ   teller     deposit    TRANS     0.1667
  
                  ******   RESOURCE Performance   *******

Metric          Resource     Work              Value   Unit
------          --------     ----              -----   ----
Throughput      teller       deposit         11.6000   Cust/Hour
Utilization     teller       deposit         96.6667   Percent
Queue length    teller       deposit         29.4915   Cust
Waiting line    teller       deposit         27.5582   Cust
Waiting time    teller       deposit          2.3757   Hour
Residence time  teller       deposit          2.5424   Hour
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This example is dramatic because the lone teller is already near saturation (arrival rate ~= service rate) and the queue is growing  unbounded. So naturally, adding<br />
another teller will halve the utilization of each and reduce the queue size significantly.</p>
<p>I used <a href="http://www.perfdynamics.com/Tools/PDQcode.html" rel="nofollow">PDQ-R</a> to check your calculations. See below, although the formatting might die in this little Reply box. The original waiting line has  28 people in steady state and indeed the residence time is 5 hrs. In the 2nd scenario, a customer only waits about 30% of the time and their mean waiting time is about 3 mins (0.0508 Hours), as you stated.</p>
<p>A more interesting question is, what happens if we now double the traffic rate into the bank with 2 tellers? See PDQ report 3. Even though the tellers will return to being as busy as the original lone teller, the waiting time is only 2.3757 Hours;<br />
half that in scenario 1. Dual tellers really win!</p>
<p>The great feature of 2 tellers or a dual-core processor, is that the customer (or thread) at the *head* of the waiting line gets serviced by the next available teller.<br />
The benefit over a single teller is due to the variation about the mean service period S. With an  exp service time dsn, the variance is the same magnitude as the mean. So, if one customer is opening a new bank account (long service period), other customers (with shorter transactions) can be serviced *in parallel* by the other teller. </p>
<p>New question: What happens if a 3rd teller is added? <img src='http://www.johndcook.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code><br />
                =======================================<br />
                ******    PDQ Model Results     *******<br />
                =======================================</p>
<p>1. Single teller model.</p>
<p>Node Sched Resource   Workload   Class     Demand<br />
---- ----- --------   --------   -----     ------<br />
  1  MSQ   teller     deposit    TRANS     0.1667</p>
<p>                ******   RESOURCE Performance   *******</p>
<p>Metric          Resource     Work              Value   Unit<br />
------          --------     ----              -----   ----<br />
Throughput      teller       deposit          5.8000   Cust/Hour<br />
Utilization     teller       deposit         96.6667   Percent<br />
Queue length    teller       deposit         29.0000   Cust<br />
Waiting line    teller       deposit         28.0333   Cust<br />
Waiting time    teller       deposit          4.8333   Hour<br />
Residence time  teller       deposit          5.0000   Hour</p>
<p>2. Add another teller.</p>
<p>Node Sched Resource   Workload   Class     Demand<br />
---- ----- --------   --------   -----     ------<br />
  2  MSQ   teller     deposit    TRANS     0.1667</p>
<p>                ******   RESOURCE Performance   *******</p>
<p>Metric          Resource     Work              Value   Unit<br />
------          --------     ----              -----   ----<br />
Throughput      teller       deposit          5.8000   Cust/Hour<br />
Utilization     teller       deposit         48.3333   Percent<br />
Queue length    teller       deposit          1.2613   Cust<br />
Waiting line    teller       deposit          0.2947   Cust<br />
Waiting time    teller       deposit          0.0508   Hour<br />
Residence time  teller       deposit          0.2175   Hour</p>
<p>3. Double the customer traffic as well.</p>
<p>Node Sched Resource   Workload   Class     Demand<br />
---- ----- --------   --------   -----     ------<br />
  2  MSQ   teller     deposit    TRANS     0.1667</p>
<p>                  ******   RESOURCE Performance   *******</p>
<p>Metric          Resource     Work              Value   Unit<br />
------          --------     ----              -----   ----<br />
Throughput      teller       deposit         11.6000   Cust/Hour<br />
Utilization     teller       deposit         96.6667   Percent<br />
Queue length    teller       deposit         29.4915   Cust<br />
Waiting line    teller       deposit         27.5582   Cust<br />
Waiting time    teller       deposit          2.3757   Hour<br />
Residence time  teller       deposit          2.5424   Hour<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Venier</title>
		<link>http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/comment-page-1/#comment-8280</link>
		<dc:creator>John Venier</dc:creator>
		<pubDate>Wed, 22 Oct 2008 16:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=712#comment-8280</guid>
		<description>Wow, that&#039;s amazing!  I never would have guessed, but when you put it in terms of &lt;em&gt;slack&lt;/em&gt; it makes sense.
</description>
		<content:encoded><![CDATA[<p>Wow, that&#8217;s amazing!  I never would have guessed, but when you put it in terms of <em>slack</em> it makes sense.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.319 seconds -->

