Activities ordered if same day

Started by math, June 13, 2018, 08:40:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

math

Hi!

Is there any way in FET for specifying that two activities shall be ordered if they are planned on the same day?

Background: Basically the order of lecture and corresponding exercise does not matter. If a lecture is planned for Monday and the corresponding exercise is planned for Tuesday, the content of the exercise relates to the Monday lecture. If it is the other way around (Monday exercise, tuesday lecture), the content of the exercise relates to the content of previous week's lecture.

There's only a problem where exercise and lecture is planned to the same day and the exercise is scheduled to an earlier time than the lecture. Most teachers dislike this configuration. They want the lecture to precede the exercise if both are scheduled for the same day.

So is there any way I can prevent this? Can I specify in any way that if activities A and B are scheduled for the same day, A has to be scheduled to an earlier time than B?

Liviu Lalescu

#1
Even if I don't like it, I have to admit it cannot be done with FET as it is now and a new constraint is necessary. But I don't know how useful it might be to other users.

Are you sure that what you suggest is useful? Only for two activities? Aren't there usually more subactivities in a larger activity?

If you would accept it, I could write you code to modify the current constraint two activities ordered. It is simple (much simpler than to add a new constraint). And you could use this constraint as if it were what you need. If not, I will be forced to implement it into the official FET. Let me know.

math

Thanks for your quick response, but I use the "two activities are ordered" constraint quite often in its intended way, such that the order of two activities is defined. Replacing the "two activities are ordered" contraint by an "two activities are ordered if same day" constraint would be a problem for these activities.

But wouldn't it be possible to add a boolean flag to that constraint, e.g. "only applies if same day" (y/n). If the flag is FALSE the constraint would work like it does in the current version. If the flag is set, the behaviour of the constraint would change the way I described in my initial posting and what you suggested to implement in a individual version.

Liviu Lalescu

It is possible, but I think the best way would be to add a new constraint.

In fact, I might begin work shortly.

Volker Dirr

just to be sure: there are different teachers in the activities (or at least different rooms), right?!
i just ask because that is maybe different on universities. there it might be useful.
but at most (nearly all?) schools the teachers, students (and rooms) are the same. So in fact it doesn't matter if it is ordered in a timetable, since the teacher can simply swap hisself (even it is "wrong" in the timetable).

math

Yes, that's correct.
For instance first year lectures often use rooms with 300+ capacity whereas exercises for that lecture use much smaller rooms. Also the teacher may differ between lecture and exercises. Hence, simply swapping the slots is not possible.

Liviu Lalescu

I am done with the implementation, I will test and check the code now and put a snapshot hopefully soon. I hope you will report how it works.

Liviu Lalescu

I have made it and made available a new snapshot, please see the snapshots announcements section.

Volker Dirr

hmmm...
thinking about this some more (and even i already translated), i just thought about a minor "bug"?

QuoteTwo activities ordered (the second activity must begin at any time in the week after the first activity has finished)

Let's say A1 and A2 have got same students (at least one shared subgroup) and/or at least one shared teacher.
In that case it is of course automatically "after the first activity has finished" without caring about the duration of activity A1.

But what happen if A1 and A2 haven't got similar subgroups and teachers?
a) Is it needed that it must be "after the first activity has finished"? So it is needed to care about duration of A1.
or
b) Is it unneeded to care about "after the first activity has finished", so only care about "after the first activity has STARTED". So no need to care about duration

variant b) might be faster to calculate, since FET doesn't need to care about duration.


hmm...
So in normal case (shared teacher OR subgroup) checking only "after the first activity has STARTED" will give the same results as "after the first activity has finished".
But in "not normal case" (no teacher and subgroup) it is of course different.

I wonder if there is an example where this "not normal case" a) or b) is useful.
If there is only a) OR b) existing, we should decide for that variant.
If a) AND b) DON'T exist, it is enough to care only about b)
If a) AND b) exist, we might need a flag to care about that.

Anyone have got examples where a) and/or b) might be useful?