FET Forum

FET Support (English) => Get Help => Topic started by: panyadee on March 18, 2016, 05:40:33 PM

Title: How to account for more than one schedule?
Post by: panyadee on March 18, 2016, 05:40:33 PM
Hello.

I have created a timetable for our secondary school with FET, and so far it works great.  But we also have a primary school and there exist resources (teachers, rooms) shared between the two.  The natural thing to do would be to generate the primary school timetable at the same time as the secondary timetable, in the same file.  My issue is that the two schools are not on the same schedule.  Primary school contains one fewer period, ends an hour earlier, and the start/end times of some (perhaps all) periods differ.  What would be the best approach to carrying this out? 

Or am I resigned to creating two separate timetables.  The primary timetable would have no constraints on the shared resources.  But the generated primary timetable would then set the shared resource constraints in the secondary timetable.  I would then have to manually insert those constraints into the secondary timetable and generate.  Every change in the primary timetable that affected the shared resources would then require manually changing the shared resource constraints in the secondary timetable and re-generating.  If this is the only option, would it help to set broad constraints on the shared resources for each timetable.  e.g. teacher A is with primary in the morning and secondary in the afternoon?  That might increase my chances of not having to adjust constraints on the two timetables when things change.

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Bobby Wise on March 18, 2016, 06:33:28 PM
I would try your first option. Create one TT for the entire school.

Then use the constraint 'Students not available time' to prevent FET from scheduling classes for the primary schoolin the first and last periods of the day.

The start/end time of periods would however be a bigger problem.

I am not sure how you will overcome this.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 18, 2016, 07:36:55 PM
Yes, like Bobby said, I think one single file would be the best. Add students not available constraints. Consider maybe making 1 FET hour = 1 real half hour and activities to have durations 2.

Please let us know.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 19, 2016, 09:00:21 AM
Thanks for the tips both of you. 

>> The start/end time of periods would however be a bigger problem.

>> Consider maybe making 1 FET hour = 1 real half hour and activities to have durations 2.

Unfortunately our period durations are non-standard.  Secondary has a mix of 60 minute and 50 minute periods.  Primary has a mix of 60 minute, 50 minute, and 40 minute periods.  Is the single timetable solution still available to me?  Could I expand on Liv's suggestion and make 1 FET hour = 10 real minutes?  But then what would the next step be? 

Additionally, is there perhaps some clever use of break times I could employ?

Thanks again for your help.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 19, 2016, 10:09:19 AM
I don't think you can use constraint break.

Yes, maybe a 10 minutes smallest common divisor would be applicable. However, you then need to specify the exact duration of each activity (so each activity will have a specified duration of 4, 5, or 6).

Maybe you could show us a model of the timetable (picture, pdf).
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 19, 2016, 01:41:21 PM
Thanks for the reply.

>> you then need to specify the exact duration of each activity (so each activity will have a specified duration of 4, 5, or 6).

I assume that I should do this after the timetable is set in stone (or at least close enough to stone)?  We are still tweaking it.

>> Maybe you could show us a model of the timetable (picture, pdf).

I would love to.  What exactly do you mean by 'model' though.  How about the schedule (periods, start and end time of each period) for each school (primary and secondary)?  What else should I post?
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 19, 2016, 02:04:39 PM
Quote from: panyadee on March 19, 2016, 01:41:21 PM
Thanks for the reply.

>> you then need to specify the exact duration of each activity (so each activity will have a specified duration of 4, 5, or 6).

I assume that I should do this after the timetable is set in stone (or at least close enough to stone)?  We are still tweaking it.


I meant the problem is that you need to define the duration of the activity in FET before generating the timetable. This is the problem.

Quote

>> Maybe you could show us a model of the timetable (picture, pdf).

I would love to.  What exactly do you mean by 'model' though.  How about the schedule (periods, start and end time of each period) for each school (primary and secondary)?  What else should I post?

Anything to help us understand your timetable requests.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 19, 2016, 02:54:32 PM
Thanks for your help.

I've attached a jpg showing the schedule for each school.  Note that the start and end times most periods are different between the two schools.  Additionally, the duration of the lunch period is different.

>> I meant the problem is that you need to define the duration of the activity in FET before generating the timetable. This is the problem.

