FET Forum

FET Support (English) => Get Help => Topic started by: chrischi on February 08, 2010, 12:22:52 PM

Title: adding rooms to an already generated timetable
Post by: chrischi on February 08, 2010, 12:22:52 PM
Hi,
I (or better FET) has made an exellent timetable for our college and I released it. But I didn't add rooms at all. Now I see that it would be good to have rooms organized by it.
Is there at all a way to import the old timetable (which I have in html format), and then let FET do the rooms? I don't want to do a new timetable because the semester already started just now. Or do I have to make the teachers only available on the actual times which I take from the already generated timetable?
Thanks for your help!
Christoph
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 08, 2010, 12:52:36 PM
QuoteHi,
I (or better FET) has made an exellent timetable for our college and I released it. But I didn't add rooms at all. Now I see that it would be good to have rooms organized by it.
Is there at all a way to import the old timetable (which I have in html format), and then let FET do the rooms? I don't want to do a new timetable because the semester already started just now. Or do I have to make the teachers only available on the actual times which I take from the already generated timetable?
Thanks for your help!
Christoph

There is no direct import of timetable from HTML or other format.

What FET version are you using?

There are more possibilities:

1) Starting with FET-5.11.0 I think, you have in the timetables directory the random seed at the start of the timetable. If you have the same input file and same random seed, the timetable is identical. Then you can lock it in time and add rooms.

2) You have a file activities.xml in the generated timetables directory. It is possible to make a convertor to a .fet file.

3) You could lock each activity by a constraint activity preferred starting time (it is a bit of work, the time of each activity should be inputted).

4) Yes, you can make each teacher not available at the corresponding intervals. I am not 100% sure that FET will be able to find again a timetable in this situation. Theoretically it must work, but I have no practical confirmation from other users.

Other users may have more ideas, please share.
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 08, 2010, 03:37:53 PM
Maybe the simplest way is to look into the directory with the html files. if you didn't delete it, then there is the ???.fet file with the locked activities.
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 08, 2010, 03:40:04 PM
QuoteMaybe the simplest way is to look into the directory with the html files. if you didn't delete it, then there is the ???.fet file with the locked activities.

Yes, I forgot about that :-)
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 08, 2010, 09:33:53 PM
Thanks for the help and the detailed answer!
I noticed that I need to upgrade, and that I had - without knowing it - deleted the html files by trying to make a new timetable, which overwrote the old ones.

But it worked to set the teacher's available times to the released timetable info.

Now I added some rooms and thought after I specified how many students are in each subgroup  it would distribute the rooms to the activities.
But it  didn't.
It is a bit difficult to add homeroom restraints, because the groups are changing so much (being split up for certain activities and united with other students from higher levels for others).
What do I have to do that the rooms are distributed.
I appreciate any idea in regard of that.
Christoph
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 08, 2010, 10:38:15 PM
if you don't want to use homerooms, maybe just use an other preferred space constraint.
compare:
http://www.timetabling.de/manual/FET-manual.en.html#id_29

if you also have many subjects, maybe do it with an activity tag.
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 09, 2010, 12:03:48 AM
Yes, you need to add some space constraints, otherwise FET does not add a room for each activity.
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 09, 2010, 11:12:22 AM
QuoteThanks for the help and the detailed answer!
I noticed that I need to upgrade, and that I had - without knowing it - deleted the html files by trying to make a new timetable, which overwrote the old ones.

If the new timetable is incomplete, the data_and_timetable.fet file will remain the old one (from the previous complete timetable). Maybe you can try using that.

Quote
But it worked to set the teacher's available times to the released timetable info.

That is a good thing.
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 09, 2010, 07:19:18 PM
I tried to put different restraints with homerooms for groups (like senior students, junior students and so on), or activities (computer lab for computer science)...
and I thought it might be enough, but still the rooms timetable is quite blanc. Do I need to specify for each subgroup space restraints or for each activity? But then I would do what I thought the program would do for me: distributing the activities according to the size of the rooms and the availability.

Another problem that came up: I finally managed to install the new version of FET, but when I entered the .fet file it was not possible to find a solution
with exactly the same file the old version finds a solution in 13 seconds.

Thanks for all your help!
Christoph
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 09, 2010, 07:33:41 PM
QuoteI tried to put different restraints with homerooms for groups (like senior students, junior students and so on), or activities (computer lab for computer science)...
and I thought it might be enough, but still the rooms timetable is quite blanc. Do I need to specify for each subgroup space restraints or for each activity? But then I would do what I thought the program would do for me: distributing the activities according to the size of the rooms and the availability.

