No Slide Title

Download Report

Transcript No Slide Title

EMGT 501
Fall 2005
Midterm Exam
SOLUTIONS
1.
a
Min
s.t.
M1 = units of component 1 manufactured
M2 = units of component 2 manufactured
M3 = units of component 3 manufactured
P1 = units of component 1 purchased
P2 = units of component 2 purchased
P3 = units of component 3 purchased
4.50M1  5.00M 2  2.75M 3  6.50P1  8.80P2  7.00P3
2M 1
 3M 2
 4M 3
 21,600 P r oduction
M1
 1.5M 2
 3M 3
 15,000 Assem bly
1.5M 1
 2M 2
 5M 3
 18,000 Testing / Packaging
 P1
M1
 6,000 Com ponent1
 P2
M2
 4,000 Com ponent2
 P3  3,500 Com ponent3
M3
M1, M2, M3, P1, P2, P3
0

b
Component 1 Component 2 Component 3
Source
4000
2000
1400
Manufacture
0
4000
2100
Purchase
Total Cost: $73,550
c
Max  21600u1 15000u 2 18000u3  6000u 4  4000u5  3500u6
s.t.
 2u1  u2  1.5u3  u 4
 3u1  1.5u2  2u3
 4.5
 u5
 4u1  3u2  5u3
5
 u6  2.75
 6.5
u4
u5
 8.8
u6  7.0
all
u1 , u2 , u3  0 u4 , u5 , u6 : URS
d.
u1* = 0.9063, u2* = 0, u3* = 0.1250, u4* = 6.5
u5* = 7.9688 and u6* = 7.000
If a dual variable is positive on optimality, then its
corresponding constraint in primal formulation
becomes binding (=). Similarly, if a primal variable is
positive on optimality, then its corresponding
constraint in dual formulation becomes binding (=).
2.
a
b
x1*  0, x2*  1, x3*  0, x4*  3, z*  9,
 1  1

B  
 1 2 
 1  1 5   1 
1
    
B b  
  1 2  4   3 
1
1
C B B b  3 2   9
 3
1
*  0, x*  1, x*  0, x*  4, z*  11,
c x1
2
3
4
The objective is changed from 9 to 11
NOTE:
 1  1 5  1  1 


     0
  1 2  4  1  4 
3.
a
Min
s.t.
550u1  700u2  200u3
1.5u1  4u2  2u3  4
2u1  1u2  3u3  6
4u1  2u2  1u3  3
3u1  1u2  2u3  1
u1 , u2 , u3  0
b. Optimal solution: u1 = 3/10, u2 = 0, u3 = 54/30
The (z-c)j values for the four surplus variables of the
dual show x1 = 0, x2 = 25, x3 = 125, and x4 = 0.
c. Since u1 = 3/10, u2 = 0, and u3 = 54/30, machines A
and C (uj > 0) are operating at capacity. Machine C is
the priority machine since each hour is worth 54/30.
4.
a
b
Activity
Expected Time
Variance
A
B
C
D
E
F
G
H
I
4.83
4.00
6.00
8.83
4.00
2.00
7.83
8.00
4.00
0.25
0.44
0.11
0.25
0.44
0.11
0.69
0.44
0.11
Activity
Earliest
Start
Latest
Start
Earliest
Finish
Latest
Finish
Slack
Critical
Activity
A
B
0.00
0.00
0.00
0.83
4.83
4.00
4.83
4.83
0.00
0.83
Yes
C
4.83
5.67
10.83
11.67
0.83
D
4.83
4.83
13.67
13.67
0.00
E
4.00
17.67
8.00
21.67
13.67
F
10.83
11.67
12.83
13.67
0.83
G
13.67
13.83
21.50
21.67
0.17
H
13.67
13.67
21.67
21.67
0.00
Yes
I
21.67
21.67
25.67
25.67
0.00
Yes
Yes
c
Critical Path: A-D-H-I
d
E(T)= tA + tD + tH + tI
= 4.83 + 8.83 + 8 + 4 = 25.66 days
e
2 = 2A + 2D + 2H + 2I
= 0.25 + 0.25 + 0.44 + 0.11 = 1.05
Using the normal distribution,
z
25  E (T )

