Hello everyone.
1) In the simple case where two teachers share a classroom, what constraint do I use?
2) In general, what's the difference between assigning each teacher their own classrooms versus assigning each teacher their own subject(s) and each subject their preferred classroom?
Is it just the fact that a teacher can teach multiple subjects, which may require different classrooms?
So, if I don't need to distinguish between different subjects, can I directly assign the teacher to the classroom?
3) Is the "A teacher has a home room" constraint exclusive, or can I assign other teachers to that classroom?
Thanks you
Andrea
1) just use a home room constraint for each teacher. So add 2 constraints. Every teacher need his own one.
2) yes. For example a math and physics teacher is using different rooms. For example math in his home room, but physics in his "subject" room. Subject room has higher priority than a home room.
3) You can add as many as you want, as long as there are enough free slots in the room available for all teachers.
But in my timetable the constraint is violated, i'm wondering if the constraint is not HARD even if it's 100% or i made a mistake.
I used teachers home rooms only by now (and zero subjects rooms), i've teachers paired in a shared dedicated room.
Something like 10 teachers - 5 rooms, 2 by 2.
There are three buildings, so it's not a too strong constraint.
The weight is 100%.
The classes (group of students) can use all rooms in their buinding.
Therefore the timetable for each room-paired teachers should be mutually exclusive (in a building) while sometimes other free classrooms are assigned (owned by other teachers-pairs), violating the assigned classroom constraint. Why?
How can i make it HARD?
It is hard if it is 100%. Since it is old verified code, maybe you are making a mistake. If you want me to have a look at your file, send it here or to fet4 AT lalescu.ro. Show me where the mistake appears, in the locked timetable.
Thanks you Liviu, i will send to you if i can't solve.
The problem seems to involve different teachers (not paired in a room) when having co-presence in a class.
In fact the "A teacher have a set of home rooms" advise "ONLY this teacher" !!! (not two)
How i can constrain two teachers in a co-presence lesson to a specific room?
Assigning the "An activity has a prefered room" constraint instead of theacher one?
It just seems a little strange to me to treat individual teacher-room constraints differently from those for co-teaching activities.
Should I proceed this way, or do you recommend moving all the teachers-room constraints to the activities so they're all together?
You are welcome, Andrea!
Indeed, if a (sub)activity has two teachers, the home rooms are not implied. The present home rooms and preferred rooms system was designed a long time ago, trying to solve the problems in the best way, with much work.
Maybe you could add some tags to a part or to all the activities, and use preferred room(s) for tags. I am not sure of the best solution.
Quote from: k3nt0n on September 21, 2025, 01:33:03 PMThe problem seems to involve different teachers (not paired in a room) when having co-presence in a class.
How i can constrain two teachers in a co-presence lesson to a specific room?
all together?
I have solved a similar situation with 'virtual' subjects (one for each couple of co-present teachers) that have an assigned room.
AP
We use activity tag to solve this problem
Quote from: flauta on September 21, 2025, 03:37:10 PMI have solved a similar situation with 'virtual' subjects (one for each couple of co-present teachers) that have an assigned room.
AP
I already have all subjects real and virtual and this way seems to be faster (they are about 30) than create 100 activity key/tags.
But i'm wondering how manage 3 buildings. Maybe creating a subject for each building/room.
Or maybe i can assign to a subject 3 rooms (one each building) and let the space-class+room constraint to make the match because a class have one building only.
Mmm i switched to "a subject has a set of prefered rooms" (removed all "teacher home room")
Let there "a set of students has a set of home rooms" (all in them building)
I expect that subject rooms match with student rooms (the match is only one because a teacher have one room in each building)
But not, activities are placed in other buildings avaiable to teachers but violating the student room constraint.
Subject rooms not respect student home rooms too?
Yes, preferred rooms override all home rooms (teachers and students).
So by the fact it's not possible to mix home rooms and prefered rooms together when referred to the same activity, i switch to "activity tag" and "tag prefered room" like Youssef said.
(Eliminating every other room constraint (teacher/subject/class))
Now work perfectly generating extremely good timetables.
It's a mine private experiment by now, my school use a commercial software, and the timetable is awful.
Another planet...
But maybe who use the software at school is not experienced enough.