Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - yush

#1
OK, as far as helping with the performance, not as well as I've hoped. The problem is I am adding extra "free" hours to patch up the holes so I can use this "max single gap" constraint to avoid a certain layout. In the example of a 9 hours/slots afternoon, here is another case I want to avoid:
Recap: In a 9 slots afternoon, 3+3+3 is good, 4+4 is ok. 3+5 is NOT good, 3+4 is also NOT good.

With the "max single gap" constraints, I cannot really avoid the 3+4 case since there are two open slots between 3 & 4 out of 9. I tried to get it to work by adding an extra "free hour", so to avoid a single gap would achieve what I want. The problem is, there is no exact way to add the free hour at the right place.

So, I think it would be great if we can "adjust" this "single gap". By default, it is just one hour. Is it possible to "adjust" the gap to be other number of hours? So I can avoid any kinds of gap.

*** by the way, I meant to add this whole conversation to the thread that I posted earlier that resulted in this new feature. I did a search on the forum, saw the word "gap"... thinking that this was the right thread. I just realized my mistake.***
#2
It works! Now I need to verify that my trick actually helps with the optimization. But as far as the functionality of avoiding gap, it works!
#3
Quote from: Liviu Lalescu on July 03, 2025, 01:32:03 PMIt is ready: https://lalescu.ro/liviu/fet/download/custom/yushB/

Please check that src/engine/generate.cpp contains the string "Yush" twice.


Yup, got it. Actually has the string "Yush" three times. Will let you know if the result.
#4
OK. Qt all set up. Ready to compile.
#5
Quote from: Liviu Lalescu on July 03, 2025, 11:52:58 AMI am sure Darren would like to help us if you run into a problem.


I think I will need his help. Downloading Qt, it says it's going take over 1 day to finish the download!
#6
Quote from: Liviu Lalescu on July 03, 2025, 11:34:07 AMOK, I will try now and let you know soon.


Thanks! Downloading and installing Qt for Mac and Xcode!
#7
Yes, "Students (set) max single gaps in selected time slots?" would work.
#8
Quote from: Liviu Lalescu on July 03, 2025, 11:15:01 AMI like your style, Yush! You want to go to the root of the problem and ensure optimum behavior.

It is possible to make a custom constraint with what you need: respecting the no gaps even for a partial timetable. I will help you with this. It will be, at least for now, a custom version, not official FET, and I will think of the feasibility of adding it to the official FET.

Let me know if you need it.


Yes, if it doesn't impact the performance too much. I suppose checking it everytime an activity is placed as opposed to just at the end is a big different.

Also, I will have to re-learn how to compile things on my Mac. Last time I did it was over 10 years ago! Getting older makes me I am less confidence about learning or re-learning new things!
#9
For example, in the afternoon, I have 9 slots/hours (15 real minutes per slot). If it place a 3 + 5, the 1 hour would be wasted, leading the not enough open slot for the last activity. For that 9 hours, 3+3+3 is ok. 4+5 is ok. 4+4 is sometimes ok, but 3 + 5 is definitely not ok, so I want to avoid that.

Can't think of other ways to avoid that.
#10
Quote from: Liviu Lalescu on July 03, 2025, 10:35:29 AMYush, I don't understand more things:

1) This is another topic than your constraint, max single gaps in selected time slots.
2) The timetable for 2C-1 is full. Why can't you use max 0 gaps per week?
3) The incomplete timetable for 2C-1 may contain gaps, because there are 3 more activities-hours to be placed (149 versus 152).


3) This makes me understand why it isn't working for me.
2) Yes, when it is completed, it would be all filled. However, I am hoping to use this as a trick to avoid a certain configuration. In particular, I don't want FET to ever allow this to happen:

Subject A
- Gap -
Subject B

In other words, ALWAYS place activities next to each other. This is not actually want I need, but I am simplifying a very complicated need into the essential. So, I was hoping that this no-gap constaint is honored at all time, not just when the student set is finished.

Why? The long story is, as I am working on this very difficult timetable that I have (I have a solution now. But me being me, I am studying it to see how I can optimize it), I realize that the bulk of the problem is a certain layout will eventually lead to impossible situations toward the end. In this case, if there are too many gaps, or if the gaps is not placed just in the right way, there will not be enough slots for the last few activities.

In theory, FET should be able to move things around until enough slots are freed up. Unfortunately, I find that if the early activities are placed with gaps, these gaps are very difficult to be removed as those early activities are "buried" so deep with other activities, hundreds of activities deep.

So, my strategy is to give it structure, hence, you see me adding all those "preferred starting time" to make sure that activities are not placed in slots that is anything less than optimal. The improvement is drastic. With my added constraints, I get good result (though never full result, at in 1100/1137) about 50% of the time, as opposed to 2% of the time in the past. My theory is, since the default is random placement, it tends to "spread". However, with my timetable, I needed so many things to happen at the same time, I need everthing to be optimally "packed", not spreaded.

Hope the long story makes sense.



#11
I am using this constraint but seems that it is not working. I want to use it to avoid two consecutive gaps, so, I added a dummy activity called "Free". With this constraint on, we should not see this:

Subject A
Free
- gap -
Subject B

But I am seeing it.

Try the attached file. Stop it when it hit 604 or 612. Check the timetable for student 2C-1 (for 604) or 2B-1 for (612). You will see the scenario above, which should not be possible.

The constraint is set under "A set of students", for 2A-1, 2B-1 and 2C-1.

Am I setting up wrong? Or is it a bug?
#12
Running a new version with the extra min/max days constraints added to all activities that has the same starting time. Seems to be slower, not sure it will go further. Only time will tell. However, I am just thinking if this is true:
If one of the mindays constraint is at 20%, wouldn't have 5 duplicates of the same makes it less likely for FET to break that constraint?
#13
Yes. I did most of the min/max day by script, ensuring that I am not creating redundant constraints. I will now write another script to put them back on and try again. It's bed time for me now, will let you know of the result tomorrow! I am running more runs tongiht, so I will have more data to compare tomorrow.
#14
I haven't add the redundants in my file that worked. But I am going to keep working to improve it. Let me confirm what you are suggesting:
If I have several groups of activities that happens at the same time (I call them a block), I should have identical minday/maxday constraints for all the activities set in that block? These redundant constraints will help FET to run faster?
Am I right? If so, can you tell me a little more about why it would help? Given that activities with same starting time constraints will be placed together, I can't see why it would help. Or, am I getting it wrong?
#15
Got one working! Have to do some manual work:
- It got all the way to 1083/1137
- It has 4 remaining yr=2 activities
- I lock all time, unlock all yr=2, use advanced group activities order to move the yr=2 ahead of all yr=1
- At first it didn't work. Then I moved the the last 4 to earlier in the order
- Then it got to 1090, which means all the yr=2 are done
- lock all, unlock yr=1, try again -> solution!!!