25  2566
.

 0.65
105
.
From Appendix, area for z = -0.65 is 0.2422.
Probability of 25 days or less = 0.5000 - 0.2422 = 0.2578
5.
a
2DCo
2(7200)(150)
Q* 

 1078.12
7200 
(1  D / P)Ch

1  25000  (0.18)(14.50)


b Number of production runs = D / Q* = 7200 / 1078.12
= 6.68
C
250Q 250(1078.12)
T

 37.43
D
7200
[days]
d
Q
1078.12

 10.78
Production run length =
P / 250 25000 / 250
days
e Maximum Inventory
7200 
 D

1  P  Q  1  25000  (1078.12)  767.62




f Holding Cost
1 D
1
7200 
1   QCh  1 
(1078.12)(0.18)(14.50)  $1001.74


2
P
2  25000 
D
7200
(150)  $1001.74
Ordering cost  Co 
Q
1078.12
Total Cost = $2,003.48
g
7200
 D 
r  dm  
m
(15)  432

250
 250 
6.
a
C = current cost per unit
C ' = 1.23 C new cost per unit
Q 
*
2 DCo

(1  D / P)Ch
2 DC0
 5000
(1  D / P) IC
Let Q' = new optimal production lot size
Q' 
2 DCo
(1  D / P) IC '
Q'

Q*
2 DCo
(1  D / P) IC '
2 DCo
(1  D / P) IC

1
C
C
1
C'



 0.9017
C'
1.23C
1.23
1
C
Q' = 0.9017(Q*) = 0.9017(5000) = 4509
Queueing Theory
The Basic Structure of Queueing Models
The Basic Queueing Process:
Customers are generated over time by an input
source.
The customers enter a queueing system.
A required service is performed in the service
mechanism.
Input
source
Customers
Queueing system
Queue
Service
mechanism
Served
customers
Input Source (Calling Population):
The size of Input Source (Calling Population) is
assumed infinite because the calculations are far
easier.
The pattern by which customers are generated is
assumed to be a Poisson process.
The probability distribution of the time
between consecutive arrivals is an
exponential distribution.
The time between consecutive arrivals is
referred to as the interarrival time.
Queue:
The queue is where customers wait before
being served.
A queue is characterized by the maximum
permissible number of customers that it can
contain.
The assumption of an infinite queue is the
standard one for most queueing models.
Queue Discipline:
The queue discipline refers to the order in
which members of the queue are selected for
service.
For example,
(a) First-come-first-served
(b) Random
Service Mechanism:
The service mechanism consists of one or more
service facilities, each of which contains one or
more parallel service channels, called servers.
The time at a service facility is referred to as the
service time.
The service-time is assumed to be the
exponential distribution.
Elementary Queueing Process
Served customers
Queue
Customers
Queueing system
C
C
CCCCCCC C
C
Served customers
S
S
S
S
Service
facility
 / /
Distribution of service times
Number of servers
Distribution of interarrival times
Where
M = exponential distribution (Markovian)
D = degenerate distribution (constant times)
Ek = Erlang distribution (shape parameter = k)
G = general distribution(any arbitrary
distribution allowed)
M /M /s
Both interarrival and service times have an
exponential distribution. The number of
servers is s .
M / G /1
Interarrival time is an exponential distribution.
No restriction on service time. The number of
servers is exactly 1.
Terminology and Notation
State of system = # of customers in queueing system.
Queue length = # of customers waiting for
service to begin.
N(t) = # of customers in queueing

system
at
time
t
(t
0)
P (t )
n
= probability of exactly n customers
in queueing system at time t.
s
n 
n 
# of servers in queueing system.
A mean arrival rate (the expected number
of arrivals per unit time) of new customers
when n customers are in system.
A mean service rate for overall system (the
expected number of customers completing
service per unit time) when n customers are
in system.
Note:  n represents a combined rate at
which all busy servers (those serving
customers) achieve service completions.
When n is a constant for all n, it is expressed by 
When the mean service rate per busy server is a
constant for all n  1, this constant is denoted by  .
Under these circumstances, 1 /  and 1 /  are the
expected interarrival time and the expected service
time.
   /(s ) is the utilization factor for the service
