An algorithmic optimization engine for complex institutional seating arrangements.
OptiSeat is a high-performance Python application designed to solve the "combinatorial bottleneck" of exam and classroom seating. It replaces manual, error-prone processes with a deterministic allocation algorithm that ensures optimal resource utilization while maintaining strict academic integrity constraints.
OptiSeat doesn't just "place students in rooms." It employs a multi-pass allocation logic that handles:
- Relational Constraints: Links students, subjects, sections, and room capacities via a structured SQLite schema.
- Dynamic Capacity Management: Handles variable bench counts and student-per-bench densities.
- Sequential Integrity: Automatically detects and optimizes for sequential roll numbers to simplify post-allocation logistics.
- Multi-Date Orchestration: Processes multiple exam dates and subject pairs in a single execution loop.
- Automated Seat Allocation: Greedy-based optimization for filling rooms based on subject and section priority.
- Relational Data Engine: Powered by SQLite for robust, local-first data persistence.
- Post-Processing Intelligence: Converts raw allocation data into "Instruction Sets" (Range-based or Array-based) for easier implementation by invigilators.
- Streamlit GUI: A modern, reactive interface for data input and visualization.
- Sequence Detection: Identifies continuous roll number blocks (
isSeqlogic) to reduce the complexity of seating charts.
- Language: Python 3.10+
- Frontend: Streamlit
- Database: SQLite3
- Data Analysis: Pandas
- Serialization: Pickle for fast binary state recovery.
-
Clone the repository:
git clone https://github.com/XotEmBotZ/OptiSeat.git cd OptiSeat -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
The core engine iterates through distinct dates and subject pairings. It maintains a stateful studLst and fills rooms sequentially while validating against numBench and benchStud constraints. If a room cannot accommodate the required density, the algorithm raises an AssertionError, ensuring no "overflow" or illegal seating occurs.
Perfect for schools, colleges, and competitive exam centers that need to generate high-integrity seating plans for 1000+ students across multiple rooms and subjects in seconds.