You are on page 1of 16

Teachers Forum: Spreadsheet Modeling and

Simulation Improves Understanding of Queues

Thomas A. Grossman, Jr. Faculty of Management


University of Calgary
Calgary, Alberta, Canada T2N 1N4

Process-driven spreadsheet queuing simulation is a better ve-


hicle for understanding queue behavior than queuing theory
or dedicated simulation software. Spreadsheet queuing simula-
tion has many pedagogical benefits in a business school end-
user modeling course, including developing students intui-
tion, giving them experience with active modeling skills, and
providing access to tools. Spreadsheet queuing simulations are
surprisingly easy to program, even for queues with balking
and reneging. The ease of prototyping in spreadsheets invites
thoughtless design, so careful spreadsheet programming prac-
tice is important. Spreadsheet queuing simulation is inferior to
dedicated simulation software for analyzing queues but is
more likely to be available to managers and students.

Q ueuing theory has always been a


staple in survey courses on manage-
ment science. Although it is a powerful
better vehicle.
Although Evans and Olson [1998, p.
170] state that a serious limitation of
tool for computing certain steady-state spreadsheets for waiting-line models is
performance measures, queuing theory is that it is not possible to include behavior
a poor vehicle for teaching students about such as balking and Liberatore and Ny-
what transpires in queues. Process-driven dick [forthcoming] indicate that a limita-
spreadsheet queuing simulation is a much tion of spreadsheet simulation is the in-

Copyright q 1999, Institute for Operations Research QUEUESSIMULATION


and the Management Sciences PROFESSIONALOR/MS EDUCATION
0092-2102/99/2903/0088/$5.00
This paper was refereed.

INTERFACES 29: 3 MayJune 1999 (pp. 88103)


TEACHERS FORUM