facility.
The state of the system will be greatly affected by the
initial state and by the time that has since elapsed.
The system is said to be in a transient condition.
After sufficient time has elapsed, the state of the
system becomes essentially independent of the initial
state and the elapsed time.
The system has reached a steady-state condition,
where the probability distribution of the state of the
system remains the same over time.
Pn  The probability of exactly n customers in
queueing system.
L
The expected number of customers in
queueing system 

 nP .
n 0
n
Lq  The expected queue length (excludes

customers being served) 
 (n  s) P .
ns
n
w
A waiting time in system (includes
service time) for each individual
customer.
W  E (w).
wq 
A waiting time in queue (excludes
service time) for each individual
customer.
Wq  E(wq ).
L,W , Lq , and Wq .
n is a constant  for all n.
Relationships between
Assume that
In a steady-state queueing process,
L  W .
Lq  Wq .
Assume that the mean service time is a constant,
1  for all n  1. It follows that,
W  Wq 
1

.
The Role of the Exponential Distribution
fT (t )

0 E (T )  1

t
An exponential distribution has the following
probability density function:


t

e
for t  0
fT (t)  

for t  0,
 0
Relationship to the Poisson distribution
Suppose that the time between consecutive
arrivals has an exponential distribution with
parameter  .
Let X(t) be the number of occurrences by time t
(t  0)
The number of arrivals follows
(t ) e
PX (t )  n 
n!
n
t
, for n = 0, 1, 2, …;
The Birth-and-Death Process
Most elementary queueing models assume that the
inputs and outputs of the queueing system occur
according to the birth-and-death process.
In the context of queueing theory, the term birth
refers to the arrival of a new customer into the
queueing system, and death refers to the departure
of a served customer.
The assumptions of the birth-and-death process are
the following:
Assumption 1.
Given N(t) = n, the current probability distribution
of the remaining time until the next birth is
exponential. n (n  0,1,2,...).
Assumption 2.
Given N(t) = n, the current probability distribution
of the remaining time until the next death is
exponential n (n  0,1,2,...).
Assumption 3.
The random variable of assumption 1 (the remaining
time until the next birth) and the random variable
variable of assumption 2 (the remaining time until
the next death) are mutually independent.
The next transition in the state of the process is
either
n  n  1 (a single birth)
n  n  1 (a single death),
depending on whether the former or latter random
variable is smaller.
The birth-and-death process is a special type of
continuous time Markov chain.
0 1 2
State: 0
1
2
3
1  2 3
n
and
n
n2 n1 n
 n-2 n-1
n
n+1 
n1 n n1
are mean rates.
Starting at time 0, suppose that a count is made of
the number of the times that the process enters this
state and the number of times it leaves this state, as
demoted below:
En (t ) 
the number of times that
process enters state n by time t.
Ln (t ) 
the number of times that
process leaves state n by time t.
Rate In = Rate Out Principle.
For any state of the system n (n = 0,1,2,…),
average entering rate = average leaving rate.
The equation expressing this principle is called the
balance equation for state n.
State
Rate In = Rate Out
0
1P1  0 P0
1
0 P0  2 P2  (1  1 ) P1
2
1P1  3 P3  (2  2 ) P2


n–1
n

n2 Pn2  n Pn  (n1  n1 ) Pn1
n1Pn1  n1Pn1  (n  n ) Pn

State:
0:
1:
2:
0
P1 
P0
1
1
1
10
1
P2 
P1 
( 1 P1  0 P0 ) 
P1 
P0
2
2
2
 2 1
210
2
2
1
P2 
P0
P3 
P2  (  2 P2  1 P1 ) 
3
3  2 1
3
3
To simplify notation, let
n 1n 2  0
Cn 
,
 n  n 1  1
for
n = 1,2,…
and then define Cn  1 for n = 0.
Thus, the steady-state probabilities are
Pn  Cn P0 , for n = 0,1,2,…
The requirement that

