%% Comparing Queue-Server Combinations

% Copyright 2008-2012 The MathWorks, Inc.

%% Overview
% This example shows a comparison of a single-queue, multiple-server system with a
% multiple-queue, multiple-server system.

modelname = 'sedemo_single_v_multi_queue';
open_system(modelname);
sim(modelname);

%% Structure
% In this model, both systems share the same average service time and
% achieve the same throughput. However, the single-queue system exhibits
% shorter delays than the multiple-queue system.
%
% The comparison of these two systems is the classic "queuing for multiple
% bank tellers" problem and shows that forming a single line for
% multiple tellers reduces the average delay, compared to forming one line
% for each teller.


%% Related Examples
% * <matlab:helpview(fullfile(docroot,'toolbox','simevents','helptargets.map'),'doc_dd1'); Building a Simple Discrete-Event Model>
% * <matlab:helpview(fullfile(docroot,'toolbox','simevents','helptargets.map'),'doc_lifo_vs_fifo'); Example: Waiting Time in LIFO Queue>
% * <matlab:helpview(fullfile(docroot,'toolbox','simevents','helptargets.map'),'doc_mm5'); Example: M/M/5 Queuing System>
% * <matlab:helpview(fullfile(docroot,'toolbox','simevents','helptargets.map'),'doc_priorityq'); Example: Serving Preferred Customers First>
% * <matlab:showdemo('sedemo_priority_policies'); Comparing Prioritized Queuing Policies>
% * <matlab:showdemo('sedemo_preempt_policy'); Comparing Server Preemption Policies>

%% 
%cleanup
bdclose(modelname);
clear modelname;
displayEndOfDemoMessage(mfilename)
