Teacher in certain hours of a day

Started by Christian Kemmer, August 01, 2011, 12:15:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Christian Kemmer

Hello,

I have one teacher who has to teach in certain hours of day.

At the moment, I only see the possibility to manually choose and place one of his activities in each of those hours. Is there a better way, e.g., can I tell FET to assign this teacher's activities to certain hours?

Liviu Lalescu

Why don't you use constraint teacher not available? (only 100% weight possible for this one, though). Alternatively, constraint activities preferred time slots, with only the teacher selected, allows a weight lower than 100%.

Christian Kemmer

Take the following example:

The Teacher has to work on Monday in the first and in the seventh hour, also on Tuesday in the first and in the sixth hour. All other activities of this teacher may be placed as FET does. So I don't care about a special activity for that teacher and I cannot use "teacher not available", because FET has to respect only that this teacher works in four certain  hours, all other activities of this teacher may be placed in any other hour.

Volker Dirr

I can't see a problem.
Place the 4 activities manualy.
Then add a max gaps constraint. FET will now place other activities between the 4 activities (of course depending on the value of the "max gaps" constraint).

Christian Kemmer

I could do that, if I knew which activities to place.

But I only know that the teacher has to be in an activity, it doesn't matter, which activity this is. I only care that he has one (any of his) activities.

Background: The teacher has to prove to some government agency that he cannot be at home at certain times, because he has to work.

Liviu Lalescu

QuoteI could do that, if I knew which activities to place.

But I only know that the teacher has to be in an activity, it doesn't matter, which activity this is. I only care that he has one (any of his) activities.

Background: The teacher has to prove to some government agency that he cannot be at home at certain times, because he has to work.

This cannot be done directly in current FET. We need this new constraint: in a set of time slots, there can be placed maximum x number of activities from a specified set of activities (it is the negative of what you need). I'll add this in the TODO, but don't know if and when I'll do it.

You may try to use some tricks, but it is clear that FET lacks something here.

Maybe you could use min gaps between activities.

Davide G. M. Salvetti

Quote
QuoteI could do that, if I knew which activities to place.

But I only know that the teacher has to be in an activity, it doesn't matter, which activity this is. I only care that he has one (any of his) activities.

Background: The teacher has to prove to some government agency that he cannot be at home at certain times, because he has to work.

This cannot be done directly in current FET. We need this new constraint: in a set of time slots, there can be placed maximum x number of activities from a specified set of activities (it is the negative of what you need). I'll add this in the TODO, but don't know if and when I'll do it.

You may try to use some tricks, but it is clear that FET lacks something here.

Maybe you could use min gaps between activities.

I'm also interested in the original request (background: vice-headmaster, an otherwise normal teacher, has to be at school teaching no matter what in certain hours, most notably at the beginning of the day, to be able to possibly deal with pupils headmaster matters when the headmaster is not there, if need arises).

How could we make use of min gaps between activities to set this constraint?

Volker Dirr

Quote
I'm also interested in the original request (background: vice-headmaster, an otherwise normal teacher, has to be at school teaching no matter what in certain hours, most notably at the beginning of the day, to be able to possibly deal with pupils headmaster matters when the headmaster is not there, if need arises).

How could we make use of min gaps between activities to set this constraint?

Maybe i missunderstood your request, but i think min gaps between doesn't help in your situation.

If i understood correct, then you need a "begins early" constraint for teachers.
You can maybe do that by a trick: add befor your first hour an hour and place an pseudoactivity into that hour. so with low gap constraints, you will be early.

Liviu Lalescu

#8
Quote
I'm also interested in the original request (background: vice-headmaster, an otherwise normal teacher, has to be at school teaching no matter what in certain hours, most notably at the beginning of the day, to be able to possibly deal with pupils headmaster matters when the headmaster is not there, if need arises).

OK, I took note of your request. I still believe that my formulation "We need this new constraint: in a set of time slots, there can be placed maximum x number of activities from a specified set of activities (it is the negative of what you need)." is the most general.

But:

1) I cannot think of a decent FET style name for such a constraint; please let us know your proposals.

2) I cannot promise I'll do it (soon).

By the way, Davide G. M. Salvetti, this would apply also to your first request: http://lalescu.ro/liviu/fet/forum/index.php?topic=413.0 , because we add n_days_per_week such constraints for each day j, with all activities of the teacher, and two slots: first and last hour of day j, allowed to occupy only one slot. (am I right?)

Quote
How could we make use of min gaps between activities to set this constraint?

This was my suggestion to make the teacher have activities in the first and last hours. But it is quite a poor suggestion.

Davide G. M. Salvetti

#9
Quote
OK, I took note of your request. I still believe that my formulation "We need this new constraint: in a set of time slots, there can be placed maximum x number of activities from a specified set of activities (it is the negative of what you need)." is the most general.

But:

1) I cannot think of a decent FET style name for such a constraint; please let us know your proposals.
Maybe it's not the best, but this is what I can think of:

Time -> Activities -> Max number of activities from a set allowed in a set of time slots

Quote
2) I cannot promise I'll do it (soon).

By the way, Davide G. M. Salvetti, this would apply also to your first request: http://lalescu.ro/liviu/fet/forum/index.php?topic=413.0 , because we add n_days_per_week such constraints for each day j, with all activities of the teacher, and two slots: first and last hour of day j, allowed to occupy only one slot. (am I right?)
Yes, I think you are right, that would do.

Liviu Lalescu

I added a resume of this topic in the TODO file.

Liviu Lalescu


Liviu Lalescu

#12
I want to add the constraint "Time -> Activities -> Max number of activities from a set allowed in a set of time slots" or something like that. In fact, "Max number of time slots from a set occupied by a set of activities", or I'll try to find a better formulation. Please help with a better formulation - ideas.

Let me know if anybody needs it. And if anybody will help with testing.

Corfiot

QuoteI want to add the constraint "Time -> Activities -> Max number of activities from a set allowed in a set of time slots" or something like that. In fact, "Max number of time slots from a set occupied by a set of activities", or I'll try to find a better formulation. Please help with a better formulation - ideas.

Let me know if anybody needs it. And if anybody will help with testing.

"A max number of activities fill a set of time slots"
"Time slots contain max number of some activities"
??

lalloso

This could be useful but not often, at leat in my mind.

I think "max hours per day with a teacher" could be more useful.