Sign Out
Logged In:
 
 
 
 
 
Tab Image

Queueing for Toilets

- estimating the required number of toilets using queueing theory

by Don McNickle

The New Zealand Works Consultancy Services was contracted to study of the number of sanitary facilities to be provided in buildings, in order to revise the tables in the New Zealand Building Code. A very extensive data-gathering exercise to predict occupancy times and demand for various kinds of buildings was carried out. Simple queueing models proved to be the most appropriate tools for use to estimate the waiting times that the new standards would produce. While the aim of the project was to produce consistent standards, a preliminary analysis indicated the new standards might produce savings with a NPV of about $80 million.

-oo0oo-

The New Zealand Building Code (Clause G1 Personal Hygiene) requires that ‘appropriate and sufficient numbers’ of ‘sanitary fixtures’ (that is WC’s, urinals, handbasins) be provided for people in buildings. The Buildings Industry Authority publishes a document (G1/AS1) which gives tables of Acceptable Solutions (number and types of facilities) as a means of compliance with the requirement. The numbers in G1/AS1 had been copied from various pieces of legislation and other sources over the years, and were known to be often wildly inconsistent. In 1994 Works Consultancy Services (a state-owned engineering consultancy with a long tradition of excellent service, since sold to the private sector) was contracted to revise the G1/AS1 tables. They in turn approached me for help with data analysis and modelling the delays that various numbers of facilities would produce.

Most countries have some kind of standards like these, and there have been a number of attempts, usually based on queueing models, to put them on a scientific footing. We found reports from Canada, the UK, Australia, and the USA. A review of these showed that although there had been some good studies (see, for example, Davidson and Courtney (1976)), these either covered too few types of building or were not exhaustive enough to produce comprehensive standards. We also had a sneaking worry that toilet habits might vary from country to country, so it was decided to carry out a complete analysis for New Zealand.

Collecting and analysing the data

Data collection started in 1994. Works Consultancy staff collected data from thirteen types of buildings, including office buildings, schools, theatres, swimming pools and shopping plazas. 27 locations were surveyed, and multiple samples were collected from facilities that were expected to be particularly variable.

Most of the data was collected electronically, with arrival times measured by the time of cutting a pair of infrared beams. Occupancy times were measured either by magnetic switches on cubicle doors or infrared beams. Loggers normally used for rain-gauges were used to record the data. These were left in each location for at least three weeks. The result was a data set that far exceeds, in scope and scale, anything else we had seen. Gender ratios and total building occupancies had also to be measured to express the results in terms of the number of occupants. Where possible buildings with known numbers of occupants were used. Otherwise numbers were estimated by surveys. To ensure that at least the required performance criterion was met, average peak arrival rates (measured over 15-minute intervals) were used as inputs to the models. Employing peak rates also allowed for buildings where the arrivals were particularly ‘bursty’ - schools, theatres for example.

The models

The main performance criterion we were to use was that the 90th percentile of the waiting time distribution was to be no more than 60 seconds. It is not clear where this criterion came from - possibly a chance remark of mine during an early demonstration of queueing calculations. However by the time I returned to the project in 1996 it had become fixed in the contract. This was a little unfortunate, as although tail points of waiting time distributions are popular performance criteria, in contrast to mean waiting times for example, they are difficult to calculate theoretically except for queues where the arrivals occur as a Poisson process and the service or occupancy times are negative exponentially distributed.

In queueing theory models with these characteristics and C servers or facilities are known by the shorthand notation of ‘M/M/C’. Now while arrival processes did appear reasonably Poisson, at least over intervals where the arrival rate was constant, occupancy times were usually much less variable than negative exponential, with coefficients of variation between those of Erlang-2 and Erlang-3. So strictly a model of the M/G/C class, where the service time distribution can have any general form, was required. The one exception to this was urinal occupancy times, which were uncannily negative exponential!

There are very few easy theoretical results for M/G/C models, so my first approach was a simulation model (in GPSS/H). This was quite short - about 50 lines of program - and allowed occupancy times to be more accurately modelled than simply assuming that they were exponential. It also had the advantage that aspects like the use of WC's in substitution for urinals (by men) could also be modelled. The difficulties, as usual with simulation, were that: the results were highly variable; and it was difficult and very slow to use the simulation program in an inverse way - to find a level of input parameter (the arrival rate) that will produce a specified output (90th percentile of waiting time equal to 60 seconds). It was clear that hundreds of hours of simulation would be needed.

I had also given Works Consultancy a spreadsheet M/M/C model (Figure 1), which could calculate the 90th percentile of the waiting time for these models directly. The formulas for this can be found in any queueing book (Gross and Harris Section 2.3, for example). In particular the waiting time distribution has a specific exponential distribution, and so the 90th percentile can be found by taking logs of this. This can be seen as the currently active formula in cell C13. With a bit of tweaking the ‘Goal Seek’ tool in Excel would even solve for the mean interarrival time (cell C2) which will give a 90th percentile of the waiting-time distribution of exactly 60 seconds (C13). It should be noted that this is an early version of the spreadsheet. It was decided as a matter of policy that all users would wash their hands!


Figure 1: An early version of the spreadsheet queueing

