Constraints¶
The Constraints Page is where you view, change and add constraints. Almost all constraints can also be managed from their own pages, but this page puts them all in one place.
It also points out two very different kinds of problems, and it helps to know which one you're looking at:
| Unmet constraints | Scheduling conflicts | |
|---|---|---|
| What it means | The schedule as it stands, the one on the Schedule Page, breaks the constraint. | You validated or generated, and ScheduLearn couldn't build a schedule: no schedule can meet all of these constraints together. |
| When you see it | Any time, while you work on the schedule. | After a validate or generate fails, until you run one again. |
| Color | Red for requirements, yellow for preferences | Purple |
| How to fix it | Move lessons, or generate the schedule again. | Loosen or turn off one of the constraints, then solve again. |
See Unmet Constraints and Scheduling Conflicts below.
A hard constraint (red) is a requirement. A soft constraint (yellow) is a preference that ScheduLearn meets when it can. See Key Concepts.
Viewing, Modifying, and Creating Constraints¶
The constraints page is organized into several tabs, detailed below.
Subject Constraints¶
Any constraint added to a subject or lesson appears here. You can modify, delete, or disable constraints using the action buttons on the right of each row.
You can also hover over a subject or lesson to reveal additional teacher and class information.
Subject Constraints Dashboard.
Workload Constraints¶
To add a workload constraint, navigate to the Workload tab and select Add Constraint in the toolbar. You can then choose from the list below.
Constraint Types¶
-
Teacher Constraint¶
The teacher-specific constraints described in the Teacher Constraints section of the Teachers page. Select the teacher, then the constraint type, then fill in the details.
-
Consecutive¶
Requires a group of subjects to occur consecutively within a defined gap.
Adding a Consecutive Constraint.This is more general than the teacher-specific Lesson’s Consecutive constraint, which is effectively the same rule but automatically applied to all of a teacher’s subjects. With this constraint you may choose any subjects — even unrelated ones taught by different teachers.
Note
If the subjects belong to different schedule structures, you must use Minutes instead of Periods.
-
Not Consecutive¶
Subjects in Subjects A must not occur within the specified time frame of subjects in Subjects B.
Adding a Not Consecutive Constraint.Note
If the subjects belong to different schedule structures, you must use Minutes instead of Periods.
-
Lesson Placement¶
Controls where the lessons of one or more subjects land in the day: exactly, at most, or at least a number of lessons — in total across the week or on each day — placed before, at, after, or between chosen periods.
Adding a Lesson Placement Constraint.A common use case is distributing “Specials” evenly between morning and afternoon in elementary schools. In the example above, there are 2 specials, Art and PE. Say they each have 2 lessons, so there are 4 lessons in total. “Exactly 2 lessons in total before period 4” ensures 2 specials in the morning and 2 in the afternoon. Other examples: “At most 1 lesson each day at period 1” stops the subjects competing for the first period, and “At most 0 lessons in total between period 5 and period 7” keeps them out of that window entirely.
Before/after count lessons that sit entirely on that side of the period; at/between count lessons occupying those periods (a double lesson counts at every period it covers).
Note
You can only select subjects from the same schedule structure.
Calendar Tabs (Teacher, Class, Classroom)¶
These tabs visualize blocked-off time for each teacher, class, and (if enabled) classroom.
Cells are shaded based on the percentage of teachers with hard or soft constraints in that slot. Clicking any cell shows the detailed breakdown. Clicking a teacher name toggles that teacher’s constraint.
Teacher Calendar Constraints (Thursday, Period 2).
This view is primarily for visualizing constraints and their problems; large edits should generally be made on the individual teacher/class/classroom pages.
Multiple Schedule Structures¶
Calendar constraints apply to a specific schedule structure. For example, a teacher who works in both Middle School and High School and does not teach on Tuesdays must have separate calendar constraints for each structure.
To learn more, see the Teachers Guide section on multi-structure calendar constraints.
You can select the schedule structure in the dashboard toolbar as shown below:
Selecting a Schedule Structure in the Calendar View.
Lesson Spread¶
This tab lists each subject’s lesson spread constraint and whether its lessons should occur at the same period.
The Same Period checkbox is always treated as a soft constraint, so it never stops a schedule from being built.
If either the lesson spread rule or the same-period preference is unmet, the row appears highlighted.
Unmet Lesson Spread Constraints.
In the example above, two Algebra 1 lessons were placed on the same day at different periods. Thus:
- the hard constraint (No more than 1 lesson per day) is unmet (red)
- the soft Same Period preference is also unmet (yellow)
The red and yellow numerical indicators on the Schedule Page direct you to the relevant tabs.
The Toolbar¶
Toolbar actions depend on the selected tab. For example, the purple Add button only appears on the Subject and Workload tabs.
All tabs include filtering options, including a checkbox that shows only the flagged constraints: Unmet ones (Unmet Constraints), or Blocking ones while the page shows a scheduling conflict (Scheduling Conflicts).
Filter for Only Flagged Constraints.
Choosing What the Filter Shows¶
On the calendar tabs, the filter also picks which teachers, classes, classrooms or subjects are shown. The button at the start of the field sets how your picks are read:
- All — everything, including anything you add later.
- Only — just the ones you pick. Anything you add later stays hidden until you pick it too.
- All except — everything but the ones you pick. Anything you add later is shown.
Picking a name while the filter is on All starts a new Only list. Only and All except each remember their own picks, so you can switch modes and come back without losing them; the menu shows how many each one holds. When the filter hides anything, a line under the field says how many, with a Clear filter link that goes back to All.
The same filter appears on the Export Page and in the Schedule Page's Day View.
The toolbar’s settings icon also allows you to enable Constraint Weights (see the Constraint Weights section on the Advanced Constraints Guide).
Unmet Constraints¶
An unmet constraint is one that the current schedule, the one on the Schedule Page, breaks. ScheduLearn checks the schedule as you work, so moving a lesson can fix an unmet constraint or create one. An unmet requirement is marked in red; an unmet preference is marked in yellow.
Unmet constraints show up:
- as red and yellow counts next to Constraints in the sidebar and on each tab of this page
- as highlighted rows on the tabs; check Unmet in the filter toolbar to show only those
- on the lessons themselves on the Schedule Page (see Viewing problems from the Schedule Page)
In the screenshot below, Algebra 1 must be at period 3, but the schedule has it at period 2, so the constraint is unmet. The sidebar counts 1 unmet requirement and 19 unmet preferences, and each tab shows its own counts.
An unmet requirement on the Subject tab, with the Unmet filter on.
On the Schedule Page, the lesson itself is marked. Hover over it to see which constraint it breaks (below).
Wilson's Computer Lab lesson is scheduled at a time Wilson is unavailable.
The sidebar count always reflects the current schedule.
Scheduling Conflicts¶
When you validate or generate, ScheduLearn tries to build a schedule that meets every constraint. If it isn't possible, the solver may tell you that there is a scheduling conflict. This is a different problem from an unmet constraint: it isn't about where your lessons are now, but about constraints that can't all be met at the same time, wherever the lessons go.
The Constraints Page marks scheduling conflict constraints in purple. They aren't necessarily broken in your current schedule.
When there is a scheduling conflict, the Schedule Page shows a Couldn't build a schedule banner.
The banner for a scheduling conflict.
Click See why to open the Constraints Page with the constraints in the scheduling conflict:
- A purple banner at the top says how many constraints can't all be met together.
- Each tab counts its scheduling conflict constraints, and the page opens on a tab that has some.
- They are marked in purple and listed first. The filter labels them Blocking.
Loosen or turn off one of them, for example by making a requirement a preference, then validate or generate again.
Click Show unmet constraints in the banner to go back to the constraints your current schedule doesn't meet. Until you validate or generate again, a slim purple bar at the top of the page says your last solve failed, and its See why button brings the scheduling conflict back.
Example: Finding a Scheduling Conflict¶
As an example, let's create two constraints that can't both be met. Suppose Anderson, a Middle School math teacher, is unavailable during Period 7. However, you also require all math courses—including Geometry, which Anderson teaches—to occur in Period 7.
When you validate the schedule, ScheduLearn can't build it and shows the Couldn't build a schedule banner. Click See why.
ScheduLearn narrows the scheduling conflict down to as few constraints as it can—in this case, two:
-
Geometry must be at Period 7 Hovering over Geometry shows it is taught by Anderson (green arrow below).
-
Anderson is unavailable Monday, Period 7 A purple “1” appears on Monday Period 7, marking one scheduling conflict constraint there. Clicking the cell reveals Anderson’s blocked-off time (green arrow below).
Note
Although all four days had Period 7 blocked for Anderson, only Monday is marked. ScheduLearn marks as few constraints as it can.
See What to Do When a Scheduling Conflict Is Unclear in the Advanced Constraints Guide for more strategies.


