Main Menu

Tag+Space constraints

Started by catalin, March 29, 2009, 12:51:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catalin

I would find useful the addition of the following constraint:
-space constraint + activity tag constraint

e.g.: for the Activities tagged as "laboratories" to be able to set a certain set of rooms. The same for the Activities tagged as "courses".

(there is a workaround but this requires to specify constraints for all subjects, which is much too much, considering that about half of our activities require a certain set of rooms)

Thank you,
Catalin

Volker Dirr

ok. that feature is currently missing.
it shouldn't be to difficult to add.
Let's wait for Livius answer.

Liviu Lalescu

#2
Just to make sure, are you suggesting constraint activity tag preferred room(s)?

Later edit: Is that constraint enough for your necessities? Do you need other constraints?

Liviu Lalescu

I have implemented this constraint (it took less than 2 hours :-)

The link to the snapshot, as usual, on http://lalescu.ro/liviu/fet/download/test/ .

Please test thoroughly, open/save this constraint, check that it functions correctly, with weight 100% or below.

Please let me know.

Catalin, I hope you can help with testing. Translators, please translate the new fields.

catalin

#4
Ok...

I have a sample input file filled with everything.

For the new constraints (Activity Tag Space Constraints):
-Course - amphitheaters , 100%
-Labs - laboratories, 100%
-Seminars - 2 constraints - special rooms for seminars and projects 100% AND laboratories + amphitheaters, 95%
-Projects - 2 constraints - special rooms for seminars and projects 100% AND laboratories + amphitheaters, 95%

Please tell me if this constraint set is possible.

[Later edit]: FET stops after about 2-5 minutes with "Simulation interrupted. FET could not find a perfect timetable...."

Catalin

Liviu Lalescu

I think I know your problem:

activity tag pref rooms: seminar. Please add ALL allowed rooms with 100% and the preferred rooms with 95%. I mean, as it is now, COPY rooms from 95% to 100%.

Please let me know if now is solvable and attach the new file.

For example, if preferred rooms are: R1, R2 and not preferred but allowed are R3 and R4, add 100% R1, R2, R3, R4 and 95% R1, R2.

catalin

Through the 2 constraints above I would like something like this:
1. fill in courses and laboratories (100%) in the allocated space
2. fill in seminars and project (100%) in the allocated space
3. for the seminars and projects, if there are not enough rooms fill in other available rooms, meaning rooms for courses and labs (95%)

In my tests:
- FET filled in rooms for seminars (100%)
- _did not_ filled any room for courses and labs

I attache a new input file, this time smaller, with fewer activities
Catalin

catalin

QuoteI think I know your problem:

activity tag pref rooms: seminar. Please add ALL allowed rooms with 100% and the preferred rooms with 95%. I mean, as it is now, COPY rooms from 95% to 100%.

Please let me know if now is solvable and attach the new file.

For example, if preferred rooms are: R1, R2 and not preferred but allowed are R3 and R4, add 100% R1, R2, R3, R4 and 95% R1, R2.
Ok, it works like that, but it fills up the amphitheaters with seminars/projects (and, of course, courses) and the rooms for the seminars stay empty.

The way I proposed the constraints, it should:
- fill up the amphitheaters (rooms for courses) with course activities (100%);
- fill up rooms for seminars and projects with this kind of activities (100%)
- fill up the rest of amphitheaters with seminars/projects activities (95%)

Please see the attached input file. rooms CP1-6 are the amphitheaters mentioned above, while the BP1-7 (seminar rooms) are almost empty.

Catalin

Liviu Lalescu

#8
I think you are wrong. Add preferred rooms 100% for seminars: all rooms. Then 95% for act. tag seminar, rooms: seminars and projects rooms.

Modify 95% to 90% or 97% or 99%, if it is too much or low.

You cannot have exactly your requirement, you need to find a good value (this 95%), that gives you a good solution, in which all seminar rooms are filled. Maybe a higher value is better, but you need to have a solvable timetable.

Please let me know.

LATER EDIT: In FET, each constraint with 100% is satisfied all the time, with 95% is satifisfied in about 95% of cases (more or less).

Volker Dirr

#9
hmm... i don't like the use of less then 100% weight.

i would do it this way:

for example about the labs:

first count the number of free periods of the labs:
freeRoomPeriods=numberDaysPerWeek*nuberHoursPerDay*NumberOfLabs - not avaliblePeriods of Labs

then count the number of periods that must be scheduled in the labs.

if that number is lower then the freeRoomPerios, then you hopefully can use only 100% constraint and FET hopefully find a perfect timetable.


but i guess you already thought about that and you have the problem that there are maybe 10 activitiy-periods more then free room-periods.

so your idea is:
add rooms with less then 100% space constraint.

i think that is not good. you can/should only work with 100% constraints.