The spreadsheet was intended simply to give starting values for the simulation, since it did not model the occupancy times well. However in spite of my reservations it was clear that Works Consultancy much preferred it to the simulation or some fancier queueing models that I had proposed. They had little experience of simulation, and any more accurate queueing model would have required a number of approximations and assumptions which would have been difficult for them to make by themselves. On the other hand they were familiar with spreadsheets and were using them for analysing the data. It seemed obvious to me that within the limits of the model the spreadsheet would actually produce more reliable results. So the next question I had to consider was: just how bad would the results of using M/M/C models be?

In most practical situations it is a reasonably safe rule of thumb that the less variable the service-time distribution is, the less congestion will occur. Because the occupancy times usually had smaller coefficients of variation than that of an exponential distribution, the M/M/C model could be expected to overestimate the waiting times. So tables from it would certainly meet the requirement that the 90th percentile was to be no more than 60 seconds. Another point in our favour is that waiting time distributions for multiple server models usually become less variable as the number of servers increases. The 90th percentile was less than one average occupancy time so I had hopes that the errors would be acceptably small. Checking the closest M/G/C tables in Seelen, Tijms and Van Hoorn (1984) showed that for the best approximations to the occupancy-time distributions the M/M/C model would typically overestimate the 90th percentile points by less than 10% over a reasonable range of arrival rates. Most importantly the degree of overestimate was reasonably uniform.

There now appeared to be limited value in using much more complex models to reduce the estimation error in a criterion that had been chosen arbitrarily in the first case. Taking the ease of use, reliability and accuracy of calculation into account I agreed with Works Consultancy that the M/M/C queueing model was the most appropriate model for most of the analysis. The simulation model was used as a further check on the accuracy of the spreadsheet and to consider the effect of some conjectures, such as the value of urinals.


Figure 2: Two of the WC Nomograms (after Stewart and Braddon-Parsons, 1996)

Results

After the initial joint work on the models Works Consultancy took over data analysis and production of all of the tables. Using the M/M/C model this went very smoothly. They extended and modified my spreadsheet model so that complete tables could be produced automatically. As well as revised G1/AS1 tables, the results were presented in the form of nomograms like those in Figure 2. These plot the number of facilities required in a building against the number of occupants. The old Drainage and Plumbing (D & P) Regulations for Men in Office buildings is a good example of how erratic the old tables had become. In many cases the old D & P Regulations also turned out to be very far from those which will meet the sixty-second criterion.

In general we found that the old D & P Regulations provided more than the required level of WC’s for males, and sometimes very much less than the required level for females, especially in theatres, cinemas, and sports stadiums. We had, of course, been given a large amount of anecdotal evidence about this latter problem during the course of the study!

The aim of this study was to provide more consistent and realistic standards. Simple queueing models proved to be quite adequate for this. In particular I think the simple model produced results which met the aim rather better than the more complex models would have done, with fewer errors and certainly at much lower cost. Errors in modelling can occur either because the model does not fit the real situation adequately, or because it is used incorrectly. Here we could trade off a very modest improvement in fit with a more complex model against a considerable improvement in ease of use and reliability if we stuck with the simpler model. Because my clients understood the simple model well the chance of errors in their use of it was minimized.

We were not really expected to optimize the number of toilets, so any cost savings which the new standards will produce was very much a secondary consideration. In any case it is difficult to estimate likely actual differences in cost between the old and the new standards because we don’t know the extent to which architects will choose to exceed the new standards. (They apparently almost completely ignored the old D & P Regulations.) However, a preliminary cost/benefit analysis reported in Stewart (1994) suggested that the difference in cost between the old and the new standards would result in savings with net present value of some $82,000,000, largely due to savings in commercial office space. For a country of some 3.7 million people that is a reasonable sum that can be saved by simply getting the regulations right.

Acknowledgement

Sharon Braddon-Parsons and Wayne Stewart, of Works Consultancy Services, did all the really hard work on this project. Their reports (nearly 300 pages long), listed in the references cover many other interesting aspects of the problem.

For the interested reader

  • Davidson P J and Courtney R G (1976) A study of the use of cloakrooms in office buildings, Op. Res. Quart. 27, 789-800.
  • Gross D and Harris C M (1998) Fundamentals of Queueing Theory (Third Edition), John Wiley, New York.
  • Seelen L H C, Tijms H and Van Hoorn M H (1984) Tables for multi-server queues, Elsevier, Amsterdam.
  • Stewart W (1994) Review of Sanitary Facilities for the Buildings Industry Authority, Works Environmental Management, Wellington, New Zealand.
  • Stewart W and Braddon-Parsons S (1996), Review of Sanitary Facilities Part 2 for the Buildings Industry Authority, Works Consultancy Services, Wellington, New Zealand.

Programs or spreadsheets that will calculate the operating characteristics of simple queueing models are often bundled with OR texts. The latest edition of Gross and Harris gives a reference to an ftp site (ftp://ftp.wiley.com/public/sci_tech_med/queueing_theory/) from which spreadsheets appropriate to that book can be downloaded.

DON McNICKLE is a senior lecturer in Management Science in the Department of Management, University of Canterbury, Christchurch, New Zealand. His research interests include queueing theory, and statistical aspects of simulation.

First published to members of the Operational Research Society in OR Insight April - June 1998