From year to year, students and teachers face the problem of Assignments Scheduling. Overlapping assignments may cause such problems as burnout, underestimated results, and unwanted but inevitable deadline extensions. Therefore, our team decided to try to solve this issue with the help of Nature Inspired Computing.
input_handling- contains the code for reading the input datatests- contains the tests for the input dataassignment.py- contains the code for the Assignment classschedule.py- contains the code for the Schedule classgenetic_algorithm.py- contains the code for the generic Genetic Algorithmdomain_to_ga.py- contains the code for converting our domain to the GA domainenvironment.py- contains the configuration of the projectexperiments.py- contains the code for visualization of the solutionsrequirements.txt- contains the list of all the dependencies
The input data is represented as json file with the list of assignments, each described with:
name: str- the name of the assignmentstart_date: date- the date when the assignment can be startedend_date: date- the date when the assignment should be finishedhours_to_complete: int- the number of hours needed to complete the assignmentinclude_weekends: bool- whether the assignment can be done on weekends
Constraints:
start_date<end_datehours_to_complete> 0
The example of the input data can be found in input_handling/assignments-example.json.
The students' schedule is represented as json file and has the following structure:
Study Year: {Study Track: {0: number of classes on Monday- ...
6: number of classes on Sunday } }
The example of the schedule can be found in input_handling/schedule-example.json.
- Clone the repository
- Install the dependencies with
pip install -r requirements.txt- Configure the algorithm parameters in
environment.py - Run the project with
python genetic_algorithm.pyTo run the tests, use
python tests/test_all.pyThe genetic algorithm is implemented in genetic_algorithm.py. To use it for your own problem, you need to implement
the following:
Geneclass, which represents the gene of the chromosomeChromosomeclass, which represents the chromosomefitnessfunction, which calculates the fitness of the chromosomecrossoverfunction, which performs crossover of two chromosomesmutationfunction, which performs mutation of the chromosomegenerationfunction, which generates the new chromosomes
You can use the default implementation of functions if it is suitable.