Constraint-Based Task Scheduling With Sequence Dep
Constraint-Based Task Scheduling With Sequence Dep
net/publication/221384714
CITATIONS READS
6 65
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Armin Emil Wolf on 27 May 2014.
Armin Wolf
Abstract: The work presented in this article generalizes the modeling of task schedul-
ing problems with sequence dependent setup time on the basis of task scheduling on
single respectively exclusive resources: Besides working activities also work breaks
are respected properly which is formally proven. The additional contribution of this ar-
ticle is an effective pruning algorithm according to the presented modeling approach.
Benchmark examinations show that the introduced modeling and pruning approach
is comparable with another state-of-the-art constraint-based approach. Within these
examination the optimality of a lower bound of one benchmark instance, namely of
t2-ps09, is proven – to the best of one’s knowledge – the first time.
1 Introduction
Production or maintenance scheduling is still an attractive field for researchers and practi-
tioners. Researchers are interested in better approaches for those in general NP-complete
scheduling problems. In Constraint Programming (CP) the main focus of research con-
cerning scheduling problems lies on
2 Related Work
The literature surveys given in [GPG01, AF08] points out the importance of treating se-
quence dependent setup times in production scheduling and that such scheduling problem
are NP-hard. The reviews show the variety of applications considering sequence depen-
dent setup times: the application areas are ranging from paper and plastics industries over
printing industry to textile, pharmaceutical, chemical and metallurgical industries.
Due to its importance in industry (and maybe due to its NP-completeness) scheduling
with sequence dependent setup times is (still) a challenging topic in Operations Research
(OR), Artificial Intelligence (AI) and Constraint Programming (CP). For instance, the OR
optimization approach presented in [BT96] for general shop problems with sequence de-
pendent setup times uses a branch & bound method in particular for job shop scheduling
benchmark instances. These instances are examined in the presented work using a similar
branch & bound method, too (cf. Sec. 5).
AI approaches are presented for example in [GPG01, GVV08]. While Ant Colony Opti-
mization (ACO) is used in [GPG01], a hybrid approach combing genetic algorithms with
local search (GA+LS) is applied in [GVV08] to job shop scheduling problems with se-
quence dependent setup times.
CP approaches for scheduling with sequence dependent setup times are presented
in [ABF04, AF08, Vil02, VB02]. In [ABF04] job-shop scheduling with sequence de-
pendent setup times is considered. There, the lower bounds for the make-span on each
machine are computed considering the scheduling on each machine independently. In
detail, for each machine a traveling salesman problem with time windows (TSPTW) is
modeled and solved. However, the pruning algorithms used to solve the TSPTW are
not presented/described. Specialized pruning algorithms are presented in [AF08] which
seems to be a continuation of the work presented in [ABF04]. The approaches presented
in [Vil02, VB02] are only feasible for a rather small number of different setup times,
i.e. so called setup time families. The reason is that the pruning algorithms require a pre-
computation of minimal setup times for all non-empty, exponentially many subsets of such
families.
The work presented in this article is based on the results in [BL98]. Additionally, time
windows as well as breaks are considered and a new pruning algorithm is introduced
that reduces runtime significantly. This pruning algorithm is based on detectable prece-
dences [Vil04, Vil07] (cf. Sect. 4).
A formal description of the task scheduling problem is given in this section. It starts with
the definition of the items to be scheduled: working tasks and work breaks. Then, the
definition of sequence dependent setup times is given. These definitions are completed by
two kinds of interrelated scheduling problems which are formally specified. Finally it is
shown that both scheduling problems are equivalent with respect to their solutions.
The considered scheduling problem consists of a set of tasks T , a set of (task) families F
indicating the type of each task, a set of breaks B and an exclusively available resource r.
Each task i ∈ T is a non-preemptive activity defined by its
• fixed family fi ∈ F ,
• variable start time si ,
• variable end time ei ,
Breaks are non-preemptive activities, too; the only difference between breaks and tasks is
that breaks do not belong to a family.
For each task or break its earliest start time and latest completion time determines its time
window for its processing. More formally, for each task or break x ∈ T ∪ B the following
constraints must hold:
For simplicity, the set of tasks and breaks T ∪ B is sometimes identified by the integer
set {1, . . . , |T | + |B|}. Then by convention, the integer set {i1 , . . . , i|T | } identify the tasks
and the integer set {p1 , . . . , p|B| } the breaks.
The sequence dependent setup times between two families f, g ∈ F is defined by a setup
time matrix AF ×F = (af,g ) where af,g ∈ N defines the required setup time between a
task of family f ∈ F and a task of family g ∈ F :
• no setup time is assumed between any two tasks of the same family, i.e.:
∀f ∈ F : af,f = 0 ,
• any insertion of another task between any two tasks will not decrease the total setup
time (triangle inequality), i.e.:
Optionally the setup times may be symmetric1 , i.e.: ∀f, g ∈ F : af,g = ag,f .
A sequence dependent setup times scheduling problem (possibly with breaks) is defined
by a quadruple (T, F, B, AF ×F ), where T is a non-empty set of tasks, F is an according,
non-empty set of families, B is a possibly empty set of breaks and AF ×F is a setup time
matrix.
A solution of such a sequence dependent setup times scheduling problem (possibly with
breaks) is defined by an admissible value assignment of the start times and end times of
the tasks and the breaks (as well as of their durations, if they are variable) such that the
following constraints are satisfied:
• for each task or break x ∈ T ∪ B the start-duration-end and the time-window con-
dition
ex ≤ sy ∨ ey ≤ sx ,
• for each pair of different tasks i, j ∈ T with i 6= j and each break p ∈ B the break
condition2
ex ≤ sy ∨ ey ≤ sx ,
2 This condition ensures that breaks do not occur during the setup times, which are in general working times,
too.
• for each family g ∈ FT and each pair of different tasks of breaks xg , yg ∈ Tg ∪ Bg
with xg 6= yg the non-overlapping condition
• for each pair of different tasks or breaks x, y ∈ T ∪ B the common order condition
It has to be noted that this multi-resource scheduling traces back to the modeling consid-
erations made in [BL98] for scheduling problems with sequence dependent setup times,
however, without any work breaks. There, it is shown that these problems are equivalent.
This also holds for the considered generalization with work breaks.
Lemma 1 Any solution of a sequence dependent setup times scheduling problem (possibly
with breaks) determines a solution of the according multi-resource scheduling problem.
Proof 1 Let a solution of a sequence dependent setup times scheduling problem – without
loss of generality with breaks – (T, F, B, AF ×F ) be given. Then, due to non-overlapping,
the tasks and breaks in T ∪ B are linearly ordered. Assuming that the tasks and breaks are
sorted according to their scheduled order it holds ex ≤ sx+1 for x = 1, . . . , |T | + |B| − 1.
In particular for i = j1 , . . . , j|T |−1 it holds
under the assumption that the tasks are numbered according to their scheduled order. Due
to the fact that the triangle inequality holds, it follows immediately that afi ,fi+1 +afi+1 ,g ≥
afi ,g – or equivalently afi ,fi+1 ≥ afi ,g − afi+1 ,g – holds for any family g ∈ FT . Thus it
holds
which is equivalent to
meaning that the solution of the sequence dependent setup times scheduling problem de-
termines a schedule for the tasks of the according multi-resource problem if
is chosen. Furthermore, the considered breaks are ordered for all families in FT in the
scheduled linear order.
Now, in the i-th step (1 ≤ i < |T |) let qki +1 , . . . , qki+1 be the breaks scheduled between
task ji and task ji+1 :
is chosen. Furthermore, the considered breaks are ordered for all families in FT in the
scheduled linear order.
In the last step let qk|T | +1 , . . . , q|B| be the breaks scheduled after the last task j|T | ,
i. e. e|T | ≤ sp|T | holds for each p|T | ∈ {qk|T | +1 , . . . , q|B| }. Then for any solution of
the according multi-resource problem it holds ej|T | ,g ≤ sp|T | + afj|T | ,g for each fam-
ily g ∈ FT and each p|T | ∈ {qk|T | +1 , . . . , q|B| } because ej|T | ,g = ej|T | + afj|T | ,g
has to be satisfied. Then, it holds ej|T | ,g ≤ sp|T | ,g for each family g ∈ FT and each
p|T | ∈ {qk|T | +1 , . . . , q|B| } if
is chosen. Furthermore, the considered breaks are ordered for all families in FT in the
scheduled linear order.
All together, the solution of the sequence dependent setup times scheduling problem with
breaks determines a solution of the according multi-resource problem.
Lemma 2 Let a sequence dependent setup times scheduling problem (possibly with
breaks) be given. Then, any solution of the according multi-resource scheduling prob-
lem is a solution of the given sequence dependent setup times scheduling problem.
Proof 2 Let (T, F, B, AF ×F ) be a considered sequence dependent setup times scheduling
problem – without loss of generality with breaks. Further, let a solution of the according
multi-resource problem be given. Then, due to non-overlapping and the common-order
condition, the tasks and breaks in T ∪B respective Tg ∪Bg are linearly ordered. Assuming
that the tasks and breaks are sorted according to their scheduled order it holds
under the assumption that the tasks are numbered according to the scheduled order. By
definition it holds
This inequality holds for each g ∈ FT and thus in particular for g = fi+1 . So, due to the
fact that afi+1 ,fi+1 = 0 holds, it follows immediately
Now, it is assumed that ei ≤ sp ∧ep ≤ sj holds for an arbitrary pair of different tasks i 6= j
and an arbitrary break p ∈ B. Then for each family g ∈ FT it holds
ei,g + dp ≤ sp + dp ≤ sj,g
ei + afi ,g + dp ≤ sj + afj ,g
because ei,g = ei + afi ,g ∧ sj,g = sj + afj ,g is satisfied for each g ∈ FT and thus in
particular for g = fj . It follows immediately that
ei + afi ,fj + dp ≤ sj
Remark 1 It is remarkable that the common order over all families in the multi-resource
scheduling problem is essential for the equivalence of both problems. As a counter-
example consider the sequence dependent setup times scheduling problem with two tasks
1 and 2 having the setup times
afi ,fj f1 f2
f1 0 8
f2 8 0
for their families f1 , f2 and durations d1 = d2 = 4. Ignoring the required common order
in the according multi-resource scheduling problem, there is the solution with s1 = 0, s2 =
4 which is obviously not a solution of the sequence dependent setup times scheduling
problem because the setup time af1 ,f2 is not respected:
Remark 2 It is further remarkable that the triangle equality is essential for the equiv-
alence of both problems: As a counter-example consider the sequence dependent setup
times scheduling problem with three tasks 1, 2, 3 having the setup times
afi ,fj f1 f2 f3
f1 0 1 3
f2 1 0 1
f3 3 1 0
SingleResource(S)
SetupTimeOnSingleResource(AF ×F , MT →F , T, B)
too (iteration over all other families starts at line 5). Thus, there is an inconsistency if the
reversed order holds on another resource (identified by a family f , cf. line 6). If the order
is not detectable (at line 8) an update of the activities’ time windows according to the order
is performed because this may be not redundant.
The runtime complexity of the whole algorithm is O(|T ∪ B|2 |TF |). It is remarkable that
the complexity is not quadradic in |TF | because the innermost loop (line 5) is iterated at
most once for any pair of activities (cf. line 13).
5 Benchmark Examinations
Due to the fact that there are no benchmark instances of sequence dependent setup time
scheduling problems with time windows and breaks available, some often examined in-
stances without breaks are considered: the job shop scheduling instances introduced
in [BT96]. These instances are modifications of the classical Lawrence instances [Law84]
devoted to job shop scheduling, additionally introducing sequence dependent setup times
(SDST-JSP). Each instance is characterized by a triple m × j × t where m is the number
of machines, j is the number of jobs to be scheduled on those machines and t is the num-
ber of different setup types, i.e. families. Each job consists of m tasks which have to be
scheduled in linear order on all m machines. The challenge is to compute a schedule with
minimal make-span, i.e. to minimize the latest completion time of all jobs Cmax and to
prove its optimality.
These problem instances are somehow task scheduling instances with time windows be-
cause the time windows of the tasks are implicitly restricted by their order within their
jobs. However, these time windows depend on the bounds of the make-span.
For the minimization of the objective Cmax a branch & bound approach with a dichotomic
bounding scheme is used. Given a lower bound lwb and an upper bound upb of the
objective with lwb ≤ upb an attempt is made to find a solution with Cmax ≤ mid where
Algorithm 2: commonOrder() prunes the domains start and end times of the tasks and
breaks according to the common-order condition.
1 for each task or break x ∈ T ∪ B do
2 for each task of break y ∈ (T ∪ B) \ {x} do
3 for each family g ∈ FT do
4 if isBeforeAt(x, y, g) then
5 for each family f ∈ FT \ {g} do
6 if isBeforeAt(y, x, f ) then
// x is before y at g but y is before x at f
7 return failure due to inconsistency;
8 else if ¬isBeforeAt(x, y, f ) then
// x is not yet before y,
// thus update their time windows
accordingly:
9 esty = max(esty , estx + dx );
10 ecty = max(ecty , ectx + dx );
11 lstx = min(lstx , lsty − dx );
12 lctx = min(lctx , lcty − dx );
13 break;
lwb+upb
j k
mid = 2 is the mean of both bounds. If such a solution exists, the upper bound
is decreased, i.e. upb = Cmax − 1. If there is no solution, the lower bound is increased,
i.e. lwb = mid + 1. The search continues until lwb > upb holds. Then, the most recently
found solution is a minimal solution of the considered SDST-JSP instance. The used
branching is a left-to-right, depth-first incremental tree search which avoids re-traversals
of already visited paths in the search tree containing suboptimal solutions (cf. [vHlP91]).
The applied heuristic search strategy is specialized for job shop scheduling [Wol05]: The
machine with highest demand is considered first. Here, the demand is the ratio of the sum
of durations and the difference between the latest possible completion time and the earliest
start time of all its tasks. Then all tasks are sorted on the current machine such that their
duration is not decreasing. Then, the pairs of the first and second activity, the first and
third, etc. will be ordered partially (cf. [Wol05]) until all tasks on each machine are in
linear order (cf. column “sorted statically” in Table 1)
For runtime comparison only the (small) 5 × 10 × 5 SDST-JSP instances t2-ps01, . . . ,
t2-ps05 and the (medium) 5 × 15 × 5 instances t2-ps06, . . . , t2-ps10 are considered. The
algorithms are coded in Java and the tests are performed on a laptop PC Intel Core 2
Duo (T7700) at 2.4 GHz with 2 GByte memory running Windows XP Professional, ver-
sion 2003, SP3 and Sun Java, version 1.6.0, revision 13. The parameters and results are
presented in Table 1. For branch & bound the initial lower and upper bounds (LB0 and
UB0) are taken from [AF08, Table 2]. The best computed make-span (Cmax ) and the
Table 1: Best computed make-span value Cmax and elapsed runtime
Strategy 2 in [AF08] sorted statically GA+LS in [GVV08]
Instance LB0 UB0
Cmax CPU sec. Cmax CPU sec. Cmax CPU sec.
t2-ps01 433 844 798∗ 56.7 798∗ 2.1 798∗ 0.7
∗ ∗
t2-ps02 434 992 784 242.3 784 7.2 784∗ 0.7
t2-ps03 359 946 749∗ 699.3 749∗ 15.1 749∗ 0.8
t2-ps04 399 921 730∗ 251.6 730∗ 3.8 730∗ 0.7
t2-ps05 390 733 691∗ 58.2 691∗ 2.7 691∗ 1.0
t2-ps06 433 1120 1009∗ 1797.6 1009∗ 1481.8 1026 4.7
t2-ps07 416 1129 970∗ 781.8 970∗ 7538.2 970∗ 3.3
t2-ps08 399 1066 963∗ 349923.0 – > 12 h 963∗ 4.3
t2-ps09 412 1174 1061 169582.0 1060∗ 31812.1 1060∗ 3.5
t2-ps10 463 1187 1018∗ 35.1 1018∗ 1788.9 1018∗ 3.2
bold value: best known result of the instance is reached.
underlined value: optimality is proven the first time.
∗
optimal.
elapsed runtime (CPU sec.) are compared with state-of-the-art approaches presented in
[AF08, GVV08]. It seems that the target machines used for the benchmark computations
are comparable: In [AF08] the algorithms are coded in C++ and run on a PC with AMD64
architecture under Linx; in [GVV08] the algorithms are coded in C++ and run a PC Intel
Core 2 Duo at 2.6 GHz. However, the solution approaches as well as their runtime differ.
While in [AF08] constraint-based, branch & bound algorithms are used, an hybrid search
combining genetic algorithms and local search (GA+LS) is applied in [GVV08]. The latter
is much faster but the proofs of optimality are missing, i.e. they are impossible with such
an approach. The comparison shows that the approach presented here is in general faster
than that presented in [AF08] but significantly slower than the presented in [GVV08]. A
reason might be that the runtime given in column “sorted statically” in Table 1 includes
the required time for proving optimality which pays off if the quality of a solution is in the
focus: To the best of one’s knowledge, it is the first time that the optimality of the minimal
make-span of problem instance t2-ps09 (namely 1060) is proven.
From a practical point of view, the significance of the benchmark comparison is question-
able: The comparison is performed on artificial job shop scheduling problem instances
with sequence dependent setup times. However, it is an open question how the compared
approaches will perform on real scheduling problem where the time windows of the tasks
are a-priori fixed and the tasks are constrained by several other conditions, too.
A constraint-based modeling approach for task scheduling with sequence dependent setup
times is extended to deal properly with work breaks. The extended model is supported by
some additional pruning algorithms which perform well compared to another constraint
based scheduling approach but worse than hybrid search approach combining genetic algo-
rithms with local search. The comparison is performed on generated job shop scheduling
problem instances with sequence dependent setup times. However, it is an open question
how the compared approaches will perform on real scheduling problems.
Currently the presented model and algorithms are evaluated in field workforce scheduling
performed for the maintenance of water distribution networks [SR08]. Future work fo-
cuses on a further generalization the developed constraint-based modeling, pruning and
search approaches for task scheduling with sequence dependent setup times on alterna-
tive resources. Such scheduling problems are of high practical relevance, e.g. in all field
workforce scheduling applications where vehicle fleets have to be managed such that the
workload is distributed well over the good or even optimal vehicle routes.
References
[ABF04] Christian Artigues, Sana Belmokhtar, and Dominique Feillet. A New Exact Solution
Algorithm for the Job Shop Problem with Sequence-Dependent Setup Times. In Jean-
Charles Régin and Michel Rueher, editors, Integration of AI and OR Techniques in
Constraint Programming for Combinatorial Optimization Problems First International
Conference, CPAIOR 2004, Nice, France, April 20-22, 2004. Proceedings, volume
3011 of Lecture Notes in Computer Science, pages 37–49. Springer-Verlag, 2004.
[AF08] Christian Artigues and Dominique Feillet. A branch and bound method for the job-
shop problem with sequence-dependent setup times. Annals of Operations Research,
159(1):135–159, 2008.
[BL98] Jean-Louis Bouquard and Christophe Lenté. Equivalence to the Sequence De-
pendent Setup Time Problem. In Jeremy Frank and Mihaela Sabin, edi-
tors, CP’98 Workshop on Constraint Problem Reformulation. online available
at http://ti.arc.nasa.gov/ic/people/frank/bouquard.cp98.FINAL.ps, October 30
1998. (Last visited: 2008/08/14).
[BT96] Peter Brucker and Olaf Thiele. A branch & bound method for the general-shop problem
with sequence dependent setup-times. OR Spectrum, 18(3):145–161, September 1996.
[GPG01] Caroline Gagné, Wilson L. Price, and Marc Gravel. Scheduling a Single Machine
with Sequence Dependent Setup Time Using Ant Colony Optimization. Technical
Report 2001-003, Faculté des Sciences de L’Administration, Université Laval, Québec,
Canada, April 2001.
[GVV08] Miguel A. González, Camino R. Vela, and Ramiro Varela. A New Hybrid Genetic
Algorithm for the Job Shop Scheduling Problem with Setup Times. In Jussi Rintanen,
Bernhard Nebel, Christopher J. Beck, and Eric A. Hansen, editors, Proceedings of the
Eighteenth International Conference on Automated Planning and Scheduling, ICAPS
2008, pages 116–123, Sydney, Australia, September 14–18 2008. Association for the
Advancement of Artificial Intelligence AAAI.
[HMSW03] Matthias Hoche, Henry Müller, Hans Schlenker, and Armin Wolf. firstCS
- A Pure Java Constraint Programming Engine. In Michael Hanus, Pe-
tra Hofstedt, and Armin Wolf, editors, 2nd International Workshop on Multi-
paradigm Constraint Programming Languages – MultiCPL’03. Online available
at uebb.cs.tu-berlin.de/MultiCPL03/Proceedings.MultiCPL03.RCoRP03.pdf, 29th
September 2003. (Last visited: 2009/05/13).
[Law84] S. Lawrence. Resource constrained project scheduling: an experimental investigation
of heuristic scheduling techniques (supplement). Technical report, Graduate School of
Industrial Administration, Carnegie Mellon University, 1984.
[LVA+ 03] D. Lesaint, C. Voudouris, N. Azarmi, I. Alletson, and B. Laithwaite. Field workforce
scheduling. BT Technology Journal, 21(4):23–26, 2003.
[SR08] Andreas Schulz and Georg Ringwelski. A Workforce-Scheduling Application Using
a CP-AI-Hybrid. In Sibylle Schwarz, editor, 22nd Workshop on (Constraint) Logic
Programming, Technical Report 2008/08, pages 83–88, Dresden, Germany, September
30 - October 1 2008. Society for Logic Programming (GLP e.V.), University Halle-
Wittenberg, Institute of Computer Science.
[SS01] Christian Schulte and Peter J. Stuckey. When Do Bounds and Domain Propagation
Lead to the Same Search Space. In Harald Søndergaard, editor, Third International
Conference on Principles and Practice of Declarative Programming, pages 115–126,
Florence, Italy, September 2001. ACM Press.
[VB02] Petr Vilı́m and Roman Barták. Filtering Algorithms for Batch Processing with Se-
quence Dependent Setup Times. In Malik Ghallab, Joachim Hertzberg, and Paolo
Traverso, editors, Proceedings of the 6th International Conference on AI Planning and
Scheduling, AIPS’02, pages 312–321. The AAAI Press, 2002.
[vHlP91] Pascal van Hentenryck and Thierry le Provost. Incremental Search in Constraint Logic
Programming. New Generation Computing, 9(3 & 4):257–275, 1991.
[Vil02] Petr Vilı́m. Batch Processing with Sequence Dependent Setup Times: New Results. In
Proceedings of the 4th Workshop of Constraint Programming for Decision and Control,
CPDC’02, Gliwice, Poland, 2002.
[Vil04] Petr Vilı́m. O(n log n) Filtering Algorithms for Unary Resource Constraint. In Jean-
Charles Régin and Michel Rueher, editors, Integration of AI and OR Techniques in
Constraint Programming for Combinatorial Optimization Problems, First Interna-
tional Conference, CPAIOR 2004, Proceedings, volume 3011 of Lecture Notes in Com-
puter Science, pages 335–347, Nice, France, April 20-22 2004. Springer Verlag.
[Vil07] Petr Vilı́m. Global Constraints in Scheduling. PhD thesis, Charles University in
Prague, Faculty of Mathematics and Physics, Department of Theoretical Computer Sci-
ence and Mathematical Logic, KTIML MFF, Universita Karlova, Malostranské náměstı́
2/25, 118 00 Praha 1, Czech Republic, August 2007.
[Wol03] Armin Wolf. Pruning while Sweeping over Task Intervals. In Francesca Rossi, editor,
Principles and Practice of Constraint Programming – CP 2003, 9th International Con-
ference, volume 2833 of Lecture Notes in Computer Science, pages 739–753. Springer
Verlag, 2003.
[Wol05] Armin Wolf. Better Propagation for Non-reemptive Single-Resource Constraint Prob-
lems. In B. Faltings, A. Petcu, F. Fages, and F. Rossi, editors, Recent Advances in
Constraints, Joint ERCIM/CoLogNET International Workshop on Constraint Solving
and Constraint Logic Programming, CSCLP 2004, Lausanne, Switzerland, June 23-25,
2004, Revised Selected and Invited Papers, volume 3419 of Lecture Notes in Artificial
Intelligence, pages 201–215. Springer Verlag, 2005.
[Wol06] Armin Wolf. Object-Oriented Constraint Programming in Java Using the Library
firstCS. In Michael Fink, Hans Tompits, and Stefan Woltran, editors, 20th Work-
shop on Logic Programming, Vienna, Austria, February 22–24, 2006, volume 1843-
06-02 of INFSYS Research Report, pages 21–32. Technische Universität Wien, 2006.