Very difficult file needing your help

Started by yush, June 21, 2025, 05:54:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

Did you also see my second screenshot? It is a second group of constraints, probably with other purpose.

Actually, I tried last evening to disable the first group, but it seemed still too difficult.

yush


Liviu Lalescu

#32
Hello, Yush,

I made some tries to isolate the problematic constraints. It isn't occupy min, it isn't preferred times - the generation kept on being difficult.

The thing I discovered: I tried to make all min days between activities constraints to have the min days option = 1 (via modify multiple option). To my surprise, it made the generation much better. I did not obtain a solution but, as you can see from the attached files, after 20 minutes on the first run (on 8 threads - cores) I had 1101/1136 and on other two threads 1004 and 1005. It might be solvable, but again restarting seems needed, unfortunately.

Is this a feasible approach? To decrease the min days?

I started on 8 threads with random seed 1,0,0, 1,0,0.

Liviu Lalescu

Hmm... I might have been just lucky. I am trying again and the results are not so good. Limit 30 minutes, and I got in 2*8 runs only once 1006/1136, and the rest under 1000.

yush

Since we have a 8 days cycle, we want to spread the activities as well as possible. For example, for classes that has only 2, 3, 4 or 5 meetings, we want more days in between, thus all the extra min days constraints. I have already set them to less then 100%, 20.1% or 10.1% or 50.1% in some cases.

Yes, I know for sure that make all min days constraints to be 1 day makes it easier. But we really don't want to see a class with 4 meetings to meet 4 days in a row and now having class in the next 4 days.

yush

I wonder if you can add an advanced "interupt" feature. The user can interupt at any point of the generation. Have everything frozen as a snapshot. Then free to unlock any placed activities. In my case it would work something like this:
- initial run gets stuck at 1082 (which is where I am at now)
- I initiate an "interupt".
- I know by this point I only have a few more yr=2 activities to place
- I place a "temperary unlock/unplace"* (explain more later) on all yr=2 activities
- use group activities in initial order constraint to ensure that all remaining yr=2 activities will be placed ahead of all remaining yr=1 activities
- "uninterupt".
- The generation will pick up from where it left off, but now starts from all the "unplaced" yr=2 activities. However, instead of being randomly put in any available slots, it will be put in a slot that it was last placed, hence the "temperary unplace", it is an unlock with initial preference when placed.
- Since it was unlocked from a placed slot, it is guarantee to be placed if everything is placed in the correct order
- But once placed, the "memory" should be erased

This should mimic my manual process but allow for a more flexible user interaction.

What do you think?
-

Liviu Lalescu

Quote from: yush on June 23, 2025, 07:48:38 PMSince we have a 8 days cycle, we want to spread the activities as well as possible. For example, for classes that has only 2, 3, 4 or 5 meetings, we want more days in between, thus all the extra min days constraints. I have already set them to less then 100%, 20.1% or 10.1% or 50.1% in some cases.

Yes, I know for sure that make all min days constraints to be 1 day makes it easier. But we really don't want to see a class with 4 meetings to meet 4 days in a row and now having class in the next 4 days.

I understand. I saw some min days >1 with 100%. But your timetable is too difficult for FET and you might need to reconsider these.

To avoid you 4-4 situation, you might want to use preferred times for subactivities (which is the most efficient for FET), or choose two subactivities and add min 5 days between them.

Liviu Lalescu

About your "interrupt" proposal: I need to think of it. But unfortunately it looks quite complicated, and I think not very useful in practice. I tried my best on the current algorithm to avoid these things (I mean to avoid restarting or manual improvements).

Liviu Lalescu

Quote from: yush on June 23, 2025, 08:48:21 PMwill be placed ahead of all remaining yr=1 activities

Remaining? Only remaining are yr=2.

yush

Quote from: Liviu Lalescu on June 24, 2025, 01:49:11 PM
Quote from: yush on June 23, 2025, 08:48:21 PMwill be placed ahead of all remaining yr=1 activities

Remaining? Only remaining are yr=2.


By the time it get to 1082, only four yr=2 activities are left unplaced. The rest of the unplaced ones are yr=1. Since there are a few yr=1 activities betweens the yr=2 activities, I grouped the yr=2 together to be ahead of the remaining yr=1. Unlocked all the yr=2 and generate again... so far still not able to get all the yr=2 placed.

Liviu Lalescu

#40
I hope I understand now.

I propose you to use the official FET without temporarily interrupting. With restarting, which seems needed for your file. But we need to help FET in other ways, with additional 'help' constraints, and you should consider relaxing min days - these two might be related. Otherwise, you don't have 20 8-core computers...

You should consider adding preferred times, with X (red) in all other places than a single day or two. For the activities with the same starting time, you should add for all such activities in the same starting time constraint identical (redundant) preferred times. This might also take care of min days. See also my previous comment, that if you don't want 4 consecutive days you should consider a pair of subactivities and add min days = 4.

The same starting day constraints are needed?

The occupy min constraints are needed? (I think I saw 4 of these.). Maybe these constraints are slowing things, I am not sure.

Then, if the file is easier, we could try it together. Otherwise, as it is now your file, no chance for my computer to finish.

yush

Quote from: Liviu Lalescu on June 24, 2025, 03:20:07 PMYou should consider adding preferred times, with X (red) in all other places than a single day or two.

For prefer start time with more red "x". I can actually do without any of the prefer start time for a certain "duration". Again, that's done to give it more structure, which I think is actually helping. I might be completely wrong. You can remove them and see if it because easier. But remove just the ones that applies to "duration" only.

Quote from: Liviu Lalescu on June 24, 2025, 03:20:07 PMFor the activities with the same starting time, you should add for all such activities in the same starting time constraint identical (redundant) preferred times.

I thought that activities that have "same starting time and day" constraints would be placed together, and it it would be more efficient to have just one of them to have "min day" constraint, since all the other one would be redundant if I add them.

The same starting day constraints are needed.

The occupy min constraint is to ensure that science classes have the same subject have some minimim non-overlapping class cause there is only one lab that they share.

This is how I used min/max day in between to spread the activities currently
- NA=7: minDay=1 100%
- NA=6: minDay=1 100%
- NA=5: minDay=1 100% + A2,A3,A4,A5: minDay=2 10.1%
- NA=4: minDay=1 100% + minDay=2 20.1%
- NA=3: minDay=2 100% + minDay=3 20.1%
- NA=2: minDay=3 100% + minDay=4 20.1% + maxDay=5 10.1%

I used to have the 10.1% and 20.1% at higher percentage. You can try lower them further.
I don't think I want anything less then NA=4 to have too many classes in consecutive days.
But I can probably do NA=5 differently. Would this be easier?
NA=5: minDay=1 100% + A1,A5 minDay=6 50.1%, + A1,A4 minday=4 50.1%
I am not sure what percentage to assign to the non-100% ones. So, I just put 50.1% here. I am afraid a percentage too low, such as 20.1% would allow it to break too often. What do you think?

yush

I decide to try this for NA=4 or 5
- Get the last 3 activities
- A1 & A3 mindays=5 @20%
- A1 & A2 mindays=2 @20%
- A2 & A3 mindays=2 @20%
- let the other activities go anywhere as long as it is not the same day

I think this way allows for more possible arrangement.

Liviu Lalescu

Ok. Don t add redundant min days, i was referring to preferred times redundant, which help fet.

Liviu Lalescu

The 10% and 20% are very low and easy for the algorithm. I am a bit concerned about min days = 3 or even 2 with 100%.