I can't define the duration of the activity because the activity does not define the duration, the period defines the duration.  In other words, my science lessons are not 60 minutes in duration.  Periods 1, 2, and 3 are 60 minutes in duration, regardless of the activity scheduled for each.  Am I understanding everything correctly?
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 19, 2016, 04:04:50 PM
I hope I have good news. I thought about this. Maybe using the magic constraint activities occupy max time slots from selection will help.

Problems:

1) I only care about teachers. I think I cannot care about rooms. We might talk some more on this, if it works for teachers.

2) There are many constraints to be added. 5*6*n_teachers. Each time a teacher changes his activities, you need to update his constraints.

3) I do not yet care for short breaks. Let's see for now if it works without short breaks, and we'll try for these maybe later.

How:

Make a week have the double number of days (10). Or make a day have double the number of hours per day (but in this case if you care for teachers' gaps there will be problems).

You need to make the teachers not to work on both 9-10 week 1 and 9-10 week 2, then on 10 week 1 versus 10 week 2, then on 11 week 1 versus 11:10 week 2, then on 12:40 week 1 versus 13 week 2, then on 13:30 week 1 versus 13 week 2, then on 14:20 week 1 versus 14:10 week 2. Each day. For that, use the magic constraint activities occupy max time slots from selection. Max occupied = 1, selected slots = two slots, activities = all activities of the teacher. If you have some exercise, you might add these constraints fast enough.

Of course the students are not available on week 1 or on week 2.

Please let me know.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 19, 2016, 07:48:44 PM
Thanks very much for this.

>> I think I cannot care about rooms.

Does this mean that the software will not check for room conflicts?

>> There are many constraints to be added. 5*6*n_teachers. Each time a teacher changes his activities, you need to update his constraints.

What are these constraints?  Is there a way to somehow import constraints?

>> I do not yet care for short breaks. Let's see for now if it works without short breaks, and we'll try for these maybe later.

OK.  Ideally though I would like those short breaks to be included in the timetable (for scheduling teacher break duty).  But if it comes at a huge hassle, I guess I could pass.

>> You need to make the teachers not to work on both 9-10 week 1 and 9-10 week 2, then on 10 week 1 versus 10 week 2, then on 11 week 1 versus 11:10 week 2, then on 12:40 week 1 versus 13 week 2, then on 13:30 week 1 versus 13 week 2, then on 14:20 week 1 versus 14:10 week 2. Each day.

This appears to be instructing me to make every teacher unavailable for every period and every day, for both weeks.  Is that what you intended?  Or am I correct that week 1 will correspond to primary and week 2 to secondary?  In that case, would I need to tell FET that secondary teachers are not available at any period during week 1, and primary teachers are not available at any period in week 2.

>> For that, use the magic constraint activities occupy max time slots from selection.

If my above supposition is correct, why can't I just use Data-->Time constraints-->Teachers-->A teacher's not available times?  Wouldn't this accomplish what I described above?  Can you explain to me (or point me to documentation that explains), "a set of activities occupies max time slots from selection?"  The online manual doesn't seem to contain information on it.

>> use the magic constraint activities occupy max time slots from selection. Max occupied = 1, selected slots = two slots, activities = all activities of the teacher.

What two slots would I select?  Each primary/secondary pair?

>> If you have some exercise, you might add these constraints fast enough.

I didn't understand this--what do you mean exactly by this?

>> Of course the students are not available on week 1 or on week 2.

Can you clarify this?  As I understand, this means that all students and all teachers are unavailable for all lessons in both week 1 and week 2.  For sure I have misunderstood something above. 

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 19, 2016, 08:13:28 PM
About rooms: By my tricks I cannot care for overlapping of say periods 5 Secondary School and periods 6 Primary School. But let's see if my tricks for teachers work and then we will maybe try to find other tricks or think of something else.

Please see the attached file with my implemented tricks. Let me know if it is correct, then try to understand what I did. It took me about 10 minutes or less to create the file.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 20, 2016, 03:33:17 AM
Thank you very much for that!  I have taken a look and here are my follow-ups.

I have seen all of the "a set of activities occupies max time slots from selection" constraints you added.  But I still am trying to figure out exactly what they are accomplishing in this timetable.  I'd like to fully understand it before I process the other questions.  Can we consider a more simplified version of your timetable that only contains two activities--one for each year group--that are not split.  If I then add the max-time-slots constraint for this activity (see attached screenshot for the exact constraint I added), what exactly is it changing about my timetable?  I have also attached the resultant timetables.

It *seems* like you are employing the constraint to ensure that activity 1 is only scheduled during week 1, and activity 2 is only scheduled during week 2.  But doesn't the "y1 is unavailable during week 2" constraint already ensure this?  I feel as I am misunderstanding something, hence the clarification request.

Are start/end times specified anywhere in your timetable?  Or does it only make reference to periods now?

Also (and I'm sorry if I didn't mention this earlier), can this process be simplified if it is known that the only resources shared between primary and secondary are 3 teachers (and 2-3 rooms)?

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 20, 2016, 06:01:07 AM
Quote from: panyadee on March 20, 2016, 03:33:17 AM
I have seen all of the "a set of activities occupies max time slots from selection" constraints you added.  But I still am trying to figure out exactly what they are accomplishing in this timetable.  I'd like to fully understand it before I process the other questions.  Can we consider a more simplified version of your timetable that only contains two activities--one for each year group--that are not split.  If I then add the max-time-slots constraint for this activity (see attached screenshot for the exact constraint I added), what exactly is it changing about my timetable?  I have also attached the resultant timetables.


You are wrong. If we simplify the file, the number of constraints remains the same, only that the activities in each constraint are fewer.

Please read the Help for the constraint.

Quote

It *seems* like you are employing the constraint to ensure that activity 1 is only scheduled during week 1, and activity 2 is only scheduled during week 2.  But doesn't the "y1 is unavailable during week 2" constraint already ensure this?  I feel as I am misunderstanding something, hence the clarification request.


No, by this constraint I make sure the overlapping intervals for Secondary and Primary schools are not having the same teacher.

Please read the Help for the constraint.

Quote

Are start/end times specified anywhere in your timetable?  Or does it only make reference to periods now?


Not specified. I only named them 1..6.

Quote

Also (and I'm sorry if I didn't mention this earlier), can this process be simplified if it is known that the only resources shared between primary and secondary are 3 teachers (and 2-3 rooms)?

Yes, only 3*5*6 constrants. Only shared teachers have constraints activities occupy max time slots from selection. Add all activities of each teacher in a constraint (only one teacher, not more).

About rooms - we need to think some more. I told you I do not care for shared rooms, yet.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 20, 2016, 09:20:46 AM
OK I am inching towards an understanding.  I had forgotten about the help buttons within the program.  That description helped. 

I think I understand the constraint and how we are using it to account for overlapping primary/secondary periods.

Are you perhaps missing a set of "no activities occupy max times slots" constraints?  I see that you have constraints in place so that the timetable does not assign a teacher for period 5 in school 1 and period 6 in school 2.  But what about the same constraint for period 6-school 1 and period 6-school 2?  Aren't those constraints necessary as well?  If you confirm this, then that validates my understanding of this constraint and timetable.

I do have additional questions about this timetable, but many of them may be resolved after I completely understand this constraint. 
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 20, 2016, 10:04:00 AM
Please see the attached scan. A teacher cannot work in the same time (the periods are overlapping in real time): Seconday School period 1 - Primary School period 1, then 2-2, 3-3, 4-4, 4-5, 5-6. A teacher can work in the Secondary School period 6 and in the Primary School period 6 in the same day.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 20, 2016, 11:03:44 AM
Apologies, you are correct.  I was misreading the times for period 6.

In that case, I can see that your timetable appears to meet the teacher and student requirements--thanks for being so patient.

The remaining features I'd like to see in this timetable are:

1.  The aforementioned rooms.  This may be a non-issue, since the only rooms shared between primary and secondary are the art room and music room (these are the rooms belonging to the shared teachers--the art teacher and music teacher).  Those subjects never use any other room, and no other activities ever use these rooms.  If I just use a subject-->preferred room constraint on each, I think this is then a non-issue?  Please confirm.

2.  Ideally I would like to be able to schedule teachers during all break times--in both schools.  Is this still possible?  Just off the top of my head, what about the possibility of creating a 'Week 3,' which would be completely unavailable to students?

3.  Output - The output for this new timetable will change.  I'll have to first re-build the timetable under this new format to see exactly how output is affected.

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 20, 2016, 11:20:15 AM
Quote from: panyadee on March 20, 2016, 11:03:44 AM
Apologies, you are correct.  I was misreading the times for period 6.

In that case, I can see that your timetable appears to meet the teacher and student requirements--thanks for being so patient.

The remaining features I'd like to see in this timetable are:

1.  The aforementioned rooms.  This may be a non-issue, since the only rooms shared between primary and secondary are the art room and music room (these are the rooms belonging to the shared teachers--the art teacher and music teacher).  Those subjects never use any other room, and no other activities ever use these rooms.  If I just use a subject-->preferred room constraint on each, I think this is then a non-issue?  Please confirm.


I think this is a non-issue, even if you work with home rooms for teachers or subject preferred room. Because the teacher will not be in two places at the same time -> the room will not be used by two activities at the same time.

Quote

2.  Ideally I would like to be able to schedule teachers during all break times--in both schools.  Is this still possible?  Just off the top of my head, what about the possibility of creating a 'Week 3,' which would be completely unavailable to students?


I think maybe you could add 3 more FET-hours, so that you have: 1, 2, SB1 (small break), 3, Lunch, 4, SB2, 5, SB3, 6. Make all the students unavailable in the SB slots. But you need to consider in advance how many breaks will each teacher supervise, so you will add one or two activities for each teacher. Can you allow this? Then, if you don't care about teachers' gaps - that's all. If you care about teachers' gaps, you need to add dummy activities for each teacher, 5*3-number_of_supervised_breaks, preferred times SB.

Quote

3.  Output - The output for this new timetable will change.  I'll have to first re-build the timetable under this new format to see exactly how output is affected.

Thanks.

Sorry, but I do not understand. You mean you would like to see only a real week in the HTML timetables (see the timetables in a nice format, not in a FET format)?
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 20, 2016, 12:19:08 PM
Good to know about the rooms.

>> But you need to consider in advance how many breaks will each teacher supervise, so you will add one or two activities for each teacher. Can you allow this?

The format we would like to have for teacher break duty is: Teachers A and B are assigned to all breaks on Monday, Teachers C and D are assigned to all breaks on Tuesday, etc.  This typically results in each teacher assigned one or two days of break duty per week.  Would the constraints you described still be applicable to this format?

>> If you care about teachers' gaps

I'm still trying to understand gaps and how/if I should use them.  Gaps--as defined by FET--seem like they would be rarely important to us.  What is more important is the free periods for each teacher (and room).  The FET manual says that if a teacher is free first period or last period, these do not count as gaps.  But in our system they do count as free periods, so we need to track them, as well as all other individual free periods.  Anyway, I think the resolution your offered is still applicable here:  if I add dummy activities for each teacher, FET will be able to schedule teachers during break duty.  Please correct me if I'm wrong.

Am I understanding gaps correctly?  Am I correct that monitoring gaps would not provide much utility for my school?  Or can I still somehow make them useful in my timetable?

Regarding my output comment, that was not meant for you to investigate.  That was more of a note to myself that, when I finish creating this new timetable, I will have some additional formatting to do in order to make it look the way we want.  That may require some additional forum posts :-)

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 20, 2016, 03:24:42 PM
Quote from: panyadee on March 20, 2016, 12:19:08 PM
Good to know about the rooms.

