Possible bug - not placing a possible activity

Started by nelsonjrgomes, July 21, 2025, 04:27:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nelsonjrgomes

Hi,

I'm having an (intermitent) problem that is making me nuts.

When making timetables for the next school year (mornings / afternoons mode), I'm facing problems with a single students group, that is blocking the genenation of timetables - when placing the last two activities, that must be placed beginnin or ending students day, it doesn't give any timetables (to reference, there are 30 available blocks to 29 activities, and the unocupied block must end students morning).

When I break the generation, and seeing the highest timetables, I could see that the last two activities (single hour activities) could be placed, respecting the students and the teacher restrictions previously defined.

To try and circunvent this problem, I created a fake activity, without teachers, that should be placed in the 30th block, ending one of the mornings. Well... Sometimes it works flawlessly, and sometimes FET places correctly the 29 real activities, and when placing the 30th one (the fake), isn't able to place this fake activity, and doesn't advance...

So you can understand what I'm saying, I send you this screenshot - the 29 real activities are all correctly placed, there is a gap for the fake activity, that must be placed in the 6th block of one of the days, and FET doesn't place it... And, of course, I have no restrictions on how many days the students can work on the 6th block of the day.

You cannot view this attachment.

What drives me nut is that it's (apparently) random... Today in the morning, FET was giving me timetables. However, now, With the same time restrictions, it doesn't - And I can see no reason as to why it doesn't...

Of course, if you want to see the .fet file, I'm more than ok to share it.

Thank you in advance for any inputs on what's happening...

Liviu Lalescu

Hello,

Please send me your fet file as soon as possible... Hmm...

You can attach here, archived if too large, or send by email: fet4 AT lalescu.ro

nelsonjrgomes

Hi,

Thanks for your quick reply. I've sent the file by email, as it has around 1.1 Mb.


Liviu Lalescu

Hello! Email received, thank you! I'll see it now.

Are there private details (like teachers' names), or may I share the answer publicly here on the forum?

nelsonjrgomes

#4
No problem, you can share the solution over here.

Liviu Lalescu

I see you have a very complex file - you used many kinds of constraints. I appreciate this.

Could you tell me the ID of the problematic activity?

In how much time do you get a solution?

Did you think of rooms? I see you have some 99% weights in the space constraints, and maybe this is the cause for random success/insuccess.

I am now generating on 8 threads, and I got to 717/840 in 3 threads and to 657 in the other 5. I saw that the generation seems to lock around some bottlenecks, and then continues. My generation time is now 16m 34s.

nelsonjrgomes

#6
Yes, there are A LOT of constraints... What a puzzle!

The "fake" activity is the 718th to be placed, and is the one that seems to not being able to be placed - in some of the timetables the gap may not be in the 6th block of the day, but in some it's possible (as the screenshot attached).

It I delete (or deactivate) the fake activity, it blocks in placing another of the activities of this student set 12_2A - In this case, activity ID.51 doesn't get assigned - but it should be, as the scrrenshot attached...

It takes quite a fet time to generate timetables, as it is, in fact, a complex timetable (and there is more to come, as there are a few activities that are not yet placed).

Liviu Lalescu

...Investigating, I will let you know as soon as I'll know exactly the problem. I hope it is not a FET bug.

nelsonjrgomes

One extra info - this file was based in one from the previous year, where I deleted the activities and constraints (so, made in a older FET version), in order to keep the base structure - could this be the cause?

Liviu Lalescu


Liviu Lalescu

I think I know the explanation:

You have max 0 beginnings at second hour for 12_2A. This year has 4 groups. The constraint is propagated to each group. I suspect in your problematic highest-stage there is a group from these 4 which has free at the first hour. FET cannot place ID 1039 in the last hour, because it would break max 0 beginnings for this group.

:)

I do not have right now a 717-stage to check, I need to wait some time, but I am sure this is it.

nelsonjrgomes

In theory, all of the groups should begin early all of the days - and students set 12_2A, 12_2B, 12_3 and 12_4 should have a gap in the 6th block of a ramdom day...

I set the subgroups this way:
- Some of the students have subject C.Pol; other AIB. One of the two are mandatory.
- The same way, some have subject EMRC, the other Cid. Des.. One of the two are mandatory.

So I set this 4 subgroups, so I can "force" them at the same time. Are you saying that I should have made a different structure?

Liviu Lalescu

Well, I did not refer to your structure. I just explained you that FET cannot place ID 1039 in the last slot directly in that case, so it seems it is hopefully not a FET bug.

About your file structure, for each optional you could divide by categories. Divide year 12_2A by 2 categories, (C.Pol, AIB) and (EMRC, Cid). You can add same starting time for activities, if needed.

Also, for a gap in the 6th, you could use activities occupy max time slots from selection.

Liviu Lalescu

#13
If the gap in the 6th comes natural from max 0 gaps and max 0 late beginnings (each subgroup has 29 hours), then it is better not to add my suggested occupy max, because I think it only slows down the generation.

Yes, I think your structure is wrong. You can add and divide year 12_2A by 2 categories, or add year 12 and divide it by more categories, and there you have also an option so that one category is permanent. Please experiment or ask.

nelsonjrgomes

Hi, Liviu,

I removed all the restritions regarding the problematic students group (now, they have activities that take 30 of the 30 available times), and now the blockage is further away - but I'm trying to find a solution. In my head, the solujtion should be simple, but I'm finding it hard to make FET give timetables, and perhaps I'm into something.

I'm working in the mornings - afternoons mode. Just to confirm - a gap from the morning to the afternoon doesn't count as such in gaps per day - only when using the real gaps per day (or real gaps per week), they are conunted, right? If so, what does the option max gaps per morning + afternoon counts?

To put in perspective - if the teacher works in the first 5 blocks in the morning, doesn't work in the last block of the morning, and then restarts working in the first block of the afternoon, it doesn' count as a gap per day, right? But it would count as gap per real day? And would it count in the gap per morning + afternoon?