4DC10-week-3-lecture
4DC10-week-3-lecture
4DC10-week-3-lecture
Week 3
Michel Reniers
1 meter
1 2 N
Question: What is the expected distance Betty has to travel into the aisle?
3
Example: KIVA
Robot Betty has to retrieve a rack in an aisle with N (1 meter spaced) positions
Rack that has to be retrieved is randomly located in the aisle
1 meter
1 2 N
Question: What is the expected distance Betty has to travel into the aisle?
Answer: Let X be location of retrieval, then travel distance is X
N N
X X 1 1 N(1 + N) 1+N
E [X] = nP(X = n) = n· = · = meter
3 N N 2 2
n=1 n=1
Discrete random variables: Bernoulli
Then
E [X] = 0 · P(X = 0) + 1 · P(X = 1) = p
h i
E X2 = 02 · P(X = 0) + 12 · P(X = 1) = p
so
h i
Var [X] = E X 2 − (E [X])2 = p − p2 = p(1 − p)
4
Discrete random variables: Geometric
Geometric random variable X is the number of Bernoulli trials till the first success
Each trial with success probability p
Hence for k = 1, 2, ...
P(X = k) = (1 − p)k−1 p
Then
∞
X
E [X] = k(1 − p)k−1 p
k=1
∞
X
= p k(1 − p)k−1
k=1
1 1
= p =
p2 p
5
Justification
∞
X
E [X] = k(1 − p)k−1 p
k=1
∞
X
= p k(1 − p)k−1
k=1
∞
X
= p (j + 1)(1 − p)j
j=0
X∞ ∞
X
= p j(1 − p)j + (1 − p)j
j=0 j=0
1−p 1 1
= p + =
p2 p p
6
Discrete random variables: Geometric
0.8
0.6
0.4
0.2
0.0
1 3 5 7 9
7
Discrete random variables: Binomial
Since X = X1 + · · · + Xn , we get
E [X] = E [X1 ] + · · · + E [Xn ] = np
Var [X] = Var [X1 ] + · · · + Var [Xn ] = np(1 − p)
8
Discrete random variables: Binomial
0.20
0.15
0.10
0 5 10 15 20
9
Discrete random variables: Poisson
Poisson random variable X with parameter λ > 0 expresses the probability of a given
number of events occurring in a fixed interval of time if these events occur with a
known constant mean rate λ and independently of the time since the last event
λk
P(X = k) = e−λ , k = 0, 1, 2, ...
k!
Then
∞
X
E [X] = kP(X = k)
k=0
∞
X λk
= ke−λ
k!
k=1
∞
X λk
= e−λ k
k!
k=0
−λ λ
10 = e λe = λ
Discrete random variables: Poisson
0.3
parameter λ = 1, 5, 10
prob
0.1
0.0
0 5 10 15 20
11
Continuous random variable
Function f (x) is called the probability density of X and it is the derivative of F(x)
d
f (x) = F(x)
dx
12
Continuous random variable
13
Expected value and variance
For a continuous random variable X with density f (x), its expected value is defined as
Z ∞
E [X] = xf (x)dx
−∞
Variance of X is
h i Z ∞
Var [X] = E (X − E(X))2 = (x − E [X])2 f (x)dx
−∞
14
Recipe for calculating densities
Then differentiate!
15
Recipe for calculating densities
Then differentiate!
Answer:
πx2 x2
F(x) = P(X ≤ x) = = , 0≤x≤r
πr 2 r2
so
d 2x
f (x) = F(x) = 2 , 0≤x≤r
dx r
15
Continuous random variable: Uniform
Uniform random variable X on [a, b] has density
(
1
a<x<b
f (x) = b−a
0 otherwise
Then
x
1 x−a
Z
P(X ≤ x) = dx = , a<x<b
a b−a b−a
b
x a+b
Z
E [X] = dx =
a b−a 2
x2 dx
b
b3 − a3
h i Z
E X2 = =
a b−a 3(b − a)
h i 1
Var [X] = E X 2 − (E [X])2 = (b − a)2
12
16
Continuous random variable: Exponential
Exponential distribution is used to model the time between events that occur
randomly and independently.
Exponential random variable X with parameter (or rate) λ > 0 has density
(
λe−λx x > 0
3.0
f (x) =
0 otherwise
2.5
2.0
1.5
1.0
1
Expectation E [X] = λ
0.5
0.0
1
0 1 2 3 4 5 Variance Var [X] = λ2
x
18
Properties of Exponential
19
Example: One-time business decision
Suppose you decide to put Q units on stock to meet the demand during a single period
Question: How much to put on stock such that the stock-out probability is no more
than 10%?
20
Example: One-time business decision
Suppose you decide to put Q units on stock to meet the demand during a single period
Question: How much to put on stock such that the stock-out probability is no more
than 10%?
Answer: Determine Q such that
1
P(X > Q) = e−µQ ≤
10
so
ln(10)
Q≥
µ
20
Continuous random variable: Normal
0.4
0.3
Normal density
0.2
0.1
0.0
−5 0 5
Additivity: If X and Y are independent and Normal, then sum X + Y is also Normal
Question: Suppose X has parameters µX and σX and Y has parameters µY and σY What
are the mean and variance of X + Y?
23
Properties of Normal
Additivity: If X and Y are independent and Normal, then sum X + Y is also Normal
Question: Suppose X has parameters µX and σX and Y has parameters µY and σY What
are the mean and variance of X + Y?
23
Recap: System capacity
• Manufacturing system of workstations W1 , ... , WN with mi parallel and identical
machines in workstation Wi , raw processing time t0i
• Arrival rate to the manufacturing system is λ jobs per unit time, fraction qi of
arrival flow is diverted to Wi . Fraction pij of throughput of workstation Wi diverted
to Wj , fraction pi0 of throughput leaves the system
• Throughput δi of workstation Wi satisfies conservation of flow:
N
X
δi = λqi + δj pji , i = 1, ... , N
j=1
24
scrap
Example 0.2
λ W1
0.3
λ W3 W4 δ
0.8
λ W2
1
Maximal inflow rate is λmax = 10.5 = 0.095 jobs per hour
0.2δ1 0.34
Fraction of jobs scrapped is 3λ = 3 = 0.113
26
Little’s Law
System
δ δ
ϕ
Remark: Little holds for stable system: inflow equals throughput (no job accumulation)
27
w
Little’s Law δ = φ
total number w
time t
solid line is total input to the system in (0, t), dashed line is total output in (0, t)
28
w
Little’s Law δ = φ
Applied to buffer:
WIP in the buffer of workstation W = Throughput of W × Time spent in buffer
Applied to buffer:
WIP in the buffer of workstation W = Throughput of W × Time spent in buffer
30
Variability
31
Process time variability
Sources of variability
• “Natural” variability (differences in operators, machines, material)
• Random outages (failures)
• Setups
• Operator (un)availability
• Rework
Classes of variability
• Low c < 0.75: Process times without outages
• Moderate 0.75 ≤ c < 1.33: Process times with short outages (setups)
• High c ≥ 1.33: Process times with long outages (failures)
33
Natural variability
34
Preemptive outages
• machine breakdowns
• power downs
35
Preemptive outages: Effect on machine capacity
Availability (long-run fraction of time machine is available)
mf
A=
mf + mr
where
• mf is mean time to failure
• mr is mean time to repair
Adjusting natural process time t0 to effective process time
t0
te =
A
and effective capacity of workstation with m machines
m m
re = = A = Ar0
36 te t0
Preemptive outages: Effect on machine capacity – Example
37
Preemptive outages: Effect on process time variability
Assumptions
• After repair, processing resumes at the point where it was interrupted by the
failure
38
Preemptive outages: Effect on process time variability
t0
te =
A
σ 2 (m2 + σ 2 )(1 − A)t
0 0
σe2 = + r r
A Amr
σe2 mr
ce2 = 2
= c02 + (1 + cr2 )A(1 − A)
te t0
m mr
c02 + A(1 − A) + cr2 A(1 − A)
r
=
t0 t0
mr mr
ce2 = c02 + A(1 − A) + cr2 A(1 − A)
t0 t0
Note: ce2 increases in mr , so long repair times induce more variability than short ones
40
Preemptive outages: Effect on process time variability – Example
For machine M1
ce2 = 6.25
and for machine M2
ce2 = 1
Conclusion: From the viewpoint of variability, it is better to have short frequent stops
than long infrequent ones!
41
Nonpreemptive outages
• tool changes
• setups
• preventive maintenance
• shift changes
42
Nonpreemptive outages: Effect on machine capacity – Example
Machine needs setup with mean ts and coefficient of variation cs after having produced
on average Ns jobs (with probability N1s a setup is performed after processing a job)
Availability
Ns t0
A=
Ns t0 + ts
Effective process time
t0 ts
te = = t0 +
A Ns
Effective capacity of workstation with m machines
m m
re = = A = Ar0
te t0
Variance of the effective process time
σs2 Ns − 1 2
43 σe2 = σ02 + + t
Ns Ns2 s
Nonpreemptive outages: Effect on process time variability – Example
Then te = 1.2 for both machines M1 and M2 , so they have the same effective capacity
44
Nonpreemptive outages: Effect on process time variability – Example
Then te = 1.2 for both machines M1 and M2 , so they have the same effective capacity
Answer: For M1
ce2 = c02 = 0.25
and for M2
ce2 = 0.29