ability to model balking and reneging, we issues as the role of initial conditions and
find we can model balking and reneging the distinction between transient and
(as well as finite queue length, which is a steady-state behavior.
special case of balking). Simulation using dedicated software
Approaches to Teaching Queuing packages is flexible, powerful, and widely
Instructors use three approaches in used for modeling queues, and it is often
teaching about queuing: analytical queu- the best technology for computing quanti-
ing theory, dedicated simulation software, tative results. Many simulation packages
and spreadsheet simulation. are available, such as SLAM, GPSS, Ex-
Queuing theory is widely taught in tend`, and Arena [Swain 1997]. However,
business school OR/MS survey courses, simulation packages hide the mechanics of
and students can use it to quickly compute queues, are expensive and time-
a handful of steady-state performance consuming to learn, and are not widely
measures. As presented in the textbooks used in survey courses on MS/OR, al-
for management science survey courses, though Liberatore and Nydick [forthcom-
queuing theory is limited because the ing] argue that they should be.
models are simplified to make them ana- Spreadsheet simulation is increasingly
lytically tractable, the results apply only to popular. Any spreadsheet model (includ-
steady-state behavior, and the number of ing those built by people with no knowl-
performance measures that can be com- edge of management science) can be simu-
puted is small. (Some queuing theory re- lated using techniques that can be found
sults go beyond these limitations, for ex- in such textbooks as Ragsdale [1998] or
ample, those of Rothkopf and Oren [1979], Winston and Albright [1997]. One pro-
but they are not described in introductory grams one or more spreadsheet cells to
texts.) Because deriving results using provide a sample value from a specified
queuing-theory models requires mathe- distribution. By recalculating the work-
matics beyond the scope of the survey sheet, one can generate a new set of sam-
course, they are presented as black box ples, and the program computes the corre-
formulas, and students do not gain the in- sponding changes in the model
sights MS/OR professionals obtain by automatically. By repeatedly recalculating
studying the underlying theory. Further- the worksheet, one can generate a distri-
more, simple performance measures, such bution of stochastic input values and cor-
as the 95th percentile of waiting time or responding stochastic output values. We
the fraction of customers who wait more recommend use of simulation add-in
than five minutes, often cannot be com- packages (for example, @RISK, Crystal
puted using queuing theory. Ball, INSIGHT.xla), which simplify sam-
Queuing theory is not particularly use- pling, manage iterations, track results, and
ful for understanding what actually tran- compute statistics.
spires in queues: their dynamics, the effect Evans and Olson [1998] distinguish
of variability, human behavior while wait- three classes of spreadsheet simulation
ing in line, and such important technical models: activity-driven, event-driven, and

MayJune 1999 89
GROSSMAN

process-driven. single-server queue. Grossman, Tran, and


An activity-driven simulation describes Ursu [1997] developed prototypes of multi-
the activities that occur during fixed inter- server process-driven models, including
vals of time (for example, an hour, day, or balking, reneging, and multiserver serial
week), typically using one row of the queues. Hesse [1997] extends Chase and
spreadsheet for each time interval. The Aquilanos model by limiting the second
activity-driven approach (often used in queue to a maximum size of one. Camm
textbook inventory models) seems to have and Evans [1996] and Lawrence and
been first used for queuing by Clauss Pasternack [1998] contain single-server
[1996] for ship unloading. However, we process-driven models. Evans and Olson
think this approach oversimplifies most [1998] describe one- and two-server
queuing systems. process-driven models.
The process-driven approach is cumber-
The idea is to teach students some to program, but it presents queue ac-
to be active modelers. tivity clearly and intuitively, and it facili-
tates communication about customer
An event-driven simulation describes experience in queues, which makes it suit-
the changes in the system at the moment able for teaching in survey courses.
of each stochastic event, typically using Our Situation and the Transition to End-
one row of the spreadsheet for each event. User Modeling
This approach was apparently first used All bachelor-of-commerce and evening
for queuing by Winston [1996] for a MBA students in the business school at
single-server queue. Evans and Olson the University of Calgary take a survey
[1998] describe a similar model. The event- course on management science. (The full-
driven approach has technical advantages time MBA students are in a team-taught,
of efficiency and flexibility, but it is not project-based Enterprise MBA program
good for teaching because it obscures the and are not considered in this paper.) Un-
customer experience of queues, and it is til 1996, these courses followed the tradi-
less intuitive than the process-driven tional tool-oriented approach and were in-
approach. creasingly unpopular with students,
A process-driven simulation (Figure 1) instructors, graduates, and even professors
models the logical sequence of events for in other departments (in short, a lose-lose
each customer, typically using one row of situation). In the summer of 1995, we set
the spreadsheet for each customer. This the goal of making the management sci-
approach was apparently first used for ence course the best core course in the
queuing by Chase and Aquilano [1992], program and decided to convert to an
who present a model of two serial single- end-user modeling approach.
server queues with zero queue size. The idea behind end-user modeling is to
Process-driven simulation was first de- teach students to be active modelers
scribed in the management science litera- [Powell 1997] who, although lacking ex-
ture by Plane [1994b] for a model of a pertise in management science, can use

INTERFACES 29:3 90
TEACHERS FORUM

Figure 1: In this template for a basic two-server queue, we provide the entries in bold. Students
use the bold entries to compute the italicized entries.

management science to influence the man- stories or on small-scale projects from lo-
agement of their firms. Plane [1994a], cal industry). At this time, we recognized
Grossman [1997], Powell [1997], Savage that examples that purport to be from
[1997], and Sonntag and Grossman [forth- functional areas of business but are obvi-
coming] discuss the issues and opportuni- ously irrelevant to the practice of manage-
ties and how end-user modelers differ ment damage the credibility of the course
from expert consultant modelers (also [Sprague and Sprague 1976] and therefore
known as practitioners). started to cull bogus examples. In winter
The transition from a traditional course 1998, we eliminated all algorithm-focused
to an end-user modeling course took three content and almost all the remaining bo-
years. In winter 1996 we adopted Excel gus examples (we retained a few introduc-
(which had the best LP solver at that time) tory toy models); refined the teaching of
and the simulation add-in @RISK, elimi- spreadsheet modeling; incorporated con-
nated all other software, rewrote the tent from finance, organizational behavior,
course notes, and instituted a community- accounting, marketing and MIS; focused
based term project. In winter 1997, we our lectures and class discussions on busi-
again rewrote the course notes, eliminated ness issues beyond the analytical results;
algebraic modeling in favor of spreadsheet and reoriented the term project toward
modeling, added process-driven spread- achieving practical consulting results for
sheet queuing simulation, reduced the client companies. We had at last
algorithm-focused content, started to cull achieved a full end-user modeling course,
bogus examples, reduced LP output analy- and teaching ratings increased to be
sis (for example, reduced costs, objective- among the best of the required courses.
function-coefficient ranges, and shadow- (We converted the evening MBA course
price ranges) in favor of direct sensitivity during the spring and summer of 1998.
analysis, added demonstrations of how to This transition was easy, given our experi-
make effective technical presentations, and ence with the undergraduate course.)
added real cases (based on student success As we gained experience teaching end-

MayJune 1999 91
GROSSMAN

user modeling, we realized that students The students models motivated us to


needed to be taught the skill of active investigate using spreadsheet queuing
modeling, and that although they could simulation in our teaching. We spent half
use queuing theory to compute numbers, a year doing research on how to program
they were not developing good intuition these models effectively and how to use
about queues and how they affect a busi- them to teach the skill of modeling and to
ness. This set the stage for the use of teach about what goes on in queues.
process-driven spreadsheet queuing
simulation. Spreadsheets show the
Teaching with Process-Driven experiences of individual
Spreadsheet Queuing Simulation customers and servers.
Instructors at the University of Calgary
had used simple tables analogous to Fig- Since the programming is tedious, we
ure 1 to illustrate the behavior of individ- developed a set of spreadsheet queuing
ual entities in queues since the 1980s. We simulation engines (for one through 12
provide students with a paper template servers, for basic queues and queues with
(Figure 1) with all cells blank except inter- balking or reneging or balking and reneg-
arrival times and service times and work ing) that students can download and use
with them to fill out the template, comput- as a basis for programming. These engines
ing for each customer the arrival time, ser- handle the logic of who receives service
vice start time, end time, wait time, and so where and when, and the user need only
forth. customize the engines for his or her partic-
The queuing templates were pro- ular application (appendix).
grammed in the Lotus 1-2-3 spreadsheet in Modeling a Queue in a Spreadsheet
1992, and the code was included in the We use a process-driven approach in
course notes. Because the programming which each row of the spreadsheet corre-
was unsatisfactory (partly because of limi- sponds to a customer. We build our queu-
tations in the hardware and software in ing models using three worksheets. The
1992 and partly because of excessive ambi- user enters data that pertain to the situa-
tion), we had been telling students that tion being modeled on the data worksheet
queuing simulation in spreadsheets was (Figure 2). The simulation worksheet (Fig-
prohibitively difficult. In March 1996, two ure 3) presents the details of the queue so
students, who were apparently not paying they appear natural and intuitive to the
attention in class, went out and created user. The computations worksheet (Figure
workable spreadsheet simulations of 4 in the appendix) computes the queue
queues with balking at a local cosmetics outcomes so they are convenient to the
retailer. The students (Kien Tran and programmer.
Garett Ursu, both third-year undergradu- We believe that spreadsheet queuing
ates) used their simulation models to in- simulations can be valuable tools for ana-
vestigate the impact of different staffing lyzing actual queues for individuals who
levels on customer service. do not have access to stand-alone simula-

INTERFACES 29:3 92
TEACHERS FORUM

tion software. We find spreadsheet queu- ately observe and understand the mechan-
ing simulations useful for teaching stu- ics of queues and the experiences of cus-
dents what transpires in real queues. tomers in queues. Users quickly realize
Pedagogical Benefits of Spreadsheet (Figure 3) which columns contain the ac-
Queuing Simulation tivities of the servers and that by examin-
We find that performing queuing simu- ing the start time and end time of each
lations in spreadsheets offers six benefits: server, they can easily see when servers
explicitness, immediacy, insight, flexibility, are busy and when they are idle. Since the
active modeling, and accessibility. These spreadsheet simulation logic preferentially
benefits apply not only to students, but assigns customers to the lowest-indexed
also to instructors with expertise in queu- (leftmost) server, the pattern of start and
ing theory. end times and blank cells in the server col-
Spreadsheets show the experiences of umns provides the user with a clear non-
individual customers and servers explic- numerical indication of how customers are
itly. In contrast to queuing theory (and routed to servers and the effect of busy
most stand-alone simulation packages), servers. When someone raises a question
spreadsheets retain and display the experi- about the behavior of the queue or of cus-
ences of individual customers. This makes tomers, it is easy to replace selected ran-
spreadsheet simulation more informative dom values for interarrival time or service
and more effective in helping students to time with appropriate fixed values. This
develop intuition and genuine under- allows the instructor to quickly and con-
standing about queues than a comparable cretely share one students observation
series of runs using queuing theory. They with the entire class and facilitates explo-
are also much less mysterious than queu- ration of the spreadsheet model.
ing theory, whose results the uninitiated Spreadsheets help users to develop their
must take on faith. intuition regarding why queues behave as
With spreadsheets, users can immedi- they do. Geoffrion [1976] argues that the

Figure 2: In the data worksheet for a two-server basic queue, the user specifies the facility start
time and close time. The user enters on this page any data required for the interarrival time
distribution and service time distribution, which can be parameters for a native Excel discrete
distribution (shown here) or for spreadsheet add-in probability distribution formulas.

MayJune 1999 93
GROSSMAN

Figure 3: In the simulation worksheet (with cell formulas) for a two-server basic queue, the cus-
tomer stochastic interarrival times are in column B, arrival times are in column C, and service
times are in column D. We assign each customer to a server in columns E, F, G, and H, with
start and finish time indicated in the column corresponding to the assigned server. We assign
customers to the first available server and to the lowest-indexed server if multiple servers are
available. In columns I and J we compute two common performance measures, waiting time
and time in system. We compute another performance measure, the percentage of customers
who wait at least six minutes, in cell K5 with intermediate calculations in column K. We can
see the experience of customer 3 in row 14. Customer 3 arrives one minute (stochastic, cell B14)
after the arrival of customer 2 at 9:04 (cell C13), arriving at 9:05 (cell C14). Customer 3 starts
service at server 2 at 9:07 (cell G14) upon the completion of service for customer 2 (cell H13).
After the stochastic service time of three minutes (cell D14) has passed, our customer completes
service at 9:10 (cell H14). The simulation worksheet displays the word closed and blank cells
for would-be customer 13 who arrived after the facility had closed at 10:00.

true purpose of management science is in- theory formulas quantify the delay, they
sight, not numbers. A classic result of do not explain why these delays occur nor
queuing theory (and of operations man- why they increase as variability increases.
agement in general) is that process vari- Consider a two-server spreadsheet queu-
ability causes delays. Although queuing ing simulation, with fixed service times of

INTERFACES 29:3 94
TEACHERS FORUM

11 minutes and fixed interarrival times of the user be interested in, say, the percent-
six minutes. We can instantly demonstrate age of cycle times that are greater than
that the queuing system moves in lock- five minutes for those customers who had
step, with customers never waiting. We to wait at least two minutes, he or she can
can introduce variability by making the easily compute it. However, as Evans and
service times probabilistic with a mean of Olson [1998] point out, our process-driven
11 minutes, and the impact on system per- approach to spreadsheet queuing simula-
formance is visible immediately. We can tion is not suitable for computing such
recalculate the worksheet a few times to time-dependent performance measures as
demonstrate the types of things that can the average queue length. (We can com-
happen with variability: sometimes there pute the length of the queue at a given
are no queues, sometimes there are large moment in time, which allows us to model
queues, and once a queue builds it tends balking. We could probably compute the
to persist. Users can observe these results distribution on queue length only by using
and articulate for themselves the reason a macro; some business school students
that variability is the driver. Such insights and managers could program this.)
are difficult to acquire with dedicated The use of a template to formalize ones
simulation packages, even those with ani- knowledge entails an experience of active
mation capabilities. modeling. Calls to teach modeling, as op-
Also, as Evans and Olson [1998] indi- posed to models, date back at least to
cate, spreadsheet queuing simulation Morris [1967]. Powell [1995] distinguishes
forces users to examine the transient be- between the science of models (which
havior (starting with an empty system) as were good at teaching) and the art and
distinct from steady-state behavior. craft of modeling (which were not so
Spreadsheet simulation provides the in- good at teaching). In the Magnanti report,
structor with a means of presenting a con- Jordan et al. [1997] recommend that teach-
crete example of this distinction, and it ers place more emphasis on the use of
strengthens the users ability to interpret spreadsheets as a vehicle for modeling, es-
steady-state queuing theory results. pecially for end-users. A paper template is
Spreadsheets allow students to consider a beginners tool for modeling, and our
a wide range of models and performance approach to process-driven spreadsheet
measures. Spreadsheet queuing simula- simulation provides an explicit, concrete
tions can be programmed to consider vari- linkage between models and modeling.
ous situations, including those for which Spreadsheet users can access the power
no closed-form solutions exist, such as of queuing simulation without the invest-
balking and reneging. Spreadsheet queu- ment required to use simulation packages.
ing simulations can also be used to com- All our students know how to use spread-
pute a wide range of custom performance sheets, and we can teach them to use our
measures about a queue, including perfor- spreadsheet queuing engines in one class
mance measures that cannot be computed period, whereas our elective course on
using queuing theory (Figure 3). Should simulation (using Arena) takes an entire

MayJune 1999 95
GROSSMAN

semester. (We are finding that spreadsheet for each customer.


queuing simulation is increasing students To model a queue with customers who
interest in our simulation elective because balk (refuse to join the queue when it is
they can see for themselves the power of too long), we need to compare the number
simulation and are more willing to invest of customers in queue upon the cus-
their time to acquire better tools.) tomers arrival to the customers willing-
Extensions: Balking and Reneging ness to enter a long line. We model will-
We have extended the basic model to ingness to enter a line by the maximum
incorporate balking and reneging (appen- queue size, called balk_num. We compute
dix). The key to modeling queue behavior the queue length upon arrival, and if it ex-
in a spreadsheet is to precisely understand ceeds balk_num, the customer balks and
the mechanics underlying events. In teach- departs immediately upon arrival. We can
ing, we use a paper version of a simula- compute the number of customers in
tion worksheet to discuss the order of queue at the time of a new arrival by
events and the availability of information. counting the customers whose start time is
This structured technique is useful for after the new arrival time. To do this in
teaching, since it gives students a tool for Excel, we had an MBA student write a
doing modeling, and it compels students custom Excel function for us (it is all of
to learn the valuable discipline of formal- five lines long). The programming is oth-
izing their personal experience. erwise straightforward. It is simple to
To model a queue with customers who modify this approach to incorporate a
renege (leave the queue before starting stochastic queue-length limit for each
service due to waiting too long), we need customer.
to compute the forthcoming wait and We have built a model with customers
compare it to the customers willingness to who can balk and renege by combining
wait. If the customer is willing to wait, ev- the model with balking and the model
erything proceeds as in the basic model. If with reneging. We had to make provision
the customer reneges, then we must indi- to count customers who were reneging but
cate his or her departure time. We model had not yet departed as being in the
customer tolerance for waiting as a maxi- queue when subsequent customers
mum waiting time, specified by the user arrived.
and called renege_time. We compute a Programming Process-Driven
customers forthcoming waiting time, and Spreadsheet Queuing Simulations
if it exceeds renege_time, the customer re- We have been surprised at how easy it
neges and departs the queue at a clock is to program spreadsheet queuing simula-
time equal to his arrival time plus tions. We believe that the programming
renege_time, and the appropriate results needed to simulate queues in spreadsheets
are displayed on the simulation work- is well within the reach of most business
sheet. The programming is straightfor- students and MS/OR professionals. The
ward. It is simple to modify this approach programmer should be aware that model-
to incorporate a stochastic reneging time ing a two-server queue requires a pro-

INTERFACES 29:3 96
TEACHERS FORUM

gramming approach different from model- ing simulation with a known number of
ing a one-server queue because the next customers (as in Evans and Olson [1998]),
available server must be identified. Like- this issue is trivial. For a terminating
wise, modeling a queue with three or simulation that ends at a particular time,
more servers requires a different program- we need to use good modeling judgment.
ming approach from modeling a queue for An informal (but effective) approach is to
two servers, because simple IF statements use enough but not too many. Too many
are unsuitable for identifying which of customer rows will unnecessarily increase
many servers is available next. No use of run times. If we include too few customer
macros is required. The only advanced rows, then any replications with unusually
programming consists of a five-line Excel short interarrival time outcomes could
function (written by an MBA student) contain inaccuracies because customers
used in the extension that considers balk- might cease to arrive before the store
ing and finite queue length. closes. It is easy to program a flag that an-
nounces when a replication has this diffi-
culty. It is easy to program the spread-
The teaching community
sheet to compute performance measures
should take responsibility for only for customers who arrive before clos-
improving student ing. (When using spreadsheet add-ins, one
programming. computes each performance measure once
on the worksheet, and the add-in repli-
The overall size of a spreadsheet pro- cates that performance measure automati-
gram can be a poor measure of the incum- cally.) If the goal is to use the spreadsheet
bent complexity. The guts of our models simulation solely as a tool to facilitate
are concentrated in a single row, and once thinking and discussion about queues,
a row has been programmed, all other then this issue is not a concern.
rows are trivially programmed using a Performance measures computed for a
spreadsheet fill-down editing feature single replication of the worksheet differ
(appendix). from performance measures computed for
We have built models with as many as multiple replications. The variance of
12 servers and find no inherent limitation waiting time (or any other higher moment
to the number of servers that can be of a distribution) can be computed for a
programmed. single replication, but the variance of wait-
Because each row in the spreadsheet ing time across replications cannot easily
queuing simulations corresponds to a sin- be determined from simulation add-in
gle customer, we must determine the output, because the variance across repli-
right number of customer rows to in- cations is not equal to the mean of the rep-
clude. For a nonterminating simulation, lication variances. The instructor must
this issue is identical to that faced when make this distinction clear to students.
using stand-alone simulation software, so This issue arises in other models, such as
we wont address it here. For a terminat- the activity-based inventory simulation

MayJune 1999 97
GROSSMAN

discussed by Ragsdale [1998]. your computer; (2) write down on paper


Recommendations for Management what your spreadsheet will look like
Science Spreadsheet Programming (Thesen and Travis [1992, pp. 4955] de-
Practice scribe simulating by hand on paper to
Students who program nontrivial mod- plan for traditional simulation); (3) execute
els, such as spreadsheet queuing simula- your paper spreadsheet by hand, return-
tions, often create messy spaghetti models ing to Step 2 as necessary; and (4) turn on
that are difficult to understand, explain, your computer and program your model.
and debug. This is a source of consterna- For some reason, this is very hard to do,
tion to teachers, and we think the teaching even for professors who really ought to
community should take responsibility for know better. The ease with which spread-
improving student programming practice. sheet models can be prototyped invites
This is a challenging undertaking. Cragg thoughtless design.
and King [1993] show that an excessive (2) One must craft the user interface.
number of industrial spreadsheets contain Create a spreadsheet that enhances under-
errors and that process guidelines in in- standing for the user. Develop the user in-
dustry are inadequate. In contrast to terface for clarity of presentation and ease
C`` programmers who benefit from uni- of understanding, rather than for effi-
versity courses and research concerning ciency or minimization of cells. Learn the
programming practice, spreadsheet Excel time formats, and display times in
programmers have little access to such everyday style rather than decimal style
knowledge. Although popular manage- (for example, display 9:20 rather than the
ment science survey texts, such as equivalent 9.333).
Ragsdale [1998] and Winston and Albright (3) Program for maintainability. More
[1997], discuss the process of modeling, cells with simple formulas are usually
they do not address the process of spread- more effective and maintainable than
sheet programming. Caine and Robson fewer cells with complex formulas. Mini-
[1993] and Conway and Ragsdale [1997] mize the use of nested 4 IF functions. The
provide design guidelines for spreadsheet benefits of clever algorithms are often out-
models. We see a need to do research that weighed by the costs of maintenance.
moves beyond design to consider the pro- (4) Start small and scale up. If you are
cesses and best practices for spreadsheet programming a situation with many serv-
programming. We can suggest five tactics ers, start with three servers. Then scale up
for effective spreadsheet program- to the number of servers you require.
ming: (5) Simplify. You need to make various
(1) One must first plan. The key to suc- checks in many cells of each customer row
cessful programming is well known to (for example, is the facility closed?). Make
software engineers but seems to be less each check in one cell per row and then
well known to spreadsheet programmers: program other cells to refer to the cell that
plan, then plan some more, and then pro- makes the check. For example, rather than
gram. We teach this as follows: (1) turn off writing code that says compute whether

INTERFACES 29:3 98
TEACHERS FORUM

the store is closed, and if it is closed write Conclusions


a null character in every cell, it is better Spreadsheet queuing simulation can be
to compute whether the store is closed in a a useful adjunct or alternative to queuing
single cell and have all other cells refer to theory for teaching. It is concrete, rather
this cell. (In Figure 4, cell F14 computes than abstract, and can be used to demon-
whether the store is closed for customer 3. strate and elucidate queue performance. It
Cells G14, H14, I14, and J14 dont recom- facilitates experimentation by students
pute this but reference cell F14 to check who can use it to generate their own in-
whether the facility is closed.) sights and explanations, and hence it helps
Whole-Earth Management Science: them to own their learning, rather than
Access to Tools taking results on faith.
Each new generation of computer hard- Although we believe that spreadsheet
ware has the power to increase processing queuing simulation is useful as a tool, we
speed while improving the ease of use of do not think people should use it to per-
the interface. User-friendly graphical user form computations when stand-alone
interfaces, such as Macintosh and Win- simulation software and trained personnel
dows 95, allow ordinary people without to use it are available. However, in many
technical sophistication (in VMS, Unix, or situations, spreadsheet queuing simulation
some other command-line operating sys- technology may allow managers and stu-
tem) to harness the power of computing. dents who would not have the resources
Hardware improvements now allow algo- to use stand-alone software to employ
rithms that once taxed the capabilities of simulation.
the worlds fastest computers to run in In the last couple of years, students in
seconds. Increasing processing power is our survey course have used spreadsheet
creating a large and growing class of prob- simulations to examine queues for retail
lems for which naive formulations and businesses, small telephone operations, su-
general purpose algorithms are viable. permarkets, banking machines, and bank
This gives people with no technical so- branches (in Canada, some banks promise
phistication an opportunity to use man- a payment to those whose wait is more
agement science. than x minutes, but their branches have
The heavy use of animation and graphi- little ability to trade off staffing levels and
cal programming tools in simulation soft- line outcomes). Like many people in the
ware (for example, in Arena, Extend`) in- business world, our students do not have
creases access to tools. End-user modeling, advanced technical training, nor do they
spreadsheet queuing simulation, and the have access to stand-alone simulation soft-
use of spreadsheets in general are part of a ware. They do have access to spreadsheets
desirable progression in ease of use, which and the ability to use them.
will inevitably lead to increase of use. We One of the great challenges in MS/OR is
believe that the future of management sci- to explain the function of a model to non-
ence depends on our ability to make tools technical users so that they genuinely un-
accessible and intuitive. derstand it. In writing about optimization,