P
n 0
n
1
implies that


  Cn  P0  1,
 n 0 

so that
1


P0    Cn  .
 n 0 

The definitions of L and Lq specify that


n 0
ns
L   nPn , Lq   (n  s) Pn .
W
L
Wq 

Lq

,
 is the average arrival rate. n is the mean
arrival rate while the system is in state n. Pn is the
proportion of time for state n,

   n Pn .
n 0
The M/M/s Model
A M/M/s model assumes that all interarrival times
are independently and identically distributed
according to an exponential distribution, that all
service times are independent and identically
distributed according to another exponential
distribution, and that the number of service is s
(any positive integer).
In this model the queueing system’s mean arrival
rate and mean service rate per busy server are
constant (  and  ) regardless of the state of the
system.
(a) Single-server case (s=1)


State: 0
1


2

3

n  
n  

 n-2 n-1



n

n+1 

(b) Multiple-server case (s > 1)
for n = 0,1,2,…
n  
n ,
for n = 1,2,…s
n  
for n = s, s+1,...
 s ,


State: 0
1

2
3
 2  3
 s-2



s-1
s
s+1
(s  1) s s

When the maximum mean service rate s exceeds
the mean arrival rate, that is, when


1
s
a queueing system fitting this model will
eventually reach a steady-state condition.
Results for the Single-Server Case (M/M/1).
For s = 1, the Cn factors for the birth-anddeath process reduce to
n

n
Cn      ,


n
P0     
 n 0 

 1 

 
1  
 1  .
Therefor,
Pn   P0 ,
n
Thus,
1
1
Pn  (1  )  ,
n

L 
n
n (1  )
n 0
 d
 (1  ) 
d

n 0
n
( )
d   n 
 (1  )


d  n  0 
d  1 

 (1  ) 
d  1   




1    
Similarly,

Lq   (n  1) Pn
n 1
 L  1(1  P0 )


.
 (   )
2
When    , the mean arrival rate exceeds the
mean service rate, the preceding solution “blows
up” and grow without bound.
Assuming    , we can derive the probability
distribution of the waiting time in the system (w)
for a random arrival when the queue discipline is
first-come-first-served.
If this arrival finds n customers in the system,
then the arrival will have to wait through n + 1
exponential service time, including his or her
own.
Which reduces after considerable manipulation to
Pw  t  e
u (1  )t
,
The surprising conclusion is that w has an
exponential distribution with parameter
.
Therefore,
1
W  E (w) 
 (1   )
1

 
These results include service time in the waiting time.
Consider the waiting time in the queue (so
excluding service time) wq for a random arrival
when the queue discipline is first-come-firstserved.
If the arrival finds no customers already in the
system, then the arrival is served immediately, so
that
Pwq  0 P0  1  .
Results for the Multiple-Server Case (s > 1).
When s > 1, the Cn factors become
 ( /  )

 n!
Cn  
s
(

/

)

 s!
n
for n = 0,1,2,…,s
  
 
 s 
ns
( /  )

ns
s! s
n
for n = s, s+1,…
Consequently, if
then
  s [so that    (s )  1],
 s 1 ( / ) n ( / )s     n s 
P0  1 1  

   
s! n s  s 
 n 1 n!



 s 1 ( / ) n ( / )s

1
1  

.
s! 1   (s) 
n 0 n!

Where the n = 0 term in the last summation yields
the correct value of 1 because of the convention
that n! = 1 when n = 0. These factors also give
  /  
P0

Pn   n! n
  /   P
 s! s n  s 0
n
if 0  n  s
if n  s.
Furthermore,


L q   ( n  s)Pn   jPs  j
n s
j 0
s
 ( /  ) s
 d
(


)
j
j
  j
 P0  P0


s!
s!
j 0
j 0 d

 P0
s
(  )
s!
s



d 
(  )
d  1 
j



  P0
 

d  j 0 
s!
d  1   


s
P0 ( / ) 

;
2
s!(1  )
wq 
Lq

;
W  Wq 
1

;

1

L   Wq    Lq  .



Example
A management engineer in the Country Hospital
has made a proposal that a second doctor should
be assigned to take care of increasing number of
patients.
She has concluded that the emergency cases arrive
pretty much at random (a Poisson input process),
so that interarrival times have an exponential
distribution and the time spent by a doctor treating
the cases approximately follows an exponential
distribution.
Therefore, she has chosen the M/M/s model.
By projecting the available data for the early
evening shift into next year, she estimates that
1
patients will arrive at an average rate of 1 every
2
hour.
A doctor requires an average of 20 minutes to
treat each patient.
Thus, with one hour as the unit of time,
1
1
 hour per customer
 2
1 1
 hour per customer
 3
so that
  2 customer per hour
  3 customer per hour
The two alternatives being considered are to
continue having just one doctor during this shift
( s = 1) or to add a second doctor ( s = 1).
In both cases,


 1,
s
so that the system should approach a steadystate condition.

0
P1
Pn for n  2
Lq
s=1
2
1
2
s=2
1
3
1
3
9
 
n
Wq
1 2
3 3
4
3
2
2 hour
3
W
1 hour
L
3
2
1
3
n
1
3
1
12
3
4
1
24 hour
3 hour
8
 
The Finite Queue Variation of the M/M/s Model]
(Called the M/M/s/K Model)
Queueing systems sometimes have a finite queue;
i.e., the number of customers in the system is not
permitted to exceed some specified number
(denoted K) so the queue capacity is K - s.
Any customer that arrives while the queue is “full”
is refused entry into the system and so leaves
forever.
From the viewpoint of the birth-and-death process,
the mean input rate into the system becomes zero
at these times.
The one modification is needed

n  
0
for n = 0, 1, 2,…, K-1
for n  K.
Because n  0 for some values of n, a
queueing system that fits this model always will
eventually reach a steady-state condition, even
when    s  1.
The Finite Calling Population Variation of the
M/M/s Model
The only deviation from the M/M/s model is that
the input source is limited; i.e., the size of the
calling population is finite.
For this case, let N denote the size of the calling
population.
When the number of customers in the queueing
system is n (n = 0, 1, 2,…, N), there are only N - n
potential customers remaining in the input source.
(a) Single-server case ( s = 1)
( N  n) ,
n  
0,
for n = 0, 1, 2, …, N
for n  N
n  ,
for n = 1, 2, ...
( N  n  1)
( N  1)
( N  n  2)
N
State: 0
1

2

 n-2
n-1

n


 N-1 N

(a) Multiple-server case ( s > 1)
for n = 0, 1, 2, …, N
( N  n) ,
n  
for n  N
0,
 n ,
n  
 s ,
for n = 1, 2, …, s
for n = s, s + 1, ...
( N  s  1)
( N  1)
( N  s  2)
N
State: 0
1
 2
2
 s-2
s-1
(s  1)
s
s

 N-1 N
s
[1] Single-Server case ( s = 1)
n  , n  ,
Birth-Death Process
  
0

State
0
1
2

n
1

2




n-1
n

n+1




Rate In = Rate Out
P1  P0
P0  P2  (   ) P1
P1  P3  (   ) P2

Pn1  Pn1  (   ) Pn
P1   P0
P2 



(   ) P1  P0 
1

(   )
1

1

2
1

2


P0  P0

(   )P0   P0 
( P0 )  ( ) P0
 2

2

Pn  ( ) P0  cn P0   P0
 n

where Cn  ( )  
 n

n
n


 P  (
n 0
n

n 0

) P0    P0  1
 n

P0 
n
n 0
1

n


 1 
(1)
n 0
Pn   P0   (1   )

n


n 0
n 0
n
(2)
L   nPn   n n (1   )

L

1 


 
(3)

Lq   (n  1) Pn 
 (   )
n 1

L
2

1
W 

     
Wq 
Lq

W 


 (   )
1
( 4)
(5)
1

(6)
Example
 
 
 5 #H
  10 # H
L, Lq , W , Wq ?
 5 1
     0.5
 10 2

5
L

1
   10  5
2
52
5 1
Lq 



 (    ) 10(10  5) 10 2
L




 
1 Hour
60
W 

 12 Min
#
#
 5
5

5
1 H
60
Wq 



6 M
# 10
#
 (    ) 10(10  5) 10
 
[2] Multiple-Server case ( s > 1)
n
n   ,  n  
s
(0  n  s)
( s  n)
Birth-Death Process

0

1


2
 2  3
3
 s-2


s-1
( s  2)  (s  1) s

s

s+1
s

s
Rate In = Rate Out
State
0
1
2
P1  P0
P0  2P2  (   ) P1
P1  3P3  (  2 ) P2


s-1
s
s+1
Ps2  sPs    (s 1) Ps1
Ps1  sPs1  (  s ) Ps
Ps  sPs2  (  s ) Ps1
P1   P0
P2 
1
2

1
2

1

2
(   ) P1  P0 
(   )
2
2
2 2


P0  P0

(   )P0  P0 
P0  ( ) P0
1
2
 2

1
(  2 ) P2  P1
P3 
3
2
2

1

 

 (  2  ) 2   P0
3 
2

3
2
2

1   2   2  


 P0
2
3 
2

1  3
 (  ) P0
3!
Pn 
Pn 
 n

( )
n!
 n
()
P0
ns
P0
s! s
 (  ) n

 n!
Cn  
 n
 ()
 s! s n  s
(0  n  s  1)
( s  n)
(0  n  s  1)
( s  n)
 s 1 (  ) n  (  ) n 
Pn  
  n  s  P0  1

 n 0 n! n  s s! s 
n 0

P0 
s 1
1 
n 1
 n

( )
n!

1
 s
()
s!

(
ns
 ns
s
)
1

 s
s 1 (  ) n
(
1

)



n
!
s
!
1

n 0
s
 (  ) n
P0

 n!
Pn  
 n
 ()
P
0
n

s
 s! s
(0  n  s  1)
( s  n)


ns
j 0
Lq   (n  s ) Pn   jPs  j

Wq 
P( ) 
 s
0 
s!(1   )


   s 


2
Lq

W  Wq 
1

L  W   (Wq 
1

)
Question 1
Mom-and-Pop’s Grocery Store has a small adjacent parking lot
with three parking spaces reserved for the store’s customers.
During store hours, cars enter the lot and use one of the spaces at a
mean rate of 2 per hour. For n = 0, 1, 2, 3, the probability Pn that
exactly n spaces currently are being used is P0 = 0.2, P1 = 0.3,
P2 = 0.3, P3 = 0.2.
(a) Describe how this parking lot can be interpreted as being a
queueing system. In particular, identify the customers and the
servers. What is the service being provided? What constitutes a
service time? What is the queue capacity?
(b) Determine the basic measures of performance - L, Lq, W, and
Wq - for this queueing system.
(c) Use the results from part (b) to determine the average length of
time that a car remains in a parking space.
Question 2
Consider the birth-and-death process with all n  2 (n  1, 2, ),
0  3, 1  2, 2  1, and n  0 for n = 3, 4, …
(a) Display the rate diagram.
(b) Calculate P0, P1, P2, P3, and Pn for n = 4, 5, ...
(c) Calculate L, Lq, W, and Wq.
Question 3
A certain small grocery store has a single checkout stand with a fulltime cashier. Customers arrive at the stand “randomly” (i.e., a
Poisson input process) at a mean rate of 30 per hour. When there is
only one customer at the stand, she is processed by the cashier
alone, with an expected service time of 1.5 minutes. However, the
stock boy has been given standard instructions that whenever there
is more than one customer at the stand, he is to help the cashier by
bagging the groceries. This help reduces the expected time required
to process a customer to 1 minute. In both cases, the service-time
distribution is exponential.
(a) Construct the rate diagram for this queueing system.
(b) What is the steady-state probability distribution of the number of
customers at the checkout stand?
(c) Derive L for this system. (Hint: Refer to the derivation of L for
the M/M/1 model at the beginning of Sec. 17.6.) Use this
information to determine Lq, W, and Wq.