Modeling Setup Times and Precedences
Extend job shop scheduling models in CP-SAT by encoding precedence constraints between tasks, fixed setup delays between consecutive tasks, and sequence-dependent setup times using conditional Boolean literals.
Tutorial
Precedence Constraints
In a scheduling model, a precedence constraint requires one task to finish before another begins. Given interval variables for tasks and the requirement that starts only after ends is expressed as the linear inequality
We write this as read " precedes ."
For example, suppose two tasks have been declared with start, duration, and end variables. Task has duration and task has duration Adding the single line
forces the solver to choose values such that One feasible assignment is
The constraint is a pure inequality between integer variables; no Boolean machinery is needed when the order of the two tasks is fixed in advance.