This page specifies an extended version of the XHSTT format called XEHSTT. It is very similar to XHSTT, the standard format for high school timetabling, so only the differences between the two are given here. XEHSTT was designed by Andreas Krystallidis. The KHE implementation is by Jeffrey H. Kingston.
Extended high school timetabling archive files
Extended high school timetabling avoid split assignments constraints
Select assignments constraints
Balance assignments constraints
Extended high school timetabling archive files have almost the same format as high school timetabling archive files. The outermost tag is ExtendedHighSchoolTimetableArchive instead of HighSchoolTimetableArchive. The overall syntax is otherwise the same:
ExtendedHighSchoolTimetableArchive +Id
+MetaData
+Instances
*Instance
+SolutionGroups
*SolutionGroup
with the same meaning as for high school timetabling, except that the extensions defined on this page are available in extended high school timetabling archives but not in high school timetabling archives. HSEval accepts both kinds of archives without having to be told which kind to expect.
The extended high school timetabling avoid split assignments constraint has syntax
AvoidSplitAssignmentsConstraint Id
Name
Required
Weight
CostFunction
AppliesTo
Role
+CountNonAssignment
This is the same as the XHSTT avoid split assignments constraint, with one extension: an optional CountNonAssignment child category, whose value must be either true or false, defaulting to false when CountNonAssignment is absent.
Deviation. When CountNonAssignment is absent or present with value false, the deviation is as for the XHSTT avoid split assignments constraint. When CountNonAssignment is present with value true, the deviation is as for the XHSTT avoid split assignments constraint except that if there are one or more unassigned event resources, then together those nonassignments count as one resource when calculating the deviation. For example, if there are two event resources, one assigned and one unassigned, that counts as two resources, so the deviation is 1.
The select assignments constraint is a whole new constraint, not present in XHSTT. It allows a resource's assignments to several events to be coordinated. In the global list of all constraints, select assignments constraints come after limit resources constraints.
The select assignments constraint has syntax
SelectAssignmentsConstraint Id
Name
Required
Weight
CostFunction
AppliesTo
+EventGroups
+Events
+Minimum
+Maximum
AppliesTo has syntax
AppliesTo
+ResourceGroups
+Resources
where ResourceGroups and Resources are as for the prefer resources constraint. Together, these two child categories enumerate a set of resources, namely the members of the resource groups referenced plus the individual resources referenced. These resources are the points of application of this constraint. Multiple occurrences of resources cause constraint violations to be counted multiple times.
EventGroups has syntax
EventGroups
*EventGroup
and EventGroup has syntax
EventGroup Reference
Events has syntax
Events
*Event
and Event has syntax
Event Reference
The event groups referenced may be defined as Courses.
Minimum and Maximum each have a body only (no attributes or children), containing a non-negative integer. When both are present, the value of Minimum may not exceed the value of Maximum.
Deviation. The deviation at one point of application of this constraint (one resource) is calculated as follows. Form a set of event groups, containing one element for each EventGroup listed, and one element for each Event listed (in this case, the event group contains just the one event). Say that a resource attends an event group if it is assigned to at least one event resource of at least one event of the event group. Count the number of listed event groups that the resource attends. The deviation is the amount by which this number falls short of Minimum (if present) or exceeds Maximum (if present). The durations of the events involved have no influence on the deviation.
The balance assignments constraint is a whole new constraint, not present in XHSTT. It is concerned with balancing class sizes. In the global list of all constraints, balance assignments constraints come after select assignments constraints.
The balance assignments constraint has syntax
BalanceAssignmentsConstraint Id
Name
Required
Weight
CostFunction
*AppliesTo
MaximumDifference
ResourceType Reference
AppliesTo has syntax
AppliesTo
+EventGroups
+Events
EventGroups and Events have the same syntax as in the select assignments constraint just above.
Unlike in all other constraints, AppliesTo may occur any number of times. It is done this way because the points of application are unusually complex here: they form a set of sets of event groups. Each AppliesTo defines one set of event groups. Within it, each EventGroup defines one event group, and each Event defines one event group containing a single event.
MaximumDifference has a body only (no attributes or children), containing a non-negative integer. ResourceType has a Reference attribute referring to a resource type, and no body.
As a stepping stone to the deviation, for each event group g we define the attendance of g to be the number of distinct resources of the given ResourceType which are assigned to solution event resources derived from event resources of the events of the event group.
Deviation. Each event group g in each AppliesTo is one point of application, whose deviation is calculated as follows. Find the maximum, over all event groups h lying in the same AppliesTo as g, of the absolute value of the difference between the attendance of g and the attendance of h. The deviation of event group g is the amount by which this quantity exceeds MaximumDifference, or is 0 if it does not exceed it.
Alternative Deviation. The definition of the deviation just given is under review and may change. The leading alternative is the following. Each set of event groups G (each AppliesTo) is one point of application, whose deviation is calculated as follows. If G is empty, then the deviation is 0. Otherwise, find the maximum over all event groups g in G of the attendance of g, and the minimum over all event groups g in G of the attendance of g. The deviation of G is the amount by which the difference of these two numbers exceeds MaximumDifference, or is 0 if it does not exceed it.
Return to the HSEval home page.