FET Forum

FET Support (English) => General Stuff => Topic started by: imran on August 14, 2010, 02:33:31 PM

Title: FET to generate Trimester TimeTable
Post by: imran on August 14, 2010, 02:33:31 PM
Hi,
Can we use FET to generate Time-Table for a complete Trimester, i mean we need to have a timetable based on dates. ( Not weekly based).
I appreciate your feedback.

Thanks in advance
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 14, 2010, 02:41:07 PM
The answer is probably no.

In FET, you can have 35 days per "week". You can even increase this value to 3*31 (=93), if you modify the program. Then, you may have what you need. But there will be very many activities and the timetable from week to week will be very different, and there may be other problems.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 14, 2010, 03:26:00 PM
Hi,
Thanks for ur quick response. Yes the timetable from week to week will be very different.
Attached is the timetable sheet.
Would you plz  help me to generate the automated timetable like the file attached.
Thanks in advance
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 14, 2010, 03:38:36 PM
Maybe it is possible, then.

You will need to increase in FET the number of days per week (I think you have more than 35) and recompile. Then, you need to enter the data and generate. I will try to help you with advice on specific problems.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 14, 2010, 04:34:43 PM
Thanks alot
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 22, 2010, 07:17:53 PM
Hi,
Can u please help me out to change the days per week in source code and recompile.
I hv downloded
a) fet-5.14.1 source code
b) Qt Creator 2.0.0 for windows

Thanks in advance
Imran
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 22, 2010, 07:26:09 PM
QuoteHi,
Can u please help me out to change the days per week in source code and recompile.
I hv downloded
a) fet-5.14.1 source code
b) Qt Creator 2.0.0 for windows

Thanks in advance
Imran

Modify file fet-5.14.1/src/engine/timetable_defs.h, line 132, instead of 35 put how much you need.

You need Qt 2010.02.1 [4.6.2]. See README file for more details how to compile (open the README file with a text viewer). Qt Creator I think is not enough, you need Qt and MinGW.

Compile FET (modified as above).

Then, create a .fet file, save it. Open it with a text editor and in <Days_List> section, make the Number as you need (nd), and add nd days, like <Name>name_i</Name>. This trick is because the dialog for days still has maximum 35 days. But it won't affect you.

Open the .fet file. Don't enter the days of the week dialog, because FET will crash. Just do everything else than opening the days of the week dialog.

That's it.

Let me know if you succeed with the timetable, please.

I'll try to help some more if you have problems.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 03:19:47 PM
The terms used in the PDF attached are
a) Days ( 8th January 2010, Friday) -
b) hours (I or 09.00-09.45)
c) Subjects ( Missionary Catechesis, Vi, ICH)
d) Courses ( M.Th, B.Th II, ....)
e) Teachers ( Fr. Maurie Barnes SDB, TPu, JT)
f)  No Rooms
g) Teachers- 2 types a) Visiting b) Resident
    Visiting professors should hv more priority then resident

How could we define all these in FET .

Thanks in advance
Imran
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 23, 2010, 03:28:11 PM
a), b), c), e) and f) are the same in FET.

d) are FET students.

about g) - I don't know what do you mean. Maybe you need to add some constraints, with higher weight for visiting teachers. Or do you mean these should be earlier in the timetable? Maybe use constraints activity(ies) preferred starting times, or a combination of multiple constraints of this type - you can use different weights and same activity for more constraints.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 03:34:58 PM
thx alot.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 04:33:56 PM
Hi,
Successfully added teachers,subjects and courses.
How could i modify "split into ...activities per week to 24 or more, coz it is not allowing to change more than 10.

Thanks
Imran khan
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 23, 2010, 04:49:54 PM
QuoteHi,
Successfully added teachers,subjects and courses.
How could i modify "split into ...activities per week to 24 or more, coz it is not allowing to change more than 10.

Thanks
Imran khan

More variants:

1) Difficult for a person who does not know FET sources: modify file src/interface/addactivityform.cpp and src/interface/addactivityform_template.ui. I can give more details if you want.

2) Not perfect: if you want to split into 24, simply split into 10, then add another split into 10, then another split into 4. It is not nice, because you won't see the exact structure in activities form. Also, you need to add a constraint min days between activities, with all 24 components, and remove the initial 3 min days between activities constraints.

3) Perfect, but a bit difficult: add one activity split into 3 (or any number between 2 and 10). Save file. See how FET wrote the activity(ies) in the Activities_List section and the constraint min days between activities in the section Time_Constraints_List. Write instead an activity split into 24 and the corresponding constraint.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 05:29:30 PM
Yes plz. I will try to do modification in code.

Thanks
Imran
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 23, 2010, 06:18:33 PM
QuoteYes plz. I will try to do modification in code.

