This project implements a timetable generation system for university courses using a genetic algorithm. It efficiently creates schedules while adhering to various constraints, optimizing for factors such as professor availability, room capacity, and course timing preferences.
- Automated generation of university course timetables
- Consideration of multiple constraints:
- Professor availability
- Room capacity and type (classroom/lab)
- Course timing preferences
- Section-specific requirements
- Genetic algorithm implementation for optimization
- Conflict resolution for overlapping schedules
- Printable timetable output
- Python 3.x
- PrettyTable library for formatted output
- Ensure you have Python 3.x installed on your system.
- Clone this repository:
git clone https://github.com/your-username/timetable-generator-genetic-algorithm.git - Navigate to the project directory:
cd timetable-generator-genetic-algorithm - Install required dependencies:
pip install prettytable
- Run the main script:
python timetable_generator.py - The program will generate a timetable based on the predefined constraints and courses.
- The best timetable will be displayed in the console.
- Initial Population Generation: Creates a set of random timetables.
- Fitness Evaluation: Assesses each timetable for conflicts and constraint violations.
- Selection: Chooses the best timetables for reproduction.
- Crossover: Combines features from two parent timetables.
- Mutation: Introduces random changes to maintain diversity.
- Iteration: Repeats the process until a satisfactory timetable is found.
You can customize the timetable generation by modifying the following in the timetable_generator.py file:
courses: Add or modify course detailssections: Adjust section informationprofessors: Update professor availabilityrooms: Change room capacities and types- Constraints: Modify the fitness function to add or adjust constraints
- GUI for easier input of courses, professors, and rooms
- Export functionality for generated timetables (e.g., CSV, PDF)
- Integration with university management systems
- Performance optimization for larger datasets
Contributions to improve the timetable generator are welcome. Please feel free to submit a pull request or open an issue for discussion.
Ahmed Abd-ur-Rahman - i210404@nu.edu.pk
Project Link: https://github.com/Asquarer02/Timtable-using-Genetic-Algorithm