I have generated a potentially workable timetable, however there are too many of the same subject happening after the second break. I have set constraints to prevent any subject from occuring more than twice after the second break, but to no avail.
How can I force this constraint as top priority?
Alternatively, how can I swap periods after the timetable has been generated, for example swapping day 1 period 1 with Day 1 period 9, without having to manually do every class and teacher?
I don't recommend using manual swapping, it must be difficult.
What constraints did you use? Did you try constraint subactivities preferred starting times (or time slots), with 100% weight?
Shane and I work together on the school timetable.
We have set time constraints activity prefered starting times so that each senior set of subjects is supposed to appear no more than twice after second break. when we generate multiple timetables( usually set to 15 mins and 20 timetables), all timetables ignore that constraint even though it is weighted at 100%.
Please send me your input file asap. If you use 100% and it is not respected, then it is a bug.
You can send on my personal e-mail address or in a personal message in the forum or publicly on the forum.
We have loaded the input file (9_8 HHS 2009.fet as 9_8 HHS 2009.zip).
Our findings are that FET respects teachers unavailable times, but not activity constraints or the requirement for each teacher to have a free lesson per day.
We have set each teacher to have maximum 6 hours per day so that each teacher should have 1 free period per day. (after adding 4 extra periods to each day so that we could set 2 phantom breaks between p1-2 and between p6-7 and also for normal breaks between p3-4 and p5-6 and setting these breaks as lessons with phantom teachers to prevent double lessons from being split over breaks.
1) You should have added a constraint break. No need for teachers not available or dummy teachers. Double period lessons are not split over the break.
2) You have added constraint teachers max 6 hours CONTINUOUSLY 100%, which is not max hours DAILY. You have also a max 9 hours daily with 90%.
3) You have constraints for 18 activities. I generated a timetable (see attached solution file) and checked the first 6 activities. 1649 is on Day5 09:01, 1655 is on D1 09:01, 1661 is on D4 09:01, 1553 is on D5 11:01, 1548 is on D4 11:01, 1543 is on D6 11:01. I also checked some middle and last activities: 1643 is on D6 11:01, 1578 is on D5 12:00.
All these activities are early and respect your constraints.
Please let me know where you or me are wrong.
I intend to release a new version in about 48 hours from now, so please let me know asap if it is a bug of FET or it was your mistake.
Also, please let me know if I may include your file into the official samples, or it is private.
I know your mistake about the activity preferred starting times constraint: if you add this constraint for one id, then only this activity will be constrained, not all the activities from the same group id.
The way you added that is not good, for more reasons.
Please do this: add for activities 1659-1654 (and then all needed) for instance activity tag "early" and constraint subactivities preferred starting times, activity tag "early", component number (split index) 1, then component number 2, then 3 (or, alternatively, component number 3, 4 and 5, to constrain the latest activities from this component). Preferred times should be early (not allowed above 13:01)