stochastic job shop scheduling
TRANSCRIPT
Stochastic Job Shop Scheduling
Marjan van den Akker, Kevin van Blokland, Han Hoogeveen
March 26, 2013
Job-shop scheduling
The Job Shop Scheduling Problem is a mathematical formulationfor a practical scheduling problem:
Suppose we have a set of machines that needs to process jobs:
Machines have specific functionality
Job consists of several operations, that need to be processedin order
Each operation is processed by a specific machine
Goal: determine machine schedules such that the makespan isminimized
Problem: NP-Complete for > 2 machines
2 / 33
Gantt Chart
2.1
1.1
1.2 3.1
3.2 2.2
3.3
1.3
2.3
Machine 1
Machine 2
Machine 3
Swapping operations on machines to obtain better schedules:
Critical Block Swap
Waiting Left Shift
3 / 33
Disjunctive Graph
s t
O0,0 O0,1 O0,2
O1,0 O1,1 O2,2
O2,0 O2,1 O2,2
p0,0
p1,0
p2,0
p0,1
p1,1
p2,1
p0,2
p1,2
p2,2
4 / 33
Uncertainties
The Standard Job Shop Scheduling is insufficient for real-lifeproblems because in the reality things are uncertain:
Machine failures
Unknown sets of jobs (online scheduling)
Uncertain job/operation properties
5 / 33
Stochastic Job Shop Scheduling
Problem: No previous research result Job Shop Scheduling withuncertainties.
Idea: local search is good solution method for job-shop scheduling
Question: How can we include uncertainty in local search? Howcan we apply local search in combination with simulation?
6 / 33
Formal Definition
Introduce stochastic processing times.
Other options:
Machine failures with repair time
Stochastic set-up times / changeovers
Stochastic travel times
Infinite buffer capacity
7 / 33
Formal Definition (2)
Stochastic operations receive a distribution for the processing time:
Pj ,i
Observations and deterministic processing times:
pj ,i
8 / 33
Formal Definition (3)
Assumption: For all the stochastic operations, the underlyingdistribution is known.
Assumption: All processing times are independent.
J | stoch.pj | E (Cmax)
9 / 33
Objective Function
The Stochastic Job Shop Scheduling Problems are optimized forthe makespan.
E (Cmax)
Equivalent to max(e(Oj ,i ))
Stochastic objective function.
10 / 33
Simulation Model
Reliably calculate the stochastic makespan by means of adiscrete-event simulation.
For each machine an entity
Machine states
Operation states
Processing time distributions
Machine schedules
Job relations
11 / 33
Simulation Model
Reliably calculate the stochastic makespan by means of adiscrete-event simulation.
For each machine an entity
Machine states
Operation states
Processing time distributions
Machine schedules
Job relations
11 / 33
States
Operation states:
Unavailable for processing
Available for processing
Processing
Finished
First operation of a job is Available from the start
Machine states:
Idle
Processing
Waiting
12 / 33
States
Operation states:
Unavailable for processing
Available for processing
Processing
Finished
First operation of a job is Available from the start
Machine states:
Idle
Processing
Waiting
12 / 33
An Event Graph
StartOperation Processed
EndOperation Available
Next Operation
13 / 33
Solve by simulated annealing
1 Find initial solution xcurrent = xinit and xbest = xinit .
2 Generate neighbor xnb.
3 If xnb is better than xcurrent = xnb,else xcurrent = xnb with
probability e−xnb−xcurrent
T .
4 If xcurrent better than xbest than update xbest .
5 Update T .
6 If stopcriterium is not met go to step 2.
14 / 33
Classical Methods
The main idea of the classical methods is to derive deterministicprocessing times:
Robustness Factor
Robustness Percentile
This is done by applying a function over the processing time’sdistribution:
pj ,i = F(Pj ,i )
15 / 33
Robustness Factor
For a robustness factor of F , the operation with an meanprocessing time Pj ,i is derived by the following formula:
pj ,i = F · Pj ,i
16 / 33
Robustness Percentile
For the robustness percentile, percentile x of the distribution isused as derived processing time
Assume that all the parameters of distributions are known
Invert the Cumulative Distribution Function of the distribution andobtain the value for percentile x :
pj ,i = CDF−1(x)
17 / 33
Relation between factor and percentile
For some distributions there is a close relation between the factorand the percentile.
For example the CDF for the Exponential distribution:
F (x) = y
y = 1− e−xβ
ln(1− y) =−x
β
−β · ln(1− y) = x
(1)
18 / 33
Relation between factor and percentile, continued
Robustness Percentile 70:−β · ln(1− 0.7) = β · 1.2
Robustness Percentile 60:−β · ln(1− 0.6) = β · 0.9
Scheduling at percentile 50 results in factor 0.7! For a factor 1.0percentile 63 has to be taken.
19 / 33
Solve by simulated annealing
1 Find initial solution xcurrent = xinit and xbest = xinit .
2 Generate neighbor xnb.
3 If xnb is better than xcurrent = xnb,else xcurrent = xnb with
probability e−xnb−xcurrent
T .
4 If xcurrent better than xbest than update xbest .
5 Update T .
6 If stopcriterium is not met go to step 2.
20 / 33
Simulation-based Methods
The classical methods are too rigorous and result in suboptimalschedules. To support the simulated annealing, the followingmethods are designed:
Processing Time Sampling
Result Sampling
Sample based neighbourhood repository
Sample Dominance Test
Cutoff Sampling
−→Combination of local search, sampling and simulations
21 / 33
Processing Time Sampling
Each time a realization of the processing time is needed during theexecution of the algorithm: take 100 samples from the distribution:
pj ,i = 1100
∑1001 p̃j ,i
−→Introduce small amounts of variation−→Mutual operation interaction is averaged
22 / 33
Result Sampling
Calculate the objective function multiple times:
LS5 five times result sampling
LS10 ten times result sampling
Each result is different
Combine the results and calculate the mean makespan
23 / 33
Sample based neighbourhood repository
Problem: “From what sample do we determine neighboursolutions?”
Previously the neighbours from only one sample are used
Result
Result
Result
Result
Result
Neighbourhood repositorySchedule
Similar neighbours occur more often and have a higher probabilityto be chosen
24 / 33
Sample Dominance Test
Determine the dominance between solutions based on samples
Common Random Numbers “Simulation Modeling and Analysis”(A.M. Law, 2007)
−→Determine five samples based on common random numbersand compare the sum of makespans
25 / 33
Cutoff Sampling
Search process is influenced by optimistic and pessimisticrealisations
We do not want realisations from percentile 95 – 100
Sort the result on the makespan, disregard the top x% and bottomy% samples
26 / 33
Generated Instances
Literature does not have stochastic instances, generate themourself:
Different subsets of stochastic operations
Different instance sizes
Selected probability distributions with same mean:
Uniform: U(0.8× pj ,i , 1.2× pj ,i )
Exponential: Exponential(pj ,i )
4-Erlang: Gamma(4,pj,i4 )
LogNormal: LogNormal(ln(pj ,i )− ln(2)2 , ln(2))
Deterministic: pj ,i
27 / 33
Name Size Instance Disturbance type Disturbance set
jdTest 10x10 jdTest Exponential jobs 4, 6, 9
jdUniformA 10x10 jdA Uniform jobs 1, 5, 9jdUniformB 10x10 jdB Uniform jobs 0, 2, 4, 6, 8jdUniformC 10x10 jdC Uniform jobs 0, 1, 3, 4, 6, 7, 9mdUniformA 10x10 mdA Uniform machines 1, 5, 9mdUniformB 10x10 mdB Uniform machines 0, 2, 4, 6, 8mdUniformC 10x10 mdC Uniform machines 0, 1, 3, 4, 6, 7, 9tdUniformX 10x10 tdX Uniform all operations
jd4ErlangA 10x10 jdA 4-Erlang jobs 1, 5, 9jd4ErlangB 10x10 jdB 4-Erlang jobs 0, 2, 4, 6, 8jd4ErlangC 10x10 jdC 4-Erlang jobs 0, 1, 3, 4, 6, 7, 9md4ErlangA 10x10 mdA 4-Erlang machines 1, 5, 9md4ErlangB 10x10 mdB 4-Erlang machines 0, 2, 4, 6, 8md4ErlangC 10x10 mdC 4-Erlang machines 0, 1, 3, 4, 6, 7, 9td4ErlangX 10x10 tdX 4-Erlang all operations
jdLogNormalA 10x10 jdA LogNormal jobs 1, 5, 9jdLogNormalB 10x10 jdB LogNormal jobs 0, 2, 4, 6, 8jdLogNormalC 10x10 jdC LogNormal jobs 0, 1, 3, 4, 6, 7, 9mdLogNormalA 10x10 mdA LogNormal machines 1, 5, 9mdLogNormalB 10x10 mdB LogNormal machines 0, 2, 4, 6, 8mdLogNormalC 10x10 mdC LogNormal machines 0, 1, 3, 4, 6, 7, 9tdLogNormalX 10x10 tdX LogNormal all operations
jdExponentialA 10x10 jdA Exponential jobs 1, 5, 9jdExponentialB 10x10 jdB Exponential jobs 0, 2, 4, 6, 8jdExponentialC 10x10 jdC Exponential jobs 0, 1, 3, 4, 6, 7, 9mdExponentialA 10x10 mdA Exponential machines 1, 5, 9mdExponentialB 10x10 mdB Exponential machines 0, 2, 4, 6, 8mdExponentialC 10x10 mdC Exponential machines 0, 1, 3, 4, 6, 7, 9tdExponentialX 10x10 tdX Exponential all operations
Experimental Setup
Non-standard Simulated Annealing local search:
Maximum of 10 restarts
Maximum of 25000 iterations per restart
Exponential cool down scheme with start probability P = 0.8and cool down factor 0.95
Use non-standard acceptance criterion: Accept whenU[0, 1] ≤ P
Cool down after 400 iterations
Alternating neighbourhoods (Critical block swaps / Waitingleft shifts), change after 15 successive acceptance failures
29 / 33
Experimental Setup
Local SearchDISTURBANCESObjective function
SCHEDULE 1SCHEDULE 2SCHEDULE 3SCHEDULE 4SCHEDULE 5
ORIGINAL/BASE DISTURBANCES
1000 results1000 results1000 results1000 results1000 results
INSTANCE
LOCAL SEARCH SETTINGS SIMULATION SETTINGS
30 / 33
Determining the combination of methods:
Percentile 70 Factor 1.2 Percentile 60 Percentile 80 Percentile 90 LS1Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev.
317,4 37,6 330,1 36,5 328,0 40,1 326,4 33,5 356,7 26,4 369,9 47,4321,8 36,6 335,1 37,7 337,0 41,8 334,7 31,6 381,9 30,6 400,8 42,8331,1 37,4 337,6 36,8 355,1 46,9 340,1 35,7 382,5 31,6 388,9 44,3333,1 37,8 348,2 37,6 355,8 45,1 366,1 30,5 389,8 31,0 368,8 38,5336,5 36,7 349,4 38,5 360,9 42,1 384,3 31,0 400,8 23,4 397,6 54,0
328,0 340,1 347,4 350,3 382,3 385,2
LS10 /w dom.test LS5 /w dom.test Percentile 70 100proc LS5 /w rep. LS10 /w rep.Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev. Average Std. Dev.
300,4 37,4 300,0 42,8 317,4 37,6 328,7 41,3 350,7 40,8 362,3 39,7300,4 38,9 300,5 40,1 321,8 36,6 339,1 42,5 361,2 40,7 365,7 36,7305,2 40,6 306,9 44,0 331,1 37,4 352,3 46,4 364,8 46,3 366,5 38,6306,3 42,1 312,7 38,6 333,1 37,8 356 41,4 375,9 45,7 368,3 44,2309,9 42,5 329,5 43,9 336,5 36,7 363,2 44,1 389,9 44 388,6 46,2
304,4 309,9 328 347,9 368,5 370,3
Total disturbance instances:
Instance 100proc LS1 LS5 LS10 P60 P70 P80 P90 Factor1.1 Factor1.2 Factor1.3
td4ErlangX 93,5 108,2 76,8 75,6 86,3 83,9 91,3 84,0 88,6 93,2 92,0123,7% 143,3% 101,6% 100,0% 114,2% 111,0% 120,8% 111,2% 117,3% 123,4% 121,8%
tdExponentialX 479,6 575,5 403,7 400,5 437,3 444,5 455,2 444,5 451,7 465,6 451,6119,7% 143,7% 100,8% 100,0% 109,2% 111,0% 113,7% 111,0% 112,8% 116,3% 112,8%
tdLogNormalX 472,9 541,8 413,1 399,4 440,7 440,4 432,3 446,6 442,4 451,5 447,8118,4% 135,7% 103,4% 100,0% 110,3% 110,3% 108,2% 111,8% 110,8% 113,0% 112,1%
tdUniformX 301,1 328,0 252,1 255,7 312,1 296,6 316,1 306,5 306,8 311,9 314,7119,4% 130,1% 100,0% 101,4% 123,8% 117,6% 125,4% 121,6% 121,7% 123,7% 124,8%
Increased job shop size instances:
Instance Worst Score LS5 Best Score Percentile 70 Gap
tdLarge15x10 836,1 792,6 -43,5tdLarge15x15 1003,2 1091,6 88,4tdLarge20x15 997,2 1297,2 700,0tdLarge20x20 1256,0 1791,9 535,9
Conclusion
Local search process under influence of “Lucky Tickets”
Sampling methods need support fromNeighbourhood Repository and Dominance Test
Sampling methods perform better than classical methods
33 / 33
0 5 10 15 20 25 30 35 40 450
2 · 10−2
4 · 10−2
6 · 10−2
8 · 10−2
0.1
0.12
0.14
0.16
X
Uniform(12, 18)
Exponential(15)
4-Erlang( 154)
LogNormal(log(15) − log(2)2, log(2))
P60 P65 P70 P75 P80 P85 P90 P95
300
320
340
360
380
400
420
440
460
Percentiles
Mak
esp
anLS10