Help choosing FET version and something else.

Started by josemgs, May 29, 2020, 10:25:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Up to my understanding any optional subject can go to any slot
with subjects of same duration. This is because subjects in same slot and same group have to be
planned same day and same hour in the final timetable.


Slots 1 to 8 correspond to the 8 subjects every student has to choose. In reference to our example I posted before this means 3 slots for three subjects with duration 5 hours per week, and 5 slots for subjects with 3 hours duration (in a real problem you have, for instance, 10 slots with durations 4,4,4,4,3,3,2,2,2).

So, in a given slot you must place only activities attached to subjects of same duration.

I hope this can answer your question. This is the way I understand it.

Liviu Lalescu

Do you mean 10 slots with durations 5,4,4,4,4,3,3,2,2,2? (you forgot the 5?)

May I assume hours 1..3 are for mandatory, and hours 4..8 for the optionals?


I'm sorry, I missed a number.

Yes, you can safely assume that 1..3 are for mandatory and 4..8 for optionals. In a general case this is dictated by the durations (in hours per week) of the different subjects. Ideally you don't want to mixed subjects in slots 1..3 unless it is unavoidable. What is really important, I think, is that time slots received only subjects with same duration.

Do you think is it possible to do it in Official FET with minor modifications or is it a major change?

Liviu Lalescu

Hmm, if we can mix duration 5 with duration 3 activities, our approach with 8 FET hours will not work, because we will end up with more than 30 hours per week. Can we assume that on each FET hour we must have same duration activities?

I am not sure from your answer, each FET hour has same duration activities? Please confirm.

Not with the official FET, but maybe the changes might be not so complicated. I will try soon and let you know.


Quote from: Liviu Lalescu on June 03, 2020, 01:06:14 PM
I am not sure from your answer, each FET hour has same duration activities? Please confirm.
Not with the official FET, but maybe the changes might be not so complicated. I will try soon and let you know.

I confirm: Each FET hour has same duration activities.

Liviu Lalescu

OK then, I will try as I said on my reply #8 (

I will let you know as soon as I have something. I think I will begin work today, but not sure if right now.


Ok, don't worry. Do not work under pressure!  :)

Liviu Lalescu

I think I am on a good path. I have just put a test version for you here:

I also attach a screenshot (view the activities timetable).

There is a file in the examples directory, you can generate some timetables and check. Please use the latest, liviu15.fet.

I added these things, as explained in the readme-josemgs.txt file:

   - When placing an activity on day d, all the activities with the same subject from day d must be at the same hour.

   - The comments of the subjects: "MOR=x" (without quotes) means the maximum number of occupied rows for a subject.

Please let me know how should he continue, what hard/soft constraints are not satisfied.


It looks pretty good at first sight!!! :)
I'll try to follow your instructions an perhaps testing with a little mor complex instance. I'll tell you as soon as possible wether I find room for improvement.

Thanks a lot.

Liviu Lalescu

There will be surely needed more constraints, either existing or newly custom made. I did not consider many of your needed requirements.

Liviu Lalescu

I added some more constraints activities occupy max time slots from selection and it seems that the timetables are better. Please see attached screenshot and input file.

I think we need to add constraints for min/max number of activities on a single row. But I will wait for your feedback.

I think in the solution below Applied Maths is not OK?


Wow!! This seems to be a better solution. What I am looking for is to minimise subjects that must run simultaneosly involving different  groups (FET days) but at the same time trying to form courses with maximum allowed number of students.
In the case of Applied Maths for this solution is not very good as you say, this implies courses with too few students or very difficult or impossible combinations of too many groups. Also it would be better for Physics and Maths to have groups of 4 students each than having two groups of 5 students and only one with 2, but this is less important. It is a trade-off between number of students and number of different groups that meet to visit a course.

You go too fast for me. I think much more slowly

Liviu Lalescu

I apologize. Please only go in your speed.

I attach a file (initial and a solution) doing what you say for Math and Physics (max Math or Physics in a slot is 4). You need to be careful, this is a compulsory constraint (100%).


I'm sorry, I am a newby in FET and I am not able distinguish between the two files attached, initial and a solution, but I managed to generate another solution.  In my solution I get three groups with 4 maths students and another student from history. The problem with this solutions is that force to run all three maths courses at the same time, with different teachers,which is normally not desired. Another posibility is to let a course of History with two students only, not too bad for a case with a maximum of 5 students. What I mean is that it is not always optimal to join maths and history, french and english in all three groups, say GA, GC and GD, because this implies that these courses must run simultaneously. It would be better sometimes having maths and history and other having maths and latin.
I hope I'm not confusing you.

Nevetheless in my opinion you have achieved a major advanced. Now I can design groups in a variety of ways with lots of posibilities. Normally, the only fact of partitioning students in non-overlapping sets is a very hard task.

Apart from the improvements you can implemented on this stage there are two remaining questions that I am not able to figure out how to tackle. The first one is:

Once a beatiful partitioning is achieved, how do the groups combine in order to perform all the activities?

The second one perhaps is trivial using FET, I don´t know. Once you hace a solution above, how do you get a final timetabling respecting the constraints obtained in that solution?

Finally, I am preparing a more elaborate example with all the four sections in the institution, with about 170 students, 40 subjects... I think this could shed more light about the quality of the solutions.

I'm sorry, too much words..