3 consecutive afternoons

Started by Omar Ben Ali, September 29, 2015, 08:02:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Omar Ben Ali

السلام عليكم ورحمة الله تعالى وبركاته

أحيانا إذا لم نستعمل تفريغ المدرسين يمكن لبرنام فيت

أن ينتج جدولا يتضمن 3 صبحيات متتابعة و3 عشيات متتابعة

وهذا الأمرقد لايكون محبذا من طرف المدرسين

هل من طريقة للتحكم في توالي عدد الصبحيات والعشيات بحيث نجعله 2

كأقصى تقدير؟

شكرا

To Mr Liviu Lalescu

sometimes if we do not use the constraint "A teacher's not available times" , Fet can generate a timetable with 3 consecutive mornings and 3 consecutive afternoons.
Is there a way to control the number of consecutive morning or afternoons and make it for example =2 as a maximum  ?
thank you .

Liviu Lalescu

Please show me a timetable with this wrong behaviour.

I'll see tomorrow if the problem can be solved or not.

Omar Ben Ali

Here an example with 3 consecutive afternoon and 3 consecutive morning
Thanks

Omar Ben Ali

#3
Here an example with only 3 consecutive afternoons and other with only 3 consecutive mornings
thanks

Liviu Lalescu

#4
1) It would be possible a constraint: Teacher(s)MaxTwoConsecutiveMornings and Teacher(s)MaxTwoConsecutiveAfternoons. So not a variable number, only three can be avoided.

2) It would be possible to implement, even if not perfectly.

3) Are you sure it is really useful? It requires some work from me.

4) To avoid for instance 3*4=12 hours on Monday, Tuesday, and Wednesday afternoon for teacher T, you can use the constraint activities occupy max time slots from selection: all activities of teacher T, selected slots Mo, Tu, We afternoon (12 slots), max occupied = how many would you like (for instance 8 ). This may allow a teacher to work for instance Mo 2 hours, Tu 4 hours, and We 2 hours. But it might be acceptable for you. Then add more constraints of this type (Mo, Tu, We morning; Mo, Tu, We afternoon; Tu, We, Th morning;... ; Th, Fr, Sa afternoon - 8 constraints in total I think, and you need only to modify the times and click add constraint, with the same activities).

Note for (4): If you add activities to teacher T, you need to add them also in the constraint activities occupy max time slots from selection.

Please let me know if (4) can be used. If not, I will be forced to implement (1), if (1) is what you need -- but (4) would be much easier for me.

Omar Ben Ali

For the constraint "A set of activities occupies max times slots from selection "=8, I used this constraint 8 times for one teacher with 24 hours a week and the result is ok because here Fet is obliged to place 4 hours in each day.
the first problem that we will forced to do it for all teachers.  The second problem, if a teacher have a number of hours less than 24 for instance 20 hours, Fet can generate a timetable with  Monday 4hours Tuesday 2hours and Wednesday 2 hours and this is not acceptable, because in general a teacher with 20 hours work 5 days per week.
I do not know if the fact of adding a new constraint will be useful for everyone. For me I think yes, but I will ask guys here in the forum,
more experienced , what they think and I tell you if it is necessary to add a such constraint.
Thank you for your kindness and your generosity.

Omar Ben Ali

السلام عليكم ورحمة الله تعالى وبركاته
لي طلب منكم إخواني متعلق بالموضوع الذي بدأته
حول جداول يتضمن 3 صبحيات متتابعة و3 عشيات متتابعة
السيد ليفيو أقترح استعمال القيد العدد الأقصى من المهام في الفترات الزمنية المحددة
لكن هذا يبدوا لي متعب جدا حيث يجب إدخال لكل أستاذ 8 قيود
وتصوروا إذا كان لدينا 60 أستاذ مثلا سنضطر لمسك 480 قيد
الحل الآخر هو إضافة قيد جديد يجعل التكرار المسموح به هو 2 فقط
من خلال تجاربكم خاصة بالنسبة للإخوة بالإعدادي
هل من الضروري إضافة هذا القيد ؟
السيد ليفيو أبدى مشكورا استعداده لإضافة قيد جديد لكن لا نريد أن نرهقه بفعل ذلك إذا
لم تكن هناك ضرورة فعلية يستفيد منها الجميع وليس فرد واحد
شكرا لتجاوبكم


