2 hours consecutive on demand only once a week

Started by Christian Kemmer, November 06, 2012, 07:26:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Christian Kemmer

For the next timetable at our school, I need the following:

Hours 5 and 6 at one day have the same activity.

So I could decide by myself to add an activity 2+1+1 and give the subactivity with "2" hours a special activity-tag "2h" or something like that. I can do this for many activities and then only allow activities with tag "2h" to be placed in hour 5.
But if I do this, I have to decide, which acitivity should be placed there. If I choose too much activities, there will also be activities lasting two hours during other times of the day, which is not wanted in many cases.

I could also use constraint "consecutive if same day", but then an activity 1+1+1+1 may become 2+2. But I only want 2+1+1 or 1+1+1+1 for that kind of activities. I am also not sure, how to ensure that "consecutive if same day" is only used for hours 5 and 6.

So, what would be the best solution to let FET decide which activities to use, so that for every student and every teacher for every day I have the following:
If the student / the teachers has an activity in hour 5, he also has this activity in hour 6. Each activity may only have one two hour lesson (like 2, 2+1, 2+1+1, 2+1+1+1), but no activity is allowed to have more than one two hour lesson (like 2+2, 2+2+1).

I hope that I have explained it clearly.

Thanks for your help.

Volker Dirr

#1
Quote from: Christian Kemmer on November 06, 2012, 07:26:29 PM
I could also use constraint "consecutive if same day", but then an activity 1+1+1+1 may become 2+2. But I only want 2+1+1 or 1+1+1+1 for that kind of activities.

That can be done by 2 min n day constraints.
First min n day constraint with all 4 subactivities and consicutive is same day = true.
The second min n day constraint contain only 3 subactivities without the consicutive if same day flag.

Quote from: Christian Kemmer on November 06, 2012, 07:26:29 PM
[...] I am also not sure, how to ensure that "consecutive if same day" is only used for hours 5 and 6.

hmmm... i can't see a solution for this at the moment. (only if you force one subactivity to be placed in the 5th hour. you can add an other min n day constaint then to this and one other subactivity. but like i said: it mean you will 100% have one hour in the 5th; and that is also much work.)

Just some questions (you don't need to answer me, just yourself):
- why only 5th and 6th hour? why not (1 and 2) or (3 and 4)? Might be good if you want to write a test in upper years. (if you need 2 hours for a test).
- "But if I do this, I have to decide". Maybe let the teacher choose if he want 1+1+1+1 or 2+1+1. (i guess some teachers like duartion 2 while others don't like it.)
- "there will also be activities lasting two hours during other times of the day, which is not wanted in many cases.". Hmmm... difficult to avoid. It will be much easier to avoid if you set 2+1+1, because you can tag the subactivitiy with duration 2 then and avoid that by an constraint.

Christian Kemmer

Thanks for the fast answer.

The reason is the following: Between 1st and 2nd hour there is a small break for students and teachers to change rooms. Between 3rd and 4th hour, there is also this small break. Between 5th and 6th hour, there is no break. So the teacher and the students must stay in the room without any break.

So I want to avoid those two hour lessons for all 1+1+1+1 and 1+1+1 and 1+1 activities if possible, but during 5th and 6th hour, I need them.

Liviu Lalescu

#3
I think the best is a new constraint, students/teachers max building changes in a time interval, and each room is in a different building in your case.

I'll add a resume of this topic in the TODO, after your confirmation, but I don't think I will work on this new constraint for now, even if it might be easy to add.

Volker Dirr

#4
Quote from: Christian Kemmer on November 07, 2012, 07:04:08 AM
The reason is the following: Between 1st and 2nd hour there is a small break for students and teachers to change rooms. Between 3rd and 4th hour, there is also this small break. Between 5th and 6th hour, there is no break. So the teacher and the students must stay in the room without any break.

So I want to avoid those two hour lessons for all 1+1+1+1 and 1+1+1 and 1+1 activities if possible, but during 5th and 6th hour, I need them.

ah.. ok. will be difficult.
let's have a look at a timetable of one class/group.
if you have 3 main subject (math, german, english), then you occupy already 3 days by this trick. (that is possible. we done that already some time ago in 2 years. but you must be carefull with your activity planning. we done it by forecing it 2+1+1+1 and placeing the duration 2 hour into the 5th/6th hour.)
but we didn't do it with other subjects. reasons: most other subject had only 2 hours per week (non-main subjects). Many of them want to have 1+1 and not 2. Except sport and art. Of course it sound like it is working by doing art and sport at the other days at 5th and 6th hour (it work is possible if you only think abou classes), but it was impossible at our school because of room (and teacher) problems(conflicts).

so currently i suggest to force it to some subjects that you (or the teacher) select.

...

Livius idea sound good.

Christian Kemmer

@Liviu Lalescu: This idea only works if each activity has a room assigned, doesn't it? In my case, I have some activities without (home) rooms. At the moment, I assign these rooms manually after each activity has been placed by FET. So I have to take care that each activity gets a room assigned by FET. Is this correct?

It would be nice, if you could add this in the TODOs. :-)

Liviu Lalescu

#6
Yes, you need to add a room for each activity, in this case.

But I don't think I will do this in the near future.

I added it in the TODO, however.