Custom FET BP - block planning (Need help choosing a custom version)

Started by ChicagoPianoTuner, July 24, 2019, 01:36:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

In your new file, you have 3 constraints activities max simultaneous in selected time slots:

1) I think you could remove the FAKE hours?

2) The third (for Physics) has all the slots. It might be faster if you only leave the affected slots.

I am generating now and it is faster (because you improved the constraints). I hope it will generate for the complete file, and with additional constraints.

Liviu Lalescu

I just thought of this: if you have a 4th choice activity divided into 3 and one divided into 1, FET will prefer to break the 99% constraint only once instead of three times.

Three constraints 99% in a row give a 99.999875% resultant, if I am not mistaking.

To obtain 99% for an activity divided into 3, you need, if I am not mistaking, 78.455653%. Because (1-0.78455653)^3 ~= 0.01

So, you might want to add for each activity an activity tag, 1SubactivityInTotalAnd4thChoice or 3SubactivitiesInTotalAnd4thChoice (in addition to all your tags which you correctly added), and for 3 give 78.455653% preferred times for 4th choice and for 1 give 99% preferred time for 4th choice (and remove 4th choice old). Otherwise FET will prefer to break 4th choice only for 1Subactivities.

You might know better than me.

Liviu Lalescu

I made that observation in the previous post because I saw in your file's results the conflicts, and all that I saw had only Component 1 wrongly placed.

ChicagoPianoTuner

Quote from: Liviu Lalescu on August 03, 2019, 05:30:30 PM
I just thought of this: if you have a 4th choice activity divided into 3 and one divided into 1, FET will prefer to break the 99% constraint only once instead of three times.

Three constraints 99% in a row give a 99.999875% resultant, if I am not mistaking.

To obtain 99% for an activity divided into 3, you need, if I am not mistaking, 78.455653%. Because (1-0.78455653)^3 ~= 0.01

So, you might want to add for each activity an activity tag, 1SubactivityInTotalAnd4thChoice or 3SubactivitiesInTotalAnd4thChoice (in addition to all your tags which you correctly added), and for 3 give 78.455653% preferred times for 4th choice and for 1 give 99% preferred time for 4th choice (and remove 4th choice old). Otherwise FET will prefer to break 4th choice only for 1Subactivities.

You might know better than me.

This makes sense. I can do that.

ChicagoPianoTuner

Quote from: Liviu Lalescu on August 03, 2019, 02:31:28 PM
In your new file, you have 3 constraints activities max simultaneous in selected time slots:

1) I think you could remove the FAKE hours?

2) The third (for Physics) has all the slots. It might be faster if you only leave the affected slots.

I am generating now and it is faster (because you improved the constraints). I hope it will generate for the complete file, and with additional constraints.
I will fix that.

ChicagoPianoTuner

Even though I do not have a completed FET file I wanted to give an update.

I am working on automatically generating the FET file. I am making good progress but it is taking me a while to get the constraints added correctly. I have already successfully added students, tags, days (real teachers), hours, activities, and some constraints.

There are two additional complications, one of which may require extra work. They both involve the middle school, so let me explain.

Middle school students (years 7-9) are divided into group called 7J, 7K, 7L, 8J, 8K, 8L, 9J, 9K, 9L in which they take 5 'core' courses (English, math, humanities, science, and MFL). Each core course occupies one full block (duration = 6). They also take 3 smaller courses of duration = 4 which must fit into the remaining blocks, e.g. activity 1 is in A1, A1', A2, and A3, activity 2 is in A4, A5, B1, and B1', and activity 3 is in B2, B3, B4, and B5. These courses are not with the same groups (J, K, L), but may be mixed.  I do not think we need any additional work here - I am just adding 4 subactivities as I did with PE for the other students. But I figured I would ask.

The major complication is that for the middle school it is desired that English, math, and humanities be in sequential blocks, possibly wrapping around, and also that in this 3-block span, each group within the year has those 3 courses. For example, for year 7, it is desired that the schedule looks like this:

Block A: 7J - humanities, 7K - English, 7L - math
Block B: 7J - English, 7K - math, 7L - humanities
Block C: 7J - math, 7K - humanities, 7L - English

It could be any 3 sequential blocks, including FGA or GAB.

Is this possible with current constraints? In FET, all core courses are comprised of 1 subactivity with duration = 6.

Liviu Lalescu

For the first problem, I think it is solved automatically, but you need to add a single not split activity of duration 4. Please tell me if you get assertion failed, I am not sure if I allow durations other than 1 and 6 and total duration 6, 3, and 8.

For the second problem, I'll try to craft something. Maybe a modified three activities grouped with activities occupy max 18 time slots from selection.

ChicagoPianoTuner

Quote from: Liviu Lalescu on August 05, 2019, 08:04:16 PM
For the first problem, I think it is solved automatically, but you need to add a single not split activity of duration 4. Please tell me if you get assertion failed, I am not sure if I allow durations other than 1 and 6 and total duration 6, 3, and 8.

OK I can do that. There won't be a problem with an activity of duration = 4 occupying 2 different blocks?

ChicagoPianoTuner

Quote from: Liviu Lalescu on August 05, 2019, 08:04:16 PM
For the second problem, I'll try to craft something. Maybe a modified three activities grouped with activities occupy max 18 time slots from selection.
My current plan is to have every overlapping class have a dummy activity with same duration and constraint same starting hour (any day) constrained to start on a dummy day. We need the dummy activities because the teacher for 7J English might not be the same as 7K English. So for year 7, there are 9 dummy activities. Then use occupy max time slots from selection on dummy day = 18. Now, like you said, we just need an activities grouped constraint that appreciates the G->A continuity.

Liviu Lalescu

Quote from: ChicagoPianoTuner on August 05, 2019, 11:06:13 PM
Quote from: Liviu Lalescu on August 05, 2019, 08:04:16 PM
For the first problem, I think it is solved automatically, but you need to add a single not split activity of duration 4. Please tell me if you get assertion failed, I am not sure if I allow durations other than 1 and 6 and total duration 6, 3, and 8.

OK I can do that. There won't be a problem with an activity of duration = 4 occupying 2 different blocks?

I think not, if I understood correctly. Because the FET hours are contiguous and on the same day.

Liviu Lalescu

Quote from: ChicagoPianoTuner on August 06, 2019, 03:40:21 PM
Quote from: Liviu Lalescu on August 05, 2019, 08:04:16 PM
For the second problem, I'll try to craft something. Maybe a modified three activities grouped with activities occupy max 18 time slots from selection.
My current plan is to have every overlapping class have a dummy activity with same duration and constraint same starting hour (any day) constrained to start on a dummy day. We need the dummy activities because the teacher for 7J English might not be the same as 7K English. So for year 7, there are 9 dummy activities. Then use occupy max time slots from selection on dummy day = 18. Now, like you said, we just need an activities grouped constraint that appreciates the G->A continuity.

Oh, sure, I did not think of different teachers.

But this trick of yours with dummy activities might slow down the generation. I will try to craft something.

But I would like to see FET being able to solve your file with complete students before embarking on the difficult task of solving this.

ChicagoPianoTuner

Quote from: Liviu Lalescu on August 06, 2019, 06:36:13 PM
But I would like to see FET being able to solve your file with complete students before embarking on the difficult task of solving this.

Makes sense. I am making progress. I hope to have the FET file by the end of the week. Sorry for the delay and thank you very much for your hard work so far :)

Liviu Lalescu


ChicagoPianoTuner

Out of curiosity, how many activities do you think will be too much for FET in this situation? Just curious.

Liviu Lalescu

Only practice will tell. I think I have a solvable difficult file with ~20,000 activities. But it depends on the difficulty.