Re: Automatic hinting in tablix?

From: Tomaž Šolc <>
Date: Fri, 17 Jul 2009 21:25:08 +0200

Hi Ramen

I hope you don't mind I CC'ed the mailing list. You have an interesting
idea and I like to keep Tablix-related conversations public where
someone else can get involved.

It's not currently possible to generate hints from a module: there's no
suitable callback that could do that (hints are implemented so that a
part of the initial population has variable resources set as suggested
instead of a random distribution).

You're correct that if you register an updater function, your module
takes complete control over one variable resource assignment for an
event, so this is not a solution to your problem.

If you have many more requests for events than events, you might try
reducing the room domain of an event to only those rooms that requested
it (and leave the complete domain for those events that nobody
requested). But that may make the timetable unsolvable, depending on
your data.

Preprocessing the XML in some way seems to be the only other option.

This would make an interesting addition to the module API though. But
what happens when different modules request different hints for the same
assignment? Use first hint for one part of population and the second on
for the other part?

Best regards

> Hi Tomaž,
> I'm making good progress with the problem I've talked about previously.
> However, it occurs to me that the algorithm spends a lot of time looking
> for (and not always finding) things I can help it with by hinting. Now
> I can put hints into the file, but I could also automatically generate
> them... consider this shortened exmaple:
> <modules>
> ...
> <!-- module that makes sure that venues are only available on
> certain dates -->
> <module name="onlyavailable" weight=250 mandatory="yes"/>
> <!-- module that allows a room to request an event -->
> <module name="preferredevent" weight="50" mandatory="no">
> </modules>
> <resources>
> <variable>
> <resourcetype type="room">
> <resource name="S/NH Jan">
> <!-- specifies only available on 2nd week -->
> <restriction type="only-available">2</restriction>
> <!-- request from promoter for a specific event -->
> <restriction type="preferred-event">Juv Ballroom</restriction>
> </resource>
> ...
> </resourcetype>
> <resourcetype type="time">
> <matrix width="51" height="5"/>
> </resourcetype>
> </variable>
> <constant>
> <resourcetype type="class">
> <resource name="Juvenile B"/>
> ...
> </resourcetype>
> <resourcetype type="teacher">
> <resource name="Juvenile B"/>
> ...
> </resourcetype>
> </constant>
> </resources>
> <events>
> <event name="Juv Ballroom" repeats="7">
> <resource type="class" name="Juvenile B"/>
> <resource type="teacher" name="Juvenile B"/>
> </event>
> ... <!-- many, many more events -->
> </events>
> In this case, the promoter (=room) requests a specific event (i.e. Juv
> Ballroom). Basically I could help the algorithm by also putting:
> <resource type="room" name="S/NH Jan">
> as a hint into one of the events and splitting it off from the other 6
> repeats. However, as this is repeating information that's already known,
> I'm wondering if it is possible for my module to randomly create the
> hint at run time from the list of requests for each event.
> 2 questions that may pop straight into your mind:
> Q1) Why am I not using the hinting straight away without the
> preferred-event module?
> A1) because I have many more requests for events than I have events, and
> I can only hint one room for each event.
> Q2) Why don't I use updater functions?
> A2) I don't understand these well yet, but I think that it means my
> module would take control of these events. If so, it would defeat the
> purpose of the G.A, which needs to be able to ignore the hint, as there
> are many other restrictions and modules to satisfy as well. If I'm
> wrong here, please put me straight.
> So my question is, is there any way I can automatically generate the hints?
> I guess one answer is to make a program that preprocesses the xml file
> and generates one random hint per event. I'll probably do that for now,
> but it would be better if the module could do it.
> regards
> Ramen
Received on Fri Jul 17 2009 - 21:25:15 CEST

This archive was generated by hypermail 2.2.0 : Sat Jul 18 2009 - 06:32:21 CEST