E10 - Elective data > Courses Action: Constraints

Modified on Wed, 15 Apr at 6:08 AM

TABLE OF CONTENTS

Preamble

Constraints apply only to the Line generation stage. They are used to influence or force the placement of individual classes on lines to meet specific school requirements. For example, restrict certain classes to run together.


Types of Constraints

The available constraints are found in the  Lines > Elective data > Courses > Action bar: Rules and Constraints: Constraints screen and consist of:
  1. Vertical
  2. Horizontal
  3. Before rotation
  4. Avoid
  5. Each rotation
  6. Lines


NOTE
Some constraints (Vertical, Horizontal and Lines) can be set in Lines > Elective data > Courses screen using the relevant Lines, VLink or HLink columns. Constraints entered here apply at the course level, affecting all classes of the course rather than individual classes. 
Refer to: E10 - Elective data > Courses.


Example: 11FOM is running 2 classes, and there are four classes running of 11GMA. The school wants to run  both 11FOM classes in any line that also has 11GMA class. This can be simply entered in the VLink field of the Courses screen, as the constraint is consistent for all classes of the course.


However, if the school wanted to force  only one of the two 11FOM classes to run in a line that had 11GMA, the Constraints table needs to be used.


Constraint: Vertical

The vertical constraint forces one or more classes to run in the same line. The Constraints action is needed when, as per the above example, the constraint does not apply to all classes of a course.

Example:    ACC:1  -  Vertical  -  ACC:2
This means that the first ACC class must occur at the same time as the second ACC class.
If there are four ACC classes running, the third and fourth class would be allowed to run on any suitable line, ie, there are no constraints for class ACC:3 or ACC:4 to run vertically. If however ACC:3 and ACC:4 also need to run on a line together, another constraint must be entered as ACC:3 vertical ACC:4


The Line results show that the ACC:1 class is in the same line as the ACC:2 class (Line 6), and the ACC:3 class is in the same line as the ACC:4 class (Line 7). Notice there is no grey line separating ACC:1 and ACC:2 as there is for 12ART and 12BIO; this signifies the constraint. 

NOTE
The next three constraints apply only to files with more than one rotation. The 'Rotated' setting MUST be ticked in the Parameters screen for these constraints to work. Refer to  E10 - Elective data > Courses Action: Parameters.


Constraint: Horizontal

The horizontal constraint requires classes to be in the same line, and in each rotation.

Example:     10ART:1 - Horizontal - 10ART:2
The school runs two semester length (1 unit) 10ART classes, and wants them on the same line, one class in each rotation. This allows them to balance staffing of these classes evenly as the same teacher can take both classes on the same line. Without this constraint, the algorithm may place the classes on separate lines to better meet student demand, which may cause staffing imbalances. As resource requirements vary by school, this constraint may not be required in all cases.


The Line results below show that 10ART:1 and 10ART:2 are both on Line 3, and placed horizontally, with one class in each rotation. The algorithm does not assign :1 or :2 to any particular rotation, it only ensures the classes are placed horizontally on the same line.

Constraint: Before rotation

Use to force class A to run before class B, without specifying any particular line.


Example: 9FRE1 - Before rot - 9FRE2
The school runs semester length Year 9 French classes: one class of 9FRE1 and one class of 9FRE2, and 9FRE1 must be scheduled in Rotation 1 and 9FRE2 in Rotation 2. As there is only one class of each, the :1 and :2 suffix syntax is not needed.
The image below shows this rule, along with the horizontal rule, indicating that both classes should also be in the same line.
The Line results below show that 9FRE1 is in Rotation 1 and 9FRE2 is in Rotation 2, with both classes on the same line (Line 1). Notice there is no faint vertical grey line separating 9FRE1 and 9FRE, unlike 9LAN1 and 9LAN2; this signifies the constraint.


TIP
This outcome may also be achieved by entering an 'a' for 9FRE1 and 'b' for 9FRE2 in the Courses > Lines column.

Constraint: Each rotation

Classes may be forced to run in alternate rotations without being placed on the same line. This allows the system to find the best outcome for students, while respecting teacher and room availability, provided one class runs in each rotation.

Example:    9ACT  -  Each rot  -  9THE
The school runs one semester length (1 unit) of 9ACT and one semester length (1 unit) of 9THE and wants them to run in different rotations so the same teacher can take both, but they do not need to be on the same line. The 'Each rot' constraint enforces this requirement.

Constraint: Avoid

Classes may be forced to run on a different line as another class by using the 'Avoid' constraint.


NOTE
This constraint is rarely required, as student choices and resource requirements typically keep courses apart. If you find yourself using 'Avoid', review the Subject Teachers and Subject Rooms data, as these are intended to manage course separation.

Example:    11CHE:1   -  Avoid  -  11PHY:1
The school is running three 11CHE classes and two 11PHY classes and wants to ensure at least one class of each are on separate lines. The 'Avoid' entry will enforce that one class of 11CHE will be in a different line to one of the 11PHY classes, while allowing the remaining classes to be placed on the most suitable lines.

WARNING 
If the user manually manipulates the lines, or adds the constraint after the lines have been generated, a warning will display in Lines > Line results > View lines, indicated by a red C.

Constraint: Lines

Occasionally, a class must run on a particular line for some reason. This differs from the Lines column in Elective data > Courses screen, which defines allowable line options, whereas the 'Lines' constraint enforces exact line placement.

Example: The school runs three 11CHE classes, and needs to enforce that one class runs on each of Lines 1, 2 and 3. As there are multiple classes of 11CHE course running, the :1 :2 and :3 syntax must be used.
11CHE:1 - Lines - 1
11CHE:2 - Lines - 2
11CHE:3 - Lines - 3


REMINDER 
Enter constraints only where necessary. Avoid adding too many initially, generate lines first and review the results. Users of other timetable software often add many constraints by habit, but Tes Timetable typically requires fewer, provided accurate base data (Subject teachers, Subject rooms and Teacher unavailability) is entered before generating lines. More constraints can be added later, then re-run or optimise the solution. Many iterations are usually generated before settling on the final lines solution.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article