Re: [tablix-list] New module 'consecutive'

From: Tomaz Solc <>
Date: Thu Jun 02 2005 - 21:48:32 CEST

Hash: SHA1


> It offers a single restriction at event level called 'consecutive'.
> If repeats=1 then the module has no effect, but if repeats>1 then all
> instances of the event are scheduled to run consecutively. I've tried
> it as far as repeats=5 and it seems to work okay.

I had a look at this module and it seems to be working fine. I see a
potential problem though. Consider this case:

<event name="Games" repeats="1">
        <resource type="teacher" name="SAH"/>
        <resource type="class" name="1A"/>
<event name="Games" repeats="4">
        <restriction type="consecutive"/>
        <resource type="teacher" name="NPR"/>
        <resource type="class" name="1B"/>

Your module will think that the first event also needs to be placed in
the same row as the last 4 because it has the same name. I've fixed this
by making another check in the getevent() function.

Also it would be better if your module would not try to enforce the
exact order of events. I think module_fitness() will return zero only if
events are ordered by tupleid. It won't return zero if they are
consecutive, but in the wrong order. This makes it harder for the
algorithm to find a solution.

You can get the modified version from the CVS.

Best regards
Tomaz Solc
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -

Received on Thu Jun 02 21:44:23 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:43:42 CEST