SLIDE 1 Resource Constrained Job Scheduling
Dissertantenseminar Matthias Horn1 G¨ unther R. Raidl1
1 Institute of Logic and Computation, TU Wien, Vienna, Austria,
{horn|raidl}@ac.tuwien.ac.at
Mar 27, 2019
SLIDE 2 Decision Diagrams (DDs)
◮ well known in computer science for decades
◮ logic circuit design, formal verification, . . .
◮ get popular in combinatorial optimization in the last decade
◮ graphical representation of solutions
- f a combinatorial optimization problem (COP)
◮ weighted directed acyclic multi-graph
with one root node r and one target node t
◮ each r-t path corresponds to a solution of the COP ◮ length of a path coincides with the solution’s objective value
◮ state of the art results could be obtained on several problems
SLIDE 3 Decision Diagrams (DDs)
r t Exact DD π0 ∈ {1, 2, 3} π1
. . .
πn 1 2 3
Exact DDs
◮ represent precisely the set of feasible solutions of a COP ◮ longest path: corresponds to optimal solution ◮ tend to be exponential in size ⇒ approximate exact DD
SLIDE 4 Decision Diagrams (DDs)
r t Exact DD π0 ∈ {1, 2, 3} π1
. . .
πn 1 2 3 r t Restricted DD π0 π1
. . .
πn 1 2 3
Restricted DDs
◮ represent subset of feasible solutions of a COP ◮ by removing nodes and edges ◮ length of longest path: corresponds to a primal bound
SLIDE 5 Decision Diagrams (DDs)
r t Exact DD π0 ∈ {1, 2, 3} π1
. . .
πn 1 2 3 r t Relaxed DD π0 π1
. . .
πn 1 2 3 r t Restricted DD π0 π1
. . .
πn 1 2 3
Relaxed DDs
◮ represent superset of feasible solutions of a COP ◮ by merging nodes ◮ length of longest path: corresponds to an upper bound ◮ discrete relaxation of solution space
SLIDE 6 Relaxed DDs
◮ discrete relaxation of solution space ◮ usage
◮ to obtain dual bounds ◮ as constraint store in constraint propagation ◮ derivation of cuts in mixed integer programming (MIP) ◮ branch-and-bound: branching on merged nodes ◮ . . .
◮ excellent results on e.g.
◮ set covering (Bergman et al., 2011) ◮ independent set (Bergman et al., 2014) ◮ time dependent traveling salesman (Cire and Hoeve, 2013) ◮ time dependent sequential ordering (Kinable et al. 2017)
SLIDE 7 DDs and Dynamic Programming
◮ dynamic programming (DP)
◮ controls xi, current state si ◮ transitions: si+1 = φi(si, xi),
i = 1, . . . , n
◮ objective function: f(x) = n
i=1 ci(si, xi)
◮ can be solved recursively
gi(xi) = min
xi∈Xi(si) {ci(si, xi) + gi+1(φi(si, xi))} ,
i = 1, . . . , n
◮ exact DDs are strongly related to DP
◮ J. N. Hooker, Decision Diagrams and Dynamic Programming, 2013. ◮ each DP state is associated with a node in the DD ◮ root node s0, target node sn+1 ◮ arc (si, φi(si, xi)) with cost ci(si, xi) for each control xi ∈ Xi ◮ create a DD based on a DP formulation without solving it ◮ provides recursive formulations of the COP
SLIDE 8 DDs - Construction Methods
◮ Top-Down Construction (TDC)
◮ compile relaxed DD layer by layer ◮ layer width is limited ◮ if current layer gets too large ⇒ merge nodes
◮ Incremental Refinement (IR)
◮ start with relaxed DD of width one ◮ iteratively refine by splitting nodes and filtering arcs
◮ A∗-based Construction (A∗C)
◮ construct a relaxed DD by a modified A∗ algorithm ◮ the size of the open list is limited by parameter φ ◮ if φ would be exceeded, nodes are merged ◮ for PC-JSOCMSR: obtained smaller DDs with stronger bounds in
shorter time
SLIDE 9 Resource Constrained Job Scheduling (RCJS)
◮ jobs J = {1, . . . , n} ◮ machines M = {1, . . . , l} ◮ one renewable shared resource ◮ each job j ∈ J has
◮ an assigned machine mj ∈ M ◮ a release time rj, a due time dj and a processing time pj ◮ weight wj ◮ cumulative resource requirement gj ◮ set of preceding jobs Γj
◮ total amount of resource consumed by concurrently executed jobs
is limited by G
◮ objective: minimize the total weighted tardiness
SLIDE 10 Solution Representation
◮ represented by permutation π of jobs ◮ assuming that π satisfies the precedence constraints ◮ a feasible schedule S(π) from π can be obtained by
◮ assigning start time si for job i in order of π ◮ such that all constraints are satisfied
◮ objective function: f(S(π)) = n i=1 wi max(0, si + pj − dj)
time horizon T = [T min, . . . , T max]
T min = min
r∈J rj and
T max = max
r∈J rj +
pj
SLIDE 11 Motivation
◮ mining supply chains
◮ transfer minerals from mining sites to ports by rail or road ◮ rail wagons and trucks are limited and have to be shared ◮ materials have to arrive at the ports by specific times, otherwise
demurrage costs must be paid
SLIDE 12
Earlier Work on RCJS
Singh, G., Ernst, A.T., (2011)
◮ integer linear programming (ILP) formulation ◮ Lagrangian relaxation (LR) based heuristic ◮ a simulated annealing (SA) based approaches ◮ genetic algorithm (GA)
Singh, G., Ernst, A.T., (2012)
◮ Lagrangian Particle Swarm Optimization
Thirduvady, D., Singh, G., Ernst, A.T., (2014)
◮ combining column generation (CG) and LR with ◮ ant colony optimization (ACO)
Thirduvady, D., Singh, G., Ernst, A.T., (2016)
◮ parallelization of ACO and SA
Further related works on RCJS with hard deadlines,. . .
SLIDE 13 Mixed Integer Programming Formulation
Model
min
T max
cjt
∀j ∈ J, ∀t = T min, . . . , rj + pj − 1
∀t ∈ T , ∀m ∈ M zjt ≥ zjt−1 ∀j ∈ J, ∀T min + 1 . . . , T max zjT max = 1 ∀j ∈ J zkt ≤ zjt−pk ∀j → k, ∀t ∈ T
gj
∀t ∈ T
Variables
◮ Decision variables zjt: one if job j is completed at time t or earlier ◮ Costs: cjt = wj max (t − dj, 0), ∀t ∈ T , ∀j ∈ J
SLIDE 14 Lagrangian Relaxation
Sup-problems for each machine m ∈ M:
Lm(λ) = min
z
cjt +
min{pj,t}
λt−igj (zjt − zj,t−1) subject to . . .
Lagrangian function:
L(λ) =
Lm(λ) − G
λt
SLIDE 15 States and Transitions
DD for RCJS: directed acyclic multigraph M = (V, A) Each node u ∈ V corresponds to a state (P(u), ˆ P(u), t(u), η(u))
◮ set P(u) ⊆ J of jobs that can be scheduled immediately ◮ set ˆ
P(u) ⊆ J of jobs that are already scheduled
◮ vector t(u) = (tr(u))m∈M of earliest times for each machine m ◮ vector η(u) = (ηt(u))t∈T representing the resource consumption at
time t Initial (root) state: r = (J, ∅, (0, . . . , 0), (0, . . . , 0)) An arc (v, w) ∈ A represents a transition from (P(v), ˆ P(v), t(v), η(v)) to (P(u), ˆ P(u), t(u), η(u)) by scheduling a job j ∈ P(v) at its earliest possible time considering t(v)
v u j | cj
SLIDE 16 States and Transitions
DD for RCJS: directed acyclic multigraph M = (V, A) Each node u ∈ V corresponds to a state (P(u), ˆ P(u), t(u), η(u))
◮ set P(u) ⊆ J of jobs that can be scheduled immediately ◮ set ˆ
P(u) ⊆ J of jobs that are already scheduled
◮ vector t(u) = (tr(u))m∈M of earliest times for each machine m ◮ vector η(u) = (ηt(u))t∈T representing the resource consumption
at time t Initial (root) state: r = (J, ∅, (0, . . . , 0), (0, . . . , 0)) An arc (v, w) ∈ A represents a transition from (P(v), ˆ P(v), t(v), η(v)) to (P(u), ˆ P(u), t(u), η(u)) by scheduling a job j ∈ P(v) at its earliest possible time considering t(v)
v u j | cj
SLIDE 17 Basic lower bound on the total weighted tardiness (1)
Preprocessing
As long as there exists two jobs j, k ∈ J s.t. j ≪ k and rk < rj + pj ⇒ set rk := rj + pj
Observation
After preprocessing it frequently happens that there are few jobs j with dj < rj.
Naive lower bound
T LB
≪ =
wj max(0, rj + pj − dj)
SLIDE 18 Basic lower bound on the total weighted tardiness (2)
Idea: sort jobs according to their due times in increasing order and
◮ sum up the total processing time for each job j ∈ J,
T LB1
j
= min
j′∈Jqj
wj max 0,
pj′ − dj
◮ and the the average resource consumption
T LB2
j
= min
j′∈J wj max
0,
pj′gj′ G − dj Lower bound on the total tardiness: T LB
due =
max(T LB1
j
, T LB2
j
)
SLIDE 19 Basic lower bound on the total weighted tardiness (3)
Baptiste, P., and Pape, C.L., (2005): relax non-preemption assumption of jobs, two steps
◮ (1) compute vector Cm = (C[1], . . . , C[nm]) for each m ∈ M
◮ where C[i] is a lower bound for the i-th smallest completion time in
any schedule
◮ shortest remaining processing time (SRPT):
each time a job becomes available or is completed, a job with the shortest remaining processing time among the available and uncompleted jobs is scheduled
◮ (2) solve assignment problems to get T LB C
=
m∈M T LB Cm
◮ between jobs in Jm and the elements in vector Cm ◮ optimal solution can be computed by the Hungarian algorithm
in cubic time
◮ compute fast lower bound on the assignment problem
see: Baptiste, P., and Pape, C.L., (2005)
SLIDE 20 First Strike – A∗ algorithm for RCJS
◮ perform A∗ algorithm
◮ on the defined state graph for RCJS ◮ using lower bound max{T LB
≪ , T LB due, T LB C } to guide the search
◮ perform beam search based diving to find primal solutions
◮ (expected) poor performance due to
◮ rather weak lower bounds ◮ high dimensional states ◮ high memory consumption
◮ possible improvements:
◮ using relaxed DDs to compute (hopefully) stronger lower bounds
SLIDE 21 Multivalued DDs for Sequencing Problems
Cire, A., van Hoeve, W.J., (2013)
Filtering
◮ try to identify infeasible arcs ◮ NP-hard problem ◮ associate states to each node of the DD
States for node u of DD M
◮ All↓ u ⊆ J, jobs scheduled on all paths from r to node u
All↓
v =
(All↓
u ∪ {val(a)}) ◮ Some↓ u ⊆ J, jobs scheduled on some paths from r to node u
Some↓
v =
(Some↓
u ∪ {val(a)})
SLIDE 22
Multivalued DDs for Sequencing Problems
Cire, A., van Hoeve, W.J., (2013)
Lemma 1
An arc a = (u, v) is infeasible if any of the following conditions hold: val(a) ∈ All↓
u,
|Some↓
u| = l(a)
and val(a) ∈ Some↓
u.
Lemma 2
An arc a = (u, v) is infeasible if any of the following conditions hold: val(a) ∈ All↑
v,
|Some↑
v| = n − l(a)
and val(a) ∈ Some↑
v,
|Some↓
u ∪ {val(a)} ∪ Some↑ v| < n.
SLIDE 23 Relaxed DD for Sequencing Problems
Cire, A., van Hoeve, W.J., (2013)
Incremental Refinement (IR)
◮ sort jobs according to some priority J∗ = {j∗ 1, . . . , j∗ n} ◮ jobs with high priority
◮ play a greater role in feasibility and optimality ◮ should be assigned to exactly one position in all orderings ◮ for weighted total tardiness: decreasing due times
Theorem 1
Let W > 0. There exists a relaxed MDD M where at least ⌊log2 W⌋ jobs are assigned to exactly one position in all orderings identified by M.
Lemma 7
A job j is assigned to exactly one position in all orderings identified by M if and only if j ∈ Some↓
u \ All↓ u for all nodes u ∈ M.
SLIDE 24
Relaxed DD for RCJS
State Merger for RCJS
Merging two states u and v: u ⊕ v = (P(u) ∪ P(v), ˆ P(u) ∪ ˆ P(v), (min(tm(u), tm(v))m∈M, (min(ηt(u), ηt(v))t∈T )
Compilation of relaxed DD M
◮ apply IR algorithm (Cire, A., van Hoeve, W.J., (2013)) ◮ sort jobs according to decreasing due times
SLIDE 25
Relaxed DD for RCJS
State Merger for RCJS
Merging two states u and v: u ⊕ v = (P(u) ∪ P(v), ˆ P(u) ∪ ˆ P(v), cancel out each other (min(tm(u), tm(v))m∈M, (min(ηt(u), ηt(v))t∈T )
Compilation of relaxed DD M
◮ apply IR algorithm (Cire, A., van Hoeve, W.J., (2013)) ◮ sort jobs according to decreasing due times
(too) many jobs with late due times
Results
in most cases: T sp(M) ≈ 0
SLIDE 26
Relaxed DD for RCJS
State Merger for RCJS
Merging two states u and v: u ⊕ v = (P(u) ∪ P(v), ˆ P(u) ∪ ˆ P(v), cancel out each other (min(tm(u), tm(v))m∈M, (min(ηt(u), ηt(v))t∈T )
Compilation of relaxed DD M
◮ apply IR algorithm (Cire, A., van Hoeve, W.J., (2013)) ◮ sort jobs according to decreasing wj max(0, rj + pj − dj) values
Results
in most cases: T sp(M) ≥ T LB
≪
SLIDE 27 Decomposition Based Approach for RCJS
Idea: compile relaxed DD Mm for each single machine m ∈ M
States
◮ set P(u) ⊆ J of jobs that can be scheduled immediately ◮ set ˆ
P(u) ⊆ J of jobs that are already scheduled
◮ time marker t of earliest available time
State Merger
u ⊕ v = (P(u) ∪ P(v), ˆ P(u) ∪ ˆ P(v), min(t(u), t(v)))
Lower Bound
T LB
SM =
T sp(Mm)
SLIDE 28
Decomposition Based Approach for RCJS
Advantages and Disadvantages
◮ on average 10 jobs are assigned to one machine
⇒ size of single relaxed DD is independent of the problem size
◮ in most cases paths have no job repetition ◮ no “cancel out” effect regarding time marker t ◮ shared resource is ignored completely
Improvement
Use Cm to strengthen states of Mm
Empirical Results (no exhaustive tests on the cluster done yet)
◮ usually T LB SM is substantial stronger than T LB ≪ , T LB due, or T LB C ◮ however weaker compared to the LP relaxation of the MIP
SLIDE 29
A∗ revisited
Idea: use T LB
SM to guide the A∗ search
Current Status
◮ compute T LB SM for each encountered node during the A∗ search ◮ A∗ is able to find the proven optimal solution at least for the
smallest instances (with three machines)
◮ for larger instances: too slow
Future Improvements
◮ create just one relaxed DD for each machine at the beginning ◮ A∗ will keep for each A∗-node references to the corresponding
relaxed DD-nodes
◮ provides constant look up time ◮ use T sp(Mm) as tie breaking criterion
SLIDE 30
Future work
◮ try to incorporate shared resource ◮ derive solution from shortest paths obtained from Mm, m ∈ M ◮ consider alternative cost structure ◮ ACO-based approach, attach pheromones to arcs of relaxed DD? ◮ find another problem
SLIDE 31
Thank you for your attention