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 - zt3

#1
About the repository thing:
Yes, I really like FET. Without repository commits history, it is a difficult job to update mapr.
You can use github (http://github.com), and you can still supervise all the pull requests (someone who wants to contribute some code).
I think the benefit is huge.
Anyway, it is up to you. :)
And I will try my best to make contribution.

About my fet file:
Once I posted it, I realized maybe I made a mistake.
And yes, you are right. I solved it. Thanks.
#2
Quote from: Liviu Lalescu on August 05, 2016, 07:29:31 AM

No, I don't use, I don't know it.


Well, just a suggestion.

Quote from: Liviu Lalescu on August 05, 2016, 07:29:31 AM

You can add min days and max different rooms to any set of activities, but it has to be more than 1 activity.


Yes, I created a fet file, and the software just reports the "1 actiivity" error. :)
I solved it. But it then reports another error with my fet file (attached):
Quote
Cannot generate timetable, because for activity with id==10446 you have no allowed preferred room (from preferred room(s) constraints). This means that a constraint preferred room(s) has 0 rooms in it. This should not happen. Please report possible bug.
I checked the fet file.
Activity 10446 is related to Subject "Political_2".
So I searched this subject, and find at line 500:
<ConstraintSubjectPreferredRooms>
<Weight_Percentage>100</Weight_Percentage>
<Subject>Political_2</Subject>
<Number_of_Preferred_Rooms>2</Number_of_Preferred_Rooms>
<Preferred_Room>Political_2-T1</Preferred_Room>
<Preferred_Room>Political_2-T2</Preferred_Room>
<Active>true</Active>
</ConstraintSubjectPreferredRooms>

It has the preferred rooms.
I can not figure out how to solve the problem.
#3
Yes, I should post a new reply.

Quote from: Liviu Lalescu on August 04, 2016, 02:23:39 PM
Quote from: zt3 on August 04, 2016, 01:26:04 PM
Can I use "ConstraintSubjectPreferredRooms" (with 's' at the end) tag instead of "ConstraintSubjectPreferredRoom" when there is only one preferred room?

Unfortunately, this is possible only from FET-5.24.0 upwards, so you cannot in FET-5.22.0-mapr.


Sad to hear that. :(
Do you use any version systems (like git)?
I think it is good for managing all the versions, and maybe I can help you to upgrade mapr version.
I really like FET, and I hope I can make some contribution.   

By the way, what about "ConstraintMinDaysBetweenActivities" or "ConstraintActivitiesOccupyMaxDifferentRooms"? Can I still add such a contraint when the "Number_of_Activities" inside is 1?

#4
OK, I see.

If I do not use constraint activities occupy max 1 different rooms (I mean no "ConstraintActivitiesOccupyMaxDifferentRooms" tags at all), would they occupy many rooms by default?

Meanwhile, I think I should not use "ConstraintRoomMaxOccupiedSlots" on Real Rooms (see your corrected-file at line 806), since I do not know which activities will take place in which real rooms.

Can I use "ConstraintSubjectPreferredRooms" (with 's' at the end) tag instead of "ConstraintSubjectPreferredRoom" when there is only one preferred room?

I also wonder what is the usage of Activity_Group_Id, since it is not fully used in the example fet file.
#5
Thank you for your corrections.
Now I see the trick. :)

You add a ConstraintSubjectPreferredRoom at the end of fet file:
<ConstraintSubjectPreferredRoom>
   <Weight_Percentage>100</Weight_Percentage>
   <Subject>151-Biology-Real Room</Subject>
   <Room>Real Room 1</Room>
   <Active>true</Active>
   <Comments></Comments>
</ConstraintSubjectPreferredRoom>

In reality, there are many real rooms that are suitable for many subjects/activities.
Therefore I should add ConstraintSubjectPreferredRoom like this:
<ConstraintSubjectPreferredRooms>
   <Weight_Percentage>100</Weight_Percentage>
   <Subject>151-Biology-Real Room</Subject>
   <Number_of_Preferred_Rooms>20</Number_of_Preferred_Rooms>
   <Preferred_Room>Real Room 1</Preferred_Room>
   <Preferred_Room>Real Room 2</Preferred_Room>
        ......
   <Active>true</Active>
   <Comments></Comments>
</ConstraintSubjectPreferredRooms>
<ConstraintSubjectPreferredRooms>
   <Weight_Percentage>100</Weight_Percentage>
   <Subject>255-Life Science-Real Room</Subject>
   <Number_of_Preferred_Rooms>20</Number_of_Preferred_Rooms>
   <Preferred_Room>Real Room 1</Preferred_Room>
   <Preferred_Room>Real Room 2</Preferred_Room>
        ......
   <Active>true</Active>
   <Comments></Comments>
</ConstraintSubjectPreferredRooms>

Am I right?

Would some (of 5) 151-Biology-Real Room activities take place in Real Room 1, while some in Real Room 2?
(by the way, this is acceptable. In fact, sometimes this is preferred in my school)
#6
Quote from: Liviu Lalescu on August 02, 2016, 03:28:26 PM

Add some rooms as courses and other rooms as real rooms. In the rooms list, add both, maybe with names to differentiate, like courses start with "C" and real rooms with "R". Then add some activities to be placed in "R" rooms and maybe constrain them to be at the same time as the courses activities.

I am a little confused. The activities are all preferred being placed in "C" rooms now. When "R" rooms are added, a activity should be placed both in a "C" room and "R" room. How to make the constraints? 
To make it clear, I just modified the example fet of the custom version as an example:
1. removed most of the students and just kept two;
2. removed most of the teachers, and make two teachers teach the same subject 151-Biology;
3. removed all the other activities and constraints that are not related to the kept students and teachers.
4. add a real room to the Rooms_List (line 429)

I do not know what to do next. Could you show me how to make it with the example file please? Thanks.
#7
Ok, I will try to play around first.
But you just reminded me

Quote from: Liviu Lalescu on July 17, 2016, 03:45:31 PM
About (1): If I remember correctly, the mapr custom version works in a single step. Just assign FET activities (which have FET teachers = real teachers) to FET rooms.

I am not sure if jimmyjim needed real rooms. But I think you can have real rooms = additional FET rooms and use some constraints activities same starting times.

To see all tags of a FET XML file, either see function Rules::read in rules.cpp or open example files.

About (2): I am not sure I understand. You just allocate FET activities to FET rooms. A room can hold multiple activities in this FET custom version (as opposed to the official FET).


The custom version does not need real rooms. So the result coursetables just show "when" to take "which" activity, but no "where".
I do not know how to "have real rooms = additional FET rooms and use some constraints activities same starting times".
Would you state it with more detail?

#8
Yes, I understand, thank you very much for your help and support.

My state of the requirement is really bad for your understanding. I just want to do students course planning by collecting the students who choose the same subjects into the same activities. For example, both students S1 and S2 choose subjects A, B, C, D, and each subject has several activities, say A-T1, A-T2, ..., B-T1, ... , D-Tn. I hope S1 and S2 should join the same four activities, say A-Ti, B-Tj, C-Tk, D-Tm, rather than S1 joins four activities and S2 joins another four activities.

In my last post, I use the vector to cluster the students. So I can get which group of students should join the same activities, but I don't know which constraints for FET to assign one student to specific activities.
#9
Also here comes a requirement that I hope to meet. In my initial post, I mentioned that the students might choose which optional subject to join in. So each student has a vector [1, 0, 1, 0, ..., 1], the length is the number of subjects, and 1 means the student choose that subject, 0 otherwise.

What I want to achieve is that assign students with the most similar/closest vector to the same activities. For activities of one subject, I can group the closest students by K-means. I wonder if there is any constraint that I can use to assign students to specific activities.
#10
I read some of the help, and then I found in fet file there is a "ConstraintActivitiesSameStartingHour" part which I think is the key to my problem.

For one subject (e.g. French), there are two teachers (e.g. T1 and T2), students can join either activity (French-T1 or French-T2), but not both. In this case, I think the two activities have different Activity_Group_Id and I should add the two activities to the Equivalent_Activities_Item. Am I right?
#11
I think I have got the idea, after I play around the custom version with the example input file, under your help. For question (2), my understanding is wrong. I can have two activities, and set ConstraintActivitiesSameStartingHour to false for them.
I have a new question regarding to fet file:
There is a "Activities_List" part in fet file, where each "Activity" may have a "Activity_Group_Id" tag.
And there is also a "Equivalent_Activities_List" part, where equivalent activites are listed.
I really want to know the difference between activity_group and equivalent_activities, and when to use one over the other.
#12
(1) OK. I will try build on another computer so that I can run fet (instead of fet-cl) and figure out what the tags for.
(2) Maybe my understanding is wrong. Anyway, let me make an extreme example, say there is only one classroom and two teachers teaching French. So there are two activities (French-T1 and French-T2, both with a separate group of students) that should be scheduled to THE CLASSROOM at DIFFERENT timeslot. My understanding is the custom version would use just one timeslot for the activities of the same subject, and mark the problem unsolvable.
#13
Yes, they choose more like the second way.
I followed the link, downloaded the custom version and read the example fet files.
The main idea of the approach is to create a schedule with activities and teachers first, and then schedule the students to the activitys using FET where a real student = a FET activity and a real activity = a FET room.

I still have some questions:
1) It is a two-step approach, so it requires totally two fet files as input. Does FET generate the second file after the first step, or should I make the file manually? If only manually, I would like to make a little program to generate it. Is there and documents for the usage of all tags in a fet file?

2) For any subject (e.g. French), the related activities and teachers are all scheduled in the same timeslot (e.g. 9:00-10:00 Monday French and 10:00-11:00 Friday French) after the first step. But if they are scheduled to different timeslots (e.g. 9:00-10:00 Monday French Teacher T1, 10:00-11:00 Monday French Teacher T2, etc..), it is likely to reduce conflicts due to lack of classrooms. It is a new and much more complicated problem.  Do you have any idea or plan to this problem?

Thank you for your help.
#14
In my case, students have both mandatory and optional subjects.
They will choose which subject (choosed by default for mandatory ones) to join on the network.
And several teachers (determined before choosing) will teach the same subject in parallel, therefore the students choosing the same subject have to be splitted into groups.
We start course timetabling after we collcect the results (e.g. how many students choosed xxx course).

But we do not know how to group students so that fet can do timetabling well.
Student A may choose subject B and C. If A is in group B1 and C1, then we have to set the constraint that B1 and C1 cannot take place at the same time. But it is not feasible to set so many contraints manully.