MayJune 1999 99
GROSSMAN

Savage [1997] observes that an algebraic ing engines on the world wide web (but
curtain forms a barrier to ordinary peo- not the development of the software itself)
ples understanding of models that are came from the Learning Enhancement En-
best on technical grounds. Savage recom- velope of the Province of Alberta, Canada.
mends that spreadsheets be used to in- Robert A. Willis did most of the HTML
crease their access to tools. This obser- programming. Stephen G. Powell, Michael
vation also applies to queuing H. Rothkopf, three anonymous referees,
models. Jaydeep Balakrishnan, Astrid Eckstein,
The availability of cheap, fast comput- and Grant Oh provided useful sugges-
ing means that computational efficiency is tions. Edward Silver and Thomas
no longer a concern for many practical Rohleder assisted in many ways.
business problems. Spreadsheets allow
APPENDIX
technically unsophisticated people to use Access to Software via the World Wide
management science without having to Web
master the intricacies of algebraic formula- You can freely download from http:
tion and algorithmic details. Spreadsheets //www.ucalgary.ca/;grossman/
allow instructors to teach the use of man- simulation/a number of spreadsheet
queuing simulation models (in Excel 5.0
agement science tools without teaching the
format):
underlying science, creating new opportu-
The spreadsheet shown in Figures 2, 3,
nities for end-user application. The use of and 4, and
spreadsheets as a vehicle for end-user A family of spreadsheet queuing simu-
modeling will play a key role in the future lation engines. These engines are ready for
of management science and is an exciting simulation replications and need only mi-
and important new area of research. nor modifications to customize them to a
Acknowledgments particular situation. We provide engines
for one through 12 servers for basic
Max Bayer introduced the use of a pa-
queues and for queues with balking, re-
per template to teach the dynamics of neging, and balking and reneging.
queuing at the University of Calgary in A list of resources for performing man-
the 1980s, and S.T. (Van) Enns and Don agement science in spreadsheets, including
Kerr programmed this one-server model textbooks, courses, and vendor contacts
in a spreadsheet no later than 1992. Enns for spreadsheet add-in simulation soft-
ware, is available via the INFORMS Edu-
programmed an approximate three-server
cation Forum,
queue with balking in the DOS version of http://www.informs.org/informed/.
Lotus 1-2-3 in 1992. Programming the Computations
Support for developing the spreadsheet Worksheet
queuing engines came from the Canadian We designed the computations work-
Natural Sciences and Engineering Re- sheet to facilitate programming and ease
of maintenance. Figures 3 and 4 show rep-
search Council Grant OGP0172794.
resentative cell formulas.
Rebecca Tsang did most of the program- Columns B and D contain cell formulas
ming, with some help from Sherry L. Oh. that compute sample values from specified
Support for putting the spreadsheet queu- probability distributions. As Ragsdale