You need to add preferred rooms constraints, when home rooms are not enough. You can add for a subject, for an activity tag or for a particular activity.

Quote
Another problem that came up: I finally managed to install the new version of FET, but when I entered the .fet file it was not possible to find a solution
with exactly the same file the old version finds a solution in 13 seconds.


This is a very bad situation. Please send me your file, as soon as possible. Also, tell me the old FET version that your file worked OK.
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 10, 2010, 09:43:37 AM
OK, I got the file from chrischi, it seems it was a false alarm, since I can generate with 5.12.3 correctly and fast, similar with 5.9.1 (but not identical, since I changed a bit the generation procedure).
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 10, 2010, 10:10:29 AM
QuoteI tried to put different restraints with homerooms for groups (like senior students, junior students and so on), or activities (computer lab for computer science)...
and I thought it might be enough, but still the rooms timetable is quite blanc. Do I need to specify for each subgroup space restraints or for each activity? But then I would do what I thought the program would do for me: distributing the activities according to the size of the rooms and the availability.

The home room is considered in this way: if an activity has only a students set and if this exact students set has a home room, then the home room is used. If activity has >=2 students sets, you need to add a preferred room(s) constraint for this activity (or for its subject and/or activity tag).

If you have year Y1 (G1 (S1, S2), G2) (G1 and G2 groups, S1 and S2 subgroups), if you make home room for G1 -> R1, if an activity has students Y1 or S1, it is not put in R1. The activity must have the exact set that you put in the constraint (so, you have to add more home room(s) constraints, for Y1 and/or S1).

You may also add an activity tag for each activity and use constraint activity tag preferred room(s).
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 10, 2010, 04:04:30 PM
Sorry for the false alarm. After compiling fet I had only moved the fet file and not the whole directory to another location. After trying it in the proper way it works fine!

I will try to follow your advice and distribute activity tags and the corresponding preferred rooms.

Thanks
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 10, 2010, 04:20:37 PM
QuoteSorry for the false alarm. After compiling fet I had only moved the fet file and not the whole directory to another location. After trying it in the proper way it works fine!

It's OK, I was worried, but now I am happy it is OK.

But I still don't understand. You mean you moved the executable file named "fet" from directory fet-5.12.3 to another location and let the rest of the directory fet-5.12.3 to original location? But it should have also worked in this case, because you just need to run the executable named "fet", which is independent.

Could you please detail why the problem appeared? What do you mean that it was not possible to find a solution? FET just ran on and on? Did it update the elapsed time?

Maybe you needed the correct new translation files in their place? You use FET in other language than English?
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 10, 2010, 04:24:53 PM
Is there a way to keep certain rooms empty as much as possible, because they should be only used if all the other rooms are occupied (like the meeting place under the tree :) )?

Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 10, 2010, 04:31:10 PM
QuoteIs there a way to keep certain rooms empty as much as possible, because they should be only used if all the other rooms are occupied (like the meeting place under the tree :) )?


There is no direct solution. You can do that: suppose activity A can be in rooms R1, R2 and R3, and you would like it to be in R1 or R2. Then, add 2 preferred rooms constraints for A: 100% (R1, R2, R3) and 95% (R1, R2). In approximately 5% of cases the second constraint will be skipped. You can raise 95% to 97.5% or lower to 90% or play with it, so you get better timetables.

