Extended teacher_preferred.c

From: Nicholas Robinson <nprREMOVE@THISbottlehall.co.uk>
Date: Fri Jun 24 2005 - 01:13:26 CEST

Hi Tomaz

I've extended the module teacher_preferred.c:

1. Add a class resource restriction also called 'preferred-room' that allows a
preferred room for a class to be defined.
2. Add a tuple restriction also called 'preferred-room' that allows a
preferred room for an event to be defined.

The parser calls the handlers and the modules data structures are built

The precalc function has been extended.

The fitness function needs to cope with the situation where more than one
'preferred-room' applies - basically it assigns a hierarchy. An event
preferred room is more important than a class preferred room and in turn is
more important than a teacher preferred room.

We need this to cope with:
1. Younger children where specialist teachers travel to the children's
classroom rather than the children coming to the teacher.
2. A PE teacher teaches the odd lesson in another subject and needs a normal

It might be better to have these as separate modules so different hierarchies
can be applied by using weights, but I'll leave that to you to decide. Doing
it this way is more rigid but should converge faster, I think.

The module as it stands has an error testing the fitness for an event,
although it does work okay for class (and obviously the original teacher
version). I can't see why at the moment. It would probably be obvious to you,
so if you have a moment, please would you have a look? The debug shows that
silly values for time-gen[m] occur after a while - and it induces wrong
answers for class/teacher preferences.

Thanks and Best wishes


Received on Fri Jun 24 01:10:31 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:44:06 CEST