Liviu Lalescu

Quote from: Omar Ben Ali on September 30, 2015, 09:48:26 PM
For the constraint "A set of activities occupies max times slots from selection "=8, I used this constraint 8 times for one teacher with 24 hours a week and the result is ok because here Fet is obliged to place 4 hours in each day.
the first problem that we will forced to do it for all teachers.  The second problem, if a teacher have a number of hours less than 24 for instance 20 hours, Fet can generate a timetable with  Monday 4hours Tuesday 2hours and Wednesday 2 hours and this is not acceptable, because in general a teacher with 20 hours work 5 days per week.
I do not know if the fact of adding a new constraint will be useful for everyone. For me I think yes, but I will ask guys here in the forum,
more experienced , what they think and I tell you if it is necessary to add a such constraint.
Thank you for your kindness and your generosity.

OK then, please tell me if you need 4 new constraints: Teacher(s)MaxTwoConsecutiveMornings and Teacher(s)MaxTwoConsecutiveAfternoons.

Omar Ben Ali

In general we divide teachers into 2 groups
First group : teachers work Monday morning and Saturday Morning (see image 1 or 2)
Second group : teachers work Monday afternoon and Saturday afternoon (see image 3 or 4).
This is the best distribution of 3 mornings and 3 afternoons.
can we hope getting only timetables of type  image1, 2 ; 3 or 4? namely the two consecutive mornings in Tuesday-Wednesday or Thursday-Friday and the two consecutive afternoons in Tuesday-Wednesday or Thursday-Friday ?
that is to say , can we avoid getting the two consecutive mornings or afternoons in Monday-tuesday and in Friday-Saturday ?
thanks

Liviu Lalescu

I'll sleep now. I hope I'll answer tomorrow, until I will leave. If not, I'll answer on my return (Sunday evening or Monday).

Liviu Lalescu

Maybe you could use constraint activities occupy max time slots from selection. For instance, to avoid 8 hours on Monday morning and Tuesday morning, select these slots, select all activities of the teacher T, and max occupied = 4.

fadil fnidaq

السيد بنعمر ما طرحته بالفعل لنا فيه كامل الاحتياج بحيث ان الجدول المنتج يكون غير محبذ من طرف الاساتذة فنجد مثلا توالي ايام الصباح او ايام المساء لذلك ألجأ الى حل نسبيا يحل الاشكال جزئيا فقط وهو تفريغ المدرسين مما يسبب ثقلا في انتاج الجدول ... المرجو اضافة القيد الذي طرحته ... وشكرا

Liviu Lalescu

@ Omar Ben Ali: your requests are possible. But aren't you over-constraining the timetable? These are very particular cases of constraints and if I implement them you might see that a timetable is not possible. Also a name for such constraints is difficult to find.

If you reply, please give me a .fet data file to see.

Liviu Lalescu

@ Omar Ben Ali: I could develop a special version for you, with the new constraints hard-coded in the source (for all teachers). We'll see how it works, and think then if it is good to add them to the general Morocco. Just let me know what you want (not same morning Mon-Tue, max two consecutive mornings/afternoons, etc.)

Omar Ben Ali

Quote from: Liviu Lalescu on October 01, 2015, 09:02:05 AM
OK then, please tell me if you need 4 new constraints: Teacher(s)MaxTwoConsecutiveMornings and Teacher(s)MaxTwoConsecutiveAfternoons.

It seems that the 4 constraints will be useful .
your help will be greatly appreciated . Thank you.