An intelligent constraint optimization solution that eliminates scheduling conflicts while balancing student preferences, teacher availability, and room capacity.
- ** Eliminates 50+ scheduling conflicts** through intelligent constraint optimization
- ** Balances multiple constraints** simultaneously (teacher availability, room capacity, class preferences)
- ** Interactive visualizations** with Plotly-powered schedule charts
- ** Professional exports** to CSV and Excel with color-coded formatting
- ** Real-time conflict detection** and resolution suggestions
This system implements a sophisticated constraint satisfaction algorithm that optimizes educational timetables by considering:
- Teacher Availability: Prevents double-booking of instructors
- Room Capacity: Ensures adequate space for class sizes
- Class Schedules: Avoids student conflicts across courses
- Course Frequency: Meets weekly session requirements (1-5x per week)
- Time Slot Management: Handles breaks, lunch periods, and duration preferences
- Priority-based scheduling: High-frequency courses get priority placement
- Randomized assignment: Ensures variety in schedule generation
- Conflict detection: Multi-layer validation system
- Capacity matching: Intelligent room-to-class size pairing
Educational institutions face complex scheduling challenges:
- Manual scheduling takes weeks and often results in conflicts
- Resource conflicts between teachers, rooms, and time slots
- Frequency requirements for different subjects (daily vs. weekly)
- Capacity constraints matching room sizes to class enrollment
- Export needs for administration and distribution
Our solution automates this process, reducing scheduling time from weeks to minutes while eliminating human error.
| Component | Technology | Purpose |
|---|---|---|
| Frontend | Streamlit | Interactive web interface |
| Optimization | Custom Python Algorithm | Constraint satisfaction solver |
| Visualization | Plotly | Interactive schedule charts |
| Data Processing | Pandas + NumPy | Data manipulation and analysis |
| Export | XlsxWriter | Professional Excel formatting |
| State Management | Streamlit Session State | Real-time data persistence |
- Teacher Management: Add instructors with subject specializations
- Room Management: Configure spaces with capacity limits
- Class Management: Set up student groups with enrollment numbers
- Course Management: Define subjects with frequency requirements
- Constraint Optimization: Simultaneous multi-constraint satisfaction
- Conflict Prevention: Proactive validation before assignment
- Frequency Balancing: Distributes sessions across the week
- Room Optimization: Matches class sizes to room capacities
- Multiple Views: Class, teacher, and room perspectives
- Interactive Charts: Hover details and color-coded subjects
- Conflict Reports: Detailed analysis of scheduling issues
- Schedule Summaries: Quick overview statistics
- CSV Export: Simple data format for external tools
- Excel Export: Color-coded, formatted spreadsheets
- Multiple Sheets: Separate views in single workbook
- Print-Ready: Professional formatting for distribution
# Clone the repository
git clone <repository-url>
cd class-scheduling-system
# Install dependencies
pip install -r requirements.txt# Start the Streamlit server
streamlit run app.pyThe application will open in your browser at http://localhost:8501
Load the included sample dataset to explore features:
- 9 teachers across different subjects
- 8 rooms with varying capacities
- 4 classes with realistic enrollment
- Multiple courses with different frequency requirements
- Add teachers with their subject specializations
- Configure rooms with capacity information
- Set up classes with student counts
- Define courses with frequency requirements
- Configure time slots and break periods
- Set lunch periods and duration
- Run the optimization algorithm
- Review conflict reports
- Switch between class, teacher, and room views
- Explore interactive visualizations
- Analyze schedule distribution and conflicts
- Download CSV for data analysis
- Export formatted Excel for distribution
- Print-ready professional layouts
- Priority Sorting: Courses sorted by frequency (high to low)
- Iterative Assignment: Each session placed using availability checks
- Multi-layer Validation: Teacher, room, and class conflict detection
- Randomized Placement: Ensures schedule variety across generations
- Conflict Reporting: Detailed analysis of unresolved constraints
- Greedy Assignment: Priority-based slot allocation
- Backtracking Prevention: Smart conflict avoidance
- Resource Matching: Capacity-aware room assignment
- Frequency Distribution: Even spacing of recurring sessions
With the included sample data, the system successfully:
- Schedules 36+ course sessions across 4 classes
- Manages 9 teachers without conflicts
- Utilizes 8 rooms efficiently
- Maintains zero scheduling conflicts
- Generates schedules in under 5 seconds
We welcome contributions! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Streamlit for rapid web app development
- Visualizations powered by Plotly
- Data processing with Pandas
Ready to eliminate scheduling conflicts? Get started now and experience intelligent timetable generation!