
1. Re: Classroom (interval) scheduling problem modify greedy algorithm to optimize #classes/classroom/day
Zhouyi Zhang Aug 10, 2017 12:50 AM (in response to Karen Hignett)Hi, Karen
I have played your workbook for a bit, still not come up with a solution. But I would like to share what I have achieved so far.
Workbook attached.
ZZ

Classroom Moves (1).twbx 71.6 KB


2. Re: Classroom (interval) scheduling problem modify greedy algorithm to optimize #classes/classroom/day
Karen Hignett Aug 10, 2017 6:59 AM (in response to Zhouyi Zhang)ZZ 
Thank you for looking at this! I meant to say in original post that my plan was to sort by earliest end time, then use INDEX function to iterate through courses. So we are on the same page there.
Looking at your viz, you are filtering by day of [END DATE] to make the window view be based on the day of the week. Besides INDEX(), the only other calculation added is Class. The result of the calc is correctthe OTHERS set contains the optimal class schedule, but I don't understand how that is accomplished without any use of end time. (probably there is something obvious staring me in the face, but right now I'm not seeing it :)) Also, I see what you are saying about the overlapping courses for Class 2 ending at 4:20, and I'm looking at why it occurredthinking it's just too many dates going on in the original viz.
Can you explain how your calculation is working?
Thanks!
Karen

3. Re: Classroom (interval) scheduling problem modify greedy algorithm to optimize #classes/classroom/day
Zhouyi Zhang Aug 11, 2017 12:29 AM (in response to Karen Hignett)1 of 1 people found this helpfulHi, Karen
Please see my explain below
If you change the Class calculation as below,
it could fix the issue I mentioned for 29 August 2017
Hope this could help you understand.
ZZ

4. Re: Classroom (interval) scheduling problem modify greedy algorithm to optimize #classes/classroom/day
Karen Hignett Aug 18, 2017 9:09 AM (in response to Zhouyi Zhang)Hi ZZ,
I used rank_unique and restarted every end_time to number the courses ending at a particular day/time, then added a calculation that evaluated the rank number against the total rooms available for each class size.
For example, there are two rooms available that will seat up to 80, so: IF RANK_UNIQUE=1 THEN <classroom#1> ELSEIF RANK_UNIQUE=2 THEN <classroom#2> ELSEIF RANK_UNIQUE>2 THEN <slack>
This works only if no end times overlap the following start time. I had one instance of that and adjusted it manually rather than rewriting the calculationalthough I will rewrite it for future use.
If you have any other thoughts feel free to share!
Thanks you again for looking at this with me!
Karen

Classroom Moves3.twbx 130.4 KB