INTERFACES 29:3 100


TEACHERS FORUM

[1998] and Winston and Albright [1997] two time values to get a third time value
describe, these formulas can be spread- and to display time values in hr:min
sheet add-in functions, or they can be code format.
that applies the built-in uniform (0,1) dis- In programming, it is important to
tribution to the inverse cumulative of the avoid mixing data types and the ensuing
desired distribution. error messages. When customers arrive
Columns C and E convert the sampled before the facility is open, their arrival
interarrival time (in minutes) into Excel se- times are numeric (serial time values),
rial time. (Excel serial time represents whereas if customers arrive after the facil-
12:00 a.m. as zero and 12:01 a.m. as ity is closed, their arrival times are text (ei-
1/1440.) This allows us to directly add ther closed or a null character). To avoid

Figure 4: In the computations worksheet (with cell formulas) for a two-server basic queue, the
user programs a formula to sample interarrival time in column B. The interarrival time is con-
verted from minutes to Excel serial time by dividing by 1,440 in column C. The user programs
a formula to sample service time in column D. The service time is converted from minutes to
Excel serial time by dividing by 1,440 in column E. The arrival time for each customer is shown
in column F and is computed as the sum of interarrival time and the previous customers ar-
rival time. The earliest time at which the customer can begin service at each server is computed
in columns G and H. The customer starts service at the minimum of columns G and H, shown
in column I, and receives service from the corresponding server shown in column J.

