Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit...

38
SCperf: An inventory management package for R Marlene Marchena [email protected] Department of Electrical Engineering Pontifical Catholic University of Rio de Janeiro - Brazil.

Transcript of Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit...

Page 1: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

SCperf: An inventory management package for R

Marlene [email protected]

Department of Electrical EngineeringPontifical Catholic University of Rio de Janeiro - Brazil.

Page 2: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Outline

� Inventory

� The basic Economic Order Quantity (EOQ) model� EOQ assumptions� Derivation of the model

� Inventory models

� What is SCperf?

� EOQ() example

� Bullwhip Effect (BE)� Measuring the BE� Measuring the BE for a generalized demand process� SCperf()

� Why did we develop SCperf?

Page 3: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Inventory

� What is inventory?

Stock of items kept to meet future demand

� Why to hold inventory?

To protect himself against irregular supply and demand

� Inventory Control Decisions

Objective: To minimize total inventory cost

Decisions:

� How much to order?� When to order?

Page 4: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Inventory

� What is inventory?

Stock of items kept to meet future demand

� Why to hold inventory?

To protect himself against irregular supply and demand

� Inventory Control Decisions

Objective: To minimize total inventory cost

Decisions:

� How much to order?� When to order?

Page 5: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Inventory

� What is inventory?

Stock of items kept to meet future demand

� Why to hold inventory?

To protect himself against irregular supply and demand

� Inventory Control Decisions

Objective: To minimize total inventory cost

Decisions:

� How much to order?� When to order?

Page 6: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

EOQ assumptions

1. Instantaneous production,

2. immediate delivery,

3. deterministic demand,

4. constant demand,

5. known fixed setup costs,

6. no shortages are allowed,

7. single product.

Page 7: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

EOQ modelNotation:D: demand per time unit,h: holding cost per unit and time unit,c: unit cost for producing orpurchasing each unit.

A: ordering or setup cost,Q: batch quantity,T : cycle time= Q/D

Total cost per cycle = A + cQ +hQ2

2D

Total cost per unit time =A + cQ + hQ2/2D

Q/D=

DA

Q+ cD +

hQ

2h

Page 8: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

EOQ modelNotation:D: demand per time unit,h: holding cost per unit and time unit,c: unit cost for producing orpurchasing each unit.

A: ordering or setup cost,Q: batch quantity,T : cycle time= Q/D

Total cost per cycle = A + cQ +hQ2

2D

Total cost per unit time =A + cQ + hQ2/2D

Q/D=

DA

Q+ cD +

hQ

2h

Page 9: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

EOQ modelNotation:D: demand per time unit,h: holding cost per unit and time unit,c: unit cost for producing orpurchasing each unit.

A: ordering or setup cost,Q: batch quantity,T : cycle time= Q/D

Total cost per cycle = A + cQ +hQ2

2D

Total cost per unit time =A + cQ + hQ2/2D

Q/D=

DA

Q+ cD +

hQ

2h

Page 10: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

We have that∂TC

∂Q=

D

QA +

Q

2h,

then Qopt =

√2DA

hand Topt =

Qopt

D

Reorder Point: order when the inventory position is equal to zero.

Page 11: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production,

⇐ Finite production rate

2. immediate delivery,

⇐ Lags can be added

3. deterministic demand,

⇐ Stochastic demand

4. constant demand,

⇐ Time-varying demand

5. known fixed setup costs,

⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 12: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery,

⇐ Lags can be added

3. deterministic demand,

⇐ Stochastic demand

4. constant demand,

⇐ Time-varying demand

5. known fixed setup costs,

⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 13: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand,

⇐ Stochastic demand

4. constant demand,

⇐ Time-varying demand

5. known fixed setup costs,

⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 14: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand, ⇐ Stochastic demand

4. constant demand,

⇐ Time-varying demand

5. known fixed setup costs,

⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 15: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand, ⇐ Stochastic demand

4. constant demand, ⇐ Time-varying demand

5. known fixed setup costs,

⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 16: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand, ⇐ Stochastic demand

4. constant demand, ⇐ Time-varying demand

5. known fixed setup costs, ⇐ Constraint approach

6. no shortages are allowed,

⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 17: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand, ⇐ Stochastic demand

4. constant demand, ⇐ Time-varying demand

5. known fixed setup costs, ⇐ Constraint approach

6. no shortages are allowed, ⇐ Shortages are allowed

7. single product.

⇐ Multiple products

Page 18: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Modification of the basic model

1. Instantaneous production, ⇐ Finite production rate

2. immediate delivery, ⇐ Lags can be added

3. deterministic demand, ⇐ Stochastic demand

4. constant demand, ⇐ Time-varying demand

5. known fixed setup costs, ⇐ Constraint approach

6. no shortages are allowed, ⇐ Shortages are allowed

7. single product. ⇐ Multiple products

Page 19: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 20: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 21: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 22: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 23: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 24: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 25: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

What is SCperf?

An R package for inventory control.

â Inventory models

o Economic Lot Size Models with Constant Demands

