FET Forum

FET Support (English) => Get Help => Topic started by: satellite2 on November 22, 2018, 01:13:33 PM

Title: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 01:13:33 PM
Hello,

FET has the option for selecting buildings of the rooms and assigning very useful constraints for the teachers/students such as min gaps between building changes and max building changes per day/week. Our university has 3 different campuses in the city and they are really far away from each other. Sometimes teachers and students need to visit more than one campus a week for different courses. So with the current options, I am considering to use each campus name as a building and assign the max building changes per day to ZERO since it is not that easy for teachers/students to change their campus in a day. However, this time I will not be able to use the actual building names inside each campus. I will not be able to assign min gaps between building changes since building names are used for the campus names. Actual buildings are also needed since some of the buildings also have some distance between them on foot and at least 1 period gap is needed.

What I want to ask is that is it difficult to add an additional hierarchical level above building variable to the current code and call it "campus" or something else? Also similar space constraint for the campus variable such as max campus changes a day?

Thanks in advance for the reply.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 02:16:04 PM
It might be possible, as a custom version. I am not sure if it is useful to add this in the official FET (but I will add this in the TODO for now) (it might confuse the users. Volker, what do you say? Other users, what do you say?).

I have this idea: say we have 8 rooms, 4 buildings and 2 campuses, like this:

room 1
room 2   building A     campus X

room 3
room 4   building B


room 5
room 6   building C     campus Y.

room 7
room 8   building D

For things to be easier for me, we could then add the FET name of the building A as "building A _ campus X", B: "building B _ campus X", C: "building C _ campus Y", D: "building D _ campus Y". And only consider internally that if a building ends in the name "campus...something" it is on this campus, and force predefined changes for campus (like max campus changes per day 0, so that it is also easier for me). I think this code is not too complicated.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 03:40:17 PM
It seems like a good idea. Maybe there can be a constraint like max change between a set of buildings for user to select if it is easier to implement.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 03:51:26 PM
Quote from: satellite2 on November 22, 2018, 03:40:17 PM
It seems like a good idea. Maybe there can be a constraint like max change between a set of buildings for user to select if it is easier to implement.

It is not very clear in your proposed way. And not easier to implement.

So, for now, I can do a custom version for you with my suggestion. Could you send me your input file? I need it as input (and I admit I am also curious of your data, is it a large university?).

If Volker or other users really want it, I will try to add it to the official. How to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 04:32:38 PM
Actually it is kind of a new university and most of the faculties only have 1 or 2 grades for now. There are about 9 faculties but not all the departments are accepting any students yet. So we can say that it is an average university for now. But it will become larger when new students arrive and almost no one will graduate in two years. So "winter is coming" :) and the university wants to take precautions. I am quite new in this university and I am currently in the planning stage since the administration did not provide me all the data yet. I am planning to convert the given data to csv file to import to FET instead of entering them all manually. I have read some academic articles that FET is very successful even with above 10 thousand students with limited room capacity in some universities. I can post here when the raw data is ready.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 04:42:14 PM
QuoteHow to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)

I did not understand each room in campus part. So do you mean that there will be an additional variable for rooms besides their building names without any hierarchy? Like room 101 is in building A and also in campus X?
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 04:44:11 PM
I see.

Please take care, if your data is private, send it to me by email (I mean at the end, if and when it will be ready).

If there is any article free and online from those you said above, could you send me the links?

I will need some test file(s), if I will implement this custom version taking care of 0 campus changes per day for students/teachers. Even a small one (or more), but not trivial.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 04:46:23 PM
Quote from: satellite2 on November 22, 2018, 04:42:14 PM
QuoteHow to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)

I did not understand each room in campus part. So do you mean that there will be an additional variable for rooms besides their building names without any hierarchy? Like room 101 is in building A and also in campus X?

Yes.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 05:01:38 PM
Quote from: Liviu Lalescu on November 22, 2018, 04:46:23 PM
Quote from: satellite2 on November 22, 2018, 04:42:14 PM
QuoteHow to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)

I did not understand each room in campus part. So do you mean that there will be an additional variable for rooms besides their building names without any hierarchy? Like room 101 is in building A and also in campus X?