>> But you need to consider in advance how many breaks will each teacher supervise, so you will add one or two activities for each teacher. Can you allow this?

The format we would like to have for teacher break duty is: Teachers A and B are assigned to all breaks on Monday, Teachers C and D are assigned to all breaks on Tuesday, etc.  This typically results in each teacher assigned one or two days of break duty per week.  Would the constraints you described still be applicable to this format?


In standard FET you could add say one activity of subject break for A and two activities of subject break for B, with preferred times on Monday.

Otherwise, if you would like FET to automatically choose two teachers for breaks, you can use a trick, but it is overkill. Also, FET might choose all three activities for teacher A. You can use for this trick FET rooms = real teachers. Preferred rooms of the activities = Room A or Room B; rooms A and B are available only on Monday.

Anyway, I think breaks are easy to care about even manually.

Quote

>> If you care about teachers' gaps

I'm still trying to understand gaps and how/if I should use them.  Gaps--as defined by FET--seem like they would be rarely important to us.  What is more important is the free periods for each teacher (and room).  The FET manual says that if a teacher is free first period or last period, these do not count as gaps.  But in our system they do count as free periods, so we need to track them, as well as all other individual free periods.  Anyway, I think the resolution your offered is still applicable here:  if I add dummy activities for each teacher, FET will be able to schedule teachers during break duty.  Please correct me if I'm wrong.

Am I understanding gaps correctly?  Am I correct that monitoring gaps would not provide much utility for my school?  Or can I still somehow make them useful in my timetable?


I think you understand correctly, you don't need to use gaps constraints for teachers. Maybe for students?

Quote

Regarding my output comment, that was not meant for you to investigate.  That was more of a note to myself that, when I finish creating this new timetable, I will have some additional formatting to do in order to make it look the way we want.  That may require some additional forum posts :-)

Thanks.

OK :)
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 21, 2016, 04:46:32 AM
>> Anyway, I think breaks are easy to care about even manually.

What about separate FET files for breaks--one file for primary school and one file for secondary school?
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 21, 2016, 05:56:05 AM
I am not sure I understand.

I thought breaks are once for both schools. If not, you could apply the same constraints - activities occupy max time slots from selection, for breaks.

You said you didn't like two files.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 21, 2016, 02:38:50 PM
I was just thinking off the top of my head, and perhaps it wasn't fully thought out.  I was thinking that, as long as I was going to schedule and track break duty manually (through the use of a static, offline spreadsheet), I might as well create a new FET "timetable" for each school.  For example, the secondary timetable would consist of 4 FET hours (one for each break), and I could schedule teachers into each hour with various constraints.  Obviously this would not update automatically when I update my main timetable.  I would create a similar "timetable" for the primary school breaks, as their break times are different.  There are no shared resources to consider.

Anyway, that's an exercise I can probably test and carry out myself, offline, after the hard work has been done.  If we have to use a simple spreadsheet we will.

Thanks again for everything.  I will post back here with any issue, probably when it comes to formatting.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 21, 2016, 02:43:20 PM
OK, I will wait for your results without thinking to the problem of breaks - I will leave you this pleasure :)

I think that you could add 5 days per week and 7+7 hours per day. So the timetable will be nicer and you may not need special timetable formatting.

Also, I thought now, it is good that you do not care about teachers' gaps, because you couldn't do that with my tricks - not with 10 days, not with 5 days.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 21, 2016, 03:43:14 PM
>> I think that you could add 5 days per week and 7+7 hours per day. So the timetable will be nicer and you may not need special timetable formatting.

Are you now speaking of how to best/easily output timetables for both primary and secondary schools, given the modified 10-day timetable you created for me?  If so, I will use this as a starting point when I get there.  Thanks again!
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 21, 2016, 03:47:04 PM
Quote from: panyadee on March 21, 2016, 03:43:14 PM
>> I think that you could add 5 days per week and 7+7 hours per day. So the timetable will be nicer and you may not need special timetable formatting.

Are you now speaking of how to best/easily output timetables for both primary and secondary schools, given the modified 10-day timetable you created for me?  If so, I will use this as a starting point when I get there.  Thanks again!

No, I mean from the start you can input in FET 5 days and 14 "hours". The constraints activities max simultaneous in selected time slots will be modified.

This change must be made at the start of anything. After you added constraints/activities it is too late.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 22, 2016, 05:24:52 AM
>> No, I mean from the start you can input in FET 5 days and 14 "hours". The constraints activities max simultaneous in selected time slots will be modified.

I think I understand.  So before I start everything, create a 5-day schedule with 7 + 7 = 14 FET hours.  But why 7 + 7 = 14 FET hours?  There are 6 periods per day, so wouldn't it be 6 +6 = 12?  Each day there are also 3 small breaks, plus 1 longer lunch.  Are you factoring in lunch as a FET hour?

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 22, 2016, 05:27:42 AM
Yes, I was thinking of lunch as a FET hour.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 22, 2016, 06:56:06 AM
>> Yes, I was thinking of lunch as a FET hour.

Got it.

So for your proposed one day/14 hour format, would the main difference be that instead of making secondary year groups unavailable during week 2, I would make them unavailable during hours 8-14?  Then of course the time slots in my "no activities occupy max times slots" constraints would be hours 1/8, hours 2/7, etc?

Thanks.
Title: Re: How to account for more than one schedule?
Post by: Liviu Lalescu on March 22, 2016, 08:22:55 AM
I think yes. I do not understand your 1/8 and 2/7. I think you mean Monday 1 and Monday 8, Monday 2 and Monday 9, etc.
Title: Re: How to account for more than one schedule?
Post by: panyadee on March 22, 2016, 12:20:32 PM
>> I think you mean Monday 1 and Monday 8, Monday 2 and Monday 9, etc.

Yes, that is exactly what I mean.