Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - josemgs

#1
Yes, I have used "The Art of Computer Programming" in the past, but I found you were cited there here https://lalescu.ro/liviu/fet/doc/en/other-algorithms-references.html, and a search in google about this topic. I didn't know you had also contributed in other problems. Congratulations!!
And remember that a problem always seems to be very simple when you find a solution!
Or as Feynman liked to say, "mathematicians can prove only trivial theorems, because every theorem that's proved is trivial".
#2
Quote from: Liviu Lalescu on June 06, 2020, 11:03:14 AM
That's good!

I forgot to tell you that you also have the constraint "activities min simultaneous in selected time slots", select "Allow empty slots", and it might be useful.


Yes, I realized about that constraint yesterday. It is also useful in case you don't have groups (FET days in our case) with same number of students.
I'll tell you when testing with a real case. Probably I will have some questions...

Thanks a lot for your fantastic work ( I can not expected less from a person cited in one of Knuth's book)

Note:
I don't know if it is of interest for other fet users. This morning I managed to compile fet-josemgs5 under Linux Mint LMDE4 Debbie successfully, cleanly and fastly.
#4
I think I've found a little 'bug'. When a comment is added to a subject, like mAR=5, for instance, it remains there forever even if it is delete afterwards.

If you want to verify it I've found it in this way:

In the example-josemgs.fet
1) I added the following restrictions Spanish MAR=10, History mAR=3,  Latin mAR=3.
2) This in turn, seems to be impossible. Excecution stops after allocating 59 activities.
3) I deleted  Spanish MAR=10 and the run had exactly the same behaviour.
4) I quit after saving (with another filename and letting constraints for Latin and History) and  I restarted. I opened the new created file. Every thing was OK.
#5
Quote from: Liviu Lalescu on June 05, 2020, 12:18:48 PM
2) Comments of subject contain "MOR=x" -> max occupied rows (max sessions for a subject? Is that correct? Maybe only correct for subjects with less students?).

Yes, it is max sessions for a subject per week (or maximum groups of students you can form for that subject). It applies to all subjects, but perhaps unnecesary for subjects like Spanish in the example, that must follow all the students.

In the week-end I'll try with your latest version.

Thanks.
#6
Thank you very much. I've had a lot of work this morning, but in the evening I will try and let you know.



#7
Quote from: Liviu Lalescu on June 04, 2020, 09:56:30 PM
Please let me know: can't we consider that each FET timetable row (FET hour) is a simultaneity constraint for all the 20 activities/students that are on that row? This is what I meant with real-life slots. We can then say that Math must occupy at least 2 rows, or Math must have at most 8 activities per hour/row? We can control simultaneity with custom constraints in this way.

I have studied josemgs-file-by-liviu-19_data_and_timetable and I think it is a good planning. I think you were right and as I said before I think slowlier... So yes, you can consider each FET row as a simultaneity constraint. I'm sorry. Some comments from you, because of my slowness lead me to think we were not in synchrony

Things that could probably  be improved:

a) English is taught at the same time for all four groups.
b) Some subjects in a row are scattered over all the 4 or 3 groups. This could be unavoidable but perhaps can be minimised.


Quote from: Liviu Lalescu on June 04, 2020, 08:37:26 PM
Please let me know if you are interested in an implementation of (3), and if needed (7) above.

I agree this two new customization constraints could be very useful
#8
I think there is a little bit of confusion, sorry for that.

We have 20 students that have choosen their subjects. We have also how many groups we can form for this students (in this case 4: GA,GB,GC,GD). This is because we need to attach a reference Teacher for these groups. We desire they follow as much as posible all their subjects together. But we do know this is impossible for all the subjects. We also know how many hours per week for each subject is allowed and also how may subgroups we can build for them. For instance, we are allowed to form only one French subgroup, and 2 Literature subgroups but 4 Spanish subgroups.
I explain sometjhings and then I answer your questions.

These are the needed steps for me:

1) To distribute students in GA,GB,GC,GD in such a way they can visit all their subjects, and go together as much as possible. "A fortiori" some students must join another students from others groups to visit with them some subjects. (this is done with your modifications) Once the distribution is done there are usually  many ways to join students from different groups. This is why we have the next step

2) Define how to join students (links between FET rows and days). For instance we can have French students in GA,GC and GD. We have only one subgroup for French, so they have to go out of class at the same time. What are doing meanwhile the rest of the students from groups GA,GC,and GD? They visit the subjects in the same slot where French is (for instance , Maths, Biology and Literature). But these can occur in the first hour of the day or in the middle. This is not fix by the distribution in 1. What it fixes are the subjects that must run simultaneously. Perhaps French Teacher is not available on mondays in the morning... So, this is "only"  for forming groups, defining subgroups and establishing links between subgroups.
With this planning I go to the teachers and they choose which groups want to teach this year. They define their constraints and preferences and finally

3) I have to find a timetable in the usual way, respecting the constraints define in 1 and 2 apart from the usual constraints for teachers. I think this is easy with FET, because I define 5 days in a week, 6 hours in a day, the groups and subgroups and which groups and subjects have to run at the same time. I also include breaks and so on. In our example, for the sake of simplicity I have omitted these irrelevant details for problem in 1). As a matter of fact, and referring to our simplify example, Spanish is also unnecessary at this stage because must always ocuppy a complete slot with five students. We could design the partition of students into de 4 groups with only 7 slots and no Spanish at all.

I hope this can help. Let me know anything you don't understand, please.

Answers:

1) I don´t know why I don´t get a timetable when opening it in FET. It says I have to generate first.

2) No, FET hour are not real hours, only a trick to allocate subjects and to establish temporal relationships between students in the diferent groups and subjects. Specially simultaneity.

3) I am confortable with the comments trick "MOR=x". I believe I understand it. I'm not sure about the MAR=y second customization. I have to think of it. This would be useful perhaps if FET hours where real.... I'm not sure.

4) it is not always possible combine groups this way, because links propagate due to the limitation in number of groups for each subject. For instance we have to form only a group for students following French course.

5) Explained above, I hope.

6) Sure, probably we can make it more realistic, no more students nor subjects, but thinking in a final timetable with teachers and their avalaibility, etc...

Really I thank you.
#9
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..
#10
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
#11
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.
#12
Ok, don't worry. Do not work under pressure!  :)
#13
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.
#14
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?
#15
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.