Cyclic jobshop problem and (max,+)-algebra - LAAS-CNRS

Cyclic jobshop problem and (max, +)-algebra
L. Houssin
LAAS-CNRS
August 29, 2011
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
1 / 29
Framework
Cyclic scheduling, Discrete event dynamical systems, (max, +)-algebra
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
2 / 29
Max-plus algebra and discrete event systems
The (max, +) algebra is the set R ∪ −∞ endowed with the max operator :
a ⊕ b = max(a, b)
and the usual sum
a ⊗ b = a + b.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
3 / 29
Max-plus algebra and discrete event systems
The (max, +) algebra is the set R ∪ −∞ endowed with the max operator :
a ⊕ b = max(a, b)
and the usual sum
a ⊗ b = a + b.
Let ε = −∞. Consequently, we have
a⊕ε=a
a⊗0=a
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
3 / 29
Same notation holds for matrices.
(A ⊕ B)ij = Aij ⊕ Bij
and
(A ⊗ B)ij =
n
M
Aik ⊗ Bkj .
k=1
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
4 / 29
The behaviour of a class of discrete event systems can be represented by
discrete functions x(·) called dater.
x(k) denotes the date of the occurrence k of the event x.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
5 / 29
The behaviour of a class of discrete event systems can be represented by
discrete functions x(·) called dater.
x(k) denotes the date of the occurrence k of the event x.
In this way, autonomous DEDS can be modelled by a linear state
representation
x(k) = Ax(k − 1),
where x is a vector and A is the evolution matrix.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
5 / 29
A graph can be associated to each evolution matrix A.
j
l
Aij
i
Ail
xi ≥ Aij xj ⊕ Ail xl
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
6 / 29
Spectral property
Any irreducible matrix A has a unique eigenvalue λ which is the maximal
cycle mean of the graph associated to A.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
7 / 29
Basic cyclic scheduling problem
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
8 / 29
Basic cyclic scheduling problem
• A set of tasks T = {1, . . . , n} and the associated processing times
p1 , . . . , pn ,
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
8 / 29
Basic cyclic scheduling problem
• A set of tasks T = {1, . . . , n} and the associated processing times
p1 , . . . , pn ,
• A set of uniform (or conjunctive) constraints of the form
j
(pj , Hij)
i
xi (k) ≥ pj + xj (k − Hij ).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
8 / 29
Basic cyclic scheduling problem
• A set of tasks T = {1, . . . , n} and the associated processing times
p1 , . . . , pn ,
• A set of uniform (or conjunctive) constraints of the form
j
(pj , Hij)
i
xi (k) ≥ pj + xj (k − Hij ).
Each task is performed without preemption on a dedicated machine.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
8 / 29
Basic cyclic scheduling problem
• A set of tasks T = {1, . . . , n} and the associated processing times
p1 , . . . , pn ,
• A set of uniform (or conjunctive) constraints of the form
j
(pj , Hij)
i
xi (k) ≥ pj + xj (k − Hij ).
Each task is performed without preemption on a dedicated machine.
Goal
Find a couple (x(0), λ) such that x(k + 1) = λ + x(k) that minimizes the
cycle time λ.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
8 / 29
The set of uniform constraints leads to a uniform graph Gu .
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
9 / 29
The set of uniform constraints leads to a uniform graph Gu .
Example
task
processing time
L. Houssin
1
2
2
1
3
2
4
2
5
1
Cyclic jobshop problem and (max, +)-algebra
9 / 29
The set of uniform constraints leads to a uniform graph Gu .
Example
task
processing time
1
2
(2,0)
1
L. Houssin
3
2
4
2
5
1
2
(1,0)
(1,2)
5
2
1
(2,0)
4
(2,0)
3
Cyclic jobshop problem and (max, +)-algebra
9 / 29
The set of uniform constraints leads to a uniform graph Gu .
Example
task
processing time
1
2
(2,0)
1
3
2
4
2
5
1
2
(1,0)
(1,2)
5
2
1
(2,0)
4
(2,0)
3
Each edge (i, j) is supplied by two values pi and Hij .
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
9 / 29
Theorem
A cyclic scheduling problem is said consistent iff every circuits of Gu have
a positive height.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
10 / 29
Theorem
A cyclic scheduling problem is said consistent iff every circuits of Gu have
a positive height.
(2,0)
1
(1,0)
(1,-1)
5
2
(2,0)
4
(2,0)
3
There is a circuit with non positive height. It leads to
x1 (k) ≥ 8 + x1 (k + 1). Not consistent
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
10 / 29
Theorem
A cyclic scheduling problem is said consistent iff every circuits of Gu have
a positive height.
(2,0)
1
2
(1,0)
(1,2)
5
(2,0)
4
(2,0)
3
No circuit with non positive height. Consistent
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
10 / 29
The minimum cycle time is given by the critical circuit (regarding to the
maximum mean cycle) of Gu .
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
11 / 29
The minimum cycle time is given by the critical circuit (regarding to the
maximum mean cycle) of Gu .
In the framework of cyclic scheduling, the critical circuit plays the same
role as the critical path for the basic scheduling problem.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
11 / 29
How to find the maximum mean cycle of a graph ?
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
How to find the maximum mean cycle of a graph ?
mixed integer linear programming
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
How to find the maximum mean cycle of a graph ?
mixed integer linear programming
Graph theory
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
How to find the maximum mean cycle of a graph ?
mixed integer linear programming
Graph theory
I
Gondran and Minoux’s algorithm, complexity in O(n3 log (n)).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
How to find the maximum mean cycle of a graph ?
mixed integer linear programming
Graph theory
I
I
Gondran and Minoux’s algorithm, complexity in O(n3 log (n)).
Karp’s algorithm, complexity in O(n3 ).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
How to find the maximum mean cycle of a graph ?
mixed integer linear programming
Graph theory
I
I
I
Gondran and Minoux’s algorithm, complexity in O(n3 log (n)).
Karp’s algorithm, complexity in O(n3 ).
Howard’s algorithm, unproved complexity but showing excellent results.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
12 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
Graph theory
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
Graph theory
I
Gondran and Minoux’s algorithm. OK
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
Graph theory
I
I
Gondran and Minoux’s algorithm. OK
Karp’s algorithm. Karp’s algorithm works if the height is 1. Otherwise,
a transformation of the graph is possible by adding dummy nodes.
(2,0)
1
(1,0)
(1,2)
5
L. Houssin
2
(2,0)
4
(2,0)
Cyclic jobshop problem and (max, +)-algebra
3
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
Graph theory
I
I
Gondran and Minoux’s algorithm. OK
Karp’s algorithm. Karp’s algorithm works if the height is 1. Otherwise,
a transformation of the graph is possible by adding dummy nodes.
(2,0)
1
2
(1,0)
(0,1)
(1,1)
5
L. Houssin
(2,0)
4
(2,0)
Cyclic jobshop problem and (max, +)-algebra
3
13 / 29
The uniform graph is not classical since each edge is supplied by two
values. How these algorithms behaves in this case ?
Mixed integer linear programming. OK
Graph theory
I
Gondran and Minoux’s algorithm. OK
Karp’s algorithm. Karp’s algorithm works if the height is 1. Otherwise,
a transformation of the graph is possible by adding dummy nodes.
I
Howard’s algorithm. OK
I
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
13 / 29
Jobshop cyclic scheduling problem
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
14 / 29
Jobshop cyclic scheduling problem
Same thing as the basic cyclic problem but limited number of machine (or
processor).
Each task is mapped onto a machine.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
14 / 29
Jobshop cyclic scheduling problem
Same thing as the basic cyclic problem but limited number of machine (or
processor).
Each task is mapped onto a machine.
Goal
Find a couple (x(0), λ) such that x(k + 1) = λ + x(k) that minimizes the
cycle time λ.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
14 / 29
New constraints have to be took into account : Disjunctive constraints.
xi (s) ≥ pj + xj (s − Kij )
∀i, j ∈ T |M(i) = M(j)
and Kij + Kji = 1.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
15 / 29
New constraints have to be took into account : Disjunctive constraints.
xi (s) ≥ pj + xj (s − Kij )
∀i, j ∈ T |M(i) = M(j)
and Kij + Kji = 1.
Disjunctive constraints leads to a disjunctive graph.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
15 / 29
Disjunctive constraints leads to a selection graph Gs (or disjunctive graph).
Example
The tasks 1, 3 processed on machine 1.
The tasks 2, 4, 5 processed on machine 2.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
16 / 29
Disjunctive constraints leads to a selection graph Gs (or disjunctive graph).
Example
The tasks 1, 3 processed on machine 1.
The tasks 2, 4, 5 processed on machine 2.
(1,K31)
(2,K13) 2
1
(1,K25)
(2,K42)
(1,K52)
(1,K24)
(2,K45)
5
(1,K54)
3
4
Gs
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
16 / 29
The jobshop cyclic problem leads to two graphs Gu and Gs that can be
merged in a aggregated graph called generic graph Gg .
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
17 / 29
The jobshop cyclic problem leads to two graphs Gu and Gs that can be
merged in a aggregated graph called generic graph Gg .
(1,K31)
(2,K13) 2
1
(1,K25)
(2,K42)
(1,K52)
(1,K24)
(2,K45)
5
(1,K54)
3
4
Gs
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
17 / 29
The jobshop cyclic problem leads to two graphs Gu and Gs that can be
merged in a aggregated graph called generic graph Gg .
1
(1,2)
5
(2,0)
(2,K13) 2
(2,K31)
(1,0)
(1,K25)
(2,K42)
(1,K52)
(1,K24)
(2,K45)
(1,K54)
(2,0)
4
Gs
L. Houssin
3
(2,0)
Cyclic jobshop problem and (max, +)-algebra
Gu
17 / 29
The same theorem holds for the cyclic jobshop problem.
Theorem
A cyclic schedule is feasible consistent iff every circuits of Gg has a
positive height (event shift).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
18 / 29
Problem formulation
Find the values Kij of the selection graph such that the critical circuit is
minimum.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
19 / 29
Solving method
A brand and bound method can be used.
Branching on Kij
Bounding with the maximum mean cycle obtained in Gg .
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
20 / 29
What about non causal contraints ?
(2,1)
4
(2,1)
(2,-1)
(2,1)
(3,0)
(2,0)
2
5
1
(3,0)
3
x5 (k) ≥ 2 + x1 (k + 1)
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
21 / 29
What about non causal contraints ?
2
2
M3
2
3
3
4
M4
0
3
4
4
5
5
5
M5
1
1
1
1
M1
M2
5
k-1
10
k
15
k+1
5
20
25
x5 (k) ≥ 2 + x1 (k + 1)
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
22 / 29
Non causal contraints are really frequent in cyclic jobshop scheduling
problem.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
23 / 29
Non causal contraints are really frequent in cyclic jobshop scheduling
problem.
Example
Optimal solution. Cycle time λ = 5
1
(1,2)
5
(2,1)
(2,0)
(2,0) 2
(1,2)
(2,1)
(1,-1)
(2,0)
(1,1)
4
(2,0)
(1,0)
(1,0)
Gs
L. Houssin
3
(2,0)
Gu
Cyclic jobshop problem and (max, +)-algebra
23 / 29
Non causal contraints are really frequent in cyclic jobshop scheduling
problem.
Example
Optimal solution. Cycle time λ = 5
1
(1,2)
5
(2,1)
(2,0)
(2,0) 2
(1,2)
(2,1)
(1,-1)
(2,0)
(1,1)
4
(2,0)
(1,0)
(1,0)
Gs
L. Houssin
3
(2,0)
Gu
Cyclic jobshop problem and (max, +)-algebra
23 / 29
Non causal contraints are really frequent in cyclic jobshop scheduling
problem.
Example
Optimal solution. Cycle time λ = 5
1
(1,2)
5
(2,1)
(2,0)
(2,0) 2
(1,2)
(2,1)
(1,-1)
(2,0)
(1,1)
4
(2,0)
(1,0)
(1,0)
Gs
L. Houssin
3
(2,0)
Gu
Cyclic jobshop problem and (max, +)-algebra
23 / 29
Non causal contraints are really frequent in cyclic jobshop scheduling
problem.
Example
Optimal solution. Cycle time λ = 5
1
(1,2)
5
(2,1)
(2,0)
(2,0) 2
(1,2)
(2,1)
(1,-1)
(2,0)
(1,1)
4
(2,0)
(1,0)
(1,0)
3
(2,0)
Gs
Gu
x5 (k) ≥ 1 + x2 (k + 1)
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
23 / 29
How to deal with these non causal constraints ?
How to evaluate the cycle time of a schedule ?
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
24 / 29
What max-plus can do for cyclic scheduling problem?
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
25 / 29
What max-plus can do for cyclic scheduling problem?
A non causal schedule can be describes by
x(k) =
L. Houssin
M
Aq x(k − q),
q ∈ Z.
Cyclic jobshop problem and (max, +)-algebra
25 / 29
What max-plus can do for cyclic scheduling problem?
A non causal schedule can be describes by
x(k) =
M
Aq x(k − q),
q ∈ Z.
First idea
Transform a non causal representation of a cyclic schedule into a causal
representation.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
25 / 29
By means of an extension of the state vector
x(k) = A01 x(k − 1) ⊕ A0−1 x(k + 1),
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
26 / 29
By means of an extension of the state vector
x(k) = A01 x(k − 1) ⊕ A0−1 x(k + 1),
For some conditions on the structure of A−1 , a causal representation can
be obtained easily.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
26 / 29
Second idea
Howard algorithm that is a policy-iteration based algorithm on weighted
graph (mainly used for Markov decision process) still works if the system is
not causal.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
27 / 29
Second idea
Howard algorithm that is a policy-iteration based algorithm on weighted
graph (mainly used for Markov decision process) still works if the system is
not causal.
We don’t need a causal representation of the system to evaluate the cycle
time of a cyclic schedule.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
27 / 29
Howard algorithm can be used to check if a solution (even partial) is
feasible.
Transforming Gg in Gg0 by keeping only the opposite of the height.
Howard gives the largest maximum mean cycle of Gg0 , if it’s negative all
the circuits of Gg0 are negative and then all circuits of Gg are non-negative
(and the schedule is feasible).
1
(1,2)
5
(2,1)
(2,0)
(2,0) 2
(1,2)
(2,1)
(1,-1)
(2,0)
(1,1)
4
(2,0)
(1,0)
(1,0)
Gs
L. Houssin
3
(2,0)
Gu
Cyclic jobshop problem and (max, +)-algebra
28 / 29
Howard algorithm can be used to check if a solution (even partial) is
feasible.
Transforming Gg in Gg0 by keeping only the opposite of the height.
Howard gives the largest maximum mean cycle of Gg0 , if it’s negative all
the circuits of Gg0 are negative and then all circuits of Gg are non-negative
(and the schedule is feasible).
1
-2
5
0
-2
0
-1
0
2
0
-1
0
1
-1
4
0
3
0
Gs
L. Houssin
Gu
Cyclic jobshop problem and (max, +)-algebra
28 / 29
Future works
I In further works, we will consider a branch and bound procedure
based on Howard algorithm (currently in progress).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
29 / 29
Future works
I In further works, we will consider a branch and bound procedure
based on Howard algorithm (currently in progress).
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
29 / 29
Future works
I In further works, we will consider a branch and bound procedure
based on Howard algorithm (currently in progress).
I Compare with MILP and Hanen’s procedure.
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
29 / 29
Future works
I In further works, we will consider a branch and bound procedure
based on Howard algorithm (currently in progress).
I Compare with MILP and Hanen’s procedure.
I Robust scheduling. Minimize the deviation of the cycle time when
delays occur ?
L. Houssin
Cyclic jobshop problem and (max, +)-algebra
29 / 29