https://github.com/conorwilliams/ballot

Code for the Churchill MCR postgraduate-rooms ballot

https://github.com/conorwilliams/ballot

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Code for the Churchill MCR postgraduate-rooms ballot

Basic Info
  • Host: GitHub
  • Owner: ConorWilliams
  • License: mpl-2.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 336 KB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • Open Issues: 2
  • Releases: 3
Created over 5 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License

README.md



MCR Room Ballot

Welcome to the Churchill MCR postgraduate-room-ballot code, please read on to find out how to:

  1. Run the ballot code if you are the computing officer this year.
  2. Verify that the room ballot was run honestly!

Installation

To build the codebase you will need a c++ compiler supporting c++20, git, make, and a version of cmake greater than or equal to 3.14. Then follow the standard procedure:

zsh git clone https://github.com/ConorWilliams/ballot cd ballot mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. make

You will now have your very own copy of the ballot executable!

Alternatively 64-bit Linux binaries are provided with each release.

Running the ballot

First up you're your going to need a csv file containing everyone's room preferences see example/example.csv to get an idea of the expected format. Now compile the program, navigate to example/ and run the ballot like:

../build/ballot run example.csv

This will generate two files public_ballot.json and secret_ballot.csv. The first can be distributed and used by members of the MCR to anonymously verify the ballot was run fairly. The second contains the room assignments and some additional info. You should email each student their result, "id" and "secretname" (last three fields in `secretballot.csv` respectively).

If you would like to encourage particular rooms to fill up (e.g. the hostels) then you can pass in a list of prefixes, for example:

../build/ballot run example.csv -h RR CJ

would preferentially fill all rooms beginning with the letters "RR" or "CJ".

Finally you can control the total number of allocated rooms using the -m or --max-rooms options.

Verifying the ballot

To verify the MCR computing officer hasn't fiddled your position you need a copy of the public_ballot.json file they generated, your "id" and "secret_name" which you should have received securely. Now run:

./ballot verify YOUR_ID YOUR_SECRET_NAME

where you can supply the optional flag -i /path/to/public_ballot.json to specify the location of the public ballot file if it is not in your current working directory.

Details about the ballot

The ballot code formulates the task as solving the balanced linear assignment problem. We define a cost function which assigns a value to allocating any student to any room. The student-room pairs are then permuted until the global minimum of the cost function (value summed over all pair) is found. This is done using the Jonker-Volgenant algorithm.

In order to allow the possibility that all students get kicked off the ballot the list of rooms is augmented with p (the number of people) "kicked-rooms". To ensure balanced assignment, preference-free null-people are appended to the list of people.

If the total number of allocated rooms needs to be limited the lowest priority students are removed from the ballot.

The cost function

In summary, the cost function prioritises people getting their first choices but prefers kicking people off the ballot to assigning them to a room they didn't want. Finally, the cost function ensures all houses designated as "hostels" are preferentially filled.

Owner

  • Name: Conor Williams
  • Login: ConorWilliams
  • Kind: user
  • Company: myrtle.ai

PhD Physicist & Computer-Scientist. Open source enthusiast!

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 70
  • Total Committers: 1
  • Avg Commits per committer: 70.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
ConorWilliams c****s@o****m 70

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 2
  • Total pull requests: 1
  • Average time to close issues: about 24 hours
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ConorWilliams (2)
Pull Request Authors
  • imgbot[bot] (1)
Top Labels
Issue Labels
enhancement (1) good first issue (1)
Pull Request Labels