Re: [tablix-list] Extended teacher_preferred.c

From: Nicholas Robinson <nprREMOVE@THISbottlehall.co.uk>
Date: Sat Jun 25 2005 - 05:08:25 CEST

Hi

Thanks for your help. Now you come to mention it, I can't find any email where
I sent it before! I'll check to make sure there aren't any others I've
missed.

Best Wishes

Nick

On Friday 24 June 2005 18:04, Tomaz Solc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> > I've extended the module teacher_preferred.c:
>
> Was there an original version? Because I haven't seen this module yet.
>
> > 2. Add a tuple restriction also called 'preferred-room' that allows a
> > preferred room for an event to be defined.
> >
> > 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.
>
> You don't mention these two features in the comment block in the source
> code.
>
> > 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.
>
> I think it is fine as it is. Since this module isn't really specific to
> teachers, I have added it to the CVS under the name "preferredroom.c"
>
> > // ERROR between here
> > if ( peroom[time->gen[m]] != -1 )
> > {
> > if ( room->gen[m] != peroom[time->gen[m]]) sum++;
> > }
> > else
> > // AND HERE
>
> The problem here is that the index of "peroom" array should be a tuple
> ID, but in this code you are trying to use time resource ID instead.
> Version in CVS has this fixed.
>
> I've written four automated test cases and it looks like it is working
> properly now.
>
> Best regards
> Tomaz Solc
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFCvD0isAlAlRhL9q8RAjmPAJ934jKLeUdJ5Z38x3k8GHky5EBcywCeL+mk
> 9sAVYuftQuhMm8gGuh0oDwI=
> =dnRs
> -----END PGP SIGNATURE-----

-- 
Fight Prejudice - Fight the Ban (see www.countrysidealliance.org)
Received on Sat Jun 25 05:05:20 2005

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