Yes.

I think that'll do the job since the idea here is to add that campus constraint. Max change of campus constraint seems like the only necessity for me right now :) I don't know if the use of a campus variable would do good for anything else than this constraint.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 05:12:55 PM
Quote from: satellite2 on November 22, 2018, 05:01:38 PM
Quote from: Liviu Lalescu on November 22, 2018, 04:46:23 PM
Quote from: satellite2 on November 22, 2018, 04:42:14 PM
QuoteHow to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)

I did not understand each room in campus part. So do you mean that there will be an additional variable for rooms besides their building names without any hierarchy? Like room 101 is in building A and also in campus X?

Yes.

I think that'll do the job since the idea here is to add that campus constraint. Max change of campus constraint seems like the only necessity for me right now :) I don't know if the use of a campus variable would do good for anything else than this constraint.

I am not sure I will add this in the official FET.

For you, as a custom version, I can add only the max change of campus per day for students/teachers (should it be 0 only?). I would prefer to test it as this firstly.

If we decide to add campuses in the FET official, we need to add min gaps between campus changes and max campus changes per week as well, to be complete. It might be not that difficult, maybe it will be similar to building changes.

So, you suggest to add a campus to each room. This might be more flexible, but more work is needed to input each campus for each room and it is error prone, unlike adding a campus for only (say) 3 buildings.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 05:33:30 PM
Quote from: Liviu Lalescu on November 22, 2018, 05:12:55 PM
Quote from: satellite2 on November 22, 2018, 05:01:38 PM
Quote from: Liviu Lalescu on November 22, 2018, 04:46:23 PM
Quote from: satellite2 on November 22, 2018, 04:42:14 PM
QuoteHow to add, a campus for each building or a campus for each room? (each building in a campus or each room in a campus?)

I did not understand each room in campus part. So do you mean that there will be an additional variable for rooms besides their building names without any hierarchy? Like room 101 is in building A and also in campus X?

Yes.

I think that'll do the job since the idea here is to add that campus constraint. Max change of campus constraint seems like the only necessity for me right now :) I don't know if the use of a campus variable would do good for anything else than this constraint.

I am not sure I will add this in the official FET.

For you, as a custom version, I can add only the max change of campus per day for students/teachers (should it be 0 only?). I would prefer to test it as this firstly.

If we decide to add campuses in the FET official, we need to add min gaps between campus changes and max campus changes per week as well, to be complete. It might be not that difficult, maybe it will be similar to building changes.

So, you suggest to add a campus to each room. This might be more flexible, but more work is needed to input each campus for each room and it is error prone, unlike adding a campus for only (say) 3 buildings.

Adding campus to buildings is much simpler for the user of course. It seems like a better idea for me. A room will be automatically included in the campus of the building I guess. I will try to get the raw data as soon as I can. I also think that you should not include this feature in the official version since majority of the users use it for single schools or at most schools with  a couple of buildings. Maybe in the future there may be other people like me asking for this kind of a thing but I guess not many.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 05:40:57 PM
Maybe you can lock/hide campus option in the official version unless the user intentionally unlocks it to use it for a university level data. 
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 05:42:17 PM
Quote from: satellite2 on November 22, 2018, 05:33:30 PM
Adding campus to buildings is much simpler for the user of course. It seems like a better idea for me. A room will be automatically included in the campus of the building I guess. I will try to get the raw data as soon as I can. I also think that you should not include this feature in the official version since majority of the users use it for single schools or at most schools with  a couple of buildings. Maybe in the future there may be other people like me asking for this kind of a thing but I guess not many.

OK, thank you for clarifying! I will also write this in the TODO.

I hope I will start developing your custom version soon (maybe even today), and I will try to create for myself some small examples to test. I will let you know about it. I will use this trick with building ending in the name "campus X" or other name, but including "campus", and if the part after "campus" is different this means the buildings are on different campuses. And I will only implement max 0 campus changes per day for students/teachers, right?
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 05:44:03 PM
Quote from: satellite2 on November 22, 2018, 05:40:57 PM
Maybe you can lock/hide campus option in the official version unless the user intentionally unlocks it to use it for a university level data.

Yes, might be an idea.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 06:19:46 PM
Quote from: Liviu Lalescu on November 22, 2018, 05:42:17 PM
Quote from: satellite2 on November 22, 2018, 05:33:30 PM
Adding campus to buildings is much simpler for the user of course. It seems like a better idea for me. A room will be automatically included in the campus of the building I guess. I will try to get the raw data as soon as I can. I also think that you should not include this feature in the official version since majority of the users use it for single schools or at most schools with  a couple of buildings. Maybe in the future there may be other people like me asking for this kind of a thing but I guess not many.

OK, thank you for clarifying! I will also write this in the TODO.

I hope I will start developing your custom version soon (maybe even today), and I will try to create for myself some small examples to test. I will let you know about it. I will use this trick with building ending in the name "campus X" or other name, but including "campus", and if the part after "campus" is different this means the buildings are on different campuses. And I will only implement max 0 campus changes per day for students/teachers, right?

Max 0 campus changes seems enough I guess. Other values than ZERO will not be useful I think.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 22, 2018, 07:27:24 PM
I did something which seems to work. Please download from: https://lalescu.ro/liviu/fet/download/custom/satellite2/

There is a small example there, in the examples directory.

It is not perfectly optimized, but I think in practice it won't be noticeable (instead of comparing integers I compare and parse QString-s, in a small for-loop).

Please let me know.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 22, 2018, 09:55:59 PM
Quote from: Liviu Lalescu on November 22, 2018, 07:27:24 PM
I did something which seems to work. Please download from: https://lalescu.ro/liviu/fet/download/custom/satellite2/

There is a small example there, in the examples directory.

It is not perfectly optimized, but I think in practice it won't be noticeable (instead of comparing integers I compare and parse QString-s, in a small for-loop).

Please let me know.

Thank you very much Liviu, I will try it tomorrow and let you know.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 23, 2018, 11:04:38 AM
Quote from: Liviu Lalescu on November 22, 2018, 07:27:24 PM
I did something which seems to work. Please download from: https://lalescu.ro/liviu/fet/download/custom/satellite2/

There is a small example there, in the examples directory.

It is not perfectly optimized, but I think in practice it won't be noticeable (instead of comparing integers I compare and parse QString-s, in a small for-loop).

Please let me know.

I tried it several times with the sample data and it seems perfect. So I need to write the exact phrase "campus" to each building for this to work right?
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 23, 2018, 11:45:12 AM
Quote from: satellite2 on November 23, 2018, 11:04:38 AM
I tried it several times with the sample data and it seems perfect. So I need to write the exact phrase "campus" to each building for this to work right?

Yes, write "Campus", followed by something different for each campus.

I think I will modify a bit and put soon a new version (a minor thing, I made "Campus" check case insensitive, but I think it should be case sensitive).
Title: Re: Campus Option for Universities
Post by: satellite2 on November 23, 2018, 12:37:55 PM
Quote from: Liviu Lalescu on November 23, 2018, 11:45:12 AM
Quote from: satellite2 on November 23, 2018, 11:04:38 AM
I tried it several times with the sample data and it seems perfect. So I need to write the exact phrase "campus" to each building for this to work right?

Yes, write "Campus", followed by something different for each campus.

I think I will modify a bit and put soon a new version (a minor thing, I made "Campus" check case insensitive, but I think it should be case sensitive).

I see, thanks. In the sample data, I added two more activities to each campus (with respective rooms and subjects) and also applied min gaps between buildings to 1. I also lowered the hours of day to 6, so for two days there are 12 available slots for 10 activities and it works like a charm. I am really excited about what will happen with the actual data. This setting will help me a lot!

So since I am still in the planning phase, I am trying to figure out how to limit the distribution of activities to the certain campuses. So there are 3 campuses far away from each other. One of the campuses have two distinct areas (North area and South area) and there is a highway between them. A single period gap would be enough in order to pass from one area to the other area so I will treat these two areas as a single campus. However, the departments in these Northern and Southern areas mostly prefer to stay in their own areas unless there are any room problems.

Let's say that Southern area have more rooms available than Northern area and I want some of the activities in the Northern area to be held in Southern area in case of room problems in the Northern area. So normally I would apply 100% weight constraint to the Northern area buildings for Northern area activities, but this time I have to apply 99% or lower in case of room problems in the North. If I apply 99% or lower for the rooms in the Northern buildings, what should I apply for these activities for the Southern part in case of room problems? Should I apply another 100% weight for the whole rooms in the campus buildings? (every room in the North and South)


I also want to get clarified about room constraints in general. This clarification can make things easier in a campus environment. For instance, can we do something like below?

Activity1, Activity2 and Activity3 have to be held in the rooms of the buildings A, B or C with 100% and cannot be held int the rooms of the buildings D or E.

Activity1 preferably needs to be held in building A (Activity2 in building B and Activity3 in building C respectively) with 99% possibility.

* Assign 100% weight constraint to all 3 activities to be held in the rooms of the buildings A, B and C.
* Assign 0% weight constraint to all 3 activities to be held in the rooms of the buildings D, E.
* Assign 99% weight constraint to Activity1 to be held in the rooms of building A (Activity2 in building B and Activity3 in building C respectively)


Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 23, 2018, 01:04:03 PM
I added the new version, with this minor thing (capitalization matters).

I will read your new post in a short time.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 23, 2018, 02:04:36 PM
For your previous post, you are right, with a single exception: there is no need for the 0% weight constraint for the buildings D and E. And maybe you need lower weights than 99% (this can be found by trial-and-error).

And for North and South: you might want to consider the buildings in North in "Campus N", the buildings in South in "Campus S" and, if a solution cannot be found, modify both "Campus N" and "Campus S" to "Campus NS" (so you have very little work to do this).
Title: Re: Campus Option for Universities
Post by: satellite2 on November 23, 2018, 02:24:30 PM
Quote from: Liviu Lalescu on November 23, 2018, 02:04:36 PM
For your previous post, you are right, with a single exception: there is no need for the 0% weight constraint for the buildings D and E. And maybe you need lower weights than 99% (this can be found by trial-and-error).

That's perfect.

Quote from: Liviu Lalescu on November 23, 2018, 02:04:36 PM
And for North and South: you might want to consider the buildings in North in "Campus N", the buildings in South in "Campus S" and, if a solution cannot be found, modify both "Campus N" and "Campus S" to "Campus NS" (so you have very little work to do this).

That sounds like a great idea, thanks.
Title: Re: Campus Option for Universities
Post by: satellite2 on November 23, 2018, 03:18:38 PM
I am also planning the structure of student sets. I know that a student year normally represents students in the same year of their schooling but I want to use this for a whole department in a faculty in order to have a single timetable for the whole department in the years_days html files. I think there won't be any problems to use a structure like below?

Instead of this:

- Faculty A - Department X - Grade 1 (as Year)
----- Section A (as Group)
----- Section B (as Group)
- Faculty A - Department X - Grade 2 (as Year)
----- Section A (as Group)
----- Section B (as Group)


I want to use this:

- Faculty A - Department X (as Year)
----- Grade 1A (as Group)
----- Grade 1B (as Group)
----- Grade 2A (as Group)
----- Grade 2B (as Group)

Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 23, 2018, 03:29:36 PM
Years/groups/subgroups is just a convention. The important part for FET internals is the subgroups - these must be not overlapping. Yes, I think your structure should be OK.

But do you know that you have the timetable of all activities in the HTML results?
Title: Re: Campus Option for Universities
Post by: satellite2 on November 23, 2018, 06:10:17 PM
Quote from: Liviu Lalescu on November 23, 2018, 03:29:36 PM
But do you know that you have the timetable of all activities in the HTML results?

Yes, I think we can see all the activities in a single table but that would be very difficult for people to find their respective classes.
Title: Re: Campus Option for Universities
Post by: Liviu Lalescu on November 23, 2018, 06:12:46 PM
Quote from: satellite2 on November 23, 2018, 06:10:17 PM
Quote from: Liviu Lalescu on November 23, 2018, 03:29:36 PM
But do you know that you have the timetable of all activities in the HTML results?

Yes, I think we can see all the activities in a single table but that would be very difficult for people to find their respective classes.

Oh, indeed, you will have more FET years.