Author Topic: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora  (Read 520 times)

0 Members and 1 Guest are viewing this topic.

utismetis

  • Level 4
  • ****
  • Posts: 413
  • I Love Free Software!
    • View Profile
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #1 on: September 18, 2016, 11:19:15 AM »
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.
« Last Edit: September 18, 2016, 11:25:00 AM by Liviu Lalescu »

utismetis

  • Level 4
  • ****
  • Posts: 413
  • I Love Free Software!
    • View Profile
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #2 on: September 18, 2016, 01: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. 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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #3 on: September 18, 2016, 01:13:34 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

  • Level 4
  • ****
  • Posts: 413
  • I Love Free Software!
    • View Profile
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #4 on: September 18, 2016, 01:35:29 PM »
Yes, Liviu, i haven't understood exact constrain i have to set.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #5 on: September 18, 2016, 01:39:16 PM »
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #6 on: September 19, 2016, 10:13:46 AM »
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

  • Level 4
  • ****
  • Posts: 413
  • I Love Free Software!
    • View Profile
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #7 on: September 19, 2016, 10:17:01 AM »
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #8 on: September 19, 2016, 10:21:14 AM »
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

  • Level 4
  • ****
  • Posts: 413
  • I Love Free Software!
    • View Profile
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #9 on: September 19, 2016, 10:36:40 AM »
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5112
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #10 on: September 19, 2016, 10:41:52 AM »
Yes, you need to add 10 constraints for each teacher. But this might be done in a reasonable time.
« Last Edit: September 19, 2016, 10:44:49 AM by Liviu Lalescu »

Lizio

  • Level 2
  • **
  • Posts: 73
    • View Profile
Re: massimo un solo giorno a settimana di lezione dalla prima alla quinta ora
« Reply #11 on: September 20, 2016, 10:26:06 AM »
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.