E10 - Elective data > Courses Action: Constraints

Modified on Thu, 14 Aug at 12:42 AM

Preamble

Constraints apply only to the Line generation stage. They are used to influence or force the placement of classes on the lines where the school has certain requirements they want in the final lines solution. 


Types of Constraints

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

Some of these constraints (Vertical, Horizontal and Lines) may be stipulated in the Lines > Elective data > Courses screen using the relevant Lines, VLink or HLink columns. Entering data in the Courses screen enforces the constraint to work at a  course level ie the constraint applies to the entire number of classes running of the course, not at individual  class level. 

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 a 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).
Note that there is no grey line separating ACC:1 and ACC:2 as there is for 12ART and 12BIO; this signifies the constraint. 


Constraint: Horizontal


The file must have the Parameters setting of 'Rotated' set to Y (Yes) for the Horizontal constraint to work. Refer to  E10 - Elective data > Courses Action: Parameters.
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 to ensure that these classes are placed on the same line, one class in each rotation. They will then be able to balance the staffing of these classes evenly; the same teacher will be assured to have a class assigned in both rotation 1 and rotation 2 on the same line. Without this constraint, the algorithm may be able to better meet student demand by placing the classes on separate lines, subject to teacher and rooming availability, which may cause staff allocation balancing issues. As school resources significantly differ in each school, this constraint is not required in all circumstances.



The Line results below show that the 10ART:1 class is in the same line as the 10ART:2 class (Line 3), and that they are horizontal, meaning 10ART:2 is in Rotation 1 and 10ART:1 is in Rotation 2. (the algorithm does not concern itself with the :1 and :2 being in any particular rotation, so long as it has placed each of the classes horizontally then it's work is done.)



Constraint: Before rotation

The file must have the Parameters setting of 'Rotated' set to Y (Yes) for the Before rotation constraint to work. Refer to  E10 - Elective data > Courses Action: Parameters.

Example:    9FRE1   -  Before rot   -  9FRE2
The school runs semester length Year 9 French classes: one class of 9FRE1 and one class of 9FRE2. 9FRE1 must occur in Rotation 1 and 9FRE2 must occur in Rotation 2. There is no need to use the syntax :1 and :2 (9FRE1:1 and 9FRE2:2) as there is only one class of each.
The below image shows this rule, and also the horizontal rule, meaning, in this example, that we want both 9FRE courses to be in the same line also.

The Line results below show that 9FRE1 is in Rotation 1 and 9FRE2 is in Rotation 2 (Line 1), and also that they are in the same line.
Note that there is no faint vertical grey line separating 9FRE1 and 9FRE as there is for 9LAN1 and 9LAN2; this signifies the constraint.

(In this scenario, this outcome may also have been achieved by entering an 'a' in the Lines column in the Courses screen fro 9FRE1, and a 'b' for 9FRE2).

Constraint: Avoid

Courses or classes may be forced to run on a different line as another course or class by using the 'Avoid' constraint.
Idea
Note: This constraint should rarely need to be used, because normally the student choices and/or the resource requirements automatically keep the relevant courses apart. If you find yourself using 'avoid', then consider whether the Subject Teachers and Subject Rooms data is correct, as it is creating unnecessary work to have to enter these extra constraints when the Subject Teachers and Subject Rooms features are designed to manage this.
Example:    11CHE:1   -  Avoid  -  11PHY:1 
The school is running three 11CHE classes and two 11PHY classes. They want to force one class of 11CHE to run on a different line to 11PHY (the other classes can go on whichever line suits, but they want to ensure at least one class of each are on separate lines.
The avoid entry will ensure that one class of 11CHE will be in a different line to one of the 11PHY classes.


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:


Constraint: Each rotation

Courses or classes may be forced to run in an alternate rotation as another course or class, but without forcing these courses or classes to be on the same line, as per the horizontal constraint. The program can find the best outcome for students, while checking teacher and rooming resources, by placing these classes onto the optimal lines, so long as one class is in one rotation and the other class in the other.

Example:    9ACT  -  Each rot  -  9THE
The school is running one semester length (one unit) course of 9ACT and one semester length (one unit) course of 9THE. The school wants these classes to run in different rotations so that they can assign the same teacher to each class, but they do not necessarily need these classes to run in the same line. The 'Each rot' constraint will ensure this outcome is achieved.



Constraint: Lines

Occasionally there may be reason to enforce that a course or class must run on a particular line.
Note this is different to the Lines > Elective data > Courses Lines column, as this specifies the line options where classes may run. The Constraints 'Lines' specifies the exact placement of the course or class onto the lines.

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




Alert
Reminder: Constraints should be entered where they are necessary, but do avoid or delay entering too many initially in order to see what lines are generated. It is commonly found that users of other software programs are in the habit of needing to enter many constraints, but El's greater functionality does not require this as much, provided the base data such as Subject teachers, Subject rooms and Teacher unavailability are entered prior to generating lines.
It is easy to add constraints in after the initial line generation occurs, then re-run or optimise the solution to consider the added constraints. many iterations of lines are usually generated before accepting the final 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