Let me know if I am mistaking (it is a long time since I didn't work with these constraints).
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 10, 2010, 07:39:49 PM
I moved the executable fet to the location where the old fet executable still was lying (/usr/bin) so that I could start it with the old entry under the applications menu of ubuntu.

Now I tried it also this way twice and it took 37 s / 57 s. Yesterday after maybe around 2 minutes I thought it would never end because it had taken just a few seconds before. But probably it would have found the solution just then.

Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 10, 2010, 08:01:50 PM
QuoteI moved the executable fet to the location where the old fet executable still was lying (/usr/bin) so that I could start it with the old entry under the applications menu of ubuntu.

Now I tried it also this way twice and it took 37 s / 57 s. Yesterday after maybe around 2 minutes I thought it would never end because it had taken just a few seconds before. But probably it would have found the solution just then.


Yes, that must be the answer.

I tried on my computer, it solves in about the same time as 5.9.1, average 10 seconds.

The new 5.12.3 seems much slower, or it depends on luck? Could you try more generations on your timetable and let me know?
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 12, 2010, 07:41:34 PM
I just installed fet on my Eee PC and tested again. It took only an average of 27,4 s for each timetable. Probably my old Notebook is otherwise a bit slow.

when I followed the installation instruction in the readme file, the suggestion was to remove the -g flag from from QMAKE_CFLAGS_RELEASE section.
However in my g++.conf file the sections read as follows

QMAKE_CFLAGS_RELEASE    += -O2
QMAKE_CFLAGS_DEBUG      += -g

Because I didn't know if I should change it then I just left it but it seems to work fine.
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 12, 2010, 07:55:13 PM
QuoteI just installed fet on my Eee PC and tested again. It took only an average of 27,4 s for each timetable. Probably my old Notebook is otherwise a bit slow.

when I followed the installation instruction in the readme file, the suggestion was to remove the -g flag from from QMAKE_CFLAGS_RELEASE section.
However in my g++.conf file the sections read as follows

QMAKE_CFLAGS_RELEASE    += -O2
QMAKE_CFLAGS_DEBUG      += -g

Because I didn't know if I should change it then I just left it but it seems to work fine.

You don't need to change these flags. Only if QMAKE_CFLAGS_RELEASE contains -g, remove it.
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 15, 2010, 11:38:21 AM
Hi,
I am still stuck with distributing the rooms to the already made and released timetable.

we have a number of different subgroups because of electives, of majoring tracks, of language tracks, and even smallgroup divisions should be still different (though I didn't manage to put them in yet).

First try I added to each activity 2 restraints, 95% for the rooms I would prefer for this activity, and 100% for all the possible rooms. (We have not enough rooms and want to use the shade place only if other rooms are occupied).

This is not ideal. I started anew and added tags to all the courses, mainly according to the groups and  the subgroups because I want the senior English e.g. not hop around but use a set of homerooms. But I added also some tags either because an activity is better in a certain room, or because one teacher allows for his small courses his office to be used.

Qestion1: Should I use for this rather the set of homerooms option with 95% for the smaller preferred set of rooms and 100% for all possible rooms?
Qestion 2: I don't want all the tags to appear in the timetable. is there an easy way to prevent this?
Question 3: The table gets stuck at a course that has only the restraint to be in the office of the teacher, which is not used else. I cannot find the mistake. (Id. 147)
Question 4: Does FET try so hard because in my case there are all the time constraints that I put so that the table would fit the already released time table? Would it therefore be better to somehow fix the times that the table finds without any constraints (to lock activities) so that it wouldn't work again on that issue but concentrate on the rooms?
Question 5: Is there an easier way to set all the available rooms at 100% so that what is available will be distributed? (Other than doing it for each activity tag, activity or student group) (I am not sure if I am clear with this. My problem was, that if non of the most preferred rooms are free (95% restrain), then no room at all appears on the timetable.

I hope this is not too much at a time and not too confusing...

Christoph
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 15, 2010, 12:25:57 PM
QuoteHi,
I am still stuck with distributing the rooms to the already made and released timetable.

we have a number of different subgroups because of electives, of majoring tracks, of language tracks, and even smallgroup divisions should be still different (though I didn't manage to put them in yet).

First try I added to each activity 2 restraints, 95% for the rooms I would prefer for this activity, and 100% for all the possible rooms. (We have not enough rooms and want to use the shade place only if other rooms are occupied).

This is not ideal. I started anew and added tags to all the courses, mainly according to the groups and  the subgroups because I want the senior English e.g. not hop around but use a set of homerooms. But I added also some tags either because an activity is better in a certain room, or because one teacher allows for his small courses his office to be used.

Qestion1: Should I use for this rather the set of homerooms option with 95% for the smaller preferred set of rooms and 100% for all possible rooms?
Qestion 2: I don't want all the tags to appear in the timetable. is there an easy way to prevent this?
Question 3: The table gets stuck at a course that has only the restraint to be in the office of the teacher, which is not used else. I cannot find the mistake. (Id. 147)
Question 4: Does FET try so hard because in my case there are all the time constraints that I put so that the table would fit the already released time table? Would it therefore be better to somehow fix the times that the table finds without any constraints (to lock activities) so that it wouldn't work again on that issue but concentrate on the rooms?
Question 5: Is there an easier way to set all the available rooms at 100% so that what is available will be distributed? (Other than doing it for each activity tag, activity or student group) (I am not sure if I am clear with this. My problem was, that if non of the most preferred rooms are free (95% restrain), then no room at all appears on the timetable.

I hope this is not too much at a time and not too confusing...

Christoph

1. Possibly yes.
2. Volker can answer. I think you can edit the css file to remove some activity tags.
3. Maybe the teacher is too constrained. Stop the generation after 81 activities have been placed, stop and see highest stage, to see if the timetable seems possible
4. If you fix an activity in time, and this place is good, then it is easier for FET. This activity is placed fast and never displaced.
5. No other way.

I saw you inputted a lot of activity tags. This is not necessary. You can use the same activity tag for an activity. You can also add more activity tags for an activity.
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 15, 2010, 01:56:57 PM
Quote
Qestion 2: I don't want all the tags to appear in the timetable. is there an easy way to prevent this?

Yes, by css.
fastest is by hiding them all, but you can also hide just special tags.
please read this:
http://www.timetabling.de/manual/FET-manual.en.html#id_55
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 15, 2010, 02:50:09 PM
Quote
Question 3: The table gets stuck at a course that has only the restraint to be in the office of the teacher, which is not used else. I cannot find the mistake. (Id. 147)

The table you attached is solveable. i solved it. it just need some time.

about the room problem:
- you have very string limits to the teachers (not available times)
- please count the number of hours that will be placed into a room. as soon as you have filled the room(s) you shouldn't tag more activities with that room, because of course that will be impossible.
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 15, 2010, 03:16:32 PM
Also your data constain at least 2 bugs:
activity 133 and 134 have two conflicting constraints.
once you said it should get only lap (100%, because of subject). and at the same time it should get room r4 (98%, because of activity tag SE). so you will always get a conflict!

i highly advice you to use only 100% constraint. searching bugs will be easier by that and you get better tables!
if you set room constraint SE to 100% FET will inform you about this bug, but sadly you set only 98%, so FET doesn't tell it to you.
i didn't check the whole table yet.
please try to do the two things i told you. if you still have problems please ask one more time.
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 27, 2010, 04:08:07 PM
Thanks for the answers,
I got the room distribution a bit better but there are still a few problems.
I would like to answer or explain a bit what I did and why:
QuoteAlso your data constain at least 2 bugs:
activity 133 and 134 have two conflicting constraints.
once you said it should get only lap (100%, because of subject). and at the same time it should get room r4 (98%, because of activity tag SE). so you will always get a conflict!
I did this on purpose because I usually want Senior English in their homeroom, only when they have computer science they need to go to the lab. So I set 100 if the tag is lab and a bit less that in all other cases they will be in their home room.

I tried to get the rooms filled up according to how much I like a room to be used (see question 1 above) by putting the set of homerooms option with 95% for the smaller preferred set of rooms and 100% for all possible rooms
FET doesn't allow me to add two different restraints here.

But I got a quite good result by putting the rooms not available percentage to e.g. 98 % so FET will try to put an activity to this room only if the other rooms are not free (at least sort of).

My problem is: still a few activities are not distributed to rooms at all, although there are activity tags, and these tags have preferred rooms.
In one case it was because both of the preferred rooms were already filled, but in the other case one of the preferred rooms is still empty, and I have no idea why. What could I do?

I would really like that all the activities are distributed to rooms, so that at the end there wouldn't be a class standing outside because all rooms are filled.

Christoph
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 27, 2010, 04:12:52 PM
maybe publish your current file and tell us the id of the activity that get no room. we maybe will find the bug.
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 27, 2010, 04:15:11 PM
Sorry I forgot to post my file!
Here it is.
I also forgot to mention that I now locked all activities in time, so that FET doesn't have to figure it out again, but can concentrate on rooms.
Title: Re: adding rooms to an already generated timetable
Post by: Volker Dirr on February 27, 2010, 04:16:23 PM
did you also tried it with 0% instead of 95%? please compare speed for table generating (many tables of course, maybe same seed) and results (using optimal/not optimal room). With my (old) dataset it doesn't make sence to use 95%, because 0% was as good, but faster. but that was maybe only a result of my dataset. i am instrested in yours. can you please test that with your file?
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 27, 2010, 04:18:34 PM
you are amazingly fast!!
It was ID 112, but in between I tried to do it again, then the chapel wasn't empty any more and it also distributed more activities.
Title: Re: adding rooms to an already generated timetable
Post by: chrischi on February 27, 2010, 04:23:03 PM
Quotedid you also tried it with 0% instead of 95%?
Do you mean to change all the space constraints that are set to 95 % to 0 %?
Title: Re: adding rooms to an already generated timetable
Post by: Liviu Lalescu on February 27, 2010, 04:32:07 PM
Quote
but in the other case one of the preferred rooms is still empty, and I have no idea why. What could I do?

This is a minor problem of FET. FET does not care always if a room is available and an activity does not have a room, even if simply putting this activity in this room should solve the soft conflict. You need to manually solve this or strengthen the space constraints.