engm 732 queuing applications. motivation idea: we want to minimize the total cost of a queuing...

32
ENGM 732 ENGM 732 Queuing Queuing Applications Applications

Upload: joleen-garrett

Post on 13-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

ENGM 732ENGM 732

Queuing Queuing ApplicationsApplications

MotivationMotivation

Idea: We want to minimize the total cost of a queuing system

Let SC = cost of serviceWC = cost of waiting TC = total cost of system

min E[TC] = E[SC] + E[WC]

MotivationMotivation

E[TC] = E[SC] + E[WC]

E[TC]

E[SC]

E[WC]

Service Level

Cost

ExampleExample

Suppose we have 10 CNC machines, 8 of which are required to meet the production quota. If more than 2 machines are down, the estimated lost profit is $400 per day per additional machine down. Each server costs $280 per day. Time to failure is exponential (=0.05). Service time on a failed machine is also exponential (=0.5). Should the firm have 1 or 2 repairmen ?

Example (rate Example (rate diagrams) diagrams)

0 31 2 10

8/20 8/20 8/20 7/20 1/20

1/2 1/2 1/2 1/2 1/2

0 31 2 10

8/20 8/20 8/20 7/20 1/20

1/2 1 1 1 1

M/M/1 Queue

M/M/2 Queue

Example (rate Example (rate diagrams) diagrams)

0 31 2 10

8/20 8/20 8/20 7/20 1/20

1/2 1/2 1/2 1/2 1/2

M/M/1 Queue

P C Pn n 0

C Cnn n

n n

n

nn

1 2 0

1 1

11

...

...

Example (rate Example (rate diagrams) diagrams)

0 31 2 10

8/20 8/20 8/20 7/20 1/20

1/2 1/2 1/2 1/2 1/2

/ n Pn' Pn

0 1 0.271 8/10 1 0.8 0.217 8/10 2 0.64 0.173 8/10 3 0.512 0.139 7/10 4 0.3584 0.097 6/10 5 0.215 0.058 5/10 6 0.108 0.029 4/10 7 0.043 0.012 3/10 8 0.013 0.003 2/10 9 0.003 0.001 1/10 10 0.000 0.000

Sum = 3.692

M/M/1

Waiting Costs ( g(N) Waiting Costs ( g(N) form )form )

The current rate at which costs are being incurred is determined primarily by the current state N.

g Nn

n n( )

, , ,

( ) , , ,...,

RST0 0 1 2

400 2 3 4 10

Waiting CostsWaiting Costs

For g(n) linear; g(n) = CwnPn

E WC E g N

g n Pnn

[ ] [ ( ) ]

( )

0

E WC g n P C nP

C nP

C L

nn

w nn

w nn

w

[ ] ( )

0 0

0

Example 2Example 2A University is considering two different computer systems for purchase. An average of 20 major jobs are submitted per day (exp with rate =20). Service time is exponential with service rate dependent upon the type of computer used. Service rates and lease costs are shown below.

Computer Service Rate Lease Cost

MBI computer ( = 30) $5,000 / dayCRAB computer (= 25) $3,750 / day

Example 2Example 2

Scientists estimate a delay in research costs at $500 / day. In addition, due to a break in continuity, an additional component is given for fractional days.

h(w) = 500w + 400w2

wherew = wait time for a customer

Waiting Costs ( h(w) Waiting Costs ( h(w) model )model )

Since customers arrive per day

E h w for customer wait

h w f w dww

[ ( )]

( ) ( )

zexpected cost

0

E WC E h w

h w f w dww

[ ] [ ( ) ]

( ) ( )

z

0

Waiting Costs ( h(w) Waiting Costs ( h(w) model )model )

Recall, for an M/M/1 queue, the distribution of the wait time is given by

f w eww( ) ( ) ( )

E WC h w f w dw

w w e dw

w

w

[ ] ( ) ( )

( )( ) ( )

zz

0

2

020 500 400

Example 2 (rate Example 2 (rate diagram)diagram)

0 31 2 10

20 20 20 20 20

25 25 25 25 25

0 31 2 10

20 20 20 20 20

30 30 30 30 30

MBI Comp.

CRAB Comp.

MBI Computer (MBI Computer ( – – = = 10)10)

zE WC w w e dw

we dw w e dw

w e dw w e dw

w

w w

w w

[ ] ( )

( ) ( )

( ) ( )

,( )

,( )

$ ,

z zz z

20 500 400 10

20 500 10 20 400 10

20 500 10 20 400 10

100 0002

1080 000

3

101160

2 10

10 2 10

2 1 10 3 1 10

2 3

CRAB Computer (CRAB Computer ( – – = = 5)5)

zE WC w w e dw

w e dw w e dw

w

w w

[ ] ( )

( ) ( )

,( )

,( )

,

$ ,

z z

20 500 400 5

20 500 5 20 400 5

50 0002

540 000

3

52 000 640

2 640

2 5

2 1 5 3 1 5

2 3

Expected Total CostExpected Total Cost

E WCMBI

CRAB[ ]

,

,

1160

2 640

E TC

MBI

CRAB

[ ], ,

, ,

,

,

1160 5 000

2 640 3 750

6 160

6 390

Decision ModelsDecision Models

Unknown s

Let Cs = cost per server per unit time

Obj: Find ss.t.min E[TC] = sCs + E[WC]

Example (Repair Example (Repair Model)Model)

min E[TC] = sCs + E[WC]

s sCs E[WC] E[TC]

1 280 280 5612 560 48 6083 840 0 840

Decision ModelsDecision Models

Unknown & s

Let f() = cost per server per unit time A = set of feasible

Obj: Find , ss.t.min E[TC] = sf() + E[WC]

ExampleExampleFor MBI = 30

CRAB = 25

f ( ), ,

, ,

5 000 30

3 750 25

E TC f E WC[ ] ( ) [ ]

, ,

, ,

6 160 30

6 390 25

Decision ModelsDecision Models

Unknown & s

Choose both the number of servers and the number of service facilities

Ex: What proportion of a population should be assigned to each service facility

# restrooms in office building# storage facilities

Decision ModelsDecision Models

Unknown & s

Let Cs = marginal cost of server / unit time

Cf = fixed cost of service / facility – unit time

p = mean arrival rate for population

n = no. service facilities = p/

Decision ModelsDecision Models

Unknown & s

Cost / facility = fixed + marginal cost of service + expected waiting cost

+ travel time cost

= Cf + Cs +E[WC] + CtE[T]

Decision ModelsDecision Models

Unknown & s

Cost / facility = Cf + Cs +E[WC] + CtE[T]

Min E[TC] = n{ Cf + Cs +E[WC] + CtE[T] }

Example Example

Alternativesone tool crib at location 2two cribs at locations 1 & 3three cribs at locations 1, 2, & 3

1 2

3

Example Example

Each mechanic is assigned to nearest crib. Walking rate = 3 mph

1 2

3

E T

alt

alt

alt

[ ]

. ,

. ,

. ,

0 04 1

0 278 2

0 02 3

Example Example

Fixed cost / crib = $16 / hr (Cf)

Marginal cost / crib = $20 / hr (Cs)

Travel cost = $48 / hr (Ct)

p = 120 / hr. = 120 / hr (1 crib)

1 2

3

Example Example 1 2

3

E TC n s E WC C E T

n s E WCn

E T

t[ ] { [ ] [ ]}

{ [ ] ( ) [ ]}

16 20

16 20120

48

E WC C Lw[ ]

E TC n s Ln

E T[ ] { ( ) [ ]} 16 20 48120

48

But,

Example Example 1 2

3

E TC n s Ln

E T[ ] { ( ) [ ]} 16 20 48120

48

Consider 1 facility, 2 servers ( M/M/2 )

P0 = 0.333Lq = 0.333L = Lq + / = 1.333

Example Example 1 2

3

P0 = 0.333Lq = 0.333L = Lq + / = 1.333

E TC L E T[ ] { ( ) ( ) [ ]}

( . ) ( )( . )

.

1 16 20 2 48 120 48

16 40 48 1333 120 48 0 04

350 40

Example Example 1 2

3

n s L E[T] Cf + Css E[WC] CtE[T] E[TC]

1 120 1 M 0.04 36 M 230.4 M1 120 2 1.333 0.04 56 64.00 230.4 350.41 120 3 1.044 0.04 76 50.11 230.4 356.52 60 1 1.000 0.0278 36 48.00 80.0 328.02 60 2 0.534 0.0278 56 25.63 80.0 323.33 40 1 0.500 0.02 36 24.00 38.4 295.23 40 2 0.344 0.02 56 16.51 38.4 332.7