Help with break times

Started by infoo_, January 12, 2023, 08:22:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infoo_

#15
Hello, thanks for the patience Liviu! I am new using FET and sometimes I get lost with the help

Quote from: Liviu Lalescu on January 13, 2023, 01:41:35 PMI am not sure I understand. But why complicate things so much?

I don't know. Forget about that.

Quote from: Liviu Lalescu on January 13, 2023, 01:39:41 PMYes, and add this only for one split index of an activity split into 2. See constraint subactivities preferred starting times. And maybe add with weight <100.0%.

I'm so sorry, I do not understand how the constraint works. I have read the Help button but I got lost when trying to pick from a list the Teacher/Students set/Subject (why the activities are not displayed to pick them?). Also I got lost when talking about "Component number" and Duration (checkbox).

Could you use my FET file and modify it by deleting what you said and adding a few constraints that you are referring to? Or tell me the correct configuration, please? So then I can replicate for all subactivities.

Don't worry if you are busy, in the meantime I can think of other more automatic solutions (or try to understand what you propose).

Thanks!

Liviu Lalescu

#16
Quote from: darkwindow on January 14, 2023, 12:56:11 AMI'm so sorry, I do not understand how the constraint works.

No problem! :)

I'll try to write more detailed:

1) Remove the breaks and decrease the number of hours per day.

2) Add a constraint subactivities preferred starting times affecting only the needed subactivities. So, I think split index = 2, duration = 2, and all teachers/students/subjects/activity tags. Or you can add more constraints of this type, selecting the subject, for instance. In this way, the first activity from an activity split 2+x will be placed as needed. If you want, you can add an activity tag to the activities which are 2+2 and use it in the filter of these constraints.

Please let me know.

Liviu Lalescu

I had some time now, so I worked on your file. Please see my attached file.

infoo_

#18
Thanks for the work, Liviu! It is better.

Quote from: Liviu Lalescu on January 14, 2023, 09:16:49 AMIn this way, the first activity from an activity split 2+x will be placed as needed.

I don't understand this quote.

With respect to the FET file you have attached, I think there are a lot of divisions between break times. For instance, I will show a timetable example that was generated by your FET file and mark with a circle those subactivities that are "splitted" by imaginary break times:

You cannot view this attachment.

You cannot view this attachment.

As you can see, there are a lot and I am not showing the entire schedule

In 2022 I did not take charge of setting up the schedule, but I could see that, even respecting the teaching availability, the sub-activities of duration = 2 were put in the first hours (speaking of the Morning), since in the morning there are 2 hours, 1 break time, 2 hours and 1 break time in order to minimize the divisions, I guess.

I think it was a good strategy. Is it okay to replicate this strategy so there aren't as many splits as in the pictures I showed?

Because if I present a schedule like in the images, the school probably won't take it, since there are subjects that only have 2 hours per week, and if these teachers want to take an evaluation, break time hurts them.

Liviu Lalescu

#19
About my quote: I was wrong, you need all activities with duration 2 not on a break.

See this attached file. Seems like there will need to be a single wrong activity with duration 2 over a break.

Please think of this and try to imitate what I did. You can add/replace more constraints for the important activities, so the wrong activity will not be important.

Edit: you might want to swap the subactivities preferred starting times (split index 1 = 100% and split index 2 = 99.99%), because activities with duration 2 which are single-component are more important.

infoo_

#20
That's what I want!! You did an amazing work trying to understand what's happening :D :D

Quote from: Liviu Lalescu on January 14, 2023, 08:49:45 PMbecause activities with duration 2 which are single-component are more important.

What do you mean by "single-component are more important"? If an activity duration is 2-2-1, the first 2 and the second 2 are equally important, isn't it?

EDIT: I tried swapping the weight % as you said in my real FET file and the generation is freezed. Perhaps is more desirable swapping them again like the first time. I don't know why.

EDIT 2: What is the difference between these two options?:

1º) One "Activities preferred starting times" all activities, duration = 2, weight = 99%
2º) Two "Subactivities preferred starting times" constraints:
  2aº) Split index = 1, all subactivities, duration = 2, weight = 99%
  2bº) Split index = 2, all subactivities, duration = 2, weight = 100%

The 2º option (the one that you have proposed in this thread) is more accurate than the 1º?

Liviu Lalescu

I am glad I could help.

Single component activities: activities which are not split (for instance id 3 in your file).

I tried swapping, so 1st component is always good and 2nd component 99.99% and it worked on my computer, leaving one conflict.

Any should work, but if you constrain the first component always good and second 99.99%, it might be better, since single component activities will always be respected.

infoo_

#22
Oh, I understand.

Unfortunately, in my real FET file with the subactivity constraint and weight = 100% in index = 1 (single component activities), the generation got stuck. Some teachers will be a bit angry as happened last year... :o :P :P

I hope I don't require more help, but if not, do you consider that I continue in this thread or open a new one? I think that the main question have already been solved by you.

Liviu Lalescu

#23
I don't understand. In my newly attached file only a single activity, with split index 2, is wrong (you might need to let it compute for some more seconds, until it finishes).

Yes, you can open new threads for other problems.

infoo_

#24
Hello

Please take a look at the attached FET file. At the moment, that is my real FET file with teacher's names changed.

Look at those two "Subactivities preferred starting times" constraints. This are the broken soft constraint that I am worried about, not because the school won't accept the schedule, but I would like to know if there is a solution for the following subactivities to be not "dividied" by the imaginary break times, since they are single-component activities, as we discussed before:

Soft conflicts list (in decreasing order):

Time constraint subactivities preferred starting times broken for activity with id=44 (2 - Teacher AM - Educación Tecnológica - 1C), component number 1, increases conflicts total by 0.99
Time constraint subactivities preferred starting times broken for activity with id=165 (2/3 -    Teacher S - Biología - 3C), component number 1, increases conflicts total by 0.99
Time constraint subactivities preferred starting times broken for activity with id=172 (2 - Teacher R - Formación Ética y Ciudadana - 3C), component number 1, increases conflicts total by 0.99

Time constraint subactivities preferred starting times broken for activity with id=185 (2 - Teacher U - Artes Visuales - 4A), component number 1, increases conflicts total by 0.99
Time constraint subactivities preferred starting times broken for activity with id=207 (2 - Teacher U - Artes Visuales - 4B), component number 1, increases conflicts total by 0.99
Time constraint subactivities preferred starting times broken for activity with id=239 (2/4 -    Teacher AR - Lengua y Literatura - 4C), component number 1, increases conflicts total by 0.99
Time constraint min days between activities broken: activity with id=118 (    1/5 - Teacher AB - Matemática - 2C) conflicts with activity with id=116 (2/5 -    Teacher AB - Matemática - 2C), being 1 days too close, on days Martes and Martes, conflicts factor increase=0.99.
Time constraint subactivities preferred starting times broken for activity with id=49 (    2/4 - Teacher AG - Historia - 1C), component number 2, increases conflicts total by 0.95
Time constraint subactivities preferred starting times broken for activity with id=112 (    2/4 - Teacher K - Inglés - 2C), component number 2, increases conflicts total by 0.95
Time constraint subactivities preferred starting times broken for activity with id=117 (    2/5 - Teacher AB - Matemática - 2C), component number 2, increases conflicts total by 0.95
Time constraint subactivities preferred starting times broken for activity with id=171 (    2/4 - Teacher AE - Físico-Química - 3C), component number 2, increases conflicts total by 0.95
Time constraint subactivities preferred starting times broken for activity with id=307 (    2/4 - Teacher AD - Química - 5C), component number 2, increases conflicts total by 0.95
Time constraint min days between activities broken: activity with id=316 (    2/3 - Teacher V - Artes Visuales/Música - 1C) conflicts with activity with id=315 (1/3 -    Teacher V - Artes Visuales/Música - 1C), being 1 days too close, on days Lunes and Lunes, conflicts factor increase=0.
Time constraint min days between activities broken: activity with id=322 (    2/3 - Teacher V - Artes Visuales/Música - 2C) conflicts with activity with id=321 (1/3 -    Teacher V - Artes Visuales/Música - 2C), being 1 days too close, on days Lunes and Lunes, conflicts factor increase=0.