Economic Order Quantity, EOQ()Economic Production Quantity, EPQ()

o Economic Lot Size Models with Varying Demands,

Wagner-Whitin algorithm, WW()

o Stochastics Inventory Models

Newsvendor model, Newsvendor()

â Safety Stocks, SS()

â Inventory and Supply Chain Management (SCM)

The bullwhip effect, bullwhip() and SCperf()

Page 26: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

EOQ() function

Implements the basic (and with planned shortages) EOQ model

Example:> EOQ(8000,12000,0.3)

Q25298.22

T3.16

TVC7589.47

Page 27: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

The Bullwhip Effect (BE)

Definition: The BE is the increase of the demand variability as onemoves up the supply chain.

Page 28: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Quantifying the BEA common index used to measure the BE is:

M =Var(qt)

Var(dt)

� M = 1, there is no variance amplification.

� M > 1, the BE is present.

� M < 1, smoothing scenario.

Zhang 2004:

M = 1 +2∑L

i=0

∑Lj=i+1 ψiψj∑∞

j=0 ψ2j

Page 29: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Quantifying the BEA common index used to measure the BE is:

M =Var(qt)

Var(dt)

� M = 1, there is no variance amplification.

� M > 1, the BE is present.

� M < 1, smoothing scenario.

Zhang 2004:

M = 1 +2∑L

i=0

∑Lj=i+1 ψiψj∑∞

j=0 ψ2j

Page 30: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Quantifying the BEA common index used to measure the BE is:

M =Var(qt)

Var(dt)

� M = 1, there is no variance amplification.

� M > 1, the BE is present.

� M < 1, smoothing scenario.

Zhang 2004:

M = 1 +2∑L

i=0

∑Lj=i+1 ψiψj∑∞

j=0 ψ2j

Page 31: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Quantifying the BEA common index used to measure the BE is:

M =Var(qt)

Var(dt)

� M = 1, there is no variance amplification.

� M > 1, the BE is present.

� M < 1, smoothing scenario.

Zhang 2004:

M = 1 +2∑L

i=0

∑Lj=i+1 ψiψj∑∞

j=0 ψ2j

Page 32: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Quantifying the BEA common index used to measure the BE is:

M =Var(qt)

Var(dt)

� M = 1, there is no variance amplification.

� M > 1, the BE is present.

� M < 1, smoothing scenario.

Zhang 2004:

M = 1 +2∑L

i=0

∑Lj=i+1 ψiψj∑∞

j=0 ψ2j

Page 33: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

The modelInventory model

� Two stage supply chain

� Single item with no fixed cost

� OUT replenishment policy

� MMSE as forecast method

Define:

dt : demandL: lead timeyt = D̂L

t + z σ̂Ltz : Φ−1(α)SSLT = z σ̂Lt

qt : order quantityα: the desired SLD̂Lt =

∑Lτ=1 d̂t+τ

σ̂Lt =√

Var(DLt − D̂L

t )

SS = zσd√L

qt = yt − (yt−1 − dt) = (D̂Lt − D̂L

t−1) + z(σ̂Lt − σ̂Lt−1) + dt

Page 34: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

SCperf()

Computes the BE and other SC performance variables.

Usage: SCperf(ar, ma, L, SL)

Arguments:

� ar : a vector of AR parameters,

� ma: a vector of MA parameters,

� L: is the LT plus the review period which is equal to one,

� SL: service level, 0.95 by default.

Example:

> SCperf(0.95, 0.1, 2, 0.99)

bullwhip1.5029

VarD12.3077

VarLT5.2025

SS11.5419

SSLT5.3062

z2.3264

Page 35: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Why did we develop SCperf?

� Educational purposes:to offer to useRs, teachers, researchers and managers a free,open-source, package for inventory control

� Managerial purposes:might be used as an alternative (or complement) to otherSCM commercial packages.

� The long-term goal of SCperf is to implement the lastresearch in inventory control theory as well as all thestate-of-the-art capabilities that are currently available incommercial packages.

Page 36: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Why did we develop SCperf?

� Educational purposes:to offer to useRs, teachers, researchers and managers a free,open-source, package for inventory control

� Managerial purposes:might be used as an alternative (or complement) to otherSCM commercial packages.

� The long-term goal of SCperf is to implement the lastresearch in inventory control theory as well as all thestate-of-the-art capabilities that are currently available incommercial packages.

Page 37: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Why did we develop SCperf?

� Educational purposes:to offer to useRs, teachers, researchers and managers a free,open-source, package for inventory control

� Managerial purposes:might be used as an alternative (or complement) to otherSCM commercial packages.

� The long-term goal of SCperf is to implement the lastresearch in inventory control theory as well as all thestate-of-the-art capabilities that are currently available incommercial packages.

Page 38: Marlene Marchena marchenamarlene@gmail€¦ · D: demand per time unit, h: holding cost per unit and time unit, c: unit cost for producing or purchasing each unit. A: ordering or

Thank you for your attention!

Marlene S. [email protected]