#include <data.h>
Collaboration diagram for ext_t:
Data Fields | |
int | con_typeid |
Constant resource type ID. | |
int | var_typeid |
Variable resource type ID. | |
int | connum |
Height of the array (number of constant resources). | |
int | varnum |
Width of the array (number of variable resources). | |
int ** | tupleid |
Array of tuple IDs. | |
ext * | next |
Pointer to the next element in linked list. NULL if this is the last element. |
This structure holds a so called extension of the timetable. An extension is a representation of the timetable described by the chromosomes that is easier for modules to check for errors.
tupleid is a two-dimensional array of tuple IDs. First dimension N of the array is equal to the number of resources of the chosen variable resource type. The second dimension M is equal to the number of the resources of the chosen constant resource type. tupleid[n][m] points to a tuple that uses the variable resource of the chosen type with resource ID n and the constant resource with resource ID m.
If there is more than one tuple with variable resource n and a constant resource m, one is chosen at random.
If there are no tuples that meet that criteria, the value in the array is -1
Example usage: con_typeid is a resource type ID of the "time" resource. var_typeid is a "class" resource. In this case tupleid[n][0] holds a classical representation of the timetable for the class of students with resource ID 0.