Classrooms assignment

Started by Andrés Chandía, May 13, 2011, 10:30:18 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Andrés Chandía

Hi Liviu, here again to see if it's possible an improvement for our needs:

1. Assign a cluster of classrooms to a single activity.
The requirement here is to do the same that you can do with teacher assignment. I mean, with teachers you can assign one or a group of them to an activity, then the algorithm considers those teachers not available at the time of the activity to which they were assigned to.

2. Ok, now a kind of extravagant petition: add a new way to assign classrooms, this one applicable to activities with a defined number of students: let say we have an activity with 90 students but we only have 5 classrooms with capacity for 30 students:

<Space_Constraints_List>
<ConstraintActivityPreferred[highlight]Summable[/highlight]Rooms>
     <Weight_Percentage>100</Weight_Percentage>
     <Activity_Id>1</Activity_Id>
     <Number_of_Preferred_Rooms>5</Number_of_Preferred_Rooms>
     <Preferred_Room>R_C30_1</Preferred_Room>
     <Preferred_Room>R_C30_2</Preferred_Room>
     <Preferred_Room>R_C30_3</Preferred_Room>
     <Preferred_Room>R_C30_4</Preferred_Room>
     <Preferred_Room>R_C30_5</Preferred_Room>
</ConstraintActivityPreferred[highlight]Summable[/highlight]Rooms>

So the activity is assigned with those rooms that achieve the needed capacity to cover it, while the algorithm considers the global occupation of rooms, I mean if R_C30_3 is not available at the hour for activity 1, then is not an option to consider it.

3. This one is the product of the other two, actually, if 2. is possible this one should feed the database with the occupation information. Maybe this one is obvious for you.
@ch

Liviu Lalescu

#1
rx means request x.

r3: What do you mean?

r1: Define sets of rooms. Constraints are based on rooms or sets of rooms (identical to existing constraints).

r2: actually, I see implementing r2 using r1. I assume a reasonable number of possibilities. My idea: allowed rooms R1, R2, R3, R4, R5; allowed solutions: R1+R2+R3=allowed capacity, or R1+R2+R4, etc, a number of (5 taken 3)=10 variants. This can be specified explicitly in the input file or internally in FET.

So, we are left only with implementing r1. This is possible; I think also that it will fit in the current FET algorithm and the solution will be found in a reasonable time; this involves many non-trivial changes to current FET. I don't know, maybe it could take a few weeks or more, I am not sure.

Do you have persons familiar with the FET code? I would prefer to give specific advices and answer specific queries, because nowadays my time is very limited. As a last resort, I could do it myself.

I would prefer to keep this as a custom version (not official FET). The reason is that current FET is stable and proved to work good, and this change might make some timetables impossible for some users.

Andrés Chandía

#2
Hi again Liviu, I'm back in town!

I answer your quotes to re explain the situation of this thread.

r1, actually not, because in room assingment the activity finally chooses one of the rooms. while in teachers assignment you can assign as many teachers as you need for one single activity.
rooms     > 1 (among many) to 1
techers   > many to 1

Ok, the reexplanation:

Some times we do activities which number of students excedes the rooms capacity, but whe can spread them into 2 or 3 rooms, which we can define among a closed range of rooms, I mean
Activity A = 60 students
room 1 = capacity for 30
room 2 = capacity for 30
room 3 = capacity for 15
room 4 = capacity for 15
room 5 = capacity for 15

Obviously the better solution is to assign room 1 and 2. But what if we have a second and a third activity in action.
Activity B = 45 students
Activity C = 25 students

Ok, let's say the assignment goes like this:
room 2  > Activity C (At this point fet knows that it can not count with room 2 for activities A and B)
room 1 and 3 > Activity B (For this fet should know it can assign two or more rooms to a single activity, and also that it can not count with room 1 and 3 for Activity C)
room 4 and 5 > Activity C

I hope I could express myself
@ch

Liviu Lalescu

I hope I understood.

Multiple rooms for an activity - you think they can be treated similarly to multiple teachers for an activity. But I think it is different. Each teacher has n activities, which must be scheduled. But you cannot add a list of rooms for an activity, and pretend that the timetable for rooms should respect that. You don't know how many and which activities a room will host.

Your request may be possible: keep a counter of remaining students to schedule for each activity, and a list of rooms in which this activity will be placed. Another activity might displace some rooms, and those might displace other activities, recursively. I think this fits into current FET algorithm, but the changes are quite complicated.

I am willing to detail some more, but I don't think I will be able do these myself.

I am sorry it took so long for me to answer, but I was working hard to improve the FET interface.

Andrés Chandía

I'm coming back to this issue because I have managed in a kind of manual way, but now I have to transfer the responsibility of timetables to the secretaries, so I would like an automated solution which I don't know how to implement.

I will start explaining again the situation, then the manual solution I took, then the request... let's start:

1.- We have activities that have to be assigned with 2 or 3 rooms, 1 is not enough capacity, and we have some rooms separated by a kind of folding screen, so when we need it we can take out the folding screen and have a bigger room, for example

| Room 1 cap 30 | Room 2 cap 30 | Room 3 cap 30 |

if we have an activity for 60 students, we take out the pipe | (folding screen), then we have

| Room 1-2 cap 60 | Room 3 cap30 |

2. Manual solution
a.- Define  Room 1, Room 2, Room 3, Room 1-2, Room 1-3, Room 2-3.
b.- Assign the set of preferred rooms to all activities
c.- Generate
d.- Search for the possible overlappings between double rooms i.e. Room 1-3, etc. and single rooms, 1, 3, etc.
e.- Decide in case of overlapping which one eliminate.
f.- Block the timetable for assigned rooms not to move.
g. Generate the constraint "A room's not available time" for all the implied rooms, doubles as well as singles, setting at the singles ones when the doubles are in use and at the other way around also. For example if Room 1-2 is occupied Monday 13:00 to 15:00, I have to set in constraint "A room's not available time" for Room 1 and Room 2 that they are not available Monday 13:00 to 15:00. All of this because FET does not know that Room 1-2 and Room 1 are partially the same room so they must not overlap.
h. Generate again.

3.- The request is the possibility of assigning two or more rooms to a single activity, by now there are the space constraints for activities, "An activity has a preferred room" and "An activity has a set of preferred rooms", it would be nice to have "An activity have a set of assigned rooms", meaning that that activity must be programmed in those rooms and no others. If this is so, make fet knows that those rooms can not be assigned to other activities at the time the activity having them is set, no matter the time it takes at the moment of generation. (This last part is similar to that of 2 assigned teachers for one activity).

This request is partially manual, because the activities using more than one room have to be defined manually.
A totally automated solution is quite a big work I think, and I prefer not to ask it.
@ch

Volker Dirr

Quote from: Andrés Chandía on January 26, 2012, 02:53:29 PM
The request is the possibility of assigning two or more rooms to a single activity

you can use this workaround:
use a "normal" constraint to assign one room to an activity.
if the activity need a second room, then do this:
1. add a pseudoconstraint. no teacher, no students
2. use a constraint to assign the missing room to that pseudo activity
3. use constraint "same time (day and hour)" to that two activities.

you can use this workaround similar with 3 rooms.

Andrés Chandía

Nice, I'll try it and I will inform you, anyway for the sake of easiness of non admin users it would be good to have a constraint like the one I mentioned: "An activity has a set of assigned rooms"
@ch