so think about you activities that must be in labs. select at least as many activities as you have missing room-perios. (so in my example at least 10). that activites must be in other rooms.

maybe you will say now: why should i select it? FET should select the "best" one.
In my opinion that is incorrect. why? if FET do it, you maybe generate 10 timetables and now see different "problems" (conflicts, because of less then 100% weight.). so you choose unlucky activites AFTER generating.
that is wasting a lot of time, because there might be also other conflicts in your results.

so i think it is best to do this selection before!
so you maybe talk to the teacher. maybe in special classes/year he don't need every time the lab.
i teach physics in lab and computer science in an other lab, but i know that in some years/classes the lab is not always needed, in other i need 100%. so ask the teacher: "we have a room problem. i can't store all activities in the lab. can you tell me activities that must not be in the lab."
Maybe he need only 3 out of 4 periods per week in the lab.
of course, if all teachers say: i need 100% lab, than you have bad luck.

so you can at that /sub)-activities an other room (with 100%.)

so you see:
1. i use only 100% constraint.
2. i talk/decide about problems BEFORE generating the timetable. that will avoid a lot of trouble.
3. you will find faster and better tables by that.
4. you don't need to check the conflicts later manualy (because you will have no one) so you are much faster (espicialy if you also use less then 100% weight to other constraints.)


if you have bad luck and all teachers need the room, then you can/should do this:
a) increase the number of working days
b) increase the number of periods per day
c) ask your chef to get a new room
d) tell every teacher that he must do x hours in other rooms and he should tell you which activities that should be. (maybe keep that list for th next years, so you can be fair over the next years to all teachers.) of yourse work only with 100% constraint.

catalin

QuoteI think you are wrong. Add preferred rooms 100% for seminars: all rooms. Then 95% for act. tag seminar, rooms: seminars and projects rooms.

Modify 95% to 90% or 97% or 99%, if it is too much or low.

You cannot have exactly your requirement, you need to find a good value (this 95%), that gives you a good solution, in which all seminar rooms are filled. Maybe a higher value is better, but you need to have a solvable timetable.

Please let me know.

LATER EDIT: In FET, each constraint with 100% is satisfied all the time, with 95% is satifisfied in about 95% of cases (more or less).

Hi,
I've reviewed a little this old topic and I'm still not elucidated... How should I "Add preferred rooms 100% for seminars: all rooms"? Should I go through each activity and specify that if it has seminar the importance to be 100%? That should be a little to much because I have many activities with this tag...

The same is for Courses and Labs...
Please see my input file...

Thanks,
Catalin

catalin

Sorry... I've forgot to delete some constraints..

this is the correct file.

Liviu Lalescu

#12
Quote

Hi,
I've reviewed a little this old topic and I'm still not elucidated... How should I "Add preferred rooms 100% for seminars: all rooms"? Should I go through each activity and specify that if it has seminar the importance to be 100%? That should be a little to much because I have many activities with this tag...

The same is for Courses and Labs...
Please see my input file...

Thanks,
Catalin

I mean add a new constraint, 100%, seminar, all rooms.

Please see attached file. There is one constraint added, this is how I think it should be done.

There are 4 space constraints activity tag preferred rooms (Curs 99%, Seminar 99%, Laborator 99%, Seminar 100%, in this order).

I tried to make constraint 1 in this list (first, Curs) with 100%, but it cannot solve the timetable. I also tried 100% for constraint number 3 (Laborator), but it cannot find a solution anymore.

You should play with the constraint number 2 (Seminar 99%), lower if impossible and higher it if unsatisfactory results.

I saw that solving this new file adds a lot of Seminar activities into the Laborator rooms. This is normal if Seminar rooms are not enough for Seminar activities and Laborator rooms are not occupied.

Please let me know what you think.

catalin

Thank you for the setting

I do not mind that seminaries go into course rooms... but I do mind that there are a lot of un-allocated activities to rooms (as soft-conflicts)... How do I get rid of them?

If I set the constraints to 100% FET cannot generate a timetable... if not (<99%) I get unallocated activities although there are free rooms.

Catalin

Liviu Lalescu

#14
QuoteThank you for the setting

I do not mind that seminaries go into course rooms... but I do mind that there are a lot of un-allocated activities to rooms (as soft-conflicts)... How do I get rid of them?

If I set the constraints to 100% FET cannot generate a timetable... if not (<99%) I get unallocated activities although there are free rooms.

Catalin

You should set constraints for Curs and Laborator to 100%. Now, if FET cannot find a solution, it means simply that your timetable is too constrained. I tried on a timetable for the previous file attached here. Activity id 4 was placed at slot Luni 11:20. But on this slot, there is no Curs room free. What you want is too constrained (well, it could be a FET bug, but it is very improbable, because I got no bug reports about that).