FET Forum

FET Support (English) => Get Help => Topic started by: Vũ Ngọc Thành on February 08, 2024, 04:29:02 AM

Title: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 04:29:02 AM
Hello LiViu
Many schools in Vietnam need to constraint  this
You can add this new constraint
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 09:46:43 AM
Hello, Vu Ngoc Thanh,

Can't you use teachers/students max building changes per day/week?
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 09:56:12 AM
Many schools in Vietnam need changed after hour2
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 10:06:51 AM
Many schools in Vietnam need changed after hour2
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 10:11:53 AM
Then I propose you two solutions:

1) Add a "Break" hour after the first two hours, and use max building changes per day = 1 and min gaps between building changes = 1,

or

2) Use the Mornings-Afternoons mode of FET, and use max building changes per day = 0. This will be for a FET day = half real day.
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 10:22:00 AM
Many schools in Vietnam   change after hour 2 and no change after hour 1 and no change after hour 3 and no change after hour 4 in morning or afternoon
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 10:28:09 AM
Many schools in Vietnam   change after hour 2 and no change after hour 1 and no change after hour 3 and no change after hour 4 in morning or afternoon. Illustrating images
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 10:28:29 AM
Exactly, in my post above I proposed you two solutions.

Are you using FET in the Mornings-Afternoons mode? How many hours per FET day?

How many hours per real day do you have? 5?
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 10:35:03 AM
Hmm... I see. So you can't use my solution (2). But I hope you can use my solution (1):

1) Add a "Break" hour after the first two hours, and use max building changes per day = 1 and min gaps between building changes = 1. You will have 6 hours per FET (half) day, of which the 3rd is break (X, red).

I might leave now and come back in a couple of hours, I might not be able to answer soon.
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 10:45:55 AM
if Add a "Break" hour after the first two hours then All Teacher  do not teach 2 schools will not teach 2 consecutive hours in hour2 and hour3
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 03:05:21 PM
I arrived short time ago.

Hmm... very ugly situation, indeed. I will think of this now. Please allow me a bit. It might be possible with some tricks. If not, maybe we could try to develop a custom version just to see how a customization would work. Would you be interested?

I will think now more thoroughly and answer hopefully soon.
Title: Re: max different buildings
Post by: Liviu Lalescu on February 08, 2024, 09:31:38 PM
Hello, Vu Ngoc Thanh,

I think I got the solution: a new constraint, teacher(s) max building changes per real day interval. You will add 4 constraints for your case (first interval is Morning1 to Morning3, then Morning3 to Afternoon1, then Afternoon1 to Afternoon3, then Afternoon3 to End_of_day). What do you say?

If you like it, I hope I will be able to begin tomorrow. I will let you know.

@Volker Dirr , please also tell me what you think about this. Also, let me know if you think of a better name for the constraint.
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 08, 2024, 11:54:01 PM
Yes, I like it
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 12:00:48 AM
Great!

Do you think that in general I need to add also for students (not only in Vietnam, but internationally)?
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 09, 2024, 12:25:45 AM
In Vietnam, this restriction is for teachers
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 01:55:02 AM
Even if so, I think that internationally it might appear as a request.

I'll begin work now. I hope it will be possible.
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 03:58:14 AM
I done the most important part, the algorithm. It was not too difficult.

Now comes the interface part, which is tedious and complicated. It will take a while. But it should come out nice.
Title: Re: max different buildings
Post by: Volker Dirr on February 09, 2024, 09:40:09 AM
I don't know a better name, but i think it is also fine/needed for students at some (rare) schools.
For example at my old school there are only 5 minutes for teachers and students to change the building between hour 1&2, 3&4 and 5&6. An the area is a bit larger. Impossible to change the building in that time for guys that were forced to swap between the gym and the building for years 5&6.
So this constraint can be useful there.
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 09:56:42 AM
Great! I did the generating code for both teachers and students. Now remains the tedious part of adding in the interface. I'll let you know.

Vu Ngoc Thanh, could you prepare for me a file to test, after I am done? I hope that in maximum 24 hours I'll have a usable snapshot.
Title: Re: max different buildings
Post by: Vũ Ngọc Thành on February 09, 2024, 10:12:57 AM
Yes, I agree
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 05:36:35 PM
I hope that in some hours I'll be ready. I did the most difficult and tedious and complicated parts. I will need to test.

Could you send me your file, please? If it is private, by email. And tell me which teachers need the new constraints.

I will put a snapshot when ready with coding and testing. I hope in less than 4 hours.
Title: Re: max different buildings
Post by: Liviu Lalescu on February 09, 2024, 11:19:45 PM
I have put the snapshot. See the snapshot announcement: https://lalescu.ro/liviu/fet/forum/index.php?topic=5840.0 , or get the snapshot version from: https://lalescu.ro/liviu/fet/download/test/

Please let me know.

Edit: As a personal appeal, please consider that FET is completely free software, depending on benevolent donations, so it would be great if you could help in this matter.
Title: Re: max different buildings
Post by: Liviu Lalescu on February 16, 2024, 08:25:50 PM
Hello, Vu Ngoc Thanh,

I just released the final FET version 6.17.0, with this new constraint. Thank you for your collaboration!