MayJune 1999 101


GROSSMAN

mixing data types, we check for text in a bers 1 and 2 in cells F7 and H7, and
cell before performing calculations. For ex- change E12 to be
ample, to compute customer 3s arrival
time by adding the interarrival time (se- 4 IF (Computations!$J12 4 F7, Computa-
rial) to customer 2s arrival time (which tions!I12, 99).
could be serial or text), we use this for- On the computations worksheet shown in
mula in cell F14: Figure 4, place the label Potential Start
in cells G5 and H5, the label Server# in
4 IF (ISTEXT (F13), 99, IF (F13 ` C14 . 4
cells G6 and H6, and the numbers 1 and 2
close_time, closed, F13 ` C14)).
in cells G7 and H7, and change G12 to be
The ISTEXT function causes the cell to 4 IF (ISTEXT ($F12), 99, MAX (OFFSET
display a null character if the previous (Simulation!$F$11:$F11, 0, 2*(G$7-1)),
customers arrival time (cell F13) is text start_time, $F12)).
(corresponding to the facility being
closed). Otherwise, we check to see if cus- References
tomer 3 is the first customer to arrive after Caine, D. J. and Robson, A. J. 1993, Spread-
the facility is closed, in which case F14 dis- sheet modelling: Guidelines for model devel-
plays closed. If customer 3 arrives be- opment, Management Decision, Vol. 31, No.
fore the facility is closed, F14 displays his 1, pp. 3844.
arrival time. Camm, J. D. and Evans, J. R. 1996, Management
We compute customer 3s server and Science: Modeling, Analysis and Interpretation,
start time in cells G14, H14, I14, and J14. South-Western College Publishing, Cincin-
Cell G14 computes customer 3s start time, natti, Ohio.
Chase, R. B. and Aquilano, N. J. 1992, Produc-
if he starts at server 1. This is the maxi-
tion and Operations Management, sixth edition,
mum of customer 3s arrival time, the time Richard D. Irwin, Chicago, Illinois.
the facility opens, and the time server 1 Clauss, F. J. 1996, Applied Management Science
becomes available. Similarly, cell H14 and Spreadsheet Modeling, Duxbury Press, Bel-
computes customer 3s start time, if he mont, California.
starts at server 2. Cell I14 computes cus- Conway, D. G. and Ragsdale, C. T. 1997, Mod-
tomer 3s actual start time, which is the eling optimization problems in the unstruc-
minimum of cells G14 and H14. Cell J14 tured world of spreadsheets, Omega, Vol.
computes customer 3s server using the 25, No. 3, pp. 313322.
following code (using MATCH rather than Cragg, P. B. and King, M. 1993, Spreadsheet
IF to improve scaling): modelling abuse: An opportunity for OR?,
Journal of the Operational Research Society, Vol.
4 IF (ISTEXT (F14), 99, MATCH (I14, 44, No. 8, pp. 743752.
G14:H14, 0)). Evans, J. R. and Olson, D. L. 1998, Introduction
to Simulation and Risk Analysis, Prentice Hall,
ISTEXT displays a null character if the fa- Upper Saddle River, New Jersey.
cility is closed, and MATCH displays the Geoffrion, A. M. 1976, The purpose of mathe-
server whose potential start time (G14 or matical programming is insight not num-
bers, Interfaces, Vol. 7, No. 6, pp. 8192.
H14) is equal to the earliest start time
Grossman, T. A. 1997, End-user modeling,
(I14); if tied, it displays the lowest-indexed OR/MS Today, Vol. 24, No. 5 (October), p. 10.
server. Grossman, T. A.; Tran, K.; and Ursu, G. D.
Ragsdale has suggested a way to im- 1997, Prospects and techniques for dynamic
prove scaling. On the simulation work- discrete event simulation in spreadsheets,
sheet shown in Figure 3, place the label Proceedings of the International Association of
Server# in cells E7 and G7 and the num- Science and Technology for Development Interna-

