How work with simultaneous but different working hours?

Started by igorsch, March 14, 2025, 02:01:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

igorsch

Hello,

I work in an educational institute where we have courses running in simultaneous but different time periods, like this:

Course 1:
18h30 - 19h20
19h20 - 20h10
20h20 - 21h10
21h10 - 22h00

Course 2:
19h00 - 19h45
19h45 - 20h30
20h30 - 21h15
22h15 - 22h00

How could we set FET to avoid put teachers in simultaneous activities in both courses? Is there a restriction to block periods if another one is occupied?

Thanks in advance!

Liviu Lalescu

Hello, and welcome!

If you showed us your file it might be clearer. Otherwise, I am not sure I understand correctly, how did you input the FET hours? 1, 2, 3, and 4? And a teacher is for instance not allowed both in Course 1 19h20-20h10 and in Course 2 19h00-19h45?

If so, maybe these will help:

1) Teacher(s)/students (set) max 1 hours daily in hourly interval [1, 3). This is the easy way and preferred if possible.

or

2) Constraint activities (all activities of a teacher) occupy max 1 time slots from selection of slot 1 and slot 2 of Monday, then another constraint Tuesday, ..., Friday, then this for all the necessary teachers. This is a more flexible and general constraint.


igorsch

Thanks for reply, and another thanks for developing such helpful software!

Maybe I was not clearly. These two courses run with different and intersect time schedules, like I said, and some teachers work in both of them. Example, if teacher A has the first classtime in course 1 (18h30-19h20), he can't work in first time of course 2 (19h00-19h45), and if teacher B have the the 3rd classtime in course 2 (20h30-21h15) he can't work in 3rd (20h20-21h10) and 4rd (21h10-22h00) time of course 1.

If you like, my file is in this link.

My colegues and me think that FET should have a time constrain to prevent activities of same teacher/subjects in a group of classtime/hours, but if you can think another simplier solution to our problem, I would love to read.

Thanks for attention.

Liviu Lalescu

You are welcome!

I am analyzing your file and will let you know.

Could you please confirm: hours 1..20, there are 6 conflicts: (13, 17), (14-17), (14-18), (15-19), (16-19), and (16-20)?

igorsch

Quote from: Liviu Lalescu on March 14, 2025, 06:57:09 PMYou are welcome!

I am analyzing your file and will let you know.

Could you please confirm: hours 1..20, there are 6 conflicts: (13, 17), (14-17), (14-18), (15-19), (16-19), and (16-20)?

Exactly

Liviu Lalescu

Using the constraint activities occupy max time slots from selection, there are 6 constraints on each day, so 6x5=30 constraints on the entire week for each teacher. How many teachers teach both courses? I see you have ~100 teachers, so for all of them it would mean 3000 constraints (I think it would take 1-3 hours to input them manually), but I hope there are few teachers in both courses.

I will think of better solutions, but let me know the answer to my question above.


Liviu Lalescu

Hello again!

I added for the first teacher. It took me 4m20s. I estimate that to add for all 100 teachers would take much less than the computed ~430 minutes. I assume it would take less than 3 hours. The reason is that I added for the first teacher, not knowing the exact procedure and making mistakes and reading the paper.

See the attached file for the first teacher, the last 30 time constraints.

You are right, if there are many teachers like that we would need a new constraint, for all the teachers or for a teacher, mutually exclusive time slots. But I don't know a good name for this, and I always prefer to keep the number of types of constraints to a minimum. Is your situation common for more institutions? Are there many teachers in both courses?

I might go to sleep soon (21:55 here now).

igorsch

Quote from: Liviu Lalescu on March 14, 2025, 07:17:08 PMHow many teachers teach both courses?

Not many, around 10, maybe less. But this difficult made our team to feed another software that is easier to swap activities after FET gave us a very nice starting point. I would like to make the entire timetable with FET, this is the reason to ask for help here.

Quote from: Liviu Lalescu on March 14, 2025, 07:55:43 PMIs your situation common for more institutions?
Here in Brazil, it's common to a big institution working with many "education categories" (Idk the english term for this), like latu sensu, strict sensu and technical degree, each one with his own time schedules and class duration, but sharing teachers. Almost every university and federal institute of education (where I work) could happen this.

I'm very happy with your help! Tell me if I could help in any way.

Liviu Lalescu

OK, I will think and maybe try to add some new constraints: teacher(s)/students (set) pair of mutually exclusive time slots. If so, I hope you could help with testing. I will let you know, here.

Liviu Lalescu

I just finished the engine part, the most important and difficult. It compiles, but I cannot run it until I make the interface part.

I need to take a break now. I hope to be ready later today with a snapshot for you to test, if you would like to help me with that. I will announce here.

igorsch

Quote from: Liviu Lalescu on March 15, 2025, 03:40:40 AMOK, I will think and maybe try to add some new constraints: teacher(s)/students (set) pair of mutually exclusive time slots. If so, I hope you could help with testing. I will let you know, here.


I think the solution should create a constrain to block teachers in an hour if he's working in another specific hour.

I'll be glad to test.

Liviu Lalescu

Yes, exactly, that's what I said. The engine (most difficult and important) should be OK, I need to add the interface code and will put a snapshot for you to test. I hope I will be ready in say 5 hours, or more.

Liviu Lalescu

#12
It is ready, I hope you'll like it:

https://lalescu.ro/liviu/fet/download/test/

I also attach your file, modified by me. The perfect variant does not solve because of teacher Julio, so I deactivated for him the last day's conditions. I added constraints for all the teachers, with the "Add constraints" button, 30 times (5 days x 6 constraints per day).

Please let me know. I hope to release soon the final version, maybe on Monday 17 March.

igorsch

Amazing! Works like a charm!

Many thanks, Liviu, I send our regards from Instituto Federal da Bahia, tell me if you need something. I'll frequently visit your forum!

Liviu Lalescu

Thank you for the report! I am glad it works! You did a good suggestion.

I hope to release tomorrow the official version.

Regards from Craiova, Romania! :)

Well, FET is free software so, if you can afford a donation, it would be great.