massimo un solo giorno a settimana di lezione dalla prima alla quinta ora

Started by utismetis, September 17, 2016, 09:55:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

utismetis

Buonasera,
alcuni insegnanti si lamentano perchè hanno 2 giorni in cui lavorano dalla prima alla quinta ora senza interruzioni: esiste un vincolo per ottenere massimo un solo giorno a settimana di lezione dalla prima alla quinta ora?
Grazie

Liviu Lalescu

Buona sera,

If you are allowed to choose the day in which a teacher is allowed to have lessons from 1 to 5, you can add n_days-1 constraints activities occupy max time slots from selection to ensure that in each other day the teacher works maximum 4 hours.

utismetis

Good evening Liviu,
thank you for answer; i prefer that fet chooses the day in which the teacher works 5 hours a day. Anyway if i set in fet that a teacher works 5 hours in a day only, the program can makes him work a second day 5 hours, a third 4 hours, a fourth and fifth 2 hours. I'd like to have a day only with 5 hours.

Liviu Lalescu

Quote from: utismetis on September 18, 2016, 08:07:42 PM
Good evening Liviu,
thank you for answer; i prefer that fet chooses the day in which the teacher works 5 hours a day.

Then my method will not apply. But you might ask the teachers and make a distribution of these full days around the week.

Quote
Anyway if i set in fet that a teacher works 5 hours in a day only, the program can makes him work a second day 5 hours, a third 4 hours, a fourth and fifth 2 hours. I'd like to have a day only with 5 hours.

No. You misunderstood me. With n_days - 1 constraints you can ensure that in each of these (n_days - 1) days the teacher has maximum 4 working hours. But you need to choose a remaining day in which the teacher works 5 hours (or less).

utismetis


Liviu Lalescu

With a constraint activities occupy max time slots from selection, all activities of teacher T, select with X all slots of Monday, max occupied = 4, then on Monday the teacher T will work maximum 4 hours. The same for other days, without a single day, which you choose.

Please let me know if now is clear.

Liviu Lalescu

Talking with another user, I thought of something else. If your number of days per week is 6, add 5+4+3+2+1 = 16 constraints activities occupy max time slots from selection, for an exact result of what you want. Each constraint is for a pair of days, selects these slots with X, and the maximum number of hours is 9. So only one day will allow 5 hours per day.

I hope I am not mistaking.

I attach an example for slightly different conditions (5 days per week, 6 hours per day, a single day with 5 hours per day).

utismetis

Thank you very much Liviu, i think i have understood:
in activities i select all activities of teacher
in hours i select with x all hours of the days in wich i want that teacher works 
in max occupied i write 4, if teacher has to work maximum 4 hours.
Is it correct?

Liviu Lalescu

Quote from: utismetis on September 19, 2016, 05:17:01 PM
Thank you very much Liviu, i think i have understood:
in activities i select all activities of teacher
in hours i select with x all hours of the days in wich i want that teacher works 
in max occupied i write 4, if teacher has to work maximum 4 hours.
Is it correct?

Yes, add a single constraint for each day, select with X all slots of the day.

But please see my previous answer (the one with the attachment), it might be perfect for what you need (but you need to add more constraints).

utismetis

Hi Liviu,
i downloaded and tried your attach, (i have 5 days and 5 hours per day), it's a very good constraint, but a bit longer, because it's about pair of days.
Thank you very much again for your time and your expertice. 

Liviu Lalescu

Yes, you need to add 10 constraints for each teacher. But this might be done in a reasonable time.

Lizio

And if you have 6 days working, you put a constraint for max 5 hours working, 1 dummy activity that is the free day (5 hours long) and then you can add a dummy activity for each techer with no students of 4 hours with the constraint of not repeating in the same day at 100% and in this way fet decides in wich day to put the 5 hours work day and in all the other days it puts max 4 hoiurs work.