Commit 43a3b119 by Prayush Kumar

Update README

parent 74292b78
Showing with 114 additions and 114 deletions
# ICTS Housing Cell - Allocation Logic & Policy Documentation (2026)
This document details the housing allotment rules, priority pooling policies, preference processing algorithms, and lottery mechanism used by the ICTS Housing Cell for allocating campus housing to **Postdoctoral Fellows (PDFs)** and **Graduate Students (PhD / Int-PhD)**.
---
## 1. Overview & Allotment Workflow
The housing allocation process automates the distribution of limited hostel rooms and campus apartments based on:
1. **Applicant Group**: Postdoctoral Fellows vs. Graduate Students.
2. **Priority Pools**: Institutional policy rules prioritizing medical needs, dependents, gender, and academic seniority.
3. **Preference Vectors**: Applicant choices ranked from 1 (most preferred) downwards.
4. **Lottery Tie-Breaking**: Pseudo-random shuffling within each priority pool using a fixed RNG seed for reproducibility.
5. **Sequential Greedy Allocation**: Candidate-by-candidate allocation in lottery rank order, assigning their highest-ranked available accommodation.
---
## 2. Accommodation Types & Mapping
### Postdoctoral Fellows (Index 0 – 7)
| Index | Accommodation Category | Description & Eligibility |
| :---: | :--- | :--- |
| `0` | On campus Studios | Studio apartments on campus |
| `1` | Hostel 1 non-1BHK | Shared 2BHK apartment in Hostel 1 |
| `2` | Hostel 2 | Shared 2BHK apartment in Hostel 2 |
| `3` | Hostel 3 | Single occupancy room in Hostel 3 |
| `4` | Hostel 4 | Single occupancy room in Hostel 4 |
| `5` | Hostel 5 | Single occupancy room in Hostel 5 |
| `6` | On campus 1BHK | 1BHK apartment on campus (Family / Married only) |
| `7` | Hostel 1 1BHK | 1BHK apartment in Hostel 1 (Family / Married only) |
### Graduate Students (Index 0 – 8)
| Index | Accommodation Category | Description & Eligibility |
| :---: | :--- | :--- |
| `0` | On campus (3BHK sharing) | Shared 3BHK apartment on campus |
| `1` | Hostel 1 non-1BHK | Shared 2BHK apartment in Hostel 1 |
| `2` | Hostel 2 | Shared 2BHK apartment in Hostel 2 (Master/non-master) |
| `3` | Hostel 3 | Single room in Hostel 3 |
| `4` | Hostel 4 | Single room in Hostel 4 |
| `5` | Hostel 5 | Single room in Hostel 5 |
| `6` | On campus 1BHK | Restricted / PDF priority |
| `7` | Hostel 1 1BHK | Restricted / PDF priority |
| `8` | On campus Studios | Restricted / PDF priority |
---
## 3. Preference Parsing & Order Construction
Google Form responses collect numerical ranks for each option (e.g. `1` for top choice, `2` for second, etc.).
- **Unranked Options**: Represented as `NaN` or `99`.
- **Conversion to Preference Vector**:
1. The raw rank list `[r_0, r_1, ..., r_N]` is converted into an ordered list of accommodation indices `[pref_0, pref_1, ...]`.
2. Choices with lower numerical ranks appear earlier in the preference vector.
3. Tied or repeated ranks are ordered deterministically in reverse column order.
4. Unranked choices (rank `99`) are appended at the end of the candidate's preference vector.
---
## 4. Priority Pool Rules
Applicants are grouped into priority pools. Allocations are executed pool by pool in numerical order (Pool 1 gets highest priority, followed by Pool 2, Pool 3, etc.).
### A. Postdoctoral Fellows Priority Pools (Pools 1 to 5)
1. **Pool 1 (Highest Priority - Medical & Disability Family)**:
- Must prefer Family accommodation (`student_or_postdoc == "postdoc_family"`).
- Must have a registered medical/disability condition (`disability_check == 1`).
- Must have at least 1 dependent (`num_dependents > 0`).
2. **Pool 2 (High Family Priority)**:
- Family postdocs with `num_dependents > 2`, OR
- Female family postdocs with `num_dependents >= 2`.
3. **Pool 3 (Family with 2+ Dependents)**:
- Family postdocs with `num_dependents >= 2`.
4. **Pool 4 (Family with 1 Dependent)**:
- Family postdocs with `num_dependents == 1`.
5. **Pool 5 (General Postdocs)**:
- All single postdocs and remaining family postdocs not meeting higher pool criteria.
### B. Graduate Students Priority Pools (Pools 1 to 3)
*Note on Academic Year*: Before the start of the new session in July, student academic years are normalized (e.g. 1st year incoming is year 1).
1. **Pool 1 (Highest Priority - 1st Year Female Students)**:
- Female graduate students entering or in 1st year (`female == 1` AND `year == 1`).
2. **Pool 2 (1st Year Male & Senior PhD Students)**:
- 1st year male students (`year == 1`), OR
- Senior PhD students: PhD year $\ge 5$ OR Int-PhD year $\ge 6$.
3. **Pool 3 (General Graduate Students)**:
- All other registered graduate students (2nd, 3rd, 4th year PhD; 2nd, 3rd, 4th, 5th year Int-PhD).
---
## 5. Lottery & Allocation Algorithm
1. **Random Seed Initialization**:
- A random seed is configured (e.g., standard noon timestamp `datetime(2026, 6, 7, 12, 0, 0)`).
2. **Sequential Pool Execution**:
- For each pool ID in `[1, 2, ...]`:
- **Shuffle Candidates**: Randomize candidate order within the pool using `random.shuffle(pool_candidates)`.
- **Greedy Allocation**: For each candidate in shuffled order:
- Iterate through candidate's preference vector `[pref_0, pref_1, ...]`.
- Assign the first housing category `pref_i` with `remaining_availability[pref_i] > 0`.
- Decrement `remaining_availability[pref_i]` by 1.
- If all preferred housing options are exhausted (capacity 0), the candidate remains unallocated.
3. **Output Generation**:
- Output contains participant name, email, priority pool ID, allocated housing option ID, allocated housing option name, and preference rank satisfied.
# ICTS Housing Cell - Allocation Logic & Policy Documentation (2026)
This document details the housing allotment rules, priority pooling policies, preference processing algorithms, and lottery mechanism used by the ICTS Housing Cell for allocating campus housing to **Postdoctoral Fellows (PDFs)** and **Graduate Students (PhD / Int-PhD)**.
---
## 1. Overview & Allotment Workflow
The housing allocation process automates the distribution of limited hostel rooms and campus apartments based on:
1. **Applicant Group**: Postdoctoral Fellows vs. Graduate Students.
2. **Priority Pools**: Institutional policy rules prioritizing medical needs, dependents, gender, and academic seniority.
3. **Preference Vectors**: Applicant choices ranked from 1 (most preferred) downwards.
4. **Lottery Tie-Breaking**: Pseudo-random shuffling within each priority pool using a fixed RNG seed for reproducibility.
5. **Sequential Greedy Allocation**: Candidate-by-candidate allocation in lottery rank order, assigning their highest-ranked available accommodation.
---
## 2. Accommodation Types & Mapping
### Postdoctoral Fellows (Index 0 – 7)
| Index | Accommodation Category | Description & Eligibility |
| :---: | :--- | :--- |
| `0` | On campus Studios | Studio apartments on campus |
| `1` | Hostel 1 non-1BHK | Shared 2BHK apartment in Hostel 1 |
| `2` | Hostel 2 | Shared 2BHK apartment in Hostel 2 |
| `3` | Hostel 3 | Single occupancy room in Hostel 3 |
| `4` | Hostel 4 | Single occupancy room in Hostel 4 |
| `5` | Hostel 5 | Single occupancy room in Hostel 5 |
| `6` | On campus 1BHK | 1BHK apartment on campus (Family / Married only) |
| `7` | Hostel 1 1BHK | 1BHK apartment in Hostel 1 (Family / Married only) |
### Graduate Students (Index 0 – 8)
| Index | Accommodation Category | Description & Eligibility |
| :---: | :--- | :--- |
| `0` | On campus (3BHK sharing) | Shared 3BHK apartment on campus |
| `1` | Hostel 1 non-1BHK | Shared 2BHK apartment in Hostel 1 |
| `2` | Hostel 2 | Shared 2BHK apartment in Hostel 2 (Master/non-master) |
| `3` | Hostel 3 | Single room in Hostel 3 |
| `4` | Hostel 4 | Single room in Hostel 4 |
| `5` | Hostel 5 | Single room in Hostel 5 |
| `6` | On campus 1BHK | Restricted / PDF priority |
| `7` | Hostel 1 1BHK | Restricted / PDF priority |
| `8` | On campus Studios | Restricted / PDF priority |
---
## 3. Preference Parsing & Order Construction
Google Form responses collect numerical ranks for each option (e.g. `1` for top choice, `2` for second, etc.).
- **Unranked Options**: Represented as `NaN` or `99`.
- **Conversion to Preference Vector**:
1. The raw rank list `[r_0, r_1, ..., r_N]` is converted into an ordered list of accommodation indices `[pref_0, pref_1, ...]`.
2. Choices with lower numerical ranks appear earlier in the preference vector.
3. Tied or repeated ranks are ordered deterministically in reverse column order.
4. Unranked choices (rank `99`) are appended at the end of the candidate's preference vector.
---
## 4. Priority Pool Rules
Applicants are grouped into priority pools. Allocations are executed pool by pool in numerical order (Pool 1 gets highest priority, followed by Pool 2, Pool 3, etc.).
### A. Postdoctoral Fellows Priority Pools (Pools 1 to 5)
1. **Pool 1 (Highest Priority - Medical & Disability Family)**:
- Must prefer Family accommodation (`student_or_postdoc == "postdoc_family"`).
- Must have a registered medical/disability condition (`disability_check == 1`).
- Must have at least 1 dependent (`num_dependents > 0`).
2. **Pool 2 (High Family Priority)**:
- Family postdocs with `num_dependents > 2`, OR
- Female family postdocs with `num_dependents >= 2`.
3. **Pool 3 (Family with 2+ Dependents)**:
- Family postdocs with `num_dependents >= 2`.
4. **Pool 4 (Family with 1 Dependent)**:
- Family postdocs with `num_dependents == 1`.
5. **Pool 5 (General Postdocs)**:
- All single postdocs and remaining family postdocs not meeting higher pool criteria.
### B. Graduate Students Priority Pools (Pools 1 to 3)
*Note on Academic Year*: Before the start of the new session in July, student academic years are normalized (e.g. 1st year incoming is year 1).
1. **Pool 1 (Highest Priority - 1st Year Female Students)**:
- Female graduate students entering or in 1st year (`female == 1` AND `year == 1`).
2. **Pool 2 (1st Year Male & Senior PhD Students)**:
- 1st year male students (`year == 1`), OR
- Senior PhD students: PhD year $\ge 5$ OR Int-PhD year $\ge 6$.
3. **Pool 3 (General Graduate Students)**:
- All other registered graduate students (2nd, 3rd, 4th year PhD; 2nd, 3rd, 4th, 5th year Int-PhD).
---
## 5. Lottery & Allocation Algorithm
1. **Random Seed Initialization**:
- A random seed is configured (e.g., standard noon timestamp `datetime(2026, 6, 7, 12, 0, 0)`).
2. **Sequential Pool Execution**:
- For each pool ID in `[1, 2, ...]`:
- **Shuffle Candidates**: Randomize candidate order within the pool using `random.shuffle(pool_candidates)`.
- **Greedy Allocation**: For each candidate in shuffled order:
- Iterate through candidate's preference vector `[pref_0, pref_1, ...]`.
- Assign the first housing category `pref_i` with `remaining_availability[pref_i] > 0`.
- Decrement `remaining_availability[pref_i]` by 1.
- If all preferred housing options are exhausted (capacity 0), the candidate remains unallocated.
3. **Output Generation**:
- Output contains participant name, email, priority pool ID, allocated housing option ID, allocated housing option name, and preference rank satisfied.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment