FET Forum

FET Support (English) => Get Help => Topic started by: metherington on March 20, 2018, 02:17:38 AM

Title: 5 over 6 days
Post by: metherington on March 20, 2018, 02:17:38 AM
Hi there,

I've used FET to create school schedules several times. I am now in a school that uses a 6-day rotation. The "core classes" (Math, Science, Language Arts, and Social Studies) are taught by splitting the large class of 50 kids into thirds, teaching them 5 of the 6 days. There is always one extra day and we call it the "split day" where half the classes meet and the next day the other half meet. These "split days" must be consecutive. I don't know how to make this happen in FET - any ideas?

The attached image gives an example schedule, showing how the split day works.

Any tips appreciated!

Matthew
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 20, 2018, 07:43:29 AM
I am sorry, but I do not understand the picture.

Do you need to add two activities and say that they need to be in consecutive days? There is a constraint max days between activities which you can use, unfortunately without the cycle between the first and the last day. This can be easily solved in a custom version, making a minor modification to this constraint. Or I'll try to think of some trick, so that you can always use the latest version. I'll let you know if I will find a trick.

Maybe you could explain better the situation to me.

Please let me know.
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 20, 2018, 10:40:12 AM
If my assumption that you need two activities to be in adjacent days circularly is correct, I thought of a trick; in fact, I think it has been discussed here on other threads.

Add a fake teacher or students sets, each with activities: copies of the activities which should be in adjacent days, and an activity split into 4 subactivities with duration n_hours_per_day. For each teacher/students set, for these 4 subactivities, a constraint max days between activities, to make them adjacent (I think max 3 days, I hope I am not mistaking).

Then, use constraints activities same starting time, to make the copies of the activities which should be in adjacent days -> be simultaneous with the real activities which should be adjacent (a lot of constraints, one for each pair of activities).

This trick is difficult to implement (to input the data), and makes the timetable slower to generate.
Title: Re: 5 over 6 days
Post by: metherington on March 20, 2018, 05:57:06 PM
Thanks for the replies - I'm not sure if the second idea is something that will work - I need to read it a few more times to see if I understand!

I wanted to post a clearer example of the pattern required. It applies to several classes at once, but in this example I am showing the impact on one math class. The color coding is to represent the same lesson taught to a group. Attached is an image of a pattern that works, and one that doesn't. Hopefully this is clearer...

thanks in advance!

Matthew
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 20, 2018, 06:09:17 PM
Oh, I think I understood correctly. You have more sets of activities. For each set you need all of them to be maximum 1 day apart, but circularly.

Not circularly - you can use the constraint max days between activities. Max days = 1, select all the corresponding activities for a students set.

Circularly - either the easy customization of the constraint max days between activities, or the difficult trick.

Please let me know.
Title: Re: 5 over 6 days
Post by: metherington on March 21, 2018, 12:10:21 AM
Thanks again,

I'm not quite sure what you mean by "circularly". I'm attaching a pic of our actual full schedule with 4 grade levels (years). If you just look at the periods called "Core", you can see that there are 4 each day except the "split day" - 5th grade's split days are A and B, 6th grade's are D and E, 7th grade's are D and E, and 8th grade's are C and D.

I would typically schedule an Activity called "Math" for each of the three subgroups, and split it by 5 in a 6-day week.

Trying to make sure the split day is not separated by a regular day.

thanks

Matthew
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 21, 2018, 02:42:12 AM
By circular I meant to allow also the A and F days.

Are all Core activities for say 5th Grade equivalent? Then you can add a (circular, customized?) constraint max 1 days between activities for a pair of your choice.

Or, if you know exactly the activities ids of the Core subject which need to be in adjacent (possibly circularly) days, the same constraint will do it.

If the activities are not equivalent and you need to say to the program: "place the activities and those 2 which remain single in a day need to be in adjacent days" - this might be possible also by customization, but more difficult.
Title: Re: 5 over 6 days
Post by: metherington on March 26, 2018, 02:18:52 PM
I think it's the last option. To maintain flexibility, it would need to be a constraint. I wonder if I could split the 5 periods into different activities - the split day might have different rules than the consistent days?

There are 4 grade levels, each with 4 subjects (activities) that would need to follow this pattern - i.e. 16 different activities in the whole schedule.

thanks

Matthew
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 26, 2018, 02:31:43 PM
hmmm... maybe i misunderstand, but i think you should add the data different?!

Use a 5 days week only! Since in fact there are only 5 days and not 6 days.
Of course that mean you need to do a correct students structure. It won't work with the current one.
So you need to "split" the year.
Than all you core days (activities) will get all students, while the activities of the split days get only the split students.
Than just add a "max 1 day between with 100%" constraint between at least 2 of that activities (that also have got "a min 1 constraint with 100%")
Title: Re: 5 over 6 days
Post by: metherington on March 26, 2018, 02:59:55 PM
except that we run a 6-day cycle...
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 26, 2018, 04:04:42 PM
Quote from: metherington on March 26, 2018, 02:18:52 PM
I think it's the last option. To maintain flexibility, it would need to be a constraint.

OK, let me know if I should try a custom version for you. I will need details and example input file(s). Do you need the constraint to have an interface like all the other constraints which exist, or only a generic constraint for all activities say with total duration 20 (easier for me), or only to write this constraint in the .fet XML file (still a bit easier for me)?

Quote
I wonder if I could split the 5 periods into different activities - the split day might have different rules than the consistent days?

I am sorry, but I understand nothing here :)  You have 6 periods, not 5, in the picture, and I do not understand the rest. Could you try to use FET terminology (a real period = a FET hour, etc.)?

Quote
There are 4 grade levels, each with 4 subjects (activities) that would need to follow this pattern - i.e. 16 different activities in the whole schedule.

In your picture this is not visible? You have CORE for each year, so only 1 subject per year, so only 4 groups of activities for the input file.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 26, 2018, 04:33:27 PM
Then do it with 6 days.

again: i think the students structure you are using is "incorrect".
why not doing it like my suggestion with the 6 days and just add an pseudo activity with duration = number of hours per say; maybe with subject "free". Similar to the other split group. Those 2 pseudo activities will get a min 1 day between with 100% and a max 1 day between with 100% constrait.
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 26, 2018, 05:44:31 PM
Sorry, Volker, but I don't get you. Matthew has 6 day per week, 4 students years.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 26, 2018, 06:07:29 PM
He only need to add a new division / category  per year. maybe with "split A" and "split b".
So the "normal" activities will still have the normal students, but the split days/activities need the "split x" students.
then only add 2 pseudo activities with duration "hours per day" for "split A" and also "split B" with a min 1 day between and a max 1 day between constraint.
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 26, 2018, 07:43:06 PM
Quote from: Volker Dirr on March 26, 2018, 06:07:29 PM
He only need to add a new division / category  per year. maybe with "split A" and "split b".
So the "normal" activities will still have the normal students, but the split days/activities need the "split x" students.
then only add 2 pseudo activities with duration "hours per day" for "split A" and also "split B" with a min 1 day between and a max 1 day between constraint.

What about circular allowed? (a split day on "A"  and the other split day on "F" - by "split day" I understand Matthew's notation).

If you think it works, you might want to show us a small example .fet file.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 26, 2018, 10:53:08 PM
it is non-ciricular. but may his timetables isn't  very difficult and he can also solve it easily, even it is a bit more strict.

i just see an other variant:
as i can see it is in fact clear what activities are at the day, since i guess you always want exactly 2 times core, 2 times project and 2 times the other.

so why not simply using "same day constraint" to the 6 activities of split day a and similar to split day b? Than also a min and max 1 day constraint with 100%.
That solution is also not circular. i know, but i guess he/you should try.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 02:11:14 AM
I'm trying to keep up with your ideas, but it's tricky to understand!

Just one note - realizing my "Core" terminology was not totally helpful. The 4 periods called "core" represent 4 activities (Math, Science, Social Studies, and Language Arts). Each is taught 3 of the 4 periods in a CORE block (like my math example image) with the large class split into 3 subgroups.

4 periods of core classes would be a variation of this:

Math / Sci  / SS
SS / LA  / Math
Sci / LA / SS
Sci / LA /  Math

Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 08:28:13 AM
How do you split the students at the split day in subject core?

Lets take the 5th Grade:
Split days are A and B.
What subject do they have at day A: For example only math, only science? Or 2 different subjects?
What subject do they have on day B? The same as day A or other subjects?

You should show us your activity planning, since i hope you can see the correct students structure. I still think your students structure is "bad", since FET, we and also your students won't be able to see if that is a split day or not and they can also not see the subjects. Let's see your activity planning. If it is to private, you can also sent per email. Adding and understanding your dataset will be much easier if you setup the correct structure.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 02:46:10 PM
On 4 of the 6 days, every student takes all 4 classes in one of three subgroups:

Math / Sci  / SS
LA / Math  / Sci
SS / LA / Sci
Sci / SS /  Math

On the two split days, they take the same 4 classes over 2 consecutive days. For example:

Split day A
Math / Sci  / SS
LA / Math  / Sci

Split Day B
SS / LA / Sci
Sci / SS /  Math

I was holding off on building this in FET until I figured this out. I was able to make a schedule - it just wouldn't keep the split days consecutive.
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 02:51:58 PM
Please allow me a bit more time to read and process.

Meanwhile, maybe you could send your current file to me and Volker, by email if it is private.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 04:14:27 PM
ok. i think i understood. if you also sent me a file and or the activity planning i will enter the 5th Grade. i must go to the dentist now; i will so as soon as i am back.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 04:29:56 PM
I tried to set up 5th grade only on this file. Because core classes are always scheduled in blocks of 2, I decided to block schedule them here - makes it easier to read.

In generating this file it did place the split days consecutively (C&D days in this example), but that's not necessarily the case.

Please see attached FET file and output file to see more...

thanks!

Matthew
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 06:10:00 PM
you are mixing teachers, subjects and students. i don't think that is good.
why do you add "4 teachers" if one is unneeded? just because you don't know better or because that is the supply teacher if someone is ill?
project teachers are always the same as core teachers?
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 06:13:29 PM
Quote from: metherington on March 28, 2018, 04:29:56 PM
Please see attached FET file and output file to see more...

Oh, having an example file makes things much clearer! Volker was right to ask for it :)

I attach my file, modified from yours. Please see how I added the Core list of activities and min days between activities constraints. This is to ensure that each day has at least 2 hours of Core. Also, there are 4 same starting day constraints, and the remaining 2 activities (ids 65 and 66) are constrained by a constraint max 1 days between activities.

The only problem is that the max days between activities does not admit ids 65 and 66 to be on A and F. My example file (attached) gives always correct answers, but it is too constrained. A simple customization of the constraint max days between activities (to allow circular days A and F) would make things perfect.

Please let me know.

PS: You can open my attached file with your FET. Just ignore the newer version warning.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 06:29:24 PM
hmmm? i don't understand you split day in that example file. students haven't got free, you set an other activity?! Did i misunderstood?

i will try to sum:
A student must do 4 core selections:
1st core selection: Math / Sci  / SS
2nd core selection: LA / Math  / Sci
3th core selection: SS / LA / Sci
4th core selection: Sci / SS /  Math

ok. That is clear. So if you have maybe 60 Students in that year, than each activity has got around 20 students.

please tell me if the following is also correct, since the post in this forum are different from the exaplefile:

A students also need to do also 3 other selection (if i understood you messages here)
5th selection: Spanish OR PE (so around 25 students per activity)
6th selection: PA OR Project
7th selection: Art OR Project
But in your dataset it look like you swap them in "Grp1" and "Grp2". But both groups work on different split days. That is conflicting to your description.)

Then all students must do Project (so there a students that have got only 2 hours project, while others have got more hours by the 6th ot 7th selection?!)
How many teacher/rooms do you need here: all core teacher?!

And what are about the splits? Rereading your explanations and viewing your dataset it look strange, since some students will do other subjects more often than the other students. Or do you change that every week?

You shouldn't mix students, teachers and subjects. That is "confusing". Can't you sent me an activity planning, i think it will be much easier to understand with that.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 06:36:45 PM
I just ran Liviu's file and it was missing half of the core classes - I put each core class back to 2 duration, and that seemed to fix it - no more empty periods.

I think this works, and I understand what you did with the constraints.

If a customization is needed for the A and F days to be available as "split days" then I would gladly receive it - thanks!

I'm attaching the latest file with the added duration.

Volker - I was having a hard time splitting the class of 50 into two groups of 25 and also into 3 even groups, so I simplified it by lumping them together. It won't have any negative impact on our schedule.

thanks

Matthew
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 06:53:11 PM
Oh, indeed, my mistake :-[

I am beginning work now.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 06:54:41 PM
If you are satisfied, than all is fine. I just still wonder a bit there are are 4 teachers in the core even you need only 3. I also highly suggest to use only teacher names as teacher names.
Do you need to care about rooms or do you always have enough rooms? There might be room problems if you merge the activities instead of using the "correct" students structure.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 06:56:29 PM
Each teacher gets one of those periods free, so it's OK.

I only used generic names while we troubleshoot.

Sent you an email with a link to a Google Doc.

thanks

Matthew
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 07:00:31 PM
There will be a couple of room constraints needed, but mostly not.

Grades 5 and 6 share a building

Grades 7 and 8 share a building

They both have the same two issues:

1) They should not have Project scheduled at the same time
2) They cannot have more than 2 periods of CORE classes at the same time (or they do run out of spaces)

I was going to ask these things next!

You guys are so helpful - thank you!

Matthew
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 07:06:30 PM
Quote from: metherington on March 28, 2018, 06:56:29 PM
Each teacher gets one of those periods free, so it's OK.

Only if the teach in that grade only! If the teacher is also teaching in the other grade it might/will be a problem, since he is "locked" then even in fact he could be used in the other year!
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 07:07:59 PM
Quote from: metherington on March 28, 2018, 07:00:31 PM
There will be a couple of room constraints needed, but mostly not.

Grades 5 and 6 share a building

Grades 7 and 8 share a building

They both have the same two issues:

1) They should not have Project scheduled at the same time
2) They cannot have more than 2 periods of CORE classes at the same time (or they do run out of spaces)

I was going to ask these things next!

You guys are so helpful - thank you!

Matthew

I think:

1) Constraint activities not overlapping.

2) Constraint activities max simultaneous in selected time slots.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 07:08:39 PM
Quote from: metherington on March 28, 2018, 07:00:31 PM
1) They should not have Project scheduled at the same time
2) They cannot have more than 2 periods of CORE classes at the same time (or they do run out of spaces)
1) also because of space or because of an other problem.

i highly suggest to use the "correct" students structure at least for those activities that might get room problems, because you can care about the rooms by that.
Title: Re: 5 over 6 days
Post by: Volker Dirr on March 28, 2018, 07:10:59 PM
of course a "not overlapping" could be used. but in my option is the correct students structe with divisions will be better, since the timetable will be much more readable if you can see the correct students, teachers, subjects and rooms. at the moment it is in fact pretty "untidy"/"mixed"/"difficult to read".
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 07:56:34 PM
I added the "circular" modification. The custom version is available here: https://lalescu.ro/liviu/fet/download/custom/metherington/  . Please let me know.

If Volker is right and you may improve your data, I hope that this customization will still work. If not, we can always customize some more. Anyway, it is great that after a long debate we came to the smallest change necessary to make it. I admit I do not understand exactly your words or Volker's about the data, but I understand the FET notation and how to make a FET file solve correctly.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 09:30:39 PM
Thanks! I'm home on my mac right now, so I'll have to try this when I get back to school on a PC.

Do I run the "test-first-and-last-day.fet" file or the "liviu-matthew2.fet" file?

I appreciate your help!

Matthew
Title: Re: 5 over 6 days
Post by: Liviu Lalescu on March 28, 2018, 09:41:20 PM
Quote from: metherington on March 28, 2018, 09:30:39 PM
Thanks! I'm home on my mac right now, so I'll have to try this when I get back to school on a PC.

Do I run the "test-first-and-last-day.fet" file or the "liviu-matthew2.fet" file?

I appreciate your help!

Matthew

You are welcome!

liviu-matthew2.fet is your file, and the days with only 2 Core-s can be in any consecutive days (including circular - the first and the last days).

The second file, test-first-and-last-day.fet -- I made it to force the circular testing. The 2 Core-s are forced on the first and last days (by the last two time constraints). This file is not solved by the official FET, but it is solved by the metherington custom FET.

In your work, you will not use constraints like in the second file.

Please let me know if it is clear.
Title: Re: 5 over 6 days
Post by: metherington on March 28, 2018, 09:43:00 PM
Got it - thanks!

;D