INTERFACES 29:3 102


TEACHERS FORUM

tional Conference on Applied Modelling and ment at AgrEvo Canada Inc., Interfaces.
Simulation, Banff, Canada, July, available at Sprague, L. G. and Sprague, C. R. 1976, Man-
http://www.ucalgary.ca/;grossman agement Science? Interfaces, Vol. 7, No. 6,
/simulation/index.html. pp. 5762.
Hesse, R. 1997, Managerial Spreadsheet Modeling Swain, J. J. 1997, 1997 Simulation software sur-
and Analysis, Richard D. Irwin, Chicago, vey, OR/MS Today, Vol. 24, No. 5 (October),
Illinois. pp. 3846.
Jordan, E.; Lasdon, L.; Lenard, M.; Moore, J.; Thesen, A. and Travis, L. E. 1992, Simulation for
Powell, S.; and Willemain, T. 1997, Report Decision Making, West Publishing, St. Paul,
of the operating subcommittee of the IN- Minnesota.
FORMS business school education task Winston, W. L. 1996, Simulation Modeling Using
force, OR/MS Today, Vol. 24, No. 1 (Febru- @RISK, Duxbury Press, Belmont, California.
ary), pp. 3641, available at http: Winston, W. L. and Albright, S. C. 1997, Practi-
//www.informs.org/informed cal Management Science: Spreadsheet Modeling
/magnanti.html. and Applications, Duxbury Press, Belmont,
Lawrence, J. A. and Pasternack, B. A. 1998, Ap- California.
plied Management Science: A Computer-
Integrated Approach for Decision Making, John
Wiley and Sons, New York.
Liberatore, M. J. and Nydick, R. L. forthcoming,
Breaking the mold: A new approach for
teaching the first MBA management science
course, Interfaces.
Morris, M. 1967, On the art of modeling,
Management Science, Vol. 13, No. 12 (August),
pp. B-707B-717.
Plane, D. R. 1994a, Spreadsheet power,
OR/MS Today, Vol. 21, No. 6 (December), pp.
3238.
Plane, D. R. 1994b, Management Science: A
Spreadsheet Approach, Boyd and Fraser,
Danvers, Massachusetts.
Powell, S. G. 1995, Six key modeling heuris-
tics, Interfaces, Vol. 25, No. 4, pp. 114125.
Powell, S. G. 1997, The teachers forum: From
intelligent consumer to active modeler: Two
MBA success stories, Interfaces, Vol. 27, No.
3 (May-June), pp. 8898.
Ragsdale, C. T. 1998, Spreadsheet Modeling and
Decision Analysis, second edition, South-
Western College Publishing, Cincinnati,
Ohio.
Rothkopf, M. and Oren, S. 1979, A closure ap-
proximation for the nonstationary M/M/S
queue, Management Science, Vol. 25, No. 6,
pp. 522534.
Savage, S. L. 1997, Weighing the pros and
cons of decision technology in spreadsheets,
OR/MS Today, Vol. 24, No. 1 (February), pp.
4245.
Sonntag, C. and Grossman, T. A. forthcoming,
End-user modeling improves R&D manage-

MayJune 1999 103

You might also like