Monday, June 9, 2008
IntiCas 027: Fixed Gap Bug in Vertical Allocation Algorithm
Fixed the Gap Bug described in the previous blog.
It was an off-by-one error. In the Room Class, the variable:
int day = 1
was wrongly initialized as 1.
It should be 0:
int day = 0
The Vertical Allocation Algorithm has the following advantages:
1. Reduces the probability of each Teacher teaching more than
two hours without a break. However, if a Teacher teaches
two subjects, a situation may arise where those 2 subjects may
coincidentally be allocated continuously in the same day. This
may result in the Teacher teaching more than 2 hours non-stop.
I will deal with this in a later algorithm development. For now,
I will just focus on simple allocation.
2. It prevents a subject from being allocated more than 2 hours per day.
To Do:
Experiment with allocation of each subject as fixed 2-hour slots.