FET Forum

FET Development => Suggestions => Topic started by: mandyhuiwm on June 01, 2016, 01:32:52 AM

Title: Linked activities
Post by: mandyhuiwm on June 01, 2016, 01:32:52 AM
Is it possible to import the instruction to link up the activities? For example link the activities by the activity number and import from an excel file?

It is a very tedious that we have a very complicated timetable and we have to link 450 pairs of activities.

Thanks for your help :D
Title: Re: Linked activities
Post by: Liviu Lalescu on June 01, 2016, 06:32:41 AM
I am not sure I understand. You have 900 activities and you want to link them into constraints, two-by-two? I could develop a small program for you to write the .fet XML code by reading from a CSV file and you could copy/paste this code into your .fet XML file.
Title: Re: Linked activities
Post by: Volker Dirr on June 01, 2016, 06:37:06 PM
Liviu, i don't think that will help him.
I guess he has got a school like a German "Gesamtschule". There are also many links between activities needed.

But only linking the activities won't help him, since he need to care about rooms.

So overall there are 3 variants that will help school like that one:

a) (not implemented in FET yet): add something like "activity numbers" into the csv import. But the "activity numbers" are not unique. If they have got the same number, then they need a "same starting time (day+hour)" constraint.
This is the way how some other timetabling tools do it. but this way have got 2 disadvantages:
- links are "hard coded", even in fact that isn't always needed (even many guys think it is needed, that is not true! you might not get the best timetable.)
- user must be very careful if he modify the dataset.

b) (not implemented in FET yet): add a constraint to add rommS to an activity. So you can for example add the whole year with several teachers and several rooms into a single activity.
This way has got the advantage that adding the data will be very easy; even in the interface, not only by csv.
It has got the disadvantage that links are "hard coded". (see a) )

c) (implemented already today!): using a "correct" students structure.
This way has got the disadvantage that adding the data manualy is very complicated, since each student must be set as a subgroup. if the students structure is added correct, then you don't need to add those links.
This variant is "easy" if you can get that data from your school database. For example German guys which use SchILD can get the needed data in a second by converting the data from the school database.
The advantage is, that the links are not "hard coded". so you might get much better timetables!
Title: Re: Linked activities
Post by: Volker Dirr on June 01, 2016, 06:49:15 PM
or variant 4:
a2) very similar to a): add the real unique "activity number" to the csv file:
advantage: "activity number" can be similar to a FET activity number.
but there are 2 disadvantages:
- you must be more carefull in editing/adding the data then with variant a)
- you need a separate file with the "links"
So i think variant a) is better then a2)
Title: Re: Linked activities
Post by: mandyhuiwm on June 02, 2016, 05:05:04 AM
Thanks Volker.

a) and a2) are very close to what we need.  Plus the linkage is not only one to one, may be up to 9 activities in our linkage. b) and c) with the linkage of rooms and student sets are not so preferable, as the student sets are too complicated and I prefer to run the rooms and lesson timetable separately.

To me, a2) is more preferable as the linking process is done separately. However, in the concern of the ease of input, a) is more friendly as you suggested.

Is it possible to implement this function in the upcoming software?

Thanks a lot for this powerful tool!!
Title: Re: Linked activities
Post by: Liviu Lalescu on June 02, 2016, 05:51:47 AM
I am sorry, but I still don't understand (a) and (a2). What is a "link"? A constraint? Please explain some more. Try to explain using FET notation.
Title: Re: Linked activities
Post by: mandyhuiwm on June 02, 2016, 01:17:46 PM
Liviu, link refers to activities start at same day and time. This is a constraint.

Thanks!
Title: Re: Linked activities
Post by: Liviu Lalescu on June 02, 2016, 04:26:09 PM
So, you have 900 activities, and each should have a number n between 1 and 450 in the file imported from CSV or in other file, and FET should add same starting time constraints for activities with the same number n.

It should be possible as a custom version just for you (at least for now). I could try to modify the import activities from CSV or derive a new program to read a list of numbers (activities ids and number n) and create the .fet XML code for the constraints. Which would be best?
Title: Re: Linked activities
Post by: Volker Dirr on June 02, 2016, 05:46:14 PM
I think it is useful, if the user can skip the number. if there is no number, then the activity should get a unique id; so it won't be linked to an other activity.
Title: Re: Linked activities
Post by: Liviu Lalescu on June 02, 2016, 05:50:41 PM
Quote from: Volker Dirr on June 02, 2016, 05:46:14 PM
I think it is useful, if the user can skip the number. if there is no number, then the activity should get a unique id; so it won't be linked to an other activity.

Or, for a unified treatment, make 0 signify that the activity is not linked.
Title: Re: Linked activities
Post by: mandyhuiwm on June 04, 2016, 02:55:29 AM
Thanks so much for your help? Does it mean that a new variable is added to identify to activities start at same time and day and it can be imported by csv file together with activity input??
Title: Re: Linked activities
Post by: Liviu Lalescu on June 04, 2016, 06:21:16 AM
Yes, I could try this in a custom version just for you.
Title: Re: Linked activities
Post by: mandyhuiwm on June 04, 2016, 07:00:43 AM
Thank u so much!!
Title: Re: Linked activities
Post by: Liviu Lalescu on June 04, 2016, 07:21:25 PM
It took longer than I expected, it was a bit complicated. But it seems to work. Please get it from http://lalescu.ro/liviu/fet/download/custom/mandyhuiwm/
Title: Re: Linked activities
Post by: Liviu Lalescu on June 04, 2016, 08:39:13 PM
There are two serious bugs, which I will fix tomorrow, sorry.

If you add a single activity in a number, it crashes. This is a user mistake, but anyway should not crash.

If you add activities which are not split, the program freezes.
Title: Re: Linked activities
Post by: Liviu Lalescu on June 05, 2016, 09:29:20 AM
I corrected the above two bugs, please get your custom version from http://lalescu.ro/liviu/fet/download/custom/mandyhuiwm/
Title: Re: Linked activities
Post by: mandyhuiwm on June 06, 2016, 04:22:21 AM
Thank you so much!

Let me try to use that!
Title: Re: Linked activities
Post by: mandyhuiwm on July 20, 2017, 06:31:13 AM
Thank you so much for your help in this support of timetabling tool!!

I would like to ask whether there is any new version for this customized version so that we can generate a timetable in a shorter time.

Thank you for your assistance!!!

You really help our school a lot in making a new timetable!
Title: Re: Linked activities
Post by: Liviu Lalescu on July 20, 2017, 10:06:34 AM
There is not such update, yet.

I don't think there is a real need for this. Because, if you see the News section of the FET homepage (or the file ChangeLog in the FET archive) you can see there is no change to the generation algorithm. Only two new constraints, which you may not need.

But you could import the CSV file with your current custom version, save as a .fet file, and open and generate with the latest FET.

Or you could add your custom version changes in the latest official FET, by comparing the sources for 5.29.4 official and 5.29.4-mandyhuiwm (they are both available now in your download directory).