Activities that don't trigger space/room rules (movable breaks)

Started by Corfiot, September 26, 2018, 11:51:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corfiot

Hello,

I would like to have activities that do not count towards time or space rules. I have breaks that have to be within a specific time range so that students can eat while the restaurant is open.

If I put an activity for that FET finds places for me, which is a great help but then rules like students max hours continuously trigger and my schedule breaks.

What i'm after are "soft" breaks.

Thanks,
George

Volker Dirr

I am not 100% sure if such a rule will be needed and/or good.
a) adding such a rule might slow down (maybe only a very bit, but it will slowdown)
b) you can force the lunch activity at special times, so you already now that there will be in fact a break. So you only need to add it to the needed max value and all is fine again.

Corfiot

I am happy to consider workarounds.

I don't know the internals about (a) but I would not mind waiting longer to have this convenience.
As for (b), I'm already limiting the lunch activity to the timeslots the restaurant is open. The problem is once placed, the activity counts towards rules such as max hours continuously and "dislodges" other activities, creating gaps where there shouldn't be any, wasting a slot.

If I add an hour to my max hours continuously rules, I get, well, longer continuous days. Our schedule hours are from 9am to 9pm. Max hours continuously is currently 5. If I set it to 6 and add the lunch I can easily get lunch AND 6 hours continuously, which I don't want.

Volker Dirr


rodolforg

@Corfiot,

my custom fet have a constraint that forces a minimal time interval without activities within a time span.
Example: From 11am until 13am a/all teacher(s)/student_set(s) have minimum 60min "break".

It was discussed here: https://lalescu.ro/liviu/fet/forum/index.php?topic=3073.0

Volker Dirr

Yes, that is also possible.
You might also use time constraint max hours with an activity tag. (of course it mean you need to tag nearly all activities).

Difficult to say what is the best for your dataset without knowing your dataset.

I myself also simply just add 5 lunch activities with min 100% constraint. So lunch is forced each day. i can force the hours (at my school normaly only 6th hour, but 5th hour is also used sometimes) by preffered starting time constraints. So a min day constraint is simply 1 larger then without lunch.
This variant is very fine as long as students don't have got free days and not too empty timetables. so it should be fine for "default" schools.

rodolforg variant  and the tag variant will be better if your students are allowed to have free days or a very low number of hours at a day.

Corfiot

I am tempted to go with rodolforg's solution, an actual implementation of this. However, it seems it's a bit behind from Liviu's master. Maybe we can collaborate rodolforg? I do some development myself.

I would like this functionality added to FET directly, even though it sounds a bit confusing as a constraint. It only needs some decent documentation. I think a lot of schedules need lunch breaks (I need them for students, not teachers).

Also, the tag variant won't work because I have "max hours daily" and "max hours continuously" for both teachers and students that count the "break" and produce wrong results.

My dataset if a university department where we make schedules according to rules for professors and students with a working 12 hours in the day (9am to 9pm). So we don't just use "day" rules, there's a lot of "hour" rules involved that must be respected. If you want to take a look, the file is attached. I was forced to add rigid "breaks" for students, which makes further changes effectively impossible.



Volker Dirr

You can try rodolforgs solution of course.

In my opinion:

a) You dataset don't need it, since students have got activities every day and there are also enough activities each day. So currently just force a lunch activity each day. Of course you need to use the max "tag" constraints and increase the value 1 time. The numbers won't be wrong by that. It will be the same.

b) i don't think not counting activities will be good, since that solution will slowdown many other files, even if they don't use that feature. A much better variant will be adding a new constraint "max working in an hourly interval per day". Because this won't slow down other files, it will speed up your file and it will be much easier to enter the data.

Liviu Lalescu

#8
Quote from: Corfiot on September 26, 2018, 11:51:33 AM
Hello,

I would like to have activities that do not count towards time or space rules. I have breaks that have to be within a specific time range so that students can eat while the restaurant is open.

If I put an activity for that FET finds places for me, which is a great help but then rules like students max hours continuously trigger and my schedule breaks.

What i'm after are "soft" breaks.

Thanks,
George

This is a good suggestion - I think more users suggested until now; unfortunately, complicated. I added it for now in the TODO list.

Quote from: Corfiot on September 27, 2018, 11:21:03 AM
Also, the tag variant won't work because I have "max hours daily" and "max hours continuously" for both teachers and students that count the "break" and produce wrong results.

You have constraints teacher(s)/students (set) activity tag max hours daily/continuously. For daily, activate and neglect the warning.

Volker Dirr

Liviu, why not adding "max working in an hourly interval per day"? That will help all users that as for a feature like Corfiot asked for, but without the disadvantages. It will even have some more advantages, since the user need less activities; so it will properly even make the dataset easier to solve.

Liviu Lalescu

Quote from: Volker Dirr on September 27, 2018, 05:48:10 PM
Liviu, why not adding "max working in an hourly interval per day"? That will help all users that as for a feature like Corfiot asked for, but without the disadvantages. It will even have some more advantages, since the user need less activities; so it will properly even make the dataset easier to solve.

At first, I thought you suggest teacher(s)/students (set) interval max days per week, but you suggest something else.

But I think what you suggest can be done with the magic constraint activities occupy max slots from selection. The problems are that the user needs to add n_days_per_week*(n_teachers+n_students_sets) constraints (many constraints), and that for the students it is problematic, the activities in the constraints must be added for each subgroup (or group, if the data contains no subgroups, or year, if the data contains no groups) (see explanation (1*) below).

1*: If there are activities A1 for group G and activities A2 for subgroup S, G contains S, for S the user must add A1 and A2 in the constraint.

Volker Dirr

The "magic constraint activities occupy max slots from selection" has got 2 big disadvanatges in this cases:

1. It is too complicated to enter the data. Users won't use it, since they must enter much data and as soon as they modify a bit the dataset they must also update that constraint again. even if they will do all this stuff: the chance to do a bug is very high and it isn't very easy to find bugs. My suggestion won't have got that disadvanatge.

2. My suggestion is internally easier to check. So generating will be faster with my suggested special constraint.

Liviu Lalescu

You are wrong with (2.) The "occupy max" constraint is optimized nearly perfectly.

Corfiot

The tag suggestion is interesting but I don't see how I can implement it without tagging every activity except breaks with a tag.
Then I would have this tag in the output and that's no good. I will try it out, however.

Thank you all for your suggestions.

Liviu Lalescu

Quote from: Corfiot on September 27, 2018, 06:25:41 PM
The tag suggestion is interesting but I don't see how I can implement it without tagging every activity except breaks with a tag.

Yes, some work to do.

Quote
Then I would have this tag in the output and that's no good. I will try it out, however.

You can make an activity tag not printable in the activity tags dialog (where you add the activity tag).