Conventional tools people use to find appointments usually base their decision on the most popularly selected timeslot. However, sometimes what you really want is a set of appointments, perhaps because you have a collection of people that you would like to distribute over sessions with limited capacities. Intuitively, you could start with the most popular session and keep appointing the remaining people to the most popular selection among that subset. In our paper we show why this intuitive strategy many researchers are likely using to solve this problem (that we named Maximax) can easily be improved upon (our solution: Minimax).
Using smarter strategies for appointing people to sessions where a set of sessions is sought would likely significantly improve attendance by offering a preferred appointment to more people. Thus, algorithms like the one we present could create significant value for group-based research studies or any other type of group appointment. These algorithms are broadly applicable to any scenario where one has a sample of people who have indicated their availabilites for a pre-determined set of appointments, from which the researcher wants to find the set that will best meet their goals.
Step 1A: If you are just looking to see the algorithms in action, all you have to do is generate the data in the top left section. You can choose your own constraints, by setting how large the sample is, how many slots people are choosing from, and what capacities the appointments have. The seed value merely makes the exact set of data you generated reproducable; if you leave it blank a random number will be chosen for you.
Step 1B: If you instead want to use the algorithms on your own data, you will have to make sure it has the right format, and upload it in the top right section. The data will have to be in a .csv. The first column (with a header) should indicate the participant ID (integer). The second column (also with a header) should indicate the selections each participant made. Selections need to be a string of comma-separated integers (indexed from 1), so for example "1,2,3", where these integers represent a specific appointment in your set of appointments. The column names matter, the first column must be called "Subjects", and the second "Selections". If there are duplicate ID's, misnamed columns, or problems with the formatting of the selections, the app will likely refuse you service and may tell you why at the bottom of the page. You will also have to specify what the capacity limits of your appointments are.
Confused about step 1B? See the guide; https://lukmayer.github.io/sets_app_guide/
Step 2: With the data in place (and visible in the data viewer section), you should now be ready to use the buttons in the middle of the page. Here you can apply the algorithms, view the results, and download the solution each algorithm offered. In the downloaded files, a "0" in the solution column indicates that the person in question was not allocated to any appointment by the algorithm.
Should you want to compute with another set of data, or tweak the parameters, you will have to reset the app by using the (red) Reset App button.
For more information on the algorithms and metrics, see the About the Method section.
If you run into bugs or have any questions, you can contact me at willuk [at] vivaldi [dot] net.
The algorithms themselves are incredibly simple. Maximax takes the people who have not been assigned to a slot yet, measures which slot is most popular among them, checks how many people selected that popular slot, and allocates as many people as the slot capacity allows to that slot (of those who selected it). This is repeated until everyone has been assigned to a session. Minimax has the same process as Maximax, with the only difference being that it does not allocate to the most popular appointment. Instead, it allocates to the appointment that is closest in popularity to the minimum attendance requirement of timeslots. The appointment capacity constraints are only enforced after this allocation cycle has completed, meaning that before this step, appointments can be overfilled if there was no room otherwise. During constraint enforcement, people that overfill or underfill slots are unassigned until constraints are met (this is what you can download). For more details see the OSF repository linked in the paper (python). Alternatively, if you can read JavaScript, you can look at the source code of this webapp.
The metrics we focus on are also easy to understand. Both MiSR and MaSR compute how well a solution fits to the theoretically optimal solution. A score of 1 is thus considered equivalent to the optimal solution, while a score of 0 indicates failure to make sensible allocations. The two metrics differ in what they consider to be the theoretical optimal. MiSR is interested in minimizing the number of appointments while maximizing the number of attendees. This makes sense to use where for example, running appointments is expensive. MaSR is interested in maximizing the number of viable appointments and attendees. This makes sense to use whenever you want to have as many unique groups as possible, for example for statistical reasons. For details on the mathematics of these metrics, please have a look at our paper.