Skip to content

CorneeldH/Heuristics

Repository files navigation

Heuristics

Code for 'programmeertheorie' course of the minor programming on the UvA. I developed three algorithms in order to found solutions for an instance of the univeristy timetable program (for a description of instance, click here).

The Simulated Annealing (with local search techniques) algorithm deliverd continuously rosters with scores above 99% of the optimal score and the best result was 99.64% of the best score (1411, with possible scores between the -6541 and 1440). While I did not prove this roster was the best roster possible it is without doubt a very strong result).

Paper

See my paper for the whole shebang

Presentation (in Dutch)

It's a prezi, click here to see it,.

Data

The bare data is in the following csv's:
studens and their courses
courses
rooms

Additional information regarding this data is saved in the following excel files:
cleaned students file
students file with courses split
courses with additional calculations

Representation

The following code translates the given data and information to python code:
import data from csv
classes
scorefunction implementation

Heuristics and local search techniques

I developed three the following algorithms and local search for student- and room optimalization:
Hillclimber
Simulated Annealing
Genetic Algorithm (including: crossover methods)

Student Optimalization
Room Optimalization

Manager to create 70 roster with each algorithm

Produced Rosters

I generated rosters on two computers. In addition, I have some old rosters from preliminary tests and I optimized the best rosters (with scores above 99.5%): [first made rosters](old rosters) rosters computer 1 rosters computer 2 selected best performing rosters the best performing rosters optimized

Visualization

I made a visual with an export to json:
translate folder of rosters to json
json with necessary data for visual
javascript to dynamically show data
html with per visualized roster timetables per room / subject / student + one menu for all suboptimal socres
css to make it pretty

Analysis of scores

I did on two computers 70 runs and exported the scores to excel (and visualized them there):
Examples of score development per algorithm
Exporting scores of computer 1 to Excel
Same for computer 2
Scores on computer 1
Scores on computer 2

Analysis of rosters

Finally, I wanted to analyze the rosters themselves. This is how far I got:
Importing roster and trying to improve them further
Script for analyzing the used slots per day
Exporting per type of activity on which day it falls for all good rosters
Comparison per type of activity for good and really rosters
Attempt to compare the rosters with each other
Script that provides number of occurences per conflict in the 20 optimized rosters

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages