Constraint activity A2 not to follow immediately activity A1

Started by Liviu Lalescu, January 28, 2018, 07:35:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

As bachiri401 suggested here: https://lalescu.ro/liviu/fet/forum/index.php?topic=3578.0

I also saw that aSc Timetables has a presentation in which they say: "Gym before Chemistry?"

So I might need to add in FET a new constraint for this, to avoid the need for the difficult trick (described in the link above).

I think the best is to make it for two activities, the first (A1) and the second (A2). And to say that the situation A1 then immediately A2 is forbidden. It is allowed A2 then immediately (or not) A1, or A1 then another activity or free and then A2.

The constraint is not difficult to make, but is difficult to express in the FET style of notation of a constraint. Maybe something like: "constraint two activities not consecutive ordered"?

Is this constraint useful?

rodolforg

#1
Maybe "constraint an (a set of) activity not right after another" or "constraint two activities not consecutive" ?

Volker Dirr

#2
hmm...
i am not sure if users will always enter so many constraints, since it is only needed if both activities have got the same students set.

so if you have got 2 sets of activities, you need to care about that both set refer to the same students set or there must be a checkbox "only if same students set".

or maybe better "subject a" is not allowed after "subject b" (but again only if same students set?!)

Liviu Lalescu

#3
I prefer rodolforg's suggestion, "constraint two activities not consecutive". But this involves adding many constraints - is this acceptable?

Volker Dirr

#4
i fear a bit that there will be too many constraints to add; on the other hand you will do it only one time. But once again on the other hand it will be complicated to activate/deactivate them since it is only a minor constraint (so if you "play" a bit with your current dataset).
let's assume the user have got 4 math hours and only 1 sport lesson. he already need to add 4*1*number_of_classes constraints. So a "normal" school with 6*4=24 classes already need 96 contraints.
but now lets imagine he has got 5 math hours and 2 sport hours. maybe a few more classes. maybe just not "no math" after sport. Maybe also "no art", "no music", "no chemistry", "no languarge", "so main subject", ... you will get very fast a few thousend constraints.

Benahmed Abdelkrim

I think the original question is about subject '' a '' does not immediately follow subject '' b ''. this way we can avoid adding multiple constraints that concern pairs of activities. is it possible?
B.A/krim

Liviu Lalescu

Quote from: Benahmed Abdelkrim on January 29, 2018, 05:18:09 AM
I think the original question is about subject '' a '' does not immediately follow subject '' b ''. this way we can avoid adding multiple constraints that concern pairs of activities. is it possible?

It is not good, because it does not follow the usual FET notation. Your notation has to work only for each students set, and it does not offer access to the smallest unity, the activity.