actual a quesiton, not a comment -- i've seen a few open source applications that do this sort of thing for college and high school class and room schedules over the past few years.
Did you look at the logic they use on any of those existing systems and are trying to improve on that, or are you setting out to develop your own solution/approach from scratch?