Main Menu

Recent posts

#1
Suggestions / Re: Suggestion about a new set...
Last post by Liviu Lalescu - Today at 11:26:56 AM
Quote from: choko on Today at 09:08:44 AMFor example, in a school, suppose there are 50 time slots and 50 activities for class D. But D's homeroom will occasionally be used by class E. Examples include "E can use D's homeroom when D is having their music lesson at the music room".

I found that when 49 of D's homeroom timetable slots are used by D while the remaining one is allocated to E, it takes a long time for fet to come up with a solution. And it turns out that a solution could be found only when E's activity (which uses D's homeroom) is held when D is having an activity which is not using its own homeroom (e.g. music, Art in the Art room, Science in the laboratory). So I want E's activities to overlap with D's science or music or art or any other subjects at which D won't use its homeroom.

Is it possible?

I think there are two solutions:

1) Yes, it is possible, exactly as I said regarding the constraint activities occupy max time slots from selection.

Example: D has activities A1, A2, A3, A4 in other room than home room, and E has activity A5 to be in D's home room. Then add A1, A2, A3, A4, A5 in this constraint, select all slots (X or red), max occupied = 4 (if each activity has duration 1).

2) Considering your exact situation, maybe you could use space constraints. Home room R for D, and preferred room for that E's activity.

Quote from: Vangelis Karafillidis on Today at 10:49:38 AM
Quote from: choko on Today at 08:56:57 AMLet me clarify a bit.

At the time when activity A is being held, either activity B or C will be held as well.

Is there any solution to deal with it?
Thank you.

Liviu, I think we have already discussed this issue. Sometimes, constraints of the type "a set of activities share min common time slots with any of another set of activities" (and maybe in selected time slots). As you told me, this type of constraint is extremely difficult to be implemented. But it seems this type of constraint is quite useful...

Vangelis.


Thank you, Vangelis! I will search the TODO and if this suggestion is not already in, I'll add it. However, I hope that choko's problem can be solved by my solutions above.

I would be opened to give a try to implement the more general suggested constraint if I would be sponsored.
#2
Quote from: choko on Today at 08:56:57 AMLet me clarify a bit.

At the time when activity A is being held, either activity B or C will be held as well.

Is there any solution to deal with it?
Thank you.

Liviu, I think we have already discussed this issue. Sometimes, constraints of the type "a set of activities share min common time slots with any of another set of activities" (and maybe in selected time slots). As you told me, this type of constraint is extremely difficult to be implemented. But it seems this type of constraint is quite useful...

Vangelis.

#3
Suggestions / Re: Suggestion about a new set...
Last post by choko - Today at 09:08:44 AM
For example, in a school, suppose there are 50 time slots and 50 activities for class D. But D's homeroom will occasionally be used by class E. Examples include "E can use D's homeroom when D is having their music lesson at the music room".

I found that when 49 of D's homeroom timetable slots are used by D while the remaining one is allocated to E, it takes a long time for fet to come up with a solution. And it turns out that a solution could be found only when E's activity (which uses D's homeroom) is held when D is having an activity which is not using its own homeroom (e.g. music, Art in the Art room, Science in the laboratory). So I want E's activities to overlap with D's science or music or art or any other subjects at which D won't use its homeroom.

Is it possible?
#4
Suggestions / Re: Suggestion about a new set...
Last post by choko - Today at 08:56:57 AM
Let me clarify a bit.

At the time when activity A is being held, either activity B or C will be held as well.

Is there any solution to deal with it?
Thank you.
#5
Suggestions / Re: Suggestion about a new set...
Last post by choko - Today at 08:52:53 AM
QuoteYou could use a constraint activities occupy max time slots from selection.


Thank you for your reply. But I am afraid that the result might happen to be the activity won't overlap with any other activities at all.

Is there anything I can try?
#6
Suggestions / Re: Suggestion about a new set...
Last post by Liviu Lalescu - Today at 05:44:16 AM
Quote from: choko on Today at 04:13:54 AMOther than "a set of activities that are not overlapping with any other", is it possible to develop a new set of constraints that an activity must be overlapping with at least one activity from a set of activities"?

You could use a constraint activities occupy max time slots from selection.

QuoteSetting two activities beginning at the same time same day is similar.

Please use a constraint activities same starting time (day+hour).
#7
Suggestions / Suggestion about a new set of ...
Last post by choko - Today at 04:13:54 AM
Other than "a set of activities that are not overlapping with any other", is it possible to develop a new set of constraints that an activity must be overlapping with at least one activity from a set of activities"?

Setting two activities beginning at the same time same day is similar.
#8
Suggestions / Re: Constraints related to act...
Last post by Liviu Lalescu - July 19, 2024, 03:32:34 PM
Hello, Matthias,

For what you need, it is there :) , as I said. Please see the 4 attached screenshots. For min gaps between unordered pair of tags (AT1, AT2), you need to add two ordered pairs (AT1, AT2) and (AT2, AT1).

I will add in the TODO the remaining constraints, but I doubt they are very useful:

    Time -> Tags -> Min days between activities with an activity tag
    Time -> Tags -> Activities with an activity tag have same starting time
    Time -> Tags -> Activities with an activity tag occupy min slots
    Time -> Tags -> Activities with an activity tag occupy max slots
    Time -> Tags -> Activities with activity tag A and activity tag B are ordered
    Time -> Tags -> Max hourly span for Activities with an activity tag

They might be too strong. Maybe they would be useful for students (set)/teacher(s).

FET respects all the constraints; this is in my opinion correct. No exceptions (I refer to your "older constraint wins).
#9
Suggestions / Re: Constraints related to act...
Last post by math - July 19, 2024, 02:49:39 PM
Hi Liviu!

Thanks for your fast response. I have to admit that my example wasn't chosen well, because one of my two problems can be solved the way you described. However, the other problem remains: ensuring consistency in case that constraints are based on the type of an activity.

What I mean are constraints like these:
  • regular lectures shall be scheduled between 8:00 and 14:00 (because we made some bad experiences with evening lectures)
  • lectures for students in the first and second semester shall be scheduled between 8:00 and 12:00
  • activities in our open air lab shall end the students day
  • there shall be at least one gap between exercises
  • block courses shall be scheduled on Friday afternoon or Saturday

At the moment FET requires adding these constraints to each activity seperately. That means if I'm adding a new activity, I have to identify the required constraints and then adding them in the second step. For instance, if I'm adding a lecture activity of first semester students, I have to add a constraint that the lecture shall be scheduled between 8:00 and 12:00. When adding other activities, it might also be necessary to modify previously defined constraints, e.g. max days between set of activities.

In general, each time I'm adding a new activity, I have to ensure that I'm not only adding all required constraints to this new activity, but also modify existing constraints with the newly created activity. I have to be super attentive to add and modify all constraints correctly, because it is quite easy to miss something.

This situation is due to the fact that constraints are modeled as "properties" of the activity. I know that this description is not overly accurate, but let me just call it this way.

What I'm suggesting is adding some kind of inheriting concept where activities may inherit their time constraints from activity tags. Thus, instead of modeling them as "property" of the activity itself, they might be modeled as "property" of an activity tag. Such a concept already exists for rooms, where I can specify preferred rooms for an activity tag, but not for time.

For instance:
  • If there would be a Time -> Tags -> Activities with an activity tag have a set of preferred time slots, I might add such a constraint and define that activity tag LECTURE shall be scheduled Monday to Friday between 8:00 and 14:00.
  • When adding a new activity for a lecture, I just add the activity tag LECTURE, not having to define any specific time constraints
  • When generating a schedule, FET now has to translate the above time constraint into regular time constraints for the activity. Following the example, FET could create a regular Time -> Activities -> Preferred Times -> An Activity has a set if preferred time slots constraint for each activity with activity tag LECTURE.

From my point of view this modeling concept would have three major advantages:
  • The amount of time constraints that need to be defined would reduce significantly (at least in my usage case), since time constraints need to be defined just once for the activity tag and not for each activity seperately.
  • The modeling of a new schedule gets less error prone.
  • Modifying constraints becomes less time consuming. Let's assume that a schedule cannot be generated with the mentioned time constraint for lectures. So we decide to enhance the duration for lectures until 16:00. Currently I would have to modify all time constraints for all lectures and change 14:00 into 16:00. If there would be a time constraint for an actitiy tag, I would just have to change this single constraint.

And in my naive understanding of FET I assume that implementing these constraints should be pretty simple, because activity tag constraints are just translated into activity constraints, thus the solver does not have to be modified or enhanced in any way.

Besides the mentioned constraint for activity tags, there might be also others:
  • Time -> Tags -> Activities with an activity tag have a set of preferred time slots as just described
  • Time -> Tags -> Activities with an activity tag have a prefered starting time
  • Time -> Tags -> Min days between activities with an activity tag
  • Time -> Tags -> Activities with an activity tag begins students day
  • Time -> Tags -> Activities with an activity tag ends students day
  • Time -> Tags -> Activities with an activity tag ends teachers day
  • Time -> Tags -> Activities with an activity tag have same starting time
  • Time -> Tags -> Activities with an activity tag occupy min slots
  • Time -> Tags -> Activities with an activity tag occupy max slots
  • Time -> Tags -> Activities with activity tag A and activity tag B are ordered
  • Time -> Tags -> Max hourly span for Activities with an activity tag
  • Time -> Tags -> A set of activity tags is not overlapping: this is already existing!
  • Time -> Tags -> Min gaps between activities with an activity tag

As a matter of fact there are things that might go wrong or need to be handled. For instance this procedure might generate contradicting time constraints for an activity. This might result in an error during scheduling, so that the user has to modify her configuration. Or the user has already created a constraint for an activity where the same type activity constaint would be generated from actitiy tag. In this case the firstly created constraint could overrule the activity tag based constraint.

Phew, that was a long posting. Thanks for reading it.

Best, Matthias
#10
هل من مجيب على هذا السؤال؟ جزاكم الله خيرا