toilet: Manage the toilet queue at the IMO

[ console, program ] [ Propose Tags ] [ Report a vulnerability ]

At the examinations on 2009-07-15 and 2009-07-16 of International Mathematic Olympics 2009 in Bremen we had the following problem: There are about 100 teams, each from a different country and containing at most 6 pupils. We wanted to make sure that of each country only one pupil is at the toilet at one time. This is, since we expect, that pupils from the same country may exchange information in order to push their country in the inofficial country ranking. We also expect that pupils don't exchange information across countries, since the countries are competitors.

On the first day we handled that problem manually. First we started with one person who registered pupils going to and coming from toilet. When it became crowded at toilet, two people were required for the registration. Eventually we were four people who are busy with that task. We divided the range of countries alphabetically into 4 ranges of 25 countries and had one desk for each country. However, it remained tedious: Guiding pupils to the desk for their country, looking up countries and times, when one list became full, looking up, in which of two lists one should enter the time.

So I developed a computer program that managed this task on the second day. The program prompts you for identifiers of team members. If the entered identifier belongs to a pupil, who is already on toilet, then it is checked out. If the identifier belongs to a different member of the same team/country, then the program alerts the user, that this is not possible. In this case the pupil must wait until his team mate leaves the toilet. If no team mate of the pupil is on toilet he is checked in to toilet. Additionally all actions are written to a log file. In order to be able to interrupt and restart the program this logfile is also used to initialize the toilet plan on program startup.

I needed about 3 hours to develop that program and since only one person was needed to register people, it saved 3 persons times 4.5 hours. So the gain was about 10 hours. If you think, that one person with one computer is too slow, you can still divide the range of countries, let work more people on separate machines in parallel.

Here are the avaible commands explained for some examples:

  • ger3 - register or unregister German team member for toilet

  • ger - show who of the German team is on toilet

  • list - show all pupils on toilet, this is sometimes needed in order to resolve misspellings

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.2.1
Dependencies base (>=3 && <5), containers (>=0.1 && <0.8), strict (>=0.3.2 && <0.6), time (>=1.5 && <1.14), transformers (>=0.2 && <0.7), utility-ht (>=0.0.1 && <0.1) [details]
Tested with ghc ==6.8.2
License LicenseRef-GPL
Author Henning Thielemann <haskell@henning-thielemann.de>
Maintainer Henning Thielemann <haskell@henning-thielemann.de>
Category Console
Home page http://code.henning-thielemann.de/toilet/
Source repo head: darcs get http://code.henning-thielemann.de/toilet/
this: darcs get http://code.henning-thielemann.de/toilet/ --tag 0.0.2.1
Uploaded by HenningThielemann at 2023-12-22T17:50:17Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables toilet
Downloads 1384 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2023-12-22 [all 1 reports]