Thanks
Imran

addactivityform.cpp:
- lines 41 to 60 - add something similar with what is already there
- line 131 - instead of 10, put 24
- line 445 - instead of 10, put 24
- line 798 - instead of 10, put 24
- line 802 - instead of 10, put 24

addactivityform_template.ui - open it with Qt Designer.
- select with click the tab with 1 to 10. Then right click, insert tab.
Select with Ctrl+Click the three widgets: Duration, 1 and Active,
right click, Copy, then Paste them in the new tab. Do that
24-10 times=14 times. Click on each added widget, set the correct name in
Qt Designer (Property->QObject, objectName).

Tell me if you have problems.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 06:24:02 PM
thank u very much.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 06:31:11 PM
Hi,
The maximum activities per week required is 48. shall i add 48 tabs or make it 24 tabs and add activities twice @ runtime.

Thanks
Imran
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 23, 2010, 06:36:24 PM
QuoteHi,
The maximum activities per week required is 48. shall i add 48 tabs or make it 24 tabs and add activities twice @ runtime.

Thanks
Imran

Add 48 tabs.

I would make these changes myself, but I am so afraid that I might mix them with the official version. I am sorry. But I hope you'll manage.
Title: Re: FET to generate Trimester TimeTable
Post by: imran on August 23, 2010, 06:58:25 PM
Hi,
   Thanks for your instant support. Its absolutely fine, I will try to make changes in the code. If i stuck somewhere i will come to u.

Regards
Imran

Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 24, 2010, 05:18:42 AM
You may need to modify also src/engine/modifyactivityform.cpp and src/engine/modifyactivityform_template.ui, if you intend to modify the activities.
Title: Re: FET to generate Trimester TimeTable
Post by: jakub1982 on August 31, 2010, 08:50:37 AM
QuoteMaybe it is possible, then.

You will need to increase in FET the number of days per week (I think you have more than 35) and recompile. Then, you need to enter the data and generate. I will try to help you with advice on specific problems.

I think I found something that appears to be a bug. It manifests when I set "max gaps per day for all teachers" = 0 and try to generate the timetable. When run in terminal the program exits with a message: "Bus error".

My system is MacOS 10.6.

I run a version of fet that has been customized to accept 46 days in a week, exactly the way you described above.

Any suggestions?
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 31, 2010, 10:12:17 AM
Please send me your input file and, if possible, a random seed for which you get this error.

Then, try to recompile FET from the beginning ("make distclean", "qmake", "make") and try again to generate.

MAX_DAYS_PER_WEEK is exactly 46?

Maybe you can give more details: FET crashes immediately or after a while?
Title: Re: FET to generate Trimester TimeTable
Post by: jakub1982 on August 31, 2010, 04:18:05 PM
QuotePlease send me your input file and, if possible, a random seed for which you get this error.

Then, try to recompile FET from the beginning ("make distclean", "qmake", "make") and try again to generate.

MAX_DAYS_PER_WEEK is exactly 46?

Maybe you can give more details: FET crashes immediately or after a while?

Yes, MAX_DAYS_PER_WEEK is exactly 46, and this is the only change I made to the original code. I have emailed you the files with terminal output, and the input file (sorry, I prefer not to post this data on the internet). 

The random seed is: X: 1283266493, Y: 473803072.

Thank you for your interest, I really appreciate it.
Title: Re: FET to generate Trimester TimeTable
Post by: Liviu Lalescu on August 31, 2010, 05:00:21 PM
I could not replicate this problem on my computer (GNU/Linux), so:

1) it is a temporary problem on your computer, or
2) it is a permanent problem on your computer.

Please try this: src/engine/generate.cpp, line 184, replace with:
             return int(a);

Recompile and tell me if the problem is gone.
If it is gone, please revert to original (modify file again with return a; and make sure you modify this file, so that the compiler will recompile it, so do not use the original file, which has a lower timestamp). Recompile (make sure the compiler will show that it is recompiling this file. Then, check the problem again.
Title: Re: FET to generate Trimester TimeTable
Post by: jakub1982 on August 31, 2010, 06:12:19 PM
QuoteI could not replicate this problem on my computer (GNU/Linux), so:

1) it is a temporary problem on your computer, or
2) it is a permanent problem on your computer.

Please try this: src/engine/generate.cpp, line 184, replace with:
             return int(a);

Recompile and tell me if the problem is gone.
If it is gone, please revert to original (modify file again with return a; and make sure you modify this file, so that the compiler will recompile it, so do not use the original file, which has a lower timestamp). Recompile (make sure the compiler will show that it is recompiling this file. Then, check the problem again.

I am sorry, but these suggestions did not solve the problem. I still get the same "Bus erros" in roughly the same moment.