Motivation
Exact methods for the resource-constrained project scheduling problem — branch-and-bound over
activity lists or over start-time assignments, and the lower-bound computations inside them —
live or die by how much of the search space can be discarded before it is enumerated. The
standard tool is constraint propagation: deducing, from the precedence, resource and
time-window data, new precedence relations i→j that every feasible schedule must satisfy,
and tighter time windows for the activities. Brucker and Knust's Section 3.6
(doi:10.1007/978-3-642-23929-8) presents the
family of interval consistency tests — input, output, input-or-output and their negations —
that constraint-programming schedulers apply at every node of the search, following Carlier and
Pinson (An algorithm for solving the job-shop problem, Management Science 35, 1989,
doi:10.1287/mnsc.35.2.164) and Baptiste, Le Pape and
Nuijten (Constraint-Based Scheduling, Kluwer, 2001,
doi:10.1007/978-1-4615-1479-4). Every test is an
instance of one theorem, Theorem 3.7, and its cumulative-resource analogue, Theorem 3.8. Those
two theorems, and the tests as their corollaries, are this mission.
Setting
The instance is the RCPSP of mission I: activities 0,…,n−1 with integer processing times
pi, renewable resources k with capacities Rk and demands rik, and precedence arcs;
a schedule is an integer start-time vector S, feasible when it meets the precedences and never
exceeds a capacity. Section 3.6 adds three things.
Relations. A conjunction i→j holds in S when Si+pi≤Sj. Two activities are
parallel, i∥j, when they overlap for at least one time unit, and a disjunction
i−j is the negation of that: i→j or j→i. The instance carries a set C of
conjunctions and a set D of disjunctions that every feasible schedule must satisfy; initially
C0 is the precedence relation and D0 the pairs whose combined demand exceeds some capacity,
and propagation adds to them.
Disjunctive sets. A set I of at least two activities is disjunctive when any two of its
members are related by a disjunction or a conjunction, so no two are ever processed together:
the activities of a unit-capacity resource, the jobs of a single machine, the operations of one
job in a shop. Its total processing time is P(I)=∑i∈Ipi.
Time windows. Each activity has a head ri and a deadline di, and a feasible schedule
has ri≤Si and Si+pi≤di. An activity starts first in a set J when no activity
of J starts earlier, and ends last when none completes later.
For a cumulative resource k the work of activity i is wi=rikpi and
W(J)=∑i∈Jwi.
Formalization targets
Goal — Theorem 3.7 (printed p. 169)
Let I be a disjunctive set, J⊆I, and J′,J′′ proper subsets of J with
J′∪J′′=∅. If
ν∈J∖J′, μ∈J∖J′′ν=μmax(dμ−rν)<P(J),
then in every feasible schedule an activity from J′ starts first in J or an activity from
J′′ ends last in J.
The first infeasibility test (printed p. 169)
If some nonempty J⊆I has maxμ∈Jdμ−minν∈Jrν<P(J), no
feasible schedule exists.
The input test (3.123) and the output test (3.124) (printed p. 171)
For Ω⊆I nonempty and i∈I∖Ω: if
maxμ∈Ω∪{i}dμ−minν∈Ωrν<P(Ω)+pi then i→j for all
j∈Ω; symmetrically, if maxμ∈Ωdμ−minν∈Ω∪{i}rν<P(Ω)+pi
then j→i for all j∈Ω.
The input-or-output test (printed p. 170)
For i,j∈J⊆I, ∣J∣≥2: if maxμ∈J∖{j}dμ−minν∈J∖{i}rν<P(J)
then i starts first in J or j ends last in J, and i→j when i=j.
Theorem 3.8 (printed p. 186)
For a cumulative resource k, J⊆Ik and proper subsets J′,J′′ of J: if
Rk(maxμ∈J∖J′′dμ−minν∈J∖J′rν)<W(J) then an
activity from J′ starts first in J or an activity from J′′ ends last in J.
Significance
Theorem 3.7 is the single statement behind a whole toolbox. Every interval consistency test in
the literature — the input and output tests that fix a new conjunction, the input-or-output
test, the negation tests that only shrink a window — is the theorem with a particular choice of
J′ and J′′, and the book's Section 3.6.4 derives them one by one. A propagation engine that
applies these tests to a fixpoint is what makes branch-and-bound for the job shop and the RCPSP
practical; Carlier and Pinson's solution of the 10×10 job-shop instance is the historical
demonstration. Theorem 3.8 extends the same reasoning from disjunctive to cumulative resources
by replacing "no overlap" with "at most Rk units per time unit", the energetic-reasoning
viewpoint that the rest of Section 3.6.5 develops.
The results are elementary and proved; formalizing them fixes, once, what "feasible" means in
the presence of the relation sets C and D and time windows, on top of the RCPSP model of
mission I. That layer is reusable: the start-start distance matrix of Section 3.6.2 and the
symmetric-triple rules of Section 3.6.3 are statements about the same schedules and the same
relations. Nothing here is on the platform or in Mathlib.
Difficulty
The obvious argument for Theorem 3.7 is the correct one, and its difficulty is in the
bookkeeping. If no activity of J′ starts first and none of J′′ ends last, the first starter
is some ν∈J∖J′ and the last finisher some μ∈J∖J′′, and every
activity of J is processed inside [Sν,Sμ+pμ]⊆[rν,dμ]. Since the
activities of a disjunctive set are pairwise non-overlapping, their total length P(J) fits in
that interval, contradicting (3.121). The formal work is the packing lemma: pairwise disjoint
integer intervals inside an interval of length L have total length at most L, which requires
ordering the activities by start time and an induction that Mathlib does not supply.
The subtle point is the restriction ν=μ in (3.121). The book allows it because "an
activity which starts first cannot complete also last" when there are at least two activities
with positive durations. The formal statement reads "starts first" and "ends last" with ≤,
which makes the theorem true without a positivity hypothesis: when the restriction empties the
index set, J∖J′=J∖J′′={x}, the conclusion holds because x cannot be both
the unique first starter and the unique last finisher of a disjunctive set with two or more
members. A solver should expect to handle that corner separately.
For the tests the extra step is turning "starts first" into a conjunction i→j, which uses
the disjunction between i and j together with positive processing times: with pj=0 an
activity could start at the same instant as i without violating the disjunction, so the tests
carry the positivity hypothesis that Theorem 3.7 itself does not need. Theorem 3.8 replaces the
packing lemma by a work-counting lemma: over an interval of length L a resource of capacity
Rk supplies at most RkL units, and every activity of J consumes rikpi of them.
Formalization scope
Schedules are integer start-time vectors on Fin n, as in missions I and II, and a feasible
schedule of this mission is one that is FeasibleSchedule for the RCPSP instance (mission I),
respects the arcs of C (RespectsArcs, mission II), satisfies the disjunctions of D and lies
within the time windows; these four hypotheses are the book's "feasible schedule" in Section 3.6
and are carried on every statement, although the arguments use only the last two, or, for
Theorem 3.8, the resource constraint and the windows. The sets C and D are parameters, not
derived from the instance, since propagation enlarges them.
Every inequality "max(⋅)−min(⋅)<P" is stated as the family of inequalities
dμ<rν+P over the same index pairs. This is equivalent, avoids natural-number
subtraction, and gives an empty index set the value the convention max∅=−∞
would: the hypothesis is then vacuous. "Starts first" and "ends last" use ≤. Proper-subset
hypotheses J′⊂J, J′′⊂J are the book's; the first infeasibility test needs J
nonempty, and the input-or-output test needs ∣J∣≥2.
A trivializing reading is ruled out on the disjunctive side by the nonemptiness hypotheses (an
empty J would make the infeasibility test's family vacuous and its conclusion false) and on the
cumulative side by the observation that Theorem 3.8 with J′=J′′=∅ asserts
infeasibility, which is the book's intended reading. Welcome contributions beyond the milestones:
the input-negation and output-negation tests, the window-tightening rules of Section 3.6.4, and
the SSD-matrix results of Section 3.6.2.
Selected references
- Peter Brucker and Sigrid Knust, Complex Scheduling, 2nd ed., Springer, 2012, Section 3.6.
doi:10.1007/978-3-642-23929-8
- Jacques Carlier and Eric Pinson, An algorithm for solving the job-shop problem, Management
Science 35 (1989). doi:10.1287/mnsc.35.2.164
- Philippe Baptiste, Claude Le Pape and Wim Nuijten, Constraint-Based Scheduling, Kluwer, 2001.
doi:10.1007/978-1-4615-1479-4
- Ulrich Dorndorf, Erwin Pesch and Toàn Phan-Huy, Constraint propagation techniques for the
disjunctive scheduling problem, Artificial Intelligence 122 (2000).
doi:10.1016/S0004-3702(00)00040-0