Roommate Matching Application

I am building an application designed to help generate roommates based on student responses.

There are 20 students, each of whom completes a form indicating five other students with whom they would like to be roommates. The sheet that collects their responses will then be used to generate roommates (assign students to a specific room), taking into account their preferences.

This is the column structure:

Screenshot 2024-03-20 at 11.19.58โ€ฏAM.png

Can I somehow implement the matching logic directly within AppSheet?

0 7 162
7 REPLIES 7

First, write down your logic on a paper in plain English. Once you do it, you'll surely be able to implement it. 

Sure, here is a scenario: 

Is there a method I can implement a method/logic to assign students to rooms (Column J), considering their preferences (Columns E - I)?

1.png

If you are looking for the logic itself or a ready-made method to this task, I'm sorry I don't know any. Perhaps others can point you to a sample app or share with you similar experiences.

What I was saying is that if you have your own logic/method and manage to do it manually once on paper, the community will surely be able to help you with its implementation in AppSheet.

Ok, how about this: 


1. Everyone proposes to their favorite (Choice 1).
2. Proposal recipients then pick their best proposer and reject the rest.
3. Those who got rejected keep proposing until accepted.

If someone gets rejected by everyone else, then the algorithm terminates and reports that no stable matching exists.

Can this be accomplished in AppSheet?

Certainly. AppSheet is perfect for complex flows involving user interactions. 

Ok, can you help with the initial steps and formulas? 

 

It would rather be more about automation than formulas. For this purpose I'd think about having something similar to an approval workflow, where there would be several cycles of requests from students to join the class of another recipient classmate, then the recipient might accept or decline each of the incoming requests up to a certain number which corresponds to the number of students in the group/class.

From your initial "Choices" table, I'd use automation to add lines to another "Requests" table comprising columns like Sender, Recipient, Priority and Status (pending/approved/declined) to track requests. 

Another automation would then analyse the "Requests" table and fill in students into the relevant groups, taking into account factors like priorities, whether there are mutual requests and the groups' size.

This guide and its video tutorial is very useful in showing you how to build such an approval process: Build an Approval Workflow App Using AppSheet

Top Labels in this Space