1-to-1 distribution

28
1 1 1-to-1 Distribution John H. Vande Vate Spring, 2001

Upload: lunea-clark

Post on 03-Jan-2016

26 views

Category:

Documents


2 download

DESCRIPTION

1-to-1 Distribution. John H. Vande Vate Spring, 2001. D(t) = cumulative demand to time t D’(t) = rate of demand at time t. Two cases: Only Rent Costs matter Only Inventory Costs matter. When Demand Varies Predictably. Make them all the same size - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 1-to-1 Distribution

11

1-to-1 Distribution

John H. Vande Vate

Spring, 2001

Page 2: 1-to-1 Distribution

22

When Demand Varies Predictably

• D(t) = cumulative demand to time t

• D’(t) = rate of demand at time t.

• Two cases:– Only Rent Costs matter– Only Inventory Costs matter

Page 3: 1-to-1 Distribution

33

To Minimize the Maximum...

• Make them all the same size

• If we have n shipments in time t, make them all size D(t)/n

• Question reduces to n– Trade off shipment cost (smaller n) vs– Inventory cost (larger n)

Page 4: 1-to-1 Distribution

44

That’s just an EOQ problem

• Total cost with n shipments is– Transportation cost (ignore variable portion)

• fixed*n

– Inventory Cost• Rent Cost is $/unit/year• Rent * (D(T)/n)*T

– Average Cost per unit• Rent*T/n + fixed*n/D(T)

– So n is Rent*T*D(T)/fixed

Page 5: 1-to-1 Distribution

55

More realistic - Ignore Rent

• Wagner-Whitin Dynamic programming approach.

• Computationally intensive

• How accurate is the forecast of demand?

• How sensitive is the cost to the answer?

Page 6: 1-to-1 Distribution

66

Wagner-Whitin

• Discuss Later

Page 7: 1-to-1 Distribution

77

The Continuous Approximation Approach

t0t1 t2 t3

Fixed shipment cost + ci*area

t’

Area (t3-t2)height/2

There is some t’ where Area = (t3-t2)2D’(t’)/2

height (t3-t2)D’(t’)

Page 8: 1-to-1 Distribution

88

Step Function

• H(t) = (ti - ti-1) if ti-1 t < ti

• So total

cost = (Fixed + c*areai)

= (Fixed + c*(ti - ti-1)2D’(ti’)/2)

= (Fixed + c*H(ti’)2D’(ti’)/2)

= (Fixed /H(t) + c*H(t)D’(t’)/2)dt

An abuse of notation

Page 9: 1-to-1 Distribution

99

Equivalence= (Fixed + c*H(ti’)2D’(ti’)/2)

= (Fixed /H(t) + c*H(t)D’(t’)/2)dt

Why?

Fixed /H(t)dt = ti ti-1

Fixed /H(t)dt

• = ti ti-1

Fixed /(ti - ti-1)dt

• = Fixed

c*H(t)D’(t’)/2dt = ti ti-1

c*H(t)D’(ti’)/2dt

• = ti ti-1

c*(ti - ti-1) D’(ti’)/2dt

• = c*(ti - ti-1)2 D’(ti’)/2

• = c*H(t’i)2 D’(ti’)/2

Page 10: 1-to-1 Distribution

1010

Approximation

Total cost

= (Fixed + c*H(ti’)2D’(ti’)/2)

= (Fixed /H(t) + c*H(t)D’(t’)/2)dt

(Fixed /H(t) + c*H(t)D’(t)/2)dt

• Find a smooth function H(t) that minimizes the cost (an EOQ formula)

• H(t) = (2Fixed/cD’(t))

Page 11: 1-to-1 Distribution

1111

H(t) and Headways

0

1

2

3

4

5

6

7

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

H(t)

h

Page 12: 1-to-1 Distribution

1212

What is H(t)?

• If Demand is constant with rate D’

• We dispatch every t time units

• Cost per time = Fixed/t + ctD’/2

• Best headway is• t = (2Fixed/cD’)

• Compare with H(t)

• H(t) = (2Fixed/cD’(t))

Page 13: 1-to-1 Distribution

1313

Back to the Discrete World

• We have a continuous approximation H(t) to the discrete (step function) headways.

• How do we recover implementable headways from H(t)?

Page 14: 1-to-1 Distribution

1414

Consistent Headways

• Finding Headways consistent with H(t)

• Headway = Avg of H(t) in [0, Headway]• Avg = Integral of H(t) over the Headway/Headway• Headway2 = Integral of H(t) over the Headway

• Find Headways so that the squares approximate the area under H(t)

Page 15: 1-to-1 Distribution

1515

Example

0

0.2

0.4

0.6

0.8

1

1.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

0

10

20

30

40

50

60

D'(t)

D(t)

Page 16: 1-to-1 Distribution

1616

H(t) and Headways

0

1

2

3

4

5

6

7

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

H(t)

h

Page 17: 1-to-1 Distribution

1717

Example Cont’dt D'(t) D(t) H(t) Integral of H(t) t*t h Integral of H(t) t*t h

1 0.12 0.60 4.09 4.09 1 52 0.12 1.20 4.09 8.18 4 53 0.12 1.79 4.09 12.27 9 54 0.05 2.07 6.04 18.31 16 55 0.05 2.34 6.04 24.35 25 56 0.05 2.62 6.04 30.40 36 6.04 1 37 0.38 4.53 2.29 32.68 49 8.33 4 38 0.38 6.44 2.29 34.97 64 10.62 9 39 0.38 8.35 2.29 37.26 81 12.91 16

10 0.95 13.08 1.45 38.71 100 14.36 2511 0.95 17.81 1.45 40.17 121 15.81 3612 0.95 22.55 1.45 41.62 144 17.27 4913 0.98 27.42 1.43 43.05 169 18.70 6414 0.98 32.30 1.43 44.48 196 20.13 8115 0.98 37.18 1.43 45.92 225 21.56 10016 0.75 40.94 1.63 47.55 256 23.19 12117 0.75 44.71 1.63 49.18 289 24.82 14418 0.75 48.47 1.63 50.80 324 26.45 16919 0.73 52.11 1.66 52.46 361 28.11 19620 0.73 55.75 1.66 54.12 400 29.77 225

Page 18: 1-to-1 Distribution

1818

How’d we do?

• Inventory Cost 25.34

• Shipment Cost 10

• Total Cost 35.34

• Is that any good?

Page 19: 1-to-1 Distribution

1919

Optimum Answerset Periods;

param Demand{Periods};

table DemandTable IN "ODBC""DSN=Wagner""Demand":Periods<-[Period], Demand;

read table DemandTable;

param FixedTransp := 1;param VarTransp := 1;param Holding := 1; /* $/unit/period */

var Inv{Periods} >= 0; /* Shipment quantity */var Ship{Periods} binary; /* Whether or not we ship */var Q{Periods} >= 0; /* Shipment size */

Page 20: 1-to-1 Distribution

2020

One Model

minimize TotalCost:

sum{t in Periods} FixedTransp*Ship[t] +

sum{t in Periods} VarTransp*Q[t] +

sum{t in Periods} Holding*Inv[t];

s.t. InitialInventory:

Q[1] - Inv[1] = Demand[1];

s.t. DefineInventory{t in Periods: t > 1}:

Inv[t-1] + Q[t] - Inv[t] = Demand[t];

s.t. SetupOrNot{t in Periods}:

Q[t] <= Ship[t]*sum{k in Periods: k >= t} Demand[k];

Page 21: 1-to-1 Distribution

2121

Comparison

• Optimum Solution 25.5

• Answer from CA Method 35.3

Page 22: 1-to-1 Distribution

2222

Why so Bad?

• D’(t) changes pretty wildly

t D'(t)1.00 0.12 2.00 0.12 3.00 0.12 4.00 0.05 5.00 0.05 6.00 0.05 7.00 0.38 8.00 0.38 9.00 0.38

10.00 0.95 11.00 0.95 12.00 0.95 13.00 0.98 14.00 0.98 15.00 0.98 16.00 0.75 17.00 0.75 18.00 0.75 19.00 0.73 20.00 0.73

0

0.2

0.4

0.6

0.8

1

1.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

0

10

20

30

40

50

60

D'(t)

D(t)

Page 23: 1-to-1 Distribution

2323

More on the Optimization Modelset Periods;

param Demand{Periods};

table DemandTable IN "ODBC"

"DSN=Wagner"

"Demand":

Periods<-[Period], Demand;

read table DemandTable;

param FixedTransp := 1;

param VarTransp := 1;

param Holding := 1; /* $/unit/period */

var Ship{Periods} binary;

/* Amount we ship in period s that meets demand in period t */

var Q{s in Periods, t in Periods: t >= s} >= 0;

Page 24: 1-to-1 Distribution

2424

A Better Model

minimize TotalCost:

sum{t in Periods} FixedTransp*Ship[t] +

sum{s in Periods, t in Periods: t >= s} VarTransp*Q[s,t] +

sum{s in Periods, t in Periods: t >= s} (t-s)*Q[s,t];

s.t. MeetDemand{t in Periods}:

sum{s in Periods: s <= t} Q[s,t] = Demand[t];

s.t. ShipOrNot{s in Periods, t in Periods: t >=s}:

Q[s,t] <= Ship[s]*Demand[t];

Page 25: 1-to-1 Distribution

2525

Why’s it Better• Solves faster

• LP relaxation closer to MIP solutions

• Didn’t aggregate constraints

Q[s,t] <= Ship[s]*Demand[t]

• Implies

sum{t in Periods: t >= s} Q[s,t]

<= Ship[s]*sum{t in Periods: t>= s} Demand[t];

Q[s] <= Ship[s]*sum{t in Periods: t >= s} Demand[t];

Page 26: 1-to-1 Distribution

2626

Back To Wagner - Whitin

• A Computationally intensive Dynamic Programming Procedure for solving

• Why?

• Advantage/Disadvantage of CA over MIP

Page 27: 1-to-1 Distribution

2727

Aside on Importing Data

• ODBC = Open Data Base Connectivity

• ODBC Administrator : Control Panel

• DSN = Data Source Name

• Driver = Method for reading the DSN, e.g., Excel 97

• Security and other features

Page 28: 1-to-1 Distribution

2828

With AMPL

• Table <<tablename>> IN “ODBC”

• “DSN=<<dsnname>>”

• “tablename”:

• definedset <- [index], parametername~columnname, …;

• IN, OUT, INOUT

• SQL= sql statement