As you can test, swapping the weights % of those 2 subactivities constraint freezes the generation. Would it be possible to unfreeze it?

P.S. I've been generating several times and it seems the conflicts are on the same subactivities. If possible, I don't want a manual solution i.e. changing activities duration, but something like a new constraint.

P.S.2. Don't worry about "Artes Visuales" and "Artes Visuales/Música" subjects, it doesn't matter if they overlap within break times, since these subjects do not usually take exams.

Liviu Lalescu

You forgot to attach the file.

Liviu Lalescu

Please see what I did. I modified the 2 constraints subactivities (increased their weight) and added 3 new ones (I commented with "Liviu"). Very hard (generating on 8 threads) I obtained a timetable in about 1m 40s. I attach the file and the solution. You might want to add new constraints subactivities for other subjects, again with 100%, but decrease for those subactivities with <100%.

PS: Don't worry, the FET version on my hard disk is 6.8.2, it will warn you, ignore the warning.

infoo_

Quote from: Liviu Lalescu on January 15, 2023, 09:27:05 PMPlease see what I did. I modified the 2 constraints subactivities (increased their weight) and added 3 new ones (I commented with "Liviu"). Very hard (generating on 8 threads) I obtained a timetable in about 1m 40s.

Why am I still waiting and similar setup??:

You cannot view this attachment.

 ::)  ::)

Liviu Lalescu

Oh, no:

1) It is by luck. If you want to generate like me, here is the random seed (generate single with the starting random seed):

Generation started on: 1/15/23 11:19 PM

The random seed at the start of generation is:
   s10=3048377257, s11=1093601217, s12=1636879884,
   s20=2617088376, s21=2327605762, s22=1796296080.

This file was automatically generated by FET 6.8.2.


Generation ended on: 1/15/23 11:20 PM

The random seed at the end of generation is:
   s10=3120478977, s11=1776100026, s12=3496293733,
   s20=3698793820, s21=1187345559, s22=186494922.

This file was automatically generated by FET 6.8.2.

2) To generate on 8 cores, please use generate multiple on 8 threads. There are 8 separate timetables.
Otherwise (generate single) it is single core.

infoo_

#29
Quote from: Liviu Lalescu on January 15, 2023, 09:27:05 PMPlease see what I did. I modified the 2 constraints subactivities (increased their weight) and added 3 new ones (I commented with "Liviu"). Very hard (generating on 8 threads) I obtained a timetable in about 1m 40s. I attach the file and the solution. You might want to add new constraints subactivities for other subjects, again with 100%, but decrease for those subactivities with <100%.

Thanks for sharing it!

After 5 m 51 s I could generate the timetable, now there are other important broken constraints such as:

  • Time constraint subactivities preferred starting times broken for activity with id=308 (2 - Teacher AM - Tecnologías de la Información - 5C), component number 1 (this is on your "liviu5_data_and_timetable.fet" file)
  • Time constraint subactivities preferred starting times broken for activity with id=44 (2 - Teacher AM - Educación Tecnológica - 1C), component number 1, increases conflicts total by 0.99 (from my generation)
  • Time constraint subactivities preferred starting times broken for activity with id=172 (2 - Teacher R - Formación Ética y Ciudadana - 3C), component number 1, increases conflicts total by 0.99 (from my generation)

I think we are convinced that it is impossible, under these circumstances, to make everyone happy. It is impossible to respect all the constraints, and I knew this since last year when the person in charge of the schedule had to put the hours cut by break time.

My idea was to minimize, at least now I have a software that tell us with 99% of precission that this is impossible to generate.