Name: toilet Version: 0.0.2 License: GPL License-File: LICENSE Author: Henning Thielemann Maintainer: Henning Thielemann Homepage: http://code.henning-thielemann.de/toilet/ Category: Console Synopsis: Manage the toilet queue at the IMO Description: 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 Stability: Experimental Tested-With: GHC==6.8.2 Cabal-Version: >=1.10 Build-Type: Simple Source-Repository head Type: darcs Location: http://code.henning-thielemann.de/toilet/ Source-Repository this Tag: 0.0.2 Type: darcs Location: http://code.henning-thielemann.de/toilet/ Executable toilet Build-Depends: utility-ht >=0.0.1 && <0.1, strict >=0.3.2 && <0.5, time >=1.5 && <1.13, transformers >=0.2 && <0.7, containers >=0.1 && <0.7, base >=3 && <5 Default-Language: Haskell98 GHC-Options: -Wall -threaded Hs-Source-Dirs: src Main-Is: Main.hs