FET Forum

FET Development => Suggestions => Topic started by: Liviu Lalescu on August 16, 2023, 07:35:29 PM

Title: Buildings constraints
Post by: Liviu Lalescu on August 16, 2023, 07:35:29 PM
Hello!

We got suggestions about maximum building changes per week. Some users want the changes to be considered over all the week. Now the constraints teachers/students max building changes per week consider the changes only daily.

We intend to add another new constraint to take care of this. So if the teachers/students change the building from day 1 to day 2, it is a change.

We need suggestions for the names of the new constraints. I suggested:

ConstraintTeachers/StudentsMaxBuildingChangesPerWeek and ConstraintTeachers/StudentsMaxTotalBuildingChangesPerWeek.

Volker does not like this.

Maybe:

ConstraintTeachers/StudentsMaxBuildingChangesPerWeekDaily and
ConstraintTeachers/StudentsMaxBuildingChangesPerWeekTotal?

We need advice from users speaking better English or with better ideas. Please suggest.
Title: Re: Buildings constraints
Post by: Volker Dirr on August 16, 2023, 07:51:13 PM
"Volker doesn't like" it is maybe a bit extreme.

It is more "Volker fear that the names are not clear and misstakable."

So i hope you can help us. Since my English is too bad :-(
Title: Re: Buildings constraints
Post by: Liviu Lalescu on August 16, 2023, 07:54:45 PM
Sorry, Volker :)

Maybe also:

ConstraintTeachers/StudentsMaxBuildingChangesPerWeekDaily and
ConstraintTeachers/StudentsMaxBuildingChangesPerWeekOverall?
Title: Re: Buildings constraints
Post by: Darren McDonald on August 16, 2023, 07:59:14 PM
I don't quite understand what these constraints will count, so it's hard to choose a best option here.

Can you give an example of how this would work? For example, if a student is in building 1 and building 2 on Day 1, building 2 and building 3 on day 2, and building 1, building 2, and building 3 on day 3, how would that be counted by these two constraints?
Title: Re: Buildings constraints
Post by: Liviu Lalescu on August 16, 2023, 08:05:47 PM
Daily: one change on day 1, one change on day 2, two changes on day 3.

Overall: five changes.

Overall considers change also from day 1 to day 2 (no change in your example), and from day 2 to day 3 (one change in your example).
Title: Re: Buildings constraints
Post by: Volker Dirr on August 16, 2023, 08:19:29 PM
Lets say the week has only 2 days and 3 hours.
Here is a timetable from a teacher (with the building names only).

--MondayTuesday
1Building ABuildung B
2Building BBuildung B
3Building ABuildung B

The first constraint counts:
Monday 2 building changes
Tuesday 0 building changes
So in total 2+0=2 building changes


The other constraints counts:
Monday 2 building changes
From Monday evening to Tuesday morning 1 building change
Tuesday 0 building changes
So in total 2+1+0=3 building changes
Title: Re: Buildings constraints
Post by: Darren McDonald on August 16, 2023, 08:26:31 PM
Thank you both for the clarification!

What about

ConstraintTeachers/StudentsMaxDailyBuildingChangesTotal and
ConstraintTeachers/StudentsMaxContinuousBuildingChangesTotal?
Title: Re: Buildings constraints
Post by: Volker Dirr on August 16, 2023, 08:29:53 PM
I like that suggestion.
Title: Re: Buildings constraints
Post by: Benahmed Abdelkrim on August 16, 2023, 09:20:23 PM
I think leaving things as they are is best for the following reasons:

1. MaxBuildingChanges per day expresses the maximum changes from one building to another per day.

2. MaxBuildingChanges per week as it is now expresses the maximum of changes per week from day to day, without allowing the change in the same day which is quite normal.

3. if the user does not want any change of building per week(every days), he just has to choose the rooms of this building as favorite rooms.

4. as long as there is a constraint that can implement the user's choice, I think adding another constraint is aberrant, or even introducing a change to a constraint that works just fine would be unnecessary in my opinion... even the names quoted above would be very confusing.
Title: Re: Buildings constraints
Post by: Volker Dirr on August 16, 2023, 09:33:41 PM
Quote from: Benahmed Abdelkrim on August 16, 2023, 09:20:23 PMI think leaving things as they are is best

You are right. That is also a true point. In fact it's good if we change old stuff as less as possible, but in fact we already broke that rule a very few times in the past.

If a new name is (much) easier to understand and if it avoid mistakes, then we should think about renaming it. Because if we don't rename it users migth not see and use the constraint and/or we might get a lot of questions in the forum or by email. So we migth reduce the needed support time.

hmmm... We should take same time and think carefuly. Liviu, please don't rush too much.
Title: Re: Buildings constraints
Post by: Benahmed Abdelkrim on August 17, 2023, 09:08:46 AM
I think that if a change should be introduced, this change would be at the level of the work of the constraint and not at the level of the names.

the current names are very good, what needs to be changed is to adapt the work of the constraint to the name as it is now.

ie max change of building per week should allow change from day to day, according to the number of times defined by the user.

if for example max change per week =0 , the activities will take place in the same building throughout the week.

if max change =3 for example, the change should be from day to day for 3 times a week, we could see the following combination:
day 1: building A
day 2: building A
day 3: building B
day 4: building C
day 5:building D
Title: Re: Buildings constraints
Post by: Benahmed Abdelkrim on August 17, 2023, 12:39:01 PM
Quote from: Liviu Lalescu on August 16, 2023, 07:35:29 PMHello!

We got suggestions about maximum building changes per week. Some users want the changes to be considered over all the week. Now the constraints teachers/students max building changes per week consider the changes only daily.

We intend to add another new constraint to take care of this. So if the teachers/students change the building from day 1 to day 2, it is a change.
But why a new constraint?  while it already has a constraint that realizes this fact;  max building change per day=0?!
Title: Re: Buildings constraints
Post by: Liviu Lalescu on August 17, 2023, 01:16:27 PM
Quote from: Benahmed Abdelkrim on August 17, 2023, 12:39:01 PMBut why a new constraint?  while it already has a constraint that realizes this fact;  max building change per day=0?!

A user might need to keep for a teacher/students set the building for the whole week.
Title: Re: Buildings constraints
Post by: Liviu Lalescu on August 17, 2023, 01:38:57 PM
Answering my own initial question: I think the best compromise would be to make it similarly to the rooms:

ConstraintActivitiesOccupyMaxDifferentBuildings

So the user can add max 1 different buildings for all the activities of a teacher to keep it constant.

I am willing to implement this, but under a target sponsorship contract.
Title: Re: Buildings constraints
Post by: Benahmed Abdelkrim on August 17, 2023, 01:49:37 PM
Quote from: Liviu Lalescu on August 17, 2023, 01:16:27 PMA user might need to keep for a teacher/students set the building for the whole week.

in this sense, the constraint exists (max change of building per week), it is enough to introduce the changes which take into account the daily change, as explained in my post above.
https://lalescu.ro/liviu/fet/forum/index.php?msg=31095
Title: Re: Buildings constraints
Post by: Liviu Lalescu on August 17, 2023, 06:28:01 PM
Interesting, Benahmed, but I kind of do not like it. It is complicated to name such constraints.