Thursday, November 26, 2009

Public toilet capacity analysis

Often you will see a longer queue in front of a female public toilet than its male counterpart. Putting the toilets as server and the users as job, this is a typical FIFO (i.e. first-come-first-serve) server-scheduling problem. Provided that we cannot perform load-balancing (i.e. female users claim male toilet for their use) and we cannot preempt job (i.e. drive anyone out of the toilet during his/her use), the solution is to redesign the capacity of the servers to cope with the estimated job incoming rate.

The model looks like the following. Let's assume there are two urinal pots and two loos in the male toilet; 3 loos in the female one. To execute a urine/poop job, male need 1.5 minutes and 5 minutes respectively; female need 2.5 minutes and 5 minutes respectively. Finally, let's assume that the incoming rate of jobs are on average 4 urinal and 1 poop per time frame for both. This is summarized in the table below.

For male server, it is 5 minutes of execution in both the worst and the best case. For female server, the optimal scheduling yields 5 minutes of execution time (with probability 3x4!/5! = 60%), and the worst case could be 7.5 minutes (with probability 40%). Therefore, on average, the execution time for female is 6 minutes.

How the situation is improved if there is one more loo in the female toilet? The average execution time will be 5.5 minutes. The disparity will be total closed if there are 5 loos in the female toilet.

Further discussion. In reality, there are other causes for female to go to public rest room, for example, fixing makeup, changing sanitary, gossip, etc. They are not taken into consideration here. But those factors are definitely going to affect the capacity of the servers.






ServerMF
Resource2U + 2L 3L
Execution time(1.5M, 5M) (2.5M, 5M)
Incoming rate 4U + 1L 4U + 1L

1 comment: