Re: [tablix-list] subjects-sameday.c tablix2 port

From: Antonio Duran <>
Date: Fri Oct 21 2005 - 09:54:22 CEST

Hi. I saw what you tell me yesterday, when i was looking at

I have been trying to get the cvs version, but couldn't do it.

$ cvs -d checkout tablix

Gets the 0.1 branch.
Using tablix2 instead of tablix returns module not found.

Can anybody please tell me what am i doing wrong?

More things: yesterday i was playing with my timetables, and i saw that
i was getting a lot of thinsg like this: i need a subject with four
events to be teached in 2 separate days, two consecutive hours each day.
So i end up with something like this:

  <event name="FOTD" repeats="2">
                        <resource type="teacher" name="SMD"/>
                        <resource type="class" name="1 Lab Imagen"/>
                        <restriction type="consecutive"/>
                <event name="FOTD2" repeats="2">
                        <resource type="teacher" name="SMD"/>
                        <resource type="class" name="1 Lab Imagen"/>
                        <restriction type="consecutive"/>

Looking at consecutive.c module i see that in this case, each tuple has
to go in its place. Lets say these are the only tuples with id1 0,1,2,3.
Tuple 1 has to go after tuple 0 and tuple 3 has to go after tuple 2.
In my problem it would be OK if it was like 1,0 and 3,2, for example. Or
even 3,0 and 2,1 or something.

So i was thinking about trying to do just that, with a restriction that
would look like:

<restriction type="timeblock">6 2</restriction>

The first argument is the "repeats" number, so the handler has knowledge
of it. The second one is the number of hours in each block.

For each tuple, the module would know all the other possible adjacent

The module fitness function then would test if any two blocks of the
list are adjacent to rate the solution.

As i have subjects with 8 hours divided in 4 blocks, maybe this could
make an improvement. However i am not sure, because as i see in the
consecutive module, it does not check to see if events are just in
reverse order (which in theory would increase perfomance, but i saw in
0.1 double_period module that it dind't make much difference).

Of course, this would need a rewrite of sameday.c, and maybe it is just
too "different" to fit with existing modules.
So i was thinking about getting your thoughs about this before going
with it.


El jue, 20-10-2005 a las 19:20 +0200, Tomaz Solc escribió:
> Hash: SHA1
> Hi
> > I have been looking at the new kernel (the docs are great!)
> I'm happy to hear that.
> > i have ported one of my old modules just to give it a try.
> Thanks for your module. I've added it to the CVS repository under the
> name "events_sameday.c".
> I've removed a lot of unnecessary loops from the fitness function and
> I've cleaned up the initialization function a bit.
> You only need to check events that are stored in the sameday struct -
> you already have their tuple IDs stored in there. To find out on which
> day two events are scheduled, you take the "time" chromosome and lookup
> the resource ID by their tuple IDs. Divide the resource IDs of the
> "time" resources two events are using by the number of periods in each
> day and you have the day numbers.
> This way you only need the simple chromosome structure, not the
> expensive extension. Also your module as far as I see doesn't need to
> know anything about classes.
> Best regards
> Tomaz Solc
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird -
> =zN7O
Received on Fri Oct 21 09:57:39 2005

This archive was generated by hypermail 2.1.8 : Sat Oct 22 2005 - 06:28:44 CEST