Inventory Optimization
Inventory Optimization
Inventory Optimization
Nicolas Vandeput
Inventory Optimization
I think that there is only one way to science—or to philosophy, for that matter: to
meet a problem, to see its beauty and fall in love with it; to get married to it, and
to live with it happily, till death do you part—unless you should meet another and
even more fascinating problem, or unless, indeed, you should obtain a solution.
But even if you obtain a solution, you may then discover, to your delight, the
existence of a whole family of enchanting though perhaps difficult problem
children for whose welfare you may work, with a purpose, to the end of your days.
Karl Popper, Realism and the Aim of Science
Acknowledgments
I would like to thank the many friends, practitioners and academics
who have helped me reach the level of excellence I was pursuing
throughout the writing of this book.
First and foremost, I would like to warmly thank my friend
Gwendoline Dandoy for her help. Chapter after chapter, she
carefully hunted down mistakes and inconsistencies, allowing the
content of this book to be clearer, simpler and more consistent.
Thank you, Gwen.
I would like to thank the publishing team at De Gruyter: Jeffrey
Pepper, Jaya Dalal, as well as Mary Sudul for their incredible work,
support and trust.
The help of many experts and practitioners was essential to the
writing of this book. I am particularly grateful to three of them for
their invaluable help, reviews, advice and corrections. Koen
Cobbaert (Director at PwC) for our discussions about backorders,
lost sales and multi-echelon inventory optimization. Stefan de Kok
(Wahupa CEO & Founder) for our discussions about safety stock
and probabilistic forecasts (his book An Introduction to Probabilistic
Planning and Forecasting will be available by the end of 2020). Steven
Pauly (Research Scientist at Slimstock) for our discussions about
various inventory models, the tremendous number of models and
papers he advised me about and his careful review of all the math
included in this book.
I also had the great pleasure of discussing concepts with Professors
Ton de Kok (Eindhoven University of Technology), Stephan Graves
(MIT) and Sean Willems (Haslam Chair in Supply Chain Analytics at
University of Tennessee). Ton de Kok for his help on single-echelon
inventory policies; Stephan Graves and Sean Willems for their help
on multi-echelon inventory policies.
Special thanks goes to the whole Qalinca research unit (Université
Libre de Bruxelles) and in particular Professor Alassane Ndiaye, for
his advice and kind support. I am also grateful to my colleagues:
Alexis Nsamzinshuti, Haingo Rabarijaona, Yasin Tadayonard and
Carole Biloé, and to my previous students Lynda Dhaeyer and Fanny
Marcelis, who all provided me with continuous support and
numerous reviews.
I would also like to extend my sincere thanks to my friends Romain
Faurès, François Grisay and Charles Hoffreumon for their numerous
reviews and invaluable advice. Romain for his dedicated reviews
and spot-on remarks, François for his consultant point of view
(usually shared in cafés and restaurants) and Charles for his
statistician point of view (usually shared in his office at the
university).
A special thanks goes to Joannes Vermorel (Lokad CEO) who has
been a constant source of inspiration to me since we first started
working on Bridgestone inventory optimization models in 2017. You
can see Joannes and myself discussing inventory and forecasting on
YouTube.1 Joannes published his book The Quantitative Supply Chain
in 2018.2
I can also always count on the LinkedIn supply chain community. I
would like to especially thank Niels De Smet (PhD researcher at
Solventure & UGent) for his help on multi-echelon models, Suraj
Vissa, Steve Frampton and Guillaume De Bruycker for their help,
corrections and reviews. The reliability of the supply chain
community on LinkedIn is impressive: no matter the question, there
will always be someone there to help you.
I also had the great pleasure of working with my Bridgestone
colleagues Jon San Andres, Niek Vaessen and Henri-Xavier Benoist.
Year after year, our team managed to consistently deliver new
models by pushing data science in supply chains further.
Last but not least, my friend Nathalie Dufour for her reviews—she
allowed me to make the first part of the book more clear. Finally,
special thanks to my family Veronique and Pierre Vandeput-Dellis,
Caroline and Quentin Vandeput-Mortier as well as my friends Bruno
and Emmeline Deremince-Everaert and Nicolas and Flore Pary-
D’Argent for their support throughout 2019.
Nicolas Vandeput
February 2020
→[email protected]
About the Author
Foreword
What makes a supply chain great? As supply chains are made of
people, a frequent answer is great leadership is what it takes.
Indeed...but great is vague. More specifically, what sort of qualities
and competencies should a company seek to foster among its
supply chain management? The 20th century answer to this
question has primarily been reliable, diligent, energetic if not
charismatic leaders, capable of organizing the work of thousands of
workers, and literally creating the mass production supply chains as
we know them today.
Yet, with the advent of the barcode reader, supply chains had, by
the end of the 20th century, already outgrown the direct capabilities
of the human mind, even the most talented ones. There are too
many SKUs, too many suppliers, too many clients, too many
channels to expect management to sort it all out through sheer
willpower. Instead of directly controlling fine-grained supply chain
decisions, companies transitioned toward indirect management
through software.
In this respect, supply chain management has been lagging behind.
Factories have been heavily automated for over two decades—a few
verticals such as textiles aside. Warehouses are getting there and
will be almost exclusively automated by the end of the 2020s.
Transportation still faces the last mile problem that resists
automation, but within one decade—two at most—autonomous
vehicles will be commonplace and deliver the last major
productivity gains to be ever observed in supply chains. Beyond this
point, blue collar jobs will have almost completely disappeared from
supply chains.
Yet, software-driven supply chain management takes a fairly
distinctive skill set compared to people-driven supply chain
management. Being great at software takes a hacker mindset that
emphasizes tinkering with programs or machines, experimenting
for fun and profit, and treating reverse engineering as much as a
learning opportunity as a way to hack your way into a better
system. This hacker mindset wasn’t part of the recipe for 20th
century leadership, and yet, I firmly believe it will be the
cornerstone of 21st century leadership.
In this book Inventory Optimization: Models and Simulations, Nicolas
Vandeput hacks his way through the maze of quantitative supply
chain optimizations. This book illustrates how the quantitative
optimization of 21st century supply chains should be crafted and
executed. This book is based on many years of experience, earned
the hard way from the supply chain trenches of large companies.
With usually no more than 10 lines of Python, Nicolas Vandeput
revisits classic models and turns mathematical models into
actionable pieces of software. Doing so, Nicolas demystifies the
discourse of (most?) large software vendors in supply chain who—
under the guise of Big Data/AI/Demand Sensing (pick your
buzzword)—end up delivering less than what Nicolas achieves with
highly accessible tools, be it Excel or Python.
Also, after revising the classics, the last five chapters, starting from
“Beyond Normality,” venture into hard problems that do not have
nice, closed-form, analytical solutions. Yet, once again, the book
delivers the hands-on demonstration that even tough problems can
be brute-forced to some extent with histograms, kernels or Monte
Carlo algorithms.
The optimization of the 21st century supply chain will be driven by
hackers. Hackers share insights, but more importantly, they share
code as well. Nicolas Vandeput is at the forefront of a new and
better way of doing supply chains, and thanks to a richly illustrated
book, where every single situation gets its own illustrating code
snippet, so could you.
Joannes Vermorel
March 2020
Introduction
Supply chains are complex.
In the current business landscape of our global economy, supply
chains and businesses are made of international networks of
suppliers and clients. As the competition became fiercer on quality
and price, the pressure increased on supply chain execution. And its
management only grew more complex. The catalog of products
each company is offering is ever expanding—despite their best
efforts to keep it limited. This is mainly due to an increased (global)
competition pressure; and a wave of customization and product
innovation that started during the second half of the 20th century.
As businesses are dealing with more products, the average life-cycle
is becoming shorter and the demand variability is increasing. On
top of this, international supply chains result in longer lead times,
imposing more constraints on operational planning.
The complexity of supply chains is also due to all the humans—us!
—interacting with each other over long distances, with different
tools, capabilities and information. More importantly, even if
business leaders strive to align their teams, each actor is pursuing
its own objectives often resulting in divergent actions.
For better or for worse, inventories lie at the bottom of these
complex supply chains. The central question of how much
inventory is needed, and where it is needed, is often an endless
debate among colleagues. Especially when the game of politics
drives decisions.
Impact of Inventory
Based on the 30th Annual Council of Supply Chain Management
Professionals State of Logistics Report,1 inventory yearly costs
accounted for around $500 billion in the US in 2018 (around 2% of
US GDP). These are more or less equally spread between financial
costs, storage costs and other costs (like obsolescence, handling,
insurance). We will discuss holding costs in detail in Chapter →2.
As shown in →Figure 1, the →U.S. Census Bureau (→2019) reports
that the amount of inventory for manufacturers, wholesalers and
retailers has been rather flat for the last four years at around 1.4
months of sales (their all-time low was in 2010, with inventory levels
10 to 15% lower).
Inventory Modeling
All models are wrong, but some are helpful.
George Box (1919–2013)
Models
Since the first inventory optimization model was published in 1913
by Harris, academics have published an ever-growing list of
mathematical models to optimize how much inventory should a
supply chain hold, and where it should be stored. Each new set of
equations would tackle a supply chain under another set of
assumptions. A model would discuss supply chains with perishable
products; another one with multiple warehouses; or with a specific
seasonality and production constraints; and so on. Unfortunately,
even the cutting-edge models won’t be enough to perfectly describe
a supply chain.2 As explained by Ton de Kok—professor at the
Eindhoven University of Technology—“Inventory models are
abstractions that cannot capture all possible actions to balance supply
and demand.” We are only at the beginning of our journey of
inventory optimization and yet we already know that perfection is
out of reach. And most likely will be forever.
Simulations
An equation can’t handle the complexity of a modern supply chain,
but we can nevertheless try to simulate it. Simulations can either be
used to test the outcome of a mathematical model; or they can be
used to find a good-enough policy when no equations are up to the
challenge. In the final part of the book, you will learn to use
simulations to optimize inventory policies. Simulations will allow
you to cope with much more complexity than equations, but this
will come at a cost: longer computation times and variable results.
We will discuss in Chapter →13 how to overcome these limitations.
Limitations and Assumptions
Throughout the book we will pay careful attention to the
assumptions (read limitations) behind the models (and simulations)
we use. We won’t be able to create perfect simulations or models,
but as we understand their weaknesses, we will be able to assess
when it is right to use them (and when we should go for another
model).
Inventory Confusion
Throughout the book we will also discuss major sources of
confusion and sub-optimalities in inventory policies.
Vocabulary and definitions First and foremost, inventory
management suffers from major confusion due to
its terminology: “safety stock,” “reorder point,”
“stock target,” “expected inventory”... These might
all refer to different concepts depending on the
software vendor, consultant or colleague you are
talking to. We will take the time to define each of
these in Parts →I and →II.
Long lead times As the lead times get longer, the spread
between the order up-to level of an inventory policy
and the expected average inventory gets bigger.
We will discuss these in Chapters →3 and →5.
Review period Often practitioners forget to include the review
period of their policies into the computation of
safety stock targets (and only look at the lead time).
You will see how to include the review period in
Chapter →5.
Fill rate vs. Cycle service level A major confusion for
practitioners is how to measure the service level of
an inventory policy. Most of the safety stock models
use the cycle service level whereas most companies
record the fill rate. We will define both in Chapter
→4 and learn to fit our inventory policies to a fill
rate target in Chapter →7.
Optimal service level Finally, the service level targets are often
set as arbitrary numbers. You will see in Chapter
→8 how to set the optimal service level that will
minimize your costs.
Other Resources
In order to help you with the various concepts presented in this
book, there is a glossary and a list of symbols at the end of the
book. Please note that throughout the book you will see that
boldface is used to highlight important text for emphasis.
We will discuss many models, and refer whenever possible to their
initial authors as well as current research and helpful resources.
You can also check the following general resources about inventory
and supply chains:
Inventory and Production Management in Supply Chains by
Edward Silver, David Pyke and Douglas Thomas.7 The authors
are well-known professors in the field of inventory
management and operation management; their book is most
likely one of the main reference for PhD students as it
includes a thorough literature review and covers many topics
in-depth.
Matching Supply with Demand: An Introduction to Operations
Management by Gérard Cachon and Christian Terwiesch.8 The
book offers an introduction to many supply chain subjects: it
is great as a textbook for students.
Inventory Control by Sven Axsäter.9 This (mathematical)
reference book covers in detail various inventory models
(mainly continuous ones).
Next to these reference books, you can also check the shorter
Inventory Management in Supply Chain Networks from Horst
Tempelmeier.10 It also focuses on mathematical models.
You can also register to the excellent online class Supply Chain
Fundamentals proposed by MIT on the online platform edX.11
It covers various inventory optimization models as well as
forecast models.
MIT also offers the online class “Supply Chains for
Manufacturing I” on edX.12 This class covers inventory and
forecast models and is given by Stephen Graves and Sean
Willems—known for their research work in the field of
inventory optimization (we will discuss their models in
Chapter →10).
Tools
As a painter needs the proper brush, the inventory analyst needs
the proper tools to create her or his model. We will use two tools to
build our models, experiment and share our results.
Excel
Excel is the data analyst’s Swiss knife. It will allow you to easily
perform simple calculations and plot data. The big advantage of
Excel, compared to any programming language, is that you can see
the data. It is much easier to debug a model or to test a new one if
you see how the data is transformed by each step of computation.
Therefore, Excel can be a first go-to to experiment with new models
or data.
Excel also has many limitations. It won’t perform well on big
datasets and will hardly allow us to automate difficult tasks. It is
therefore a good tool to test ideas and models on small datasets, or
to visualize data, but it is not our preferred tool to create complex
or massive models.
Python
Python is a programming language initially published in 1991 by
Guido van Rossum, a Dutch computer scientist. If Excel is a Swiss
knife, Python is a full army of construction machines awaiting
instructions from an analyst. Python will allow you to perform
computations on huge datasets in an automated, fast and simple
way. It also comes with many libraries dedicated to data analysis
(pandas), data visualization (Seaborn and Matplotlib), scientific
computations (NumPy and SciPy) and machine learning (scikit-
learn). These will soon be your best friends, if they aren’t already.
Why Python?
We chose Python over other programming languages because it is
both user-friendly (it is easy to read and understand) and one of the
most used programming languages in the world. In 2019, it was the
programming language that was the most googled and it is the
most commonly used for machine learning and deep learning.
Python Libraries
Perfection is finally attained not when there is no longer anything to add, but
when there is no longer anything to take away.
Antoine de Saint-Exupéry (1900–1944)
Other Resources
You can download the Python codes shown in this book on
→supchains.com/resources-invopt (password: SupChains-IO).
There is also a glossary (and an index) at the end of the book where
you can find a short description of all the specific terms we will use.
Do not hesitate to consult it if you are unsure about a term or
acronym.
Part I Deterministic Supply Chains
1 Inventory Policies
An inventory policy determines how much and when a product should be
ordered (or produced).1 Inventory policies determine how the products flow
through a supply chain. We can categorize them into two types, based on
when the inventory review is done:
Continuous review policies: an order can be made at any time.
Periodic review policies: the orders can only be made at specific times.
Let’s discuss in detail three of the main inventory policies used in practice.
Advantages
This policy is safe (i. e., the risk of being out-of-stock is low) as it assumes you
can make an order whenever you need to. It is therefore a good policy for
expensive and/or important items that need to be monitored closely.
Another important advantage of this policy is that you can optimize the
order quantity based on some (often obvious) constraints or costs. For
example, you might get a rebate if you order a full pallet or a truckload. With
such a policy you are sure to get the reduction each time you make an order.
Limitations
First, it won’t allow you to group into a single order different items with
a single supplier. Imagine that you supply a hundred different products
from a single-favorite supplier: you might want to simplify your operations
and buy all these products at once (in one single order) instead of doing
different orders multiple times a day, when each one of your items needs to
be replenished.
Then, we assume that a client can make an order with its supplier at
any time. In reality, this might not be the case. For example, a supplier
might only accept orders once a month (or only send one shipment a month
—which is the same). In such a case, it is foolish to think that you would
follow a fixed reorder point policy, as the supplier is actually following its
own calendar.
Finally, the pure theoretical mathematical model of this policy (that we
will discuss in the following chapters) assumes that each client can only
buy one product at a time, so that the reorder point will always be perfectly
reached.
In practice, these assumptions are not often respected. A pure
continuous policy is therefore exceptional (some fully automated production
processes, or internal processes, could follow these assumptions). It is
therefore used as a (useful) theoretical simplification.
Notation
The fixed reorder point policy is noted (s, Q) , with s the reorder point and Q
the fixed order quantity.
Advantages
This periodic replenishment policy (with an order up-to level) is actually the
most common inventory policy because it allows businesses to group their
orders with each of their suppliers. This will help both clients and suppliers
to streamline their operations as they can plan orders and workload in
advance, and define a periodic review process.
A periodic replenishment policy is also often forced onto supply chains
by the use of a MRP/DRP.2 These tools follow a predefined schedule—often
daily or weekly—resulting in the implicit use of a periodic review policy.
Limitations
As we will discuss later in Chapter 4, “Safety Stocks,” this policy is riskier, due
to the blind spot it creates: you cannot order in-between two review periods.
If you make an order every Friday with your supplier, but are out-of-stock on
Monday evening, you will have to wait four more days before making a new
order. You will possibly suffer lost sales due to being out-of-stock in the
meantime. That is riskier than the fixed reorder point policy, where you
would have made a new order directly on Monday evening.
Another issue is that the order quantity will vary at each order. This
might disrupt a smooth operational flow. If you have a palletized product,
you might not want to remove the packaging around an entire pallet in
order to get a single unit.
Notation
The fixed review period policy is often noted (R, S) , with R being the fixed
review period and S the up-to level. Don’t get confused by the notation:
academics usually use s to denote the reorder point and S to denote the
order up-to level. As a mnemonic device, lowercase s denotes a minimum
amount of stock, and uppercase S a maximum.
1.3 Policy #3 – Periodic Review, Reorder Point and Fixed Order
Quantity
We just discussed a first inventory policy that offered us the convenience of a
fixed order quantity, and a second that gave us the convenience of a fixed
review period. We can then create an inventory policy combining the best of
both worlds in terms of operational convenience. This policy will consist of
making orders of fixed quantity Q, based on a fixed schedule, if the inventory
level reaches a threshold s (see →Figure 1.3).
Figure 1.3 Period review with reorder point and fixed order quantity: “Order
10 pieces every 4 days only if inventory level reaches 5 pieces.”
Limitations
The risk is high with this kind of policy: we have a review period possibly
blocking us from making an order when we need it; on top of that, we will
only make an order if the stock reaches a certain threshold. This extra risk
will need to be compensated for by an extra amount of safety stock,
resulting in higher inventory levels and costs. Besides, this policy is also
much more difficult to optimize mathematically, and therefore less discussed
in the academic literature.3 As the models become too complex (and based
on too many assumptions), we will optimize this policy with simulations in
Chapter →13.
Notation
We will note this policy (R, s, Q) , where R denotes the fixed review period, s
the fixed reorder point, and Q the fixed order quantity. This policy is also
sometimes noted (R, s, n ⋅ Q) if we can order a multiple of Q units at once
(typically in the case of truckload or packaging constraints).
(R,s,S) Policy
We can imagine an (R, s, S) policy, where the inventory is reviewed
periodically and, if the inventory level reaches a threshold s, an order is
placed up-to a certain level S. Again, such policies are more difficult to
optimize mathematically—yet analyzed since at least the 1960s—and are,
therefore, out of scope for this book.4
Multi-Sourcing
We can also create even more complex policies. For example, in order to
reduce the supply risk, it is rather common for a supply chain to have an
emergency supply lane in addition to a regular supply lane with a preferred
supplier. As the behavior of these policies become more complex, it will
become impossible to solve them perfectly based on tractable5 models.
That, of course, is not a reason not to use them. The question should be:
how can we approximate these policies in order to get a useful and
understandable model? Even if we cannot create such a model, we have
another tool to optimize these: running simulations. We will discuss this
technique in Chapter →13, “→Simulation Optimization.”
1.6 Recap
An inventory policy defines when an order needs to be made and how
many units should be ordered. We can categorize them between continuous
and periodic review inventory policies. A policy can be defined by different
parameters:
the order up-to level S
the review period R
the order quantity Q
the reorder point s
We analyzed three policies:
(s, Q) A continuous review policy with a reorder point s and a fixed
order quantity Q.
+ Pros: low amount of safety stock needed;
optimized order quantity.
- Cons: continuous review needed; multiple
items cannot be grouped in one order with
one supplier.
See Section →1.1.
(R, S) A periodic review policy following a review period R and an
order up-to level S.
+ Pros: multiple items can be grouped in one
order with one supplier.
- Cons: more safety stock needed; order
quantity varies and can’t be optimized.
See Section →1.2.
(R, s, Q) A periodic review policy following a review period R, with a
reorder point s and a fixed order quantity Q.
+ Pros: can group multiple items in one order
with one supplier; optimized order quantity.
- Cons: even more safety stock needed;
optimization is difficult.
See Section →1.3.
2 How Much Should I Order?
The policies discussed in Chapter →1 come with questions:
Fixed reorder point: What is the optimal order quantity? What is the best
reorder point?
We begin the discussion about these subjects in Chapter →2.
Periodic replenishment and order up-to level: What should be the up-to
level? What is the optimal review period?
We will discuss these in Chapter →3.
In order to answer these questions, we will follow the Model-Optimize-Apply-
Learn framework shown in →Figure 2.1. We will first model the costs of our
supply chain, based on the order quantity. Then we will optimize this model
(i. e., find the optimal order quantity that minimizes costs) in order to find
the optimal order quantity. We can finally apply this optimal order quantity
in a supply chain to update its inventory policies.
In this supply chain, the maximum inventory level we can have is Q and the
lowest is 0. Because the demand is constant, the inventory will decrease
uniformly from its maximum Q to its minimum 0: this means that we will
have in stock Q/2 pieces on average. This is very interesting as, in other
words, once the order quantity Q is set, the average inventory level is
independent from the demand or the number of transactions per year. We
will call this stock the cycle stock.
€
In this equation, h is expressed as a cost per year per unit ( unit⋅year
) . In the
literature h is typically expressed as a percentage of the cost ( 1
unit⋅year
) .1
The holding costs equation becomes
Q
Holding Costs = (h ⋅ c)
2
Change-over Time
Let’s assume that we have a yearly demand of D pieces. During the year, one
way or another, we will have to order these pieces from our supplier. If we
assume that we will always order a fixed quantity of Q pieces with the
supplier (same assumption as for the holding costs above), we know that we
will have to do D/Q transactions throughout the year to cover the demand.
The yearly number of transactions we will have to make with our supplier is
inversely proportional to the order quantity Q. The more you order at once,
the fewer transactions you will need.
Let’s define k as the fixed cost of a single transaction and c as the
T
variable transaction costs. The total yearly transaction costs will be equal
to the fixed cost k multiplied by the number of transactions per year ( D/Q ),
plus the variable costs c multiplied by the total yearly demand D.
T
D
= k + cT D
Q
Holding costs are proportional to the order quantity, but fixed transaction
costs are inversely proportional to the order quantity (as shown in
→Figure 2.5). The intuition is: as you order more at once (Q is big), you will
need to do fewer transactions with your supplier (or fewer different
production batches), resulting in fewer transaction costs.
Figure 2.5 Yearly transaction costs.
Q D
C (Q)= h + k + cT D
2 Q
Where 𝓒(Q) denotes the total (holding and transaction) costs based on Q.
We observe that:
Only the variable holding costs ( h ) and the fixed transaction costs (
Q
k
D
Q
) depend on the order quantity Q.
The variable transaction costs ( c D ) only depend on the total demand
T
D. No matter the order quantity, the total variable transaction costs will
be the variable transaction cost per unit multiplied by the yearly
number of units sold.
Since we are interested in minimizing the supply chain costs based on the
order quantity, we can simplify our model by only keeping what is relevant
for us. In our current model, we can remove everything that is not
dependent on the order quantity. The costs are then expressed as:
Q D (2.1)
𝓒(Q)=h + k
2 Q
→Figure 2.6 shows how transaction and holding costs behave based on Q.
We are interested in the order quantity that minimizes the total costs.
We note the optimal order quantity Q or EOQ (for Economical Order
∗
this we will compute the derivative of the total costs by Q and set it to zero.
∂C (Q)
∗
= 0 ⇔ Q = Q
∂Q
Q D
∂C (Q) ∂(h + k )
2 Q
=
∂Q ∂Q
h D
= − k
2
2 Q
h D (2.2)
− k = 0
∗2
2 Q
∗
2kD
Q = √
h
the minimal cost C by replacing Q in the total costs equation (eq. →2.1 in
∗
Section →2.2.1).
∗
∗
Q D
C = h + k
∗
2 Q
2kD
√
h D
= h + k
2 2kD
√
h
proportional to the square root of the holding costs per unit and fixed
transaction costs. This means that in order to reduce the inventory costs, it is
of equal importance to reduce the fixed transaction costs as well as the
yearly variable holding costs per unit. Of course, this relationship only
applies based on the assumption of our simple model, specifically that there
is no demand variation and therefore no safety stock.
holding costs will be equal to the yearly transaction costs (see →Figure 2.6).
2kD
∗ √
Q h √ 2kDh
Holding costs = h = h =
2 2 2
D D √ 2kDh
Transaction Costs = k = k =
∗
Q 2kD 2
√
h
→Figure 2.7, this confirms that, at the optimal order quantity, the
transaction and the holding costs are equal.
Figure 2.7 At the optimal order quantity, the transaction and the holding
costs are equal.
There is actually a feedback loop between the transaction costs and the
holding costs. An increase (or decrease) in either one of them will change
the optimal order quantity so that both costs will be equal again: one will
partially compensate the other’s increase (or decrease).
For example, if your supplier increases the fixed transaction costs, the
model would advise you to increase your order quantity in order to
compensate for this with a reduced number of transactions. This will result
in more inventory (as the order quantity is higher) and therefore in higher
inventory costs. In other words, if your supplier charges you more per order,
you will want to order more at once to do fewer orders and, in the end, this
increase of the transaction costs will impact your total holding costs as well.
Let’s imagine that you managed to decrease the holding costs per unit—
for example, thanks to a cheaper warehouse. The model will advise you to
increase your order quantity so that you will do fewer transactions per year
and thus keep more inventory. In other words, if you find a cheaper
warehouse, you will want to use your new cheap asset to reduce your costs
by placing bigger orders with your supplier to reduce the number of orders
(but resulting in a higher inventory).
To sum up, based on our (simple deterministic) model, at the optimum,
the total holding costs and the total transaction costs will always be equal.
2.2.5 Forecast or Historical Demand?
In the EOQ formula (eq. →2.2 in Section →2.2.2), we used the historical
demand D. Actually, you can decide to use instead a (demand) forecast
rather than historical numbers. That way, if a trend is observed (or is
projected based on external insights), it can be used to improve the setting
of the optimal order quantity. We then have
∗
2kF
Q = √
h
where F is the forecast (aligned with the periodicity of the holding costs h).
Graphical Intuition
As you can see in →Figure 2.8, in the area close to the optimal order
quantity, the total cost curve is rather flat. The intuition here is that, if you
stay close to Q , you will achieve a total cost very close to the optimal one.
∗
Mathematical Demonstration
Let’s now mathematically prove this graphical intuition. If you are not
interested in this demonstration, don’t hesitate to skip it and go directly to
the paragraph starting with “→Conclusion” below.
Let’s imagine we initially computed an optimal Q and a C based on an
ini ini
where k is the initial estimation we made for the transaction costs; and k
ini
is the final estimation. Typically, we might have missed 20% or 50% of these
costs. It seems to be a big mistake.
Let’s take a look at the EOQ model to see how it behaves with this mistake.
We need to compute the correct Q and C based on the initial estimations
∗ ∗
of Q and C .
ini ini
∗
2kD 2Dαk ini
Q = √ = √ = √ α Q ini
h h
∗
C = √ 2kDh = √ 2Dαk ini h = √ α C ini
We see that the actual optimal order quantity Q is equal to the initial ∗
(wrong) one multiplied by √α . The same holds true for the actual optimal
cost C .∗
If we assumed the transaction costs to be half of the actual value (i. e.,
k = 2k ini ), then our estimation of the optimal costs and order quantity was
off by 41% ( 1.41 = √2 ). This might seems like a big difference, but using
Q ini as an operational order quantity in our supply chain will actually not
result in a huge loss.
Let’s take a look at what would happen to our operational costs if we chose
an order quantity that is different than the optimal one.
D Q
C (Q) k + h
Q 2
=
∗
C (Q ) √ 2kDh
D Q
k h
Q 2
= +
√ 2kDh √ 2kDh
√ kD Q√ h
= +
Q√ 2h 2√ 2kD
∗
1 Q Q
= ( + )
∗
2 Q Q
We now have a good relationship between the two different costs. We can
solve it, as we know that Q = √αQ , so we have:
∗
∗
C (Q) 1 Q Q
= ( + )
∗ ∗
C (Q ) 2 Q Q
1 1
= (√ α + )
2 √α
This ratio is actually rather limited, even for an impressive value of α. For
example, if α = 2 , this ratio will only be 1.06. This is very interesting. It
means that, even if you forgot half of the transaction costs (or the holding
costs), and therefore wrongly estimated the optimal order quantity and total
cost by 41%, your wrong assumption will only result in an extra cost of 6%
compared to the optimal policy.
We also observe that the impact of α on the optimal cost is symmetrical:
the impact of α = 1/2 is the same as the one of α = 2 .
Conclusion
We can expand this conclusion by saying that it is virtually inexpensive to
round the optimal order quantity to a close number in order to simplify
order processing. This helps, for example, to order based on a packaging
requirement, if any.
2.5 Extensions
Various extensions to the original EOQ model have been thoroughly
discussed in the academic literature. Let’s discuss in detail three of them—
production rates, backorders and order discounts—and focus on the various
insights and recommendations we can draw.
Model
Let’s note r the production rate expressed in units produced per period.
We also note d the demand per period. We define the production
throughput ratio ρ as:
d
ρ = 1 −
r
This could be seen as a percentage of capacity available.
Let’s now update our EOQ cost model based on ρ. As shown in →Figure 2.9,
the maximum on-hand inventory is now ρQ instead of simply Q, and the
average inventory is . We then have:
ρQ
D ρQ
Cρ = k + h
Q 2
∗
2kD Q ρ=1
∗
Qρ = √ =
ρh ρ
∗ ∗
C ρ = √ 2kDρh = √ ρ C ρ=1
This model is more general than the initial one we created without
production rate (see Section →2.2.2):
D Q
C (Q) = k + h
Q 2
Figure 2.9 Order pattern with constrained production.
Insights
2.5.2 Backorders
Even if it seems counter-intuitive to many professionals, it is actually optimal
for a supply chain to allow some backorders and not aim for 100% service
level. In other words, it is optimal for a company to have some backorders
instead of serving each and every order directly from the on-hand inventory.
In B2B relationships, backorders can be allowed through negotiation with
suppliers. The contract between a supplier and its client will then stipulate a
backorder penalty (per order, or based on the waiting time).
Model
Let’s define B as the maximum number of backorders we allow in our
inventory policy (the model is shown in →Figure 2.10). We then have an
order pattern that looks like the one in →Figure 2.11.
Q
.
A second phase where the net inventory level is below 0. During
this phase we have backorders because we can’t serve the
demand directly from the on-hand inventory. This lasts for
T
−
= T .
B
Q
Using these relationships, we can estimate the average on-hand level and
the average backorder level by computing the area of the positive and
negative triangles in →Figure 2.12.
+ 2
1 T (Q − B)
Average on-hand level (grey area)= (Q − B) =
2 T 2Q
− 2
1 T B
Average backorder level (hatched area)= B =
2 T 2Q
Let’s now look at the costs of the policy. We will note b the backlog costs
τ
per unit (that is the cost per unit backordered per unit of time—similar to h).
The backlog costs are then,
2
B
Backlog costs = b τ
2Q
2 2
D (Q − B) B
C (Q, B)= k + h + bτ
Q 2Q 2Q
Cost Optimization
Now that we have defined the costs C, based on the order quantity Q, and
the backorder quantity B, we can minimize them. The algebra is out of scope,
see →Grubbström and Erdem (→1999), →Robert et al. (→2004) for the
detailed computation.
∗ ∗
bτ + h 2kD bτ + h
Q B = Q B=0 ⋅ √ = √ ⋅ √
bτ h bτ
∗
h 2kDh
∗
B = QB ⋅ ( ) = √
bτ + h b τ (b τ + h)
∗ ∗
bτ bτ
C = C B=0 ⋅ √ = √ 2kDh ⋅ √
bτ + h bτ + h
D Q
C (Q) = k + h
Q 2
Insights
2.5.3 Discounts
In order to incentivize buyers to increase their order quantities, many
suppliers offer a discount depending on the order quantity (bulk orders).
This can be incorporated into the EOQ model in order to update the optimal
order quantity. In 1963, Hadley and Whitin published in their book Analysis of
Inventory Systems the first model that dealt with such discounts.15 They have
been followed since by many other publications and models that deal with
more complex discounts.16
As a general rule, let’s imagine a supplier offers a volume discount δ (delta)
as of a quantity threshold Q . The volume discount δ is computed as such:
δ
cδ
δ =
c
where c is the product purchase cost and c is the discounted purchase cost.
δ
For example, a supplier could give you a 5% rebate if you buy at least 1000
units at once. δ is then 0.95 and Q = 1000 .
δ
cost c .δ
∗
2kD
Qδ = √
cδ h
2.6 Recap
In this chapter, we asked ourselves a simple question: How much should I
order? We found an answer by optimizing the supply chain costs based on
the order quantity. We obtained a set of equations known as the EOQ
(Economic Order Quantity) model:
Q D
C= h + k (see eq. 2.1 in Section 2.2.1)
2 Q
∗
2kD
Q = √ (see eq. 2.2 in Section 2.2.2)
h
∗
C = √ 2kDh (see eq. 2.3 in Section 2.2.3)
This means that the optimal order quantity Q is proportional to the square
∗
root of the fixed transaction costs k, to the yearly total demand D; and
inversely proportional to the square root of the variable holding costs per
unit h.
We noted that a proper setting of the order quantity balances the
ordering costs against the holding costs, and that high transaction costs will
result in high inventory levels. We saw that the EOQ model is robust to a
wrong evaluation of the transaction costs or the holding costs. This allows us
to round the optimal order quantity (or the optimal time between two
consecutive orders) to streamline our process with only a minimal impact on
the total costs.
3 When Should I Order?
Now that we know how much we should order, we have to find when we
should order. To do so, we will have to discuss two aspects of a supply
chain: the supply (or order) lead time and the review period (as shown in
→Figure 3.1).
s=d L (3.1)
Pay attention to the units of measure: d is the demand per unit of time and L
is the lead time expressed in the same unit of time. We could also compute
dL as D (the yearly demand) times L, if the lead time is expressed in years.
So that we would have d = D ⋅ L .
L
Once an order is made, it takes a lead time L to receive the goods. During
this time L we have Q pieces of in-transit inventory (sometimes called on-
order inventory).
As you can see in →Figure 3.2, we can compute the expected average in-
transit inventory I as the ratio between the lead time L and the cycle time T
s
I s =D ⋅ L=d L
Figure 3.3 Review period and order up-to level policy (R, S) with lead time
L.
1. Order up-to level
The order up-to level is now defined as the demand over the
lead time plus the demand over the review period (noted d R
):
S=d L + d R =d ⋅ L + d ⋅ R (3.3)
2. Cycle stock
The amount of product ordered for each cycle is the demand
over the review period d so that the expected cycle stock
R
level is:
1
Cs = dR
2
3. In-transit inventory
Even if the length of an order cycle changes compared to the
continuous review policy, we would still have the same
expected level of in-transit inventory per cycle:
L L (3.4)
Is = dR = dR
R R
I s =d L
4. Review period
Let’s note T the optimal review period, computed as (see
∗
Finally we have,
(3.5)
∗
2k
T = √
hD
With the first technique—a simple rounding—we set the review period T as a
multiple of a base time period T like a day or a week. If you have the
B
For example, if the base period is 1 week, the optimal review period should
be rounded to either 1, 2, 4, 8, 16... weeks. That way, products will fall into a
smaller number of categories according to their respective optimal review
period, therefore reducing schedule complexity. An example with a base
time period of one week is shown in →Table 3.1.
∗
T
∗
≤ T ≤ 1.41 ⋅ T
1.41
Cost Impact
C (T ) 1 √2 1
≤ ( + ) ≃ 1.06
∗
C (T ) 2 1 √2
This means that, by using the power-of-2 policy, we only take the risk of
increasing the total cost by 6%. That’s in theory. In practice, we are much
more likely to reduce the total cost as we are able to group different orders
into a single transaction.
S= F L + F R
where F is the forecast over the lead time and F the forecast over the
L R
review period.
3.4 Recap
We improved our EOQ model by taking into account the (supply) lead time
as well as the review period (if any). Let’s recap how much we should order
and when we should make an order for the two main policies we discussed
in Chapter →1:
(s, Q) Continuous review policy with a reorder point and a fixed
order quantity.
(R, S) Periodic review policy with an order up-to level.
Reorder point (s, Q) Review Period (R, S)
How much? Order Quantity 2kD Up-to level S = dL + dR
Q = √
h
Expected inventory Cs =
1
2
Q Is = dL Cs =
1
2
dR Is = dL
We saw that as the lead time grows bigger, the up-to level of a fixed review
period policy can’t be assumed to be the expected average stock on-hand.
We will discuss this effect further in Section →5.2 for stochastic supply
chains.
Part II Stochastic Supply Chains
4 Safety Stocks
Buffer or suffer.
So far, we have discussed the EOQ inventory and have gained some insights into this
model. It is suited for simple supply chains that don’t face any kind of uncertainties. But,
in reality, a supply chain does not have a steady flow and does not come without
variation. Supply chains face many random events that simply cannot be predicted,
leading ourselves to questions such as: Are our clients going to buy as much as forecasted?
Is the supplier going to be on time for its delivery? Will we have enough production capacity
to produce these goods on time? Safety stocks are a straightforward way to create a
buffer against these unforeseen events. In this chapter and the next one, we will be
discussing two potential causes of fluctuation in a supply chain:
1. Demand side The actual demand varies over time and is different from
the forecasted demand.
2. Supply side Suppliers can be late compared to the announced (or
negotiated) lead times.
In order to mitigate the risks resulting from these fluctuations, we will create, through
the chapters in this second part, a first model that computes how much safety stock is
needed. As usual, we will create our new model gradually. In this chapter, we will
introduce stochastic demand and build our first stochastic model. Then, we will take the
time to discuss in detail inventory policies and inventory analysis in Chapter →5,
“→Inventory Policies.” Finally, we will introduce stochastic lead times in Chapter →6,
“→Stochastic Lead Times.”
In order to make our first stochastic model, we will have to make a couple of
simplifying assumptions:
The demand and the lead time are continuous random variables. This means
that the demand and the lead time can take any value, not just integers.
We will discuss discrete models (where the demand can only take integer values)
later, in Part →IV, “→Discrete Inventory Optimization.”
They both follow a normal distribution.
We will discuss gamma-distributed demand in Chapter →9, “→Beyond Normality,”
and custom discrete distributions in Chapter →12, “→Discrete Probabilistic
Demand.”
The demand that cannot be fulfilled by on-hand inventory is backordered until
inventory is available (we will re-discuss this assumption in Section →x). In other
words, the excess demand will not result in lost sales.
We will stick to simple inventory policies:
Either a fixed review period with an order up-to level (R, S) .
Or a continuous review with a fixed reorder point and an order quantity
(s, Q) .
More complex inventory policies such as (R, s, Q) or (R, s, S) have been studied
by academics,1 but solving them—even with many assumptions and
simplifications—results in complex mathematical models that are difficult to
implement in practice. We will discuss these later in Chapter →13, “→Simulation
Optimization.”
period (e. g., a day, a week). The period service level can be
similar or different to the cycle service level depending on the length of
an order cycle. It is also much easier to understand than the cycle
service level (“We only have a 5% probability to run out-of-stock by the end
of any given business day”). Due to the mathematical complexity, it is not
common for inventory models to use this service measure.
Nevertheless, we will track it in our simulations.
Client service level The probability that a client receives their full order (often
containing multiple different products) from stock (often called On Time
In Full or OTIF). Due to its modeling complexity, it is not common to use
it in inventory models. Nevertheless, business-wise it might be the most
relevant.
Fill rate β The fraction of the demand (over the long term) that is supplied directly
from the on-hand inventory. It is often called the “Type 2 service level.”
Over the long term we should have (if we assume that a period is shorter than a cycle):
Fill rate β > Client service level > Period service level α p > Cycle service level α
Other service level key performance indicators (KPIs) could also be tracked. For example,
the average backlog per period could also be a relevant KPI. If you divide it by the
average period demand you would get a KPI close to the fill rate (the amount of
backorders/lost sales per period). However, it would be a more conservative approach
since some backorders would stay for multiple periods in the backlog. You can also track
how long on average an order stays in the backlog.
Let’s use, for now, the cycle service level as the metric to measure our service level. We
will discuss the fill rate in Chapter →7, “→Fill Rate.” We will also assume, for now, that we
know how much service level we want to reach. We will discuss later, in Chapter →8, how
to optimize the service level.
2
Demand per period ∼ N (μ d , σ d )
2
∑ (d t − μ d )
√
σd =
n − 1
where n is the number of (historical) demand observations and d the demand at time t.
t
If you are not familiar with the concept of a standard deviation, simple intuition says it is
a measure of how the demand is spread around its mean. A high deviation will simply
represent a demand that fluctuates a lot.
Sample Deviation
In our standard deviation formula, we divided the sum of the deviation by n − 1 and not
simply by n. The rigorous explanation of this trick is outside the scope of this book.
Nonetheless, we can try to estimate the true standard deviation of the demand by
looking at only a few observations: a sample of the true demand. Therefore we want to
be conservative in our estimate by dividing the sum of deviation by n − 1 instead of n,
resulting in a higher estimate of σ than the actual standard deviation of the demand
d
sample at hand.
We will discuss in Parts →II and →III inventory models based on continuous
distributions. This means that we assume that the demand can take any value. In
practice, this is often not the case. Client can often buy products only in specific
packaging (bottles, packs, pallets), and some products simply can’t be cut into arbitrary
pieces (selling 0.13 iPhones makes no sense). Nevertheless, we will first focus on
continuous models since these are easier to implement in practice than discrete models.
We will discuss the latter in Part →IV, “→Discrete Inventory Optimization.”
Statistical Definitions
Before we go back to our demand analysis and inventory level, let’s take some time to
define some important statistical concepts.
The intuition behind the probability density function (PDF) of a random distribution is
that the higher the PDF is around a value, the higher the probability (likelihood) that an
occurrence of the distribution is close to this value. In other words, if the PDF of a
distribution is high around 1, it is likely that an occurrence of this distribution would fall
close to 1. We note f 𝓧 (x) the probability density function of distribution 𝓧
expressed at a value x .
Like any other statistical distribution, a normal distribution is also defined by a PDF. It is
mathematically defined as:
2
1 (x − μ)
f N (x; μ, σ) = ⋅ exp(− )
2
√ 2πσ 2 2σ
The cumulative distribution function (CDF) of a random distribution is the probability for
an occurrence of this distribution to be less than or equal to a certain value. In other
words, the CDF of a random distribution X will tell you how likely it is that an
occurrence x of this distribution is lower than a threshold z. We note F 𝓧 (z) the CDF of
a distribution 𝓧 evaluated at a threshold z .
z
−∞
Again we note Φ(z) (phi) the CDF of a standard normal distribution (see →Figure
4.2).
Figure 4.2 Cumulative distribution function of N (0, 1) .
We have this relationship between the CDF of a normal distribution and the one of a
standard normal distribution:
x − μ
F N (x; μ, σ) = Φ( )
σ
Inverse Cumulative Distribution Function
We note F (α) the inverse cumulative distribution function (also known as the
X
−1
distribution of 1.645 is 95% and that the standard inverse cumulative distribution of 0.95
is 1.645.
σ = 25 . In other words, the probability density of a demand that varies around 100
d
units per period with a standard deviation of 25. We observe that there is a 10% chance
for the demand during a period to be higher than 132 units (as
(0.9; 100, 25) = 132 there is a 90% probability for the demand to be below 132
−1
F
N
units), and only 5% to be higher than 141 ( F (0.95; 100, 25) = 141 ).
−1
Similarly, we can compute the expected cycle service level during a period based on an
initial inventory level.
α = F N (ι; μ d , σ d )
In other words, this means that if we have an inventory of ι pieces at the beginning of a
period, we can expect, with a probability α, to have enough inventory to fulfill all the
demand during this period.
We show in →Table 4.1 (for this specific demand distribution) the relationship
between the inventory level at the beginning of a period and the expected cycle service
level.
Table 4.1 Impact of the inventory level ι on the cycle service level α.
Inventory level ι 100 106 113 121 132 141 149 158
Cycle service level α 50% 60% 70% 80% 90% 95% 97.5% 99%
ι= C s + S s
−1
ι= F (α; μ d , σ d )
N
−1
ι=μ d + σ d Φ (α)
where the cycle stock at the beginning of the period is μ (in other words, the expected
d
S s =z α σ d
We call z the service level factor, because it is the ratio that multiplies the demand
α
deviation in order to compute the required safety stock and to obtain a desired service
level. z is computed as Φ (α) . Remember, this is the inverse cumulative standard
α
−1
The relationship between the service level (that we want for our clients) and the amount
of safety stock needed is not at all linear.
Figure 4.5 Impact of the service level α on the service level factor z .
α
As shown in →Figure 4.5, in order to achieve a (cycle) service level of 60% you will
need a service level factor of 0.25, but achieving 95% is already 1.64. And 99% is 2.33.
This means that the marginal extra cost of guaranteeing an extra point of service level is
growing fast. In other words, increasing service level by 1% from 98% to 99% is much
more expensive than the increasing it from 60% to 61%. It means that, the closer you
approach a 100% service level, the faster your marginal extra cost grows.
Actually, based on our model, a service level of 100%—which is a risk of 0.00% of
being out-of-stock—will only be achieved thanks to an infinite amount of safety stock. In
other words, there is no such thing as zero risk in our continuous normal model.
You will see in Chapter →8, “→Cost and Service Level Optimization,” how to optimize
the service level in order to minimize the inventory policy costs.
And its standard deviation is computed as for any other statistical distribution:
2
∑ (e t − μ e )
√
σe =
n − 1
If we assume that the demand is normally and independently spread across each period
(we’ll discuss this in a moment), statistics teach us that the demand standard deviation
is proportional to the square root of the number of periods τ (tau). Mathematically we
have:
2 2
τ ⋅ N (μ d , σ ) = N (τ μ d , τ σ )
d d
√τ σ 2
d σd CV d
CV dτ = = =
τ μd √τ μ d √τ
A good illustration of this effect is to look at the difference between throwing one die or
multiple dice. If you throw one die, you have as many chances of getting a 1 as a 6 (the
two most extreme values)—you have a high variance. But the more dice you throw at
once, the lower the probability of getting an extreme value. For example, if you throw 3
dice, the probability to get the maximum possible value (18) is only 1 out of 216; on the
other hand you also have 1 chance out of 4 to get either a 10 or 11. In short, the
probabilities at the extremes are very low and probabilities near the middle are high.
The results are bunched closer together toward the middle, hence the coefficient of
variation of throwing three dice is lower than that of throwing a single die.
The same effect will happen with the demand distribution. You have less chance to face
an extreme month than an extreme day. Let’s say that you track the daily demand in a
shop, you then have these relationships between daily, weekly and monthly variations
(as shown in →Figure 4.6, assuming you have 5 business days per week and 22 per
month):
2
Daily demand∼ N (μ day , σ day )
2 2
Weekly demand∼ N (μ w , σ w ) = N (5μ day , 5σ day )
⇒ σ w = √ 5σ day
2 2
Monthly demand∼ N (μ m , σ m ) = N (22μ day , 22σ day )
⇒ σ m = √ 22σ day
2
Demand over multiple days∼ N (τ μ day , τ σ day )
⇒ σ τ = √ τ σ day
Figure 4.6 Simulated demand variation over different temporal aggregations.
need to assess the demand at a daily level (we have a daily replenishment). We can then
assume:
2
μw σw
d day ∼ N ( , )
5 5
so we see that the daily demand is five times lower than the weekly one but its deviation
only got reduced by the square root of five.
We can then summarize these relationships by saying that, if we aggregate the demand
over τ multiple periods, we have:
2
τ ⋅ d ∼ N (τ μ d , τ σ d )
S s =z α σ d √τ
(4.3)
which is a more general expression than what we had before: S s = zα σd (see eq. →4.2
in Section →4.2.4).
4.3.3 Demand Independence and Correlation
The safety stock model we created assumes that the demand during a period is
independent of the demand during the next one. This independence is not observed in
practice most of the time. A high demand during one period can result in a lower
demand during the following one, as your clients will already have bought what they
needed. In other cases, a high demand during one period might be followed by...
another high demand period. An external factor might be affecting the overall demand.
For example, you can have a sunny weekend, so your sales are high both on Saturday
and on Sunday. In this case of positive auto-correlation (i. e., a high demand period
followed by another high demand period), our model will undershoot the required
amount of safety stock to reach the desired service level.
The fact that this independence is not respected is, of course, an issue. It will only get
worse if you use a demand deviation value estimated at a monthly level to compute the
daily demand deviation by simply dividing it by √22 . Or, stated differently, it is not a
good idea to estimate the demand deviation at a monthly level by multiplying the one
computed at a daily level by √22 . There are too many assumptions present at once:
The monthly demand is normally distributed.
The daily demand is normally distributed.
The daily demand is uniformly and independently distributed through a month.
We have to think of another solution.
The best way to get rid of this question of independence is to compute the demand
variation at the same level of time aggregation as the lead time and the review period.
Best practice is to generate a forecast at the same level of aggregation as the supply
chain it is used to work on. For example, if your supply chain works with a weekly review
period (i. e., with weekly replenishment), it is better to forecast the demand—and
measure the forecast accuracy—in weekly buckets rather than in monthly buckets. If you
can’t do this (for example, due to the limitation of the forecast model) you can at least
measure the forecast accuracy per week using a flat split6 of the monthly forecast.
This becomes unfortunately more complex—too complex?—if you face a review
period based on another scale than the lead time. As usual, we have to do a trade-off
between usability and accuracy.
Correlation
When you need to combine the demand of multiple products into one (for example if
you need to estimate the right amount of safety stock for raw materials) you need to pay
attention to the correlation between the demand of these products.
We can measure the correlation between two variables with a mathematical
expression.
Sum of Correlated Variables
Once we know the correlation between two variables, we can compute the expected
mean and deviation of their sum as below.
If we have X and Y defined as:
2 2
X ∼ N (μ X , σ X ) Y ∼ N (μ Y , σ Y )
Then their sum is characterized as:
μ X+Y = μ X + μ Y
2 2
σ X+Y = √ σ + σ + 2ρ σ X σ Y
X Y
These equations can be used to estimate the standard deviation when combining two
products or markets into one. Remember if ρ = 0 , then we say that X and Y are linearly
uncorrelated (or, with slight abuse, independent). Unfortunately, it is much more
complex to use it to properly estimate the demand deviation over multiple periods
because some periods could be positively correlated and other negatively correlated.
Warehouse Centralization
Supply chain network analysts often look at the impact of warehouse centralization on
the cycle and safety stock levels. This impact has been studied thoroughly since
→Maister (→1976). The mathematical models used to assess the impact of centralization
are similar to those we discussed here to aggregate or disaggregate the demand across
different time buckets. See →Wanke (→2009) for a more recent literature review and
detailed models. Warehouse centralization will help to reduce demand variability, but it
won’t help against supply variability (we will discuss this in Chapter →6, “→Stochastic
Lead Times”). On the other hand, adding a central warehouse to an existing inventory
network will increase the handling costs and might result in longer total lead times.
4.4 Recap
We defined the cycle service level α as the probability of no stock-out within an order
cycle. In order to achieve this cycle service level over τ periods of demand, we computed
that we need a safety stock S :
s
where
zα is the service level factor and is computed as z = Φ (α)
α
−1
we assume that the demand observed in each period is independent from one
another.
We will now to integrate this safety stock into our inventory policies.
5 Inventory Policies
We know from Chapter →4 (see eq. →4.3 in Section →4.3.2) that the required safety
stock S to guarantee a service level α over τ periods, is computed as
s
S s = z α σ d √τ
In a continuous (s, Q) policy, the required safety stock is based on the square-root of
the supply lead time L:
S s = z α σ d √L
Indeed, the risk-period x in an (s, Q) policy (as shown in →Figure 5.2) is the lead time
τ
L: at any point in time, you can make an order and should get it within time L. Therefore,
in order to guarantee a cycle service level of α over the order cycle, you need to keep a
safety stock to protect it against any demand variation that could happen during the
lead time.
Reducing risk-periods (or lead times) should be a priority for supply chain managers. As
the safety stocks are proportional to the square root of the lead time, it means that
reducing the lead time is profitable for a supply chain. For example, if you divide the
(total) lead time by 2, you can reduce the safety stock by √2 (=1.41). This will also
reduce the amount of in-transit inventory in the supply chain, resulting in less cash tied
up in useless inventory.
We compute the order quantity, which we know from the EOQ model (see Chapter →2,
specifically eq. →2.2 in Section →2.2.2):
∗
2kD
Q = √
h
When to Order?
The reorder point s is now computed as the sum of the demand over the lead time d L
s = dL + Ss
(5.1)
S s =z α σ d √ x τ =z α σ d √ R + L
The required safety stocks are proportional to the square root of the sum of the lead
time and the review period. In order to understand why we have to compute the
demand variation over the lead time plus the review period, we have to look at the risk-
period of such a policy. As shown in →Figure 5.4, when a supply planner places an order,
at the time of the review R , the next time she will be able to make an order is at the
1
time of the next review R . Even then, she will still have to wait the supply lead time L
2
before receiving this second order. So when she makes the order at the review period
R she must keep enough safety stock in order to be protected during the total time of
1
the risk-period R + L .
Figure 5.4 risk-period for (R, S) policy.
In other words, the risk-period is now R + L (it was only L with a continuous review
policy).
We order enough quantity to bring the net inventory level to the up-to level S (not to be
confused with S the safety stock).
s
S= d L + d R + S s
Q= S − net inventory
When?
We make an order at each review period. Remember, the optimal (but not practical)
review period is based on the EOQ (see Section →3.2):
∗
2kD
Q = √
h
∗
∗
Q
T =
D
From here, we can either round the optimal review period T to a practical number, or
∗
We can easily draw many similarities between an (s, Q) and an (R, S) , and interchange
their respective equations by replacing a few variables as shown in →Table 5.1.
We can express in a very general way the equations that set our policy:
S s = z α σ d √x τ
ι= S s + dx τ
The mathematical optimization of this policy is complex due to the estimation of the
undershoot U that gets rapidly complex—even under restrictive assumptions—and
changes depending on the assumptions made about the lead time and the demand.
Therefore, a mathematical optimization of (R, s, Q) is out-of-scope for this book. You
can nevertheless check →Tempelmeier (→2011) and →Johansen and Hill (→2000) for
more information.
Figure 5.5 Undershoot U under an (R, s, Q) policy.
in-transit I inventory as with the regular deterministic EOQ model (as discussed in
s
Chapter →3):
2
Q dL z α σ d √L
2
dR dL z α σ d √R + L
The expected on-hand inventory is simply the expected cycle stock C plus the s
expected safety stock S . This means that the on-hand inventory should fluctuate
s
between the bounds [S , C + S ] . Of course, as the demand varies over time, the
s s s
actual on-hand inventory level will fluctuate outside of these bounds (we will see that
in Figures →5.6 and →5.7).
As an inventory analyst, you can estimate how much inventory is missing (if the on-
hand inventory is lower than S ) or how much short-term excess there is (if the on-hand
s
inventory is higher than C + S ). In an (R, S) policy, the net inventory level should
s s
never exceed the up-to level S—except if S decreased abruptly (for example, if the
demand decreases resulting in a lower inventory target).
Inventory Zones
Now that we have computed the expected theoretical inventory levels, we can use these
to assess the quality of our actual inventory. In order to do so, you can use a color-
system to flag inventory. A proposition of thresholds is presented in →Table 5.2.
Of course, these can be defined differently. For example, the red zone could be
defined as below 25% of the safety stock theoretical level. The thresholds are also
defined based on the on-hand inventory, but you could do the same with the net
inventory level.
We can also easily estimate—based on the actual on-hand level—how much safety,
cycle, excess or missing inventory there is.
5.3 Simulation
Nullius in verba – Take nobody’s word for it. Royal Society motto, originally from the Roman poet Horace
You can see in Figures →5.6 and →5.7 how a change in lead time impacts the
inventory level, remember that S = d(R + L) + z σ √L + R . We clearly see that, as
α d
the lead time gets bigger (→Figure 5.7), the difference between the up-to level and the
average inventory gets bigger. We also see that, with a longer lead time, the on-hand
inventory level fluctuates much more around the expected average on-hand level.
Another important finding is that it is common for the on-hand inventory level to be
below the safety stock. In other words, it is common to consume part of the safety stock.
This might seem obvious, but it can be confusing for some practitioners. Some see the
“safety” stocks as being there for emergency situations only. This is obviously not the
case here. If you need to have an emergency-only inventory it should be determined out
of the current safety stock model.
We will discuss further the estimation of the on-hand inventory levels in Chapter →8
(see specifically Section →8.4.1).
5.3.2 Service Levels
Since we used simulations to compare actual and theoretical inventory levels, we can do
the same to compare expected and simulated cycle service levels.
As you can see in →Table 5.3, the theoretical and simulated cycle service levels are very
close when the demand coefficient of variation CV is rather low. Remember you can
d
compute CV as:
d
σd
CV d =
μd
σx σ d √R + L σd CV d
CV x = = = =
μx μ d (R + L) μ d √R + L √R + L
Long lead times ( L > R ) and low cycle service levels also drive the gap between the
theoretical expected cycle service level and the actual one.
Table 5.3 Simulated cycle service level (%) over 1,000,000 periods for an (R, S) policy
with R = 4 .
L CV d CV x Theoretical cycle service level (%)
70 80 90 95 99
2
d ∼ N (100, 25 ) 1 .25 .11 70.1 80.3 90.2 95.1 99.0
4 .25 .09 70.2 80.4 90.1 95.0 98.9
10 .25 .07 69.9 80.0 90.2 95.0 99.0
2
d ∼ N (100, 50 ) 1 .50 .22 70.1 80.0 90.0 95.0 99.0
4 .50 .18 69.7 79.8 89.9 95.0 99.0
10 .50 .13 69.5 79.6 89.9 95.1 99.0
d ∼ N (100, 100 )
2
1 1.00 .45 66.4 77.9 89.3 94.7 99.0
4 1.00 .35 64.1 76.3 88.3 94.2 98.9
10 1.00 .27 60.9 73.6 86.7 93.4 98.7
Negative Demand?
Our model assumes that the demand follows a normal distribution. As the demand
coefficient of variation grows, so does the probability that the demand during a period is
negative. Negative demand is not realistic, so in our simulations, we set the minimum
demand to be 0. This results in a gap between the theory (a normal demand) and the
simulation (a truncated normal demand). As the average demand in the simulation is
higher than in the theoretical model, therefore, our simulation shows a lower-than-
expected cycle service level.
With a CV of 100%, there is a 16% chance for the demand during a period to be
d
One of the main assumptions we made in our model is that the excess demand would
result in backorders until new stock is available. In other words, if a client comes with an
order and there is no stock available, her order will be put in the backlog and served as
soon as new stock is available. The client’s demand is not lost but backordered.
Backorders
In many businesses—especially in B2B—this assumption is correct. If you have some
excess demand during one order cycle, at least part of it will be pushed to the next cycle.
Lost Sales
In other businesses, this assumption is not correct. Clients won’t wait or simply will go to
the competition, resulting in lost sales. The mathematics to compute the required safety
stock under the assumption of lost sales are out of our scope,3 but we can include this
effect in a simulation and see its impact on the service level. Note that, in a lost sales
model, the net inventory can never be negative, because there are no backorders.
As shown in →Table 5.4, if the excess demand is lost (and not backordered), the cycle
service level increases. This is normal, as the incoming orders are not used to fill
previous orders but are only used to deliver to new clients in subsequent periods. The
spread between an inventory policy with backorders, and one with lost sales, grows as
the cycle service level decreases because it results in more and more stock-outs (so that
the backorder policy needs to keep more stock aside to fill the backlog rather than new
clients).
Table 5.4 Simulated cycle service level (%) over 1,000,000 periods for an (R, S) policy
with R = 4 and d ∼ N (100, 25 ) and lost sales.
2
Our model is setting a safety stock to achieve a cycle service level α, but many supply
chains record (and are interested in) the period service level αp
As a reminder,
The cycle service level α is the probability not to have a stock-out during a cycle
order (which can contain multiple periods).
The period service level α is the probability not to experience a stock-out during
p
Table 5.5 Simulated cycle and period service levels (%) over 1,000,000 periods for an
(R, S) policy with L = 4 and d ∼ N (100, 25 ) .
2
As you might expect, when the review period R grows (i. e., more time elapses
between two consecutive orders), so does α . You have multiple periods in one cycle
p
order, so that even though you could be out-of-stock by the end of the order cycle, most
of the periods during this cycle could still have had enough inventory. The impact is
especially impressive for small values of α. In →Table 5.5, you can read the case where
R = 10 and the theoretical cycle service level is 70% as follows (let’s say each period is
a working day): “If we make an order every 2 weeks (10 days) and aim for a cycle service level
of 70%, we can expect a probability of only 3.5% of stocking out on any given day.” We
conclude that it makes no sense to use cycle service level as a service level KPI if the
supply order cycles are long compared to the daily activities of a supply chain. To
overcome the limitation of the cycle service level, we will discuss the fill rate later in
Chapter →7.
5.4 Recap
We have created an initial safety stock model where the safety stocks are meant to
protect us against the demand variation.
Section →5.1.2)—that is able to deal with stochastic demand and deterministic lead
times. That was a good improvement from the EOQ model where both the demand and
the lead time were assumed to be determined and known in advance. But most of the
real supply chains actually face stochastic lead times: you never know if your supplier—
or your (production) process—will deliver your order on time. Therefore, we want our
safety stocks to protect us against longer-than-expected lead times, as well as against
variable demand.
We will improve our model in two steps:
1. First, we will assume that the demand is fixed and the lead time varies.
2. Then, we will assume that both the demand and the lead time vary.
By the end of this chapter we will model our supply chain as shown in →Figure 6.1.
This means that a supplier can be late or early compared to its announced time of
arrival.2
If it is late, we have a potential issue with our on-hand inventory at risk of being
depleted.
If it is early, we would have too much inventory on-hand resulting in higher (useless)
holding costs.
You can see in →Figure 6.2 the probability density function of our supplier lead time
if the supply process follows a random normal distribution with a mean of 20 and a
deviation of 5.
Just as for the stochastic demand (see Table →4.2) we can estimate the probability for
the demand during the (stochastic) lead time to be below a certain threshold thanks to
its cumulative distribution function (CDF). For example, as shown in →Figure 6.2, there is
a 10% probability that the lead time is longer than μ + 1.22 σ resulting in a 10%
L L
probability that the demand during the lead time is higher than d(μ + 1.22 σ ) .
L L
Let’s generalize our findings to compute the amount of safety stock we need to protect
our supply chain against lead time variations. This safety stock will be computed as:
the service level factor z (as discussed in Section →4.2.4),
α
We finally obtain:
S s =z α μ d σ L (6.1)
6.3 Stochastic Lead Time and Demand
We now have two different safety stock models:
One for stochastic demand and fixed lead times: S = z σ √R + L (see eq.
s α d
The proof is given in Appendix →B.1. Note that, if A and B are normally distributed (as
assumed), so is C.
2 2 2 2
√ V [C] = √ E[A]V [B] + V [A]E[B] ⇒ σ dL = √ μ L σ + σ μ
d L d
the risk-period4 is the lead time in an (s, Q) policy, the standard deviation of the
demand over the risk-period is:
2 2 2
σ x = σ dL = √ μ L σ + σ μ
d L d
You can see in →Figure 6.3 how a stochastic lead time impacts an (s, Q) policy.
Figure 6.3 (s, Q) policy with stochastic demand and lead time.
2 2 2
σ x = √μ L σ + σ μ
d L d
2 2 2
S s =z α √ μ L σ + σ μ
d L d
See Section →5.1.2 for a detailed explanation of the case where both R and L are
deterministic.
Figure 6.4 (R, S) policy with stochastic demand and lead time.
2 2 2
σ x = √ (μ L + R)σ + σ μ
d L d
We can then update our safety stock model by taking into account the review period:
Ss = zα σx (6.5)
2 2 2
S s = z α √ (μ L + R)σ + σ μ
d L d
6.4 Simulation
The model we created to compute the required safety stock is not a perfect
representation of reality. However, we can test it further through simulations. In order
to do so, let’s return to the simulation we created in Chapter →5 and add random lead
times.
6.4.1 Results and Limitations
We now have a powerful model that can allocate safety stocks based on both the lead
time variation and the demand variation.
As usual, our model makes some assumptions about the lead time. These are
necessary in order to obtain tractable mathematical models; but these assumptions
might not be realistic, resulting in over- or under-estimation of the expected service
level. Let’s review them one by one.
Table 6.1 Simulated cycle service level (%) over 1,000,000 periods for an (R, S) policy
with d ∼ N (100, 25 ) . 2
70 80 90 95 99 70 80 90 95 99
10 1 45.9 58.5 73.5 83.1 93.1 69.8 79.7 89.8 94.7 98.9
5 59.4 81.2 95.5 98.9 99.9 70.5 80.0 89.6 94.9 99.0
10 67.7 92.0 99.5 100.0 100.0 70.2 79.8 90.0 94.9 99.0
20 1 49.1 61.5 76.0 85.0 94.5 69.8 80.0 89.9 94.9 98.9
5 59.3 80.6 95.1 98.7 99.9 70.1 79.8 90.0 94.8 98.9
10 69.7 91.8 99.4 100.0 100.0 69.9 80.1 90.2 95.0 99.0
40 1 52.5 65.0 78.8 87.3 95.9 70.3 80.1 89.5 95.0 98.9
5 59.3 79.6 94.4 98.5 99.9 69.8 80.1 89.7 94.9 99.0
10 69.3 91.4 99.3 99.9 100.0 70.1 79.9 89.9 95.0 98.9
In many other cases, the actual cycle service level is much lower than expected.
Especially when the lead time coefficient of variation and the cycle service are low (
CV L< 25% ). Generally, the shorter the lead time variation, the bigger the spread is
between the discrete values in the simulation and the continuity assumption of our
model, resulting in a discrepancy between the expected service level and the observed
level.
To summarize, we have to conclude that the stochastic lead time model is not robust
and will only achieve the expected results in a few cases. If you face random lead times,
you should rely on policy optimization via simulation rather than models. We will do this
in Chapter →13, “→Simulation Optimization.”
We will see later in Chapter →7, “→Fill Rate,” (specifically in Section →7.5.1), that our
stochastic lead time model gives more appropriate results when measuring the fill rate
rather than the cycle service level.
Just as for the demand, our model assumes that the lead times of different orders are
independent from each other. Again, in practice, this is not true. If a supplier is late to
deliver an order one week, it is likely to be late the next week as well—maybe it is
currently overloaded.
Our model also assumes—implicitly—that two orders can cross each other. This
means that a first order O could be delivered after a second order O (that was
1 2
ordered afterward). In practice these cases are rather exceptional: orders should be
delivered in the sequence they were ordered. This limitation has been discussed since
the 60s at least,5 but modeling mathematically this sequencing results in complex
models.
Normality
In practice, the lead time probability distribution is not normal but often looks like a
right-curved bell: the supplier is most of the time on-time, only a few times late and
nearly never early.
We have to refine our model further. We will discuss skewed probability functions in
Chapter →9, “→Beyond Normality,” and discrete optimization with custom distributions
in Part →IV, “→Discrete Inventory Optimization.”
6.5 Recap
We have created a unified safety stock model that protects us against two different
sources of variation:
1. The demand over the lead times variation.
2. The demand variation over the average lead time.
We compute the safety stock as:
2 2 2
S s =z α √ (μ L + R)σ + σ μ (see eq. 6.5 in Section 6.3.3)
d L d
where
μL + R are the average lead time and the review period (if any)
σd is the demand standard deviation
μd is the average demand
σL is the lead time standard deviation
zα is the service level factor
We now have the ability to create two much stronger inventory policies which can deal
with a variable lead time, a review period (if any) and a stochastic demand.
This model still makes some strong assumptions about the demand and the lead
time:
They are both continuous and normally distributed.
The demand is independently distributed in each period and independent from
the lead time.
Excess demand is backordered.
Different orders can cross each other.
Part III Advanced Stochastic Models
7 Fill Rate
We can also express the fill rate based on the number of units short noted U : s
Us
β = 1 −
dc
Where d is the expected demand over an order cycle (remember, an order cycle is the period
c
As you can see in →Figure 7.1, the expected fill rate is actually higher than the cycle service level
(assuming a stationary normal demand)—especially for low service levels. In the example shown
in →Figure 7.1 (and the following Example box), when α = 21% , β = 77% . That’s a difference of
56 points!
Figure 7.1 Service levels for d c = 100 and σ x = 25 .
As a metric for a supply chain service level, the fill rate often makes more sense than the cycle
service level. Especially when the order cycles are long (we will discuss this in Section →7.4). On
the other hand, the fill rate is more difficult to record than the cycle service level:
In order to compute the cycle service level, you just have to see if your stock goes to zero
during an order cycle (assuming that some demand is unmet as soon as the item is out-of-
stock, which is not always true).
In order to properly record the fill rate, you need to be able to record the excess demand.
If the excess demand is backordered (i. e., the excess demand is kept in a backlog until
inventory is available) this is easy since the total demand is known (as shown in →Figure
7.3). This is usually the case in B2B.
If the excess demand is lost, measuring the fill rate can become difficult. This is usually
the case in B2C. For example, a client who doesn’t find a product on a shelf won’t always
mention it to the retailer.
This effect is also called the “Spiral-down effect” in field of revenue management3—a discipline
where it has been observed and analyzed.4
Measuring lost sales is unfortunately not possible for every business. Just think about a
grocery store: the customers won’t go to the cashier to mention they couldn’t find the chocolate
bar they wanted to buy. They’ll simply buy another snack instead.
Unconstraining the Demand
Instead of recording the lost sales, you can try to estimate them. This is called unconstraining the
demand. One simple—but not perfect—way to do this is to use a smart forecast model.5 When
you are out-of-stock during a certain period, instead of using the sales as a proxy for the demand,
you can estimate the demand as the initial forecast for this period. Your forecast is then used as a
proxy for the lost sales—it is actually your best guess. In other words, when you are out-of-stock,
your forecast is a better estimation of the demand than the actual sales. Of course, in order to
apply this technique, you will have to record your inventory level over time to track out-of-stocks.
Before looking at an equation, let’s try to express in plain English how to compute the
expected amount of units short over the risk-period. This is the same as the expected excess
demand over this risk-period.
The expected excess demand (or number of units short) over the risk-period is the sum of:
Each possible value of the demand d, that is higher than the initial inventory level ι,
times the probability f (d) of the demand d to materialize,
times the number of units short d − ι (i. e., the difference between the demand d and the
inventory ι).
As we model the demand as a continuous distribution function “over each value of the demand d
that is higher than inventory level ι,” is translated into an integration over d from d = ι to d = ∞ ,
so that we obtain this elegant formulation:
∞
U s = L (ι) = ∫ (d − ι) f (d) dd
d=ι
where 𝓛(ι) is the demand loss function evaluated at ι, and f (d) is the demand probability density
function7 of d (over the risk-period). For the sake of clarity, we simplify the notation, by using f (d)
instead of f (d) .
Dx
If we assume d ∼ N 2
(μ x , σ x ) over the risk-period, we have:
∞
U s = L N (ι; μ x , σ x )= ∫ (d − ι) ⋅ f (d) dd
d=ι
∞ ∞
= ∫ d ⋅ f (d) dd − ι ∫ f (d) dd
d=ι d=ι
2
= σ x f (ι) + μ x (1 − F (ι)) − ι(1 − F (ι))
2
𝓛 𝓝 (ι;μ x ,σ x )=σ x f (ι) + (μ x − ι)(1 − F (ι))
where f (d) and F (d) are respectively the PDF and CDF of the demand d over the risk-period
(assumed to be normally distributed).
The proof is shown in Appendix →B.2. Note that this solution to the loss function only applies
to a normal distribution (we call L (ι; μ, σ) the normal loss function).
N
7.2.2 Standard Normal Loss Function
Usually, academics prefer to use the standard normal loss function 𝓛 N (x) :
L N (x)= L N (x; 0, 1)
2
= σ f (x) + (μ − x)(1 − F (x))
2
= 1 φ(x) + (0 − x)(1 − Φ(x))
You can use the standard normal loss function L N (x) to compute the expected units short of
any normal distribution. It can be shown that:
x − μ (7.1)
𝓛 𝓝 (x;μ,σ)=σ ⋅ 𝓛 N ( )
σ
7.3 Fill Rate Model
Policy dc μx σx ι
(s, Q) Q dL
√ Lσ
2 2 2 s
+ σ μ
d L d
(R, S) dR d(R + L)
√ (R + L)σ
2 2 2 S
+ σ μ
d L d
We are actually interested in determining the expected amount of units short over an order cycle
(an order cycle is the period between two consecutive supply orders). During an order cycle, we
assume we only witness units short during the risk-period.8 It follows that the expected number
of units short over the risk-period is the same as the expected number of units short over the full
order cycle.
We can then compute the expected fill rate over an order cycle as:
Us L N (ι; μ x , σ x )
β = 1 − = 1 −
dc dc
Using eq. →7.1 (see Section →7.2.2) we can compute the fill rate based on the standard normal
loss function.
ι − μx
U s = L N (ι; μ x , σ x ) = σ x L N ( )
σx
Us σx ι − μx
β = 1 − = 1 − LN ( )
dc dc σx
This answers the question, “If I have ι pieces at the beginning of the risk-period, what is the expected
amount of excess demand (or units short) I am likely to face?”
Safety Stocks
Let’s imagine that you have a certain amount of safety stock S . What is the service level you can
s
expect? We defined ι as “the available quantity at the beginning of the risk-period,” which is the sum
of the expected demand over the risk-period μ and the safety stock S . We then have,
x s
ι = μx + Ss
σx ι − μx
β= 1 − LN ( )
dc σx
σx (μ x + S s ) − μ x
= 1 − LN ( )
dc σx
σx Ss
= 1 − LN ( )
dc σx
So we have this relationship between the fill rate β and the amount of safety stock S : s
σx Ss
β=1 − 𝓛N ( )
dc σx
Remember that, by definition (see Section →4.2.4), the service level factor z is computed as:
Ss ι − μx
z = =
σx σx
Meaning that we can also compute the expected fill rate based on the service level factor:
σx
β=1 − 𝓛 N (z)
dc
Actually, the question is most often asked the other way around:
“If I want to get a fill rate of 95%, how much safety stock should I keep?” We already answered a
similar question with the cycle service level in Chapter →4, “→Safety Stocks” (see Section →4.2.4).
We had this relationship:
−1
Cycle service level = α ⇔ z α = Φ (α)
We can do the same for the fill rate:
σx d c (1 − β)
−1
Fill rate = β = 1 − 𝓛N
L N (z β ) ⇔ z β = ( )
dc σx
We want to achieve a fill rate β, and in order to do this we need to compute the service level factor
z , based on the inverse of the normal loss function.
β
However, an issue remains. There is no mathematical formula to compute the inverse of the
standard normal loss function. Should we then stop here? No, we have other tools at hand.
Solver
We can use a solver to minimize the difference between the desired number of units short and
the expected number of units short.
The desired number of units short is simply derived from the fill rate β and the cycle demand d : c
U s = d c (1 − β)
Now, we want the expected and desired number of units short to be equal:
σ x L N (z) = d c (1 − β)
In other words, we have to find the value of z that minimizes the absolute difference between:
d c (1 − β)
L N (z) and
σx
which means that z is the value that minimizes the absolute difference between L N (z) and
d (1 − β)/σ .
c x
polynomial at the logarithm of the value we want to inverse. In other words, L (x) is
−1
approximated as:
−1
L (x) ≃ a 0 + a 1 log (x) + a 2 log (x) + a 3 log (x) + ... + a 12 log (x) + ϵ
N
When we have a simple inventory policy (as shown in →Figure 7.5), we understand that the high-
risk period is the one preceding the reception of an order. This is the time when the on-hand
inventory is at its lowest point; this is when the risk of running out-of-stock is at its peak. In other
words, it is when you are about to receive the order from your supplier, that your stock is at its
lowest point: this is when you face the most risk to run out of stock.
As shown in →Figure 7.6, if we make less frequent orders—but order more at once—we get a
policy with less of these high-risk periods. This means that we are safe during most of the order
cycle since we have ample cycle stock left. It is only at the end of the order cycle that we are in a
riskier situation.
For these long order cycles, the fill rate is guaranteed by the massive amount of cycle stock.
The safety stock is only required to buffer the last period of the order cycle. On the other hand,
the cycle service level is not guaranteed by the cycle stock; the only thing that matters is how likely
the safety stock will be enough to resist the high-risk period at the end of the cycle.
Actually, if you analyze the fill rate and the cycle service level for varying review periods, ceteris
paribus, you see that the fill rate virtually doesn’t change whereas the cycle service level only
decreases. As the order cycle gets longer, the difference between the fill rate and the cycle service
level increases. Therefore using the cycle service level as a service level metric makes less sense.
As you can see in →Figure 7.7, the cycle service level can be around 60–70% for long cycles despite
a fill rate of around 95%.
−1
Ss σx −1
Ss
α = Φ ( ) β = 1 − L ( )
N
σx dc σx
(R,S) Policy
We have
2 2 2
dc = d ⋅ R σ x = √ (R + L)σ + d σ
d L
If we increase R,
α will decrease as σ increases and S stays constant.
x s
N
(S /σ ) will increase as S is constant and σ increases.
s x s x
This means that the relationship between the fill rate β and R can’t be easily computed and can go
in both directions; on the other hand, an increase in R can only result in a decrease of α.
(s,Q) Policy
We have
2 2 2
dc = Q σ x = √ Lσ + d σ
d L
If we increase Q,
α is not impacted.
β increases as the expected lost sales per cycle stays constant but the cycle gets longer.
Increasing the order quantity (or the batch size) will result in a higher fill rate. Again, this extra
service level doesn’t come for free: you also get a higher amount of cycle stock as C = Q/2 . s
7.5 Simulation
As shown in →Table 7.2, our model works remarkably well for policies with a demand coefficient
of variation ( CV = σ /μ ) below 50%.
d d d
Table 7.2 Simulated cycle service level (%) over 1,000,000 periods for an (R, S) policy with R = 4 .
L CV d CV x Theoretical fill rate (%)
70 80 90 95 99
2
d ∼ N (100, 25 ) 1 .25 .11 69.9 80.0 90.0 95.0 99.0
4 .25 .09 69.9 79.9 90.0 95.0 99.0
10 .25 .07 70.0 80.0 90.0 95.0 99.0
2
d ∼ N (100, 50 ) 1 .50 .22 69.9 79.9 90.0 95.0 99.0
4 .50 .18 69.7 79.8 89.9 95.0 99.0
10 .50 .13 69.7 79.7 89.8 94.9 99.0
d ∼ N (100, 100 )
2
1 1.0 .45 69.0 79.4 89.9 95.0 99.0
4 1.0 .35 67.6 78.2 89.0 94.6 99.0
10 1.0 .27 66.2 76.8 88.0 94.0 98.8
Negative Demand
As CV grows, so does the spread between the theoretical model and the simulation. This is due
d
to the fact that our simulation forbids negative demand (as discussed in Section →5.3.2,
“→Negative Demand?”). We will solve this limitation by using a strictly positive demand
distribution in Chapter →9, “→Beyond Normality.”
We discussed how much stock we need to achieve a desired service level in Chapter →4
through →7. We implicitly assumed that we had a good reason to desire this specific service level.
Supply chain managers often will aim for a 95% or 99% “service level” (it is not always clear if they
mean cycle service level or fill rate). But are these values optimal? Should we aim for 80% or for
99.5%? In order to answer this question, we will have to look at the total cost of our inventory
policies... and minimize it.
Service level is merely used as a mean to reach the real goal: profit.
−Backorders costs
Our profits are basically our sales incomes minus the purchasing,2 holding, transaction and
backorder costs. So that, over a period (a week, month, year, review period...), we have:
Prof its = (p − c) ⋅ Demand − h ⋅ (On-hand + In-transit) − k ⋅ Transactions − b ⋅ Backord
where,
p is the selling price per unit
c is the purchasing (or production) cost per unit
h is the holding cost per period per unit
k is the fixed cost of a single transaction
b is the cost of backlogging a unit
Let’s review this expression in detail:
Demand We assume that all the excess demand is backlogged (i. e., excess demand does
not result in lost sales but in backorders) so that the sales over a period are equal
to the demand over this period. The profits resulting from the sales are then
simply the period demand d multiplied by the margin p − c (selling price p minus
the purchasing cost c).
On-hand inventory We assume the (expected) average stock on-hand during a period to be the
safety stock S plus the cycle stock C (see →Table 8.1 for a recap, or Chapter
s s
In-transit inventory On top of this, the in-transit inventory I is also sometimes incurring
s
holding costs (see Section →3.1 for more details). This is the case when, for
example, the supply source is internal rather than an external supplier.
Remember, the inventory in-transit is the amount of inventory that is shipped by
the supplier but not yet received, and I = dL (see eq. →3.4 in Section →3.2).
s
Transactions The average transaction costs per period are equal to k (the cost of one
transaction) times the number of transactions during the period.
Backorders The expected costs due to backorders are the unit backorder cost b times the
expected number of units short over the period.
Remember, the unit backorder cost b represents all the costs related to putting
one item in the backlog. These costs can be penalties or loss of goodwill (see
Section →2.1.3).
For the sake of simplicity, we will look at the (inventory) costs rather than the profits (leaving aside
sales and purchasing costs), and we will leave the in-transit inventory aside (assuming we do not
incur holding costs for it). As shown in →Figure 8.1, we then have:3
Costs=h ⋅ On-hand + k ⋅ Transactions + b ⋅ Backorders (8.1)
We will also focus on normally distributed demand in this chapter (you can find a general proof in
Appendix →B.4).
Safety stock Ss z σx
In-transit stock Is dL
Backorders Us σ x L N (z)
hand inventory. Remember, as shown in →Figure 8.2, we assumed that the stock on-hand varies
(linearly) between:
d + S when we just received an order. That is, the safety stock S plus the expected
c s s
S when we are just about to receive an order (we only have the safety stock S left).
s s
Our on-hand inventory varies then between d + S and S so that the expected average on-
c s s
hand inventory is (see Section →5.2.1 for a refresher about on-hand inventory):
dc dR
(average) On-hand = C s + S s = + Ss = + Ss
2 2
Since we know the expected on-hand inventory level, we can express the total cost per review
period R as:
C per review period = hR(C s + S s ) + k + b U s
where hR is the holding cost of keeping one unit in stock during a review period R ; and,
because we do a transaction at each review period, the transaction cost per period review period
is k.
We can also compute the (average) cost per period (noted simply C ) as:
C review period k b Us
C per period = C = = h(C s + S s ) + +
R R R
dR
Cs =
2
U s = σ x L (z)
As shown in →Figure 8.3, we understand that the more safety stock you have (which is to say, the
higher z) the lower the backorder costs are ( b σ L (z) is low) but the higher the holding costs
x N
are ( h z σ is high). In Chapter →2, we optimized the order quantity Q and saw that the holding
x
∗
costs were balancing the transaction costs (see Section →2.2.2). Now, with our stochastic model,
the relationship is a bit more complex: holding costs increase when the backorders costs decrease
(more safety stock results in fewer backorders). The holding costs will also increase when the
transaction costs decrease (i. e., if R is high, we make fewer orders but have a higher amount of
cycle stock).
We will see in the following pages first how to optimize the required amount of safety stock,
and then how to optimize the review period.
Figure 8.3 Cycle service level impact on transaction, holding and backorder costs. Example with
h = 2 , k = 200 , b = 50 , L = 1 , R = 1 and d ∼ N (100, 25 ) .
2
Let’s first optimize the cost function with regard to z. The question we ask ourselves is “What is the
optimal service level we should target in order to minimize our costs?”
k b σ x L N (z)
C (z) = h(dR/2 + z σ x ) + +
R R
In order to find the optimal z , we can simply take the derivate of the cost function based on z
∗
∂C (z) ∂z b σ x ∂L N (z)
= hσ x + = 0
∂z ∂z R ∂z
hRσ x + b σ x (Φ(z) − 1) = 0
hR + b (Φ(z) − 1) = 0
hR
+ Φ(z) − 1 = 0
b
hR
Φ(z) = 1 −
b
This is a very important result because it shows that the optimal cycle service level (i. e., the one
resulting in the lowest total cost) is 1 − hR/b . Moreover, this result holds for any demand
distribution (as proven in Appendix →B.4).
This model shows that you should keep inventory when the backorder cost is higher than the
holding cost over the review period. If not—since keeping a unit in stock is more expensive than
missing one item in stock—you should use a make-to-order policy (i. e., produce only when a client
makes an order) rather than a make-to-stock policy (produce and store goods in advance).
If you are managing inventory policies, this simple equation α = 1 − hR/b should help you to
∗
easily reduce your total cost by optimizing the service levels. Go for it!
Cost Optimization: Review Period R
Now that we have an expression to find the best cycle service level α (eq. →8.3 see Section →8.2.1)
based on a given review period R, we should optimize R.
This can be done either via the power-of-2 policy (see Section →3.2.1), or simply by looking at
various possible values of R and picking the one resulting in the lowest cost. This is often a simple
routine computation as, in real life, only a few values of R are possible.
8.3 (s,Q) Policy
For the continuous (s, Q) policy—in which we order Q pieces when we reach a net inventory level
of s—we will look at the cost per year, rather than the cost per period as we did for (R, S) .
D D
C = h(C s + S s ) + k + b Us
Q Q
where:
h is the cost to keep one unit in stock for a year
D/Q is the number of transactions per year
Ss = z σx
U s = σ x L N (z)
As we did for the (R, S) policy, we will see two ways to reduce the costs: optimize z and Q.
Once again, to find the optimal z factor, we can simply take the derivative of the cost function
∗
∂z D ∂L N (z)
h(σ x ) + b σx = 0
∂z Q ∂z
D
hσ x + b σ x (Φ(z) − 1) = 0
Q
hQ + b D(Φ(z) − 1) = 0
hQ
Φ(z) = 1 −
bD
This is a very important result, since we can now easily compute the optimal cycle service level for
an (s, Q) policy as:
hQ hQ (8.4)
∗ −1 ∗
z =Φ (1 − )⇔α =1 −
bD bD
Note, in this equation h is expressed as the holding cost of keeping one unit in stock for a whole
year (and not just over a review period as we did for the (R, S) policy).
Similarly, as for the (R, S) model (see eq. →8.3 in Section →8.2.1), the optimal service level
found with eq. →8.4 can be used for any demand distribution (as proven in Appendix →B.4).
Actually, the solution for the (s, Q) policy is the same as that for the (R, S) (see eq. →8.3) if we
replace R with Q/D .
In Chapter →2 (see eq. →2.2 in Section →2.2.2), we computed the optimal order quantity Q as
∗
2kD
Q = √
h
This works for a deterministic demand, but what about a stochastic one? Let’s go back to the cost
expression:
D D
C (Q) = h(Q/2 + z σ x ) + k + b σ x L N (z)
Q Q
Just as we did for z , in order to find the optimal Q , we have to take the derivative of the cost
∗ ∗
1 ∂Q ∂ 1
h + (k + b σ x L N (z)) ( ) = 0
2 ∂Q ∂Q Q
h −1
+ (k + b σ x L N (z)) = 0
2
2 Q
2
h
−Q + (k + b σ x L N (z)) = 0
2
2
2
Q = (k + b σ x L N (z))
h
2(k + b σ x 𝓛 N (z))D
∗ √
Q =
h
2(k + b U s )D
∗ √
Q =
h
Intuition
You can understand intuitively that this equation is similar to the EOQ equation: Q = √2kD/h
(see eq. →2.2 in Section →2.2.2) with k = k + b σ L (z) . b σ L (z) = b U are the expected
′
x N x N s
backorder costs over a demand cycle, which is seen by our model as a fixed transaction cost. In
other words, the model sees the backorder costs per cycle as an extra transaction cost.
Deterministic Stochastic
∗
Q 2kD 2(k+b U s )D
√ √
h h
A simple way to optimize our costs is to iteratively use equations →8.4 and →8.5 until both Q and z
are reasonably stable. We say that the algorithm converges (i. e., it has found a solution). The
convergence will happen rather quickly if we force Q to take integer values.
1. Initialize Q as √2kD/h (based on the EOQ model)
2. Set z as Φ −1
(1 −
hQ
)
bD
3.
Update Q as √2(k + b σ L (z))D/h x N
We will review three methods, each more correct than the previous. Let’s review them one by one.
First Method
One way to track the average physical inventory level through a period is to compute it as:
As shown in →Figure 8.6, the issue is that hand[t] is the stock level at the end of a period, i. e.,
after the period demand d[t] is consumed and before the next replenishment transit[t,0] arrives
(if any). In other words, hand[t] is the lowest inventory point during the period. So if we define
p[t] as max(hand[t],0) we will undershoot the actual physical inventory.
Second Method
A second way to compute the average physical inventory is to take the average of the highest and
lowest inventory levels of each period. As shown in →Figure 8.6, the highest inventory level is
reached at the beginning of the period—just after we received a delivery if any (max(hand[t-
1]+transit[t-1,0],0))—and the lowest is reached at the end of the period (max(hand[t],0)).
The average physical inventory level during the period can then be expressed as:
Third Method
We can refine the computation of the physical inventory even further. The second method is
actually only correct when both the starting and ending inventory positions of a period are
positive. But, in the cases where the physical inventory is depleted by the end of the period
(hand[t]<0), we can expect that the inventory went to zero before the end of the period.
Figure 8.7 Average physical inventory through a period when hand[t]<0.
The average physical inventory level during a period is the grey area in →Figure 8.7. As any
triangle, this area can be computed as its height (hand[t-1] + transit[t-1,0]) multiplied by its
base ((hand[t-1] + transit[t-1,0])/max(d[t],1)) divided by 2: (hand[t-1] + transit[t-
1,0])**2/max(d[t],1)/2. Note that we take max(d[t],1) instead of d[t] in order to avoid division by
zero in the exceptional case of d[t]==0. We then have:
We see in →Figure 8.8 that the model and the simulation give very close results if the demand
deviation per period stays relatively low. But, as shown in →Figure 8.9, if the demand coefficient of
variation becomes too high ( CV ⩾ 100% ) we start to have an offset between the model and the
d
demand is higher than the theoretical demand, due to the fact that we don’t allow negative
demand in the simulation.4
Figure 8.8 Average physical inventory level per period with a low CV with d ∼ N
d
2
(100, 25 ) ,
R = 4 and L = 4 over 1 million timesteps.
Figure 8.9 Average physical inventory level per period with a high CV with d ∼ N
d (100, 100 )
2
,
R = 4 and L = 4 over 1 million timesteps.
We also observe that as the service level gets lower, the spread between the model and the
simulation grows (slightly). As noted in Section →8.2.1, the model does not take into account, in its
on-hand inventory level, the expected backlog per period. Nevertheless, as we observe for these
cases, this spread is virtually zero even for relatively low cycle service levels.
As for the physical inventory simulation, we can confirm, thanks to our simulations, that for a low
demand coefficient of variation ( CV ∼ 25% ), the model and the simulation are virtually alike
d
(see →Figure 8.10). Again, a difference arises when the demand coefficient of variation is high (
CV ⩾ 100% ) as shown in →Figure 8.11.
d
Figure 8.10 Cost simulation for low demand variation with d ∼ N 2
(100, 25 ) , k = 1000 ,
h = 1.25 , b = 50 , R = 4 and L = 4 over 1 million timesteps.
Figure 8.11 Cost simulation for high demand variation with d ∼ N (100, 100 )
2
, k = 1000 ,
h = 1.25 , b = 50 , R = 4 and L = 4 over 1 million timesteps.
8.5 Recap
In this chapter we answered the (tremendously important) question: “What is the optimal service
level?” We obtained simple expressions for both periodic and continuous review policies as shown
in →Table 8.2.
Table 8.2 Optimal cycle service levels for each inventory policy.
Policy (s, Q) (R, S)
bQ
1 −
hR
Order quantity Q
∗
√
2(k+b U s )D
h
where
R is the review period
Q is the order quantity
b is the cost of backordering an item
k is the fixed cost per transaction
h is the holding cost per unit per period (for the (R, S) policy), or per year (for the (s, Q)
policy)
U is the expected backlog by the end of the risk-period
s
The mode is normally the most common value in a dataset. However, computing the mode of a
highly scattered distribution—as we face here—can be tricky and meaningless. In order to
overcome this, we grouped the sales in bins and defined the mode as the bin with the highest
number of occurrences (as shown in →Figure 9.2). In other words, we made a histogram and
selected the highest bar as the mode.
Figure 9.2 Monthly Ford car sales in Norway.
poorly.
9.1.2 Why Does Normality Fail?
Let’s take a moment to discuss why normal distributions often fail to properly describe a real
supply chain demand dataset (or lead time fluctuations). Normal distributions have two main
characteristics that make them a poor fit:
1. Normal distributions contain negative values. Only returns could (potentially)
justify having negative demand in some specific cases. Arguably, often in a supply
chain, a return can’t compensate a sale from the on-hand inventory. So, if you
face returns, you might want to consider forecasting and managing them apart
from the normal demand.
Negative lead times are just nonsense.
2. Normal distributions are symmetric. In a normal distribution, the mode, the
median and the mean are the same value and the distribution is symmetrically
distributed around it. That’s the theory. In real supply chains, as shown in
→Figure 9.3, the demand—and the lead time—often fluctuate around a mode
with a few exceptional (positive) values. Real supply chain demand is therefore not
symmetrical around the mean; it is often skewed to the right. This means that we
have more high exceptions than a normal distribution would usually predict (and
fewer low exceptions).
Figure 9.3 Mode, mean and median for a typical demand distribution.
9.2 Skewness
In statistics, the skewness is a measure of a distribution asymmetry. It is noted γ and is
1
expressed as a number—just as the mean or the standard deviation. A positive number means a
right-tail skew, and a negative one means a left-tail skew as you can see in →Figure 9.4.
Usually (but not always) −1 < γ < 1 so that a skewness close to −1 or 1 is rather high. A
1
skewness of 0 represents a distribution that is perfectly symmetrical around its mean (e. g., the
normal distribution).
Right-skewed distributions always have a mean higher than the median, and they usually are
both higher than the mode (as shown in →Figure 9.3). This assertion is often correct when
describing a supply chain demand. Remember that for a normal distribution—as assumed in our
safety stock model so far—the mode, the mean and the median are equal.
So that,
2 2
μ σ
Γ(k, θ) = Γ( , )
2
σ μ
As you can see in →Figure 9.5, when the standard deviation of a dataset increases, the gamma
distribution is more skewed resulting in a longer tail and a lower mode. On the other hand, as the
standard deviation of a dataset decreases, the gamma distribution gets closer and closer to a
normal distribution.
Another important property of the gamma distribution is that it is a strictly positive
distribution. Yet, as you can see in →Figure 9.5, its PDF around 0 is usually very low (i. e., there is a
low probability for a gamma distribution to get a value close to 0).
Skewness
2 2 2 2
μ σ μ σ
d d d d
kd = θd = d ∼ Γ(k d , θ d ) = Γ( , )
2 2
σ μd σ μd
d d
Demand Offset
Gamma distributions always allocate some (low) probability for values close to 0, so that the
fitting shown above works well if the minimum demand value d is close to 0. But this is not min
always the case. For example, if we look at the monthly sales of Ford cars in Norway (→Figure 9.6),
the minimum monthly sales ever observed is around 400. In order to fix this and to improve
gamma fitting to our sales, we should offset the gamma distribution by d as summarized in min
→Table 9.1 (so the distribution will then start at our demand minimum value).
Figure 9.6 Fitting gamma distributions to Ford car sales with and without offset parameters.
′ ′ ′2 2 ′
d ∼ Γ(k , θ ) + d min ′ μ ′ σ μ = μ d − d min
d d
d d k = 2
θ = ′
d
d σ d μ
d d
Let’s note k , θ and μ the offset parameters.
′ ′ ′
d
′2 2
μ σ
′ ′ ′ d ′ d
μ d = μ d − d min σd = σd kd = θd =
2 ′
σ μ
d d
′2 2
μ σ
′ ′ d d
d ∼ Γ(k d , θ d ) + d min = Γ( , ) + d min
2 ′
σ μ
d d
Note that we do not use σ in our equations, because offsetting the demand by d
′
d min does not
impact σ .
d
As discussed, gamma distributions start with a PDF of zero at their minimum (i. e., f (0; k, θ) = 0 Γ
, as shown in →Figure 9.5). Therefore, you might want to define d slightly below the actual
min
minimum observed demand. In practice, the impact of this approximation is (very) low.
9.4 Distribution Selection
Now that we can properly fit a gamma distribution to a demand dataset, we need to find a proper
way to estimate if a distribution is more gamma than normal. Let’s discuss two rules of thumb.6
fitted normal and gamma distributions. Remember, we saw in eq. →9.1 that you can compute the
actual skewness γ of the observed demand as:
1
n 3
1 di − μd
γ1 = ∑( )
n σd
i=1
We know that if the demand is close to a normal distribution its skewness should be close to 0;
and if the demand is close to a gamma distribution its skewness should be close to 2σ /μ .
d d
2σ d
2
d ∼ N (μ d , σ d ) ⇒ γ 1 = 0 d ∼ Γ(k d , θ d ) ⇒ γ 1 =
μd
Thereby we can use the actual demand skewness to assess if it is closer to a normal or a gamma
distribution:
2 σd
N (μ d , σ ) if γ 1 <
d μd
d ∼ {
σd
Γ(k d , θ d ) if γ 1 >
μd
One of the great merits of this technique is that it is straightforward to implement. Even in Excel.
As soon as you can compute the demand mean, deviation and skewness, you can assess if it is
more normal or more gamma. This should allow you to massively segregate demand signals
between normal and gamma distributions.
Demand Offset
If there is a minimal demand observed in the dataset, you can also try to fit the demand as
′
d
′
d ∼ Γ(k , θ ) + d
d min and see if the skewness obtained ( 2σ /(μ − d ) ) is closer to the actual
d d min
one.
If the actual skewness is still (much) higher than 2σ /μ , you might want to look at custom
d d
Limitation
The limitation of assuming the demand to be normal or gamma based on its skewness is that,
since we focus only on matching the skewness of the demand dataset against our fitted
distribution, we do not care if the fitted distribution looks like the actual demand distribution. In
other words, your demand can be skewed like a gamma distribution but not distributed like one.
9.4.2 Method #2 – Root Mean Square Error
Another (less straightforward) way to test the goodness-of-fit of a fitted distribution compared to
the actual demand distribution is to compute the difference between the two distributions. One
way to do this is to compute the Root Mean Square Error (RMSE) between the actual and the
fitted PDF.
We define the RMSE as
1 2
RM SE = √ ∑ (f d (x) − f (x))
n
where f (x) is the actual demand PDF estimated at x and f (x) is the PDF of either a gamma or a
d
Limitations
There is no such thing as a perfect representation of the PDF of our actual demand. We can
only estimate it based on a density histogram of the demand, which comes with some
arbitrary choices that we will discuss in detail in Chapter →12, “→Discrete Probabilistic
Demand.”
The RMSE test proposed here allocates as much importance to the left-tail as to the right-tail
of the demand distribution. The left-tail is less interesting to us since we often aim for high
service levels. We want to know the 90th or 99th percentile of the demand over the risk-
period, not the 10th. Therefore, we might want to allocate more importance to the right-tail
of the distribution because we are interested in extreme demand cases.7
If the demand follows a gamma distribution d ∼ Γ(k , θ ) over one period, we can compute its
d d
distribution over τ periods.9 To do this, we first have to compute the expected demand mean and
standard deviation over τ periods.
μτ = τ μd σ τ = √τ σ d
So that,
2 2 2
μτ τ μ
d
kτ = = = τ kd
2 2
στ τ σ
d
2 2
στ τ σ
d
θτ = = = θd
μτ τ μd
Let’s note d the demand over τ periods. We can express it based on either k and θ ; or k
τ τ τ d
As shown in →Table 9.2, we can express the demand over the risk-period by replacing τ by either
R + L for an (R, S) policy or by L for an (s, Q) policy. Remember, we note x the length of the τ
′ ′ ′2 2 ′
(R, S) xτ = R + L μ σ
d ∼ Γ(k x , θ x ) + x min ′ d ′ d μ = μ d − d min
k = xτ 2
θ = ′
d
x σ x μ
d d
(s, Q) xτ = L
Note that, as the number of periods τ increases (in other words, as the risk-period gets
longer), the coefficient of variation of the distribution gets smaller so that the gamma distribution
is less and less skewed and looks more and more like a normal distribution. In other words, the
more you look into the demand distribution over a long period, the more it will follow a normal
distribution.10
Demand Offset
If we offset the gamma distribution by a minimum (as discussed in Section →9.3.2), we simply use
′
μ = μ − d
d d to compute k and θ (with x
min
′
d
being the demand offset over the risk-period
′
d min
xmin = x d τ ).
min
What if we have a random lead time and a gamma demand? As we discussed in Section →6.3.1,
we already know a couple of parameters of the expected demand over the risk-period:
2 2 2
μ x = (μ L + R)μ d σ x = √ (μ L + R)σ + σ μ
d L d
Even though we can estimate the demand deviation and mean over the risk-period, we do not
know what its distribution looks like. Will we get the same distribution if the lead time is normal
than if it is gamma-distributed? What about a gamma lead time and a normal demand?
The exact mathematics to answer these questions are not always controllable.11 Moreover,
working with such mathematics might only slightly improve our inventory policies whereas the
extra complexity will make the maintenance of the model, at best, very difficult. We have two
solutions: using more simplifying assumptions or using simulations to optimize the policy.
As an extra simplifying assumption, we could approximate the demand over the (stochastic) lead
time as gamma. Using μ and σ , as defined above, we can compute k and θ , so that:
x x x x
2
2 2 2 2 2
μx σx ((μ L + R)μ d ) (μ L + R)σ + σ μ
d L d
d x ∼ Γ(k x , θ x ) = Γ( , ) = Γ( , )
2 2 2 2
σx μx (μ L + R)σ + σ μ (μ L + R)μ d
d L d
As discussed in Chapter →6, “→Stochastic Lead Times,” the normal stochastic lead time model
only worked well when R ≫ L ≫ σ . We now have a second layer of approximations because
L
we assume that the demand over the lead time follows a gamma distribution. This means that we
should use this model with caution (e. g., test it with a simulation before using it). As we will see
with our later simulations (in Section →9.6.2), if the lead time variability is rather low, simulations
will be relatively aligned with the theoretical model.
In conclusion, if you face gamma demand and stochastic lead time, it is advised not to use a
mathematical model to optimize your inventory policy but to use simulations instead as we will do
in Chapter →13.
where F −1
Γ
(α; k x , θ x ) is the inverse of the gamma distribution Γ(k x, θx ) evaluated at service
level α.
Table 9.3 Expression of ι depending on the inventory policy and the assumed demand
distribution.
Policy Period demand General expressions Explicit expressions
−1 −1
(R, S) d ∼ Γ(k d , θ d ) ι = F (α; k x , θ x ) S = F (α; (R + L)k d , θ d )
Γ Γ
−1
(s, Q) s = F (α; L k d , θ d )
Γ
′ ′ −1 ′ ′ −1 ′ ′
(R, S) d ∼ Γ(k , θ ) + d min ι = F (α; k x , θ x ) + x min S = F (α; (R + L)k , θ ) + (R + L)d min
d d Γ Γ d d
−1 ′ ′
(s, Q) s = F (α; L k , θ ) + L d min
Γ d d
The various possible expressions of ι are shown in →Table 9.3. The safety stock level can then be
easily computed as:
Ss = ι − μx
Demand Offset
By definition, the expected units short for an initial inventory position ι over an order cycle where
d ∼ Γ(k, θ) is:
As a reminder, we note f (d; k, θ) the probability density function (PDF) of the gamma
Γ
Obviously we are interested in the expected units short U over the risk-period of our inventory
s
policy:
U s = L Γ (ι; k x , θ x ) = k x θ x (1 − F Γ (ι; k x + 1, θ x )) − ι(1 − F Γ (ι; k x , θ x ))
Remember, ι is the inventory at the beginning of the risk-period: ι = S for an (R, S) policy,
ι = s for an (s, Q) policy.
Demand Offset
where:
′2 ′2
μx σx
′ ′ ′
kx = θx = ι = ι − x min
′2 ′
σx μx
We summarize in →Table 9.4 the expression of the expected units short based on x (the risk- τ
period length), μ , θ , d .
d d min
Table 9.4 Units short expression based on x , k , k and d
τ d d min .
Policy Risk-period Units short U s
Length Demand
(R, S) xτ = R + L x ∼ Γ(x τ k d , θ d ) x τ k d θ d (1 − F Γ (ι; x τ k d + 1, θ d ))
′ ′ ′ ′ ′ ′ ′
(R, S) xτ = R + L x ∼ Γ(x τ k , θ ) + x τ d min x τ k θ (1 − F Γ (ι ; x τ k + 1, θ ))
d d d d d d
′ ′ ′ ′
(s, Q) xτ = L −ι (1 − F Γ (ι ; x τ k , θ ))
d d
Just as for the normal distribution, there is no tractable equation to express the inverse of the
gamma loss function. We will again have to use a solver to compute it. This is what we are looking
for:
Us = {
d c (1 − β)
L Γ (ι; k x , θ x )
∣
⇒ β = 1 −
dc
= 1 −
which means that ι is the value that minimizes the absolute difference between L
d (1 − β)/σ .
c x
L Γ (ι; k x , θ x )
dc
Γ (ι; kx , θx ) and
9.5.4 Gamma vs. Normal
Now that we have created a gamma model, we can analyze the differences with the normal model
we created in Part →II, “→Stochastic Supply Chains.” To do this, we show in →Table 9.5 and
→Figure 9.8 the various fill rates and cycle service levels achieved for different values of ι (the
stock level at the beginning of the risk-period) based on a risk-period demand μ = 100 ,
x
σx = 50 .
Table 9.5 Expected cycle service level α and fill rate β based on ι with μ x = 100 and σ x = 50 .
Service level Risk-period demand ι
80 100 120 140 160 180 200
α x ∼ Γ(k x , θ x ) 39.7 56.7 70.6 80.9 88.1 92.8 95.8
x ∼ N (μ x , σ )
2
x
34.5 50.0 65.5 78.8 88.5 94.5 97.7
β x ∼ Γ(k x , θ x ) 70.1 80.5 87.7 92.5 95.5 97.4 98.5
x ∼ N (μ x , σ )
2
x
68.5 80.1 88.5 94.0 97.2 98.8 99.6
We see two cross-over points when the normal model predicts higher service levels than the
gamma model (both for the cycle service level and fill rate).
Figure 9.8 Expected cycle service level α and fill rate β based on ι with μ x = 100 and σ x = 50 .
Low service levels It is usually easier to obtain a low service level with a gamma demand than
with a normal one. In other words, a small amount of inventory will result in a
higher service level when the demand over the risk-period follows a gamma
distribution rather than a normal one. This makes sense as the gamma
distribution is right-skewed resulting in a high probability for the demand not to
be too far away from the mode (which is lower than the average demand).
High service levels On the other hand, targeting a high service level is more difficult if the
demand is gamma-distributed due to its long right-tail (as there is always a small
probability that the demand will be really high).
9.6 Simulation
in Table →5.3) we had a misalignment between the simulation and the theory CV > 0.25 . d
Table 9.6 Simulated cycle service level (%) over 1,000,000 periods for an (R, S) policy with R = 4
and μ = 100 .
d
Table 9.7 Simulated fill rate (%) over 1,000,000 periods for an (R, S) policy with R = 4 and
μ = 100 .
d
We see that the simulated service level (fill rate or cycle service level) tends to be higher than the
theoretical prediction from our model. This is especially true when the lead time is long compared
to the review period and the service level target is low.
9.6.2 Random Lead Times
Let’s now simulate our model with random lead times. As discussed in Section →6.4, random lead
times come with a lot of questions that theoretical models (and simulations alike) often ignore:
Is there a correlation between the lead times of different orders?
Is the lead time independent to the demand, or seasonal?
How do we model discrete lead time?
We see in Tables →9.8 and →9.9 that our model is giving appropriate results for both normal and
gamma-distributed lead times when the lead time variation is limited. Nevertheless, for high lead
time variation, the model seems to give stock targets that are too high, resulting in higher than
targeted service levels.
Table 9.8 Simulated fill rate (%) over 1,000,000 periods for an (R, S) policy with R = 4 and
μ = 100 , σ = 100 . Lead time distributed as L∼𝓝(μ ,σ ) .
2
d d L L
Table 9.9 Simulated fill rate (%) over 1,000,000 periods for an (R, S) policy with R = 4 and
μ = 100 , σ = 100 . Lead time distributed as L∼Γ(k ,θ ) .
d d L L
Risk-period
Demand distribution
Fill rate
Safety stock
Solver
Demand Offset
Reorder point (s, Q)
Review Period (R, S)
σ x = √x τ σ d
d ∼ Γ(k d , θ d )
k =
β = 1 −
μ
σ2
Ss = ι − μx
where x min
x
= x τ d min .
2
θ =
α = F Γ (ι; k x , θ x )
ι = F
−1
∣
(α; k x , θ x )
σ
μ
μx = xτ μd
L Γ (ι;k x ,θ x )
ι = S
xτ = R + L
dc = Q
d x ∼ Γ(k x , θ x ) = Γ(x τ k d , θ d )
2
dc = dR
If you want to compute the required stock level ι (at the beginning of the risk-period) to reach a fill
rate β, you need to use a solver that will look for the ι that minimizes the difference between
d (1 − β) and L (ι; k , θ ) .
c Γ x
′
d, θ d ) + d min
μ x = μ x − x min
′
ι = ι + x min
, the computations can be done as
10 Multi-Echelon Inventory Optimization
Per ardua ad astra – Through adversity to the stars.
Royal Air Force motto
So far, we have discussed models that described supply chains with only one stocking point
and one item. Real-world supply chains are often made up of multiple stocking points, each one
usually stocking several different items. In this chapter we will broaden our model by optimizing
inventories across multiple stocking points. Ton de Kok—professor at the Eindhoven University of
Technology—argued, “There is no hope to find optimal control policies for real-world multi-item multi-
echelon systems.”1 Nevertheless, as you will see, we can easily come up with good (enough) policies
—thanks to specific assumptions.
Figure 10.1 Supply chain represented as a network with nodes and edges.
Bullwhip Effect
In many cases, supply chains that are stuck in local inventory optimization face a bigger issue than
simple misalignment. They face the risk of a massive bullwhip effect.
As shown in →Figure 10.5, the bullwhip effect describes a situation where the more upstream
an echelon is, the more demand variation it faces, despite the fact that the final demand is rather
steady. The more upstream a node is, the more pronounced the effect. The name “bullwhip”
comes from the fact that a small deviation of the final customer demand will produce a large
variability at the manufacturer end. Just like cracking a whip by a fast flick of the wrist.
The bullwhip effect was initially theorized in the 1960s by Jay Forrester (professor at MIT). It got
more attention in the late 1990s, when the name “bullwhip” was bestowed by Procter & Gamble
(P&G) management team. P&G observed that, despite the fact that the final demand for Pampers
was stable (babies consumed a steady flow), the orders at the manufacturing sites were highly
variable.
As identified by →Lee et al. (→1997), there are 4 main causes to the bullwhip effect:
1. Order forecasting
2. Order batching
3. Price fluctuation and promotions
4. Shortage gaming
Let’s investigate them one by one.
1. Order forecasting If each node in the supply chain forecasts its demand based on the direct
orders coming from its downstream nodes—rather than on the final client
demand—the supply chain faces an issue. Each node will create a new forecast
that will tend to distort its own demand signal and (very often) overreact to it.
Then, based on the node inventory policy, this demand signal will be distorted
further (as we will discuss later). These forecasts are not “demand forecasts”
anymore but “order forecasts.”
For example, let’s imagine that you think that demand decreased by 10% per
week. Your current up-to level target is around 4 weeks of inventory (because of
lead time, review period and safety stock—see Chapter →5) so, you will then
decrease it by 4 times the demand decrease you observed. In turn, the node
directly upstream will see a massive order reduction from you (its client). This will
result in an even steeper order decrease from this node to the node upstream.
And so on. The smallest final client demand variation results in a massive variation
at the manufacturer end.
The beer game3—a supply chain simulation game often played at universities—
shows this effect to its players: everyone tends to overreact to the order patterns
they observe.
Being able to forecast directly the final clients demand is particularly important
when the supply chain includes multiple steps (and actors). Supply chains that are
able to accurately react as they see the final client demand, will get a definitive
edge over their siloed competitors. This is particularly important when an external
event results in massive demand shifts (as we saw with the coronavirus crisis).
2. Order batching Usually the more upstream a node is, the bigger its batch size (or the longer
its review period). This means that as we move upstream in the supply chain we
face fewer but bigger orders (resulting in a lumpier order signal). Policies such as
discounts for full truckloads will push this effect further. As each node is batch
ordering, the demand signal will get distorted along the supply chain.
3. Price fluctuation and promotions Price fluctuations (very) often create demand distortions
resulting in a more variable demand (but not always higher overall). As we saw
earlier, as we move upstream in the supply chain, small variations in final demand
will result in a massive bullwhip effect. Often the various supply chain nodes are
not aware that this demand variation is simply caused by pricing variations or
promotions. Promotions for the final client can also force manufacturing to
produce goods months in advance to compensate for lack of production flexibility
and capacity. Order batching and order forecasting will only make the impact of
price fluctuation worse.
4. Shortage gaming In some cases, when the supply chain is very siloed, each node might place
oversized orders in a rogue move to protect itself against a speculative future
supply shortage (this will often happen in time of supply crisis such as caused by
the coronavirus). This will be done at the expense of other nodes who will suffer
from the supply shortage (often resulting from a self-fulfilling prophecy). While
the one node which ordered too much will suffer from excess inventory.
I witnessed this specific issue in a distribution company that had one central
warehouse and multiple (independent) shops. Each shop usually tried to “steal”
inventory from the central warehouse to protect itself from future shortage. They
obviously do this only for profitable products. Overall, this behavior increased
stress and resentment among employees; and resulted overall in lower sales (as
one shop had excess inventory while others suffered shortages).
Shortage gaming can also happen at the very end of a supply chain when final
customers fear that they will lack supply. We observed this effect during the
coronavirus with toilet paper runs.
The causes above can be fought one by one. Usually it requires a supply chain to:
1. Have a global view on demand and supply across each inventory node. This will
reduce shortage games and order forecasting. Typically using vendor managed
inventory (VMI) will allow a supplier to properly capture the final demand.
2. Have a central team responsible for setting inventory policies across the supply
chain, and check that these policies are followed. This will remove the shortage
gaming.
3. Use a fair-share allocation in case of shortage. And make sure everyone is playing
by the rules.
4. Reduce review periods, lead times and order quantities. This will reduce the
impact of order batching.
5. Orchestrate pricing, promotions and marketing based on supply and inventory
availability. This is often done through S&OP.4
Many software companies have been promoting multi-echelon inventory optimization advantages
through the late 2000s and 2010s, advancing the idea that MEIO can save from 20% to 30% of
inventory (compared to single-echelon inventory optimization). Many MEIO projects have been
documented in academic papers as well as in business cases. Observed inventory reductions
often vary from 10% to 35%. Let’s mention a few cases:
→Graves and Willems (→2000) described an MEIO project done for Kodak in the late 90s.
After two years, they could reduce the inventory by one-third while improving the service
level.
→Billington et al. (→2004) reports saving $130 million for HewlettPackard. Their inventory
level decreased by over 30 percent for the digital-camera business, resulting in a supply
chain total cost reduction of more than 5% (while keeping similar service levels).
In a blog post, →Tayur (→2007) reported that Deere & Company implemented an MEIO
solution for one of their divisions (accounting for 300 products across more than 2500 stock
locations). This resulted in an inventory reduction of $1 billion, while improving the service
level.
→Thonemann (→2011) describes a project undertaken by a big pharmaceutical company
that reduced the working capital tied up in safety stocks by 19% (keeping similar service
levels) for one of their best-selling drugs (in a global supply chain).
In a survey, →Aberdeen (→2012) reported for MEIO users an average 3.1% service level
increase along with a 15% reduction in cash-to-cash cycle.5
I personally witnessed extreme cases where inventory reduction was up to 40% thanks to
MEIO (and some warehouse-resizing adjustments).
Naturally, the magnitude of the results also depends on the supply chain initial maturity level.
Depending on the supply chain management objectives, one could also decide not to reduce the
total inventory level (or only partially), keeping it constant and increasing the service level instead
(thanks to a better allocation of safety stocks). In such cases, MEIO projects won’t deliver an
inventory reduction but a better service level.
Let’s discuss three drivers that influence where the (safety) stock should be located in a supply
chain (as shown in →Figure 10.6):6
So far we discussed MEIO as a method to solve inventory localization in a supply chain network,
but it can also be used to decide where to keep inventory within a production process.7 A
production process can be described as a network with various (possible) stocking points, lead
times, varying holding costs and product values, and finally with different demand signals for
each possible final product. Production processes often rely on postponement or decoupling
points: you need to define which stage of the manufacturing process should hold inventory.
These can be optimized via MEIO techniques.
The stochastic-service model (SSM) analyzes the stochastic time it takes from one node to
replenish another (based on its inventory level). The stochastic-service model is driven by
internal service levels; whereas the guaranteed-service (time) model12 assumes that each node
will always serve its clients within a fixed quoted time, assuming that the demand is bounded. The
guaranteed-service model is driven by internal guaranteed-service times (in other words,
how much risk-period each node should cover). In short, where the SSM uses safety stocks as
buffer against the entire demand variability (resulting in random lead times), the GSM assumes
that safety stocks will be used until a certain demand threshold.
Results
We already saw that the GSM is simpler than the SSM (it is also faster to optimize mathematically).
But which one will deliver the best inventory policy? In order to see which model would result in
the lowest cost, academics threw both models into competitions over simulated supply chains.
Even though no definitive answer can be drawn on which one is best, →De Smet et al. (→2018)
saw that in most cases GSM would result in lower costs than SSM (depending on parameters such
as service level), with an overall cost reduction of 10%; whereas →Klosterhalfen and Minner
(→2010) showed that the difference between the two models was around 4% maximum
depending on the supply chain features.
Conclusion
Review Policy
This supply chain also follows a periodic review policy, with a periodic review of 1 week. More
importantly, we assume that each stocking point is following the same review period, so that the 3
nodes review their stock at the same moment in time. We also assume that each stocking point
has a full view of the current inventory position of all the other stocking points.
Goods Flow
We assume that an order received by the end of a period in a node is directly available for
shipment at the beginning of the next period. In other words, in our example with a supply chain
with a weekly review period, it means that even an order received on Friday evening in the
production facility will be shipped on Monday morning to the regional hub.
Guaranteed-Service Times
In the guaranteed-service time model, the question of inventory allocation is solved thanks to the
guaranteed-service time that each node quotes to its downstream direct clients.
Our initial question of optimal safety stock allocation is answered with another question: “how
much guaranteed-service time should each node quote?”
Naturally, the allocation of guaranteed-service times needs to respect some requirements:
1. Service times cannot be negative (you cannot quote a service time of minus one
week).
2. The demand nodes (those facing final clients) need to quote a guaranteed-service
time of 0 (except if clients accept otherwise).
Bounded Demand
A supplier-node can only guarantee a maximum service time to its clients if the client demands
are bounded. For example, you can only promise your clients to deliver all their orders within 3
weeks if they agree never to order more than 1000 pieces over 3 weeks. In practice, no supply
chain will forbid demand to be too high. Instead, the demand will be managed via safety stocks up
to a certain threshold (as shown in →Figure 10.9). Thereafter, it will be served via exceptional
means.
Figure 10.9 Bounded demand over τ periods.
Typically, we say that the demand over τ periods, noted d(τ ) , is bounded by the demand bound
ˆ
d(τ ) . We can set this bound similarly to the one for the cycle service level:
13
ˆ
d(τ ) ≤ d(τ ) = z σ d √τ + μ d τ
Based on factor z (see Section →4.2.4 for a refresher), we know the probability for the demand
during τ periods to be within the bound.
period of the supply chain. For example, if the total risk-period is 10 (as in our example), we
expect that:
ˆ
d(τ ) ≤ d(τ )
for any τ ≤ 10 .
In other words, as long as the clients buy less than d(τ
ˆ
) over τ periods, it will be served fully
on time.
Risk-Period Framework
The traditional approach to GSM is done based on the guaranteed-service times quoted by each
supplying-node to its client-nodes and under the restrictive assumption of bounded demand. We
prefer here an original (simplified) approach based on risk-periods.14 The question we ask is, “Over
which risk-period should each node protect itself?” We have a few (obvious) constraints to respect:
The total risk-period of the supply chain needs to be covered.
In our previous example, the total risk-period was 10 weeks (
L + L + L + R = 4 + 3 + 2 + 1 ) so that the 3 nodes should cover, in total, 10 weeks
1 2 3
of risk.
Each node can only have protection over the maximum risk-period they face.
In other words, if the total incoming lead time of a node is 4 weeks, this node cannot cover
more than 4 weeks of risk-period.
The demand-nodes will support the review period.
As we will see in the simulations (Section →10.5), as long as the targeted service level is rather
high, we shouldn’t worry too much about the bounded demand assumption. The risk-period
framework will therefore allow us to easily allocate safety stocks in a multi-echelon supply chain.
You can see in →Figure 10.11 the 4 resulting possible (optimal) cases (where x is the length
i
τ
of the incoming risk-period of the stocking point i). A node with a white triangle means that it
holds enough safety stock to cover its incoming risk-period.
In order to see what is the optimal safety stock allocation, we need to compute the total safety
stock requirement for each case. This is done by summing the safety stock required at each
stocking point S (computed based on eq. →4.3 in Section →4.3.2).
s
i
(10.1)
i i
S s =z σ d √ x τ
Cost Optimization
Actually, we are more interested in the total cost of each case. Minimizing safety stocks is not our
objective, minimizing costs is. The total costs C can be computed simply by multiplying the
h
i i i i i
Ch = ∑ Ch = ∑ Ss h = ∑ z σ d √x τ h
i i i
We leave the cycle stocks aside from this cost equation as cycle stocks are expected to flow
through the supply chain (we assume that there is no minimum order quantity and the review
periods are aligned across the supply chain).
10.4.4 Multi-Echelon Inventory Policies
We just computed the optimal safety stock allocation for our serial supply chain. As we know,
safety stocks are only a part of the inventory policy. Because we are following a periodic review
policy (R, S) , we still have to compute each node order up-to level S . As shown in →Table 10.2,
i
we have for each node, S = μ + S where μ is the expected demand over the risk-period of
i i
x
i
s
i
x
the stocking point i (see Chapter →5 for a recap about (R, S) policies).
Case i = 1 i = 2 i = 3
In order to manage the supply chain globally, we have to follow global inventory policies (also
known as echelon policies). The policies we discussed so far are local policies: they deal with how
much stock should be present at a certain stocking point. An echelon inventory policy will deal
with the stock present at an echelon and all those downstream. The echelon order up-to
level of node i , noted 𝓢 , is the sum of all the up-to levels of this node and its (direct and indirect)
i
j≤i
For example, as shown in →Table 10.3, the echelon policy of the second node (the regional hub) is
1180 units in the second case ( S = S + S = 809 + 371 ).
2 2 1
Case i = 1 i = 2 i = 3 i = 1 i = 2 i = 3
In practice, when a node places its order, it will order based on the difference between its
echelon (actual current) inventory (i. e., its inventory plus all its client-nodes inventories) and its
echelon order up-to level.
10.5 Simulation
If we run simulations based on the cases described so far, as you can see in →Table 10.4 and
→Figure 10.12, Cases #1 to #3 will result in a slightly less than expected cycle service level. Case #4
(where all the safety stocks are located downstream) will result in exactly the targeted service
level. This makes sense, in Cases #1 to #3 the client-node is protected against its incoming risk-
period but its upstream supply chain is still impacted by a possible lack of service level (in other
words, Cases 1 and 2 will experience shortages since they don’t assume a 100% service level). In
case #4, the client-node is protected against the whole lead time and is therefore directly fulfilled
by an external supplier (which we assume to be perfectly reliable with a 100% service level).
As you can see in →Table 10.4, the results for cases #1 to #3 are close to the expected cycle
service levels, which confirm that our model can be used to optimize a real-life supply chain.
We will discuss later, in Chapter →13, “→Simulation Optimization,” how to rely directly on
simulations to optimize our supply chain.
Table 10.4 Simulation results for α = 95 and α = 90 .
Cycle service level (target) Case Risk-period coverage Safety stocks Fill rate Cycle service level
95 #1 [4, 3, 3] 224 99.0 94.6
#2 [0, 7, 3] 180 98.9 94.4
#3 [4, 0, 6] 183 98.7 94.9
#4 [0, 0, 10] 130 98.4 95.1
90 #1 [4, 3, 3] 174 97.3 88.4
#2 [0, 7, 3] 140 97.0 88.0
#3 [4, 0, 6] 142 96.6 89.0
#4 [0, 0, 10] 101 96.3 90.0
Inderfurth showed that optimizing a distribution supply chain (under the GSM framework) is
similar to solving a serial supply chain. Each site should either cover all its in-coming risk-period (i.
e., until the first upstream node that holds safety stocks) or none. This means that, even for very
wide distribution supply chains (tens or hundreds of sales points), only a few cases are worth
being checked in order to find the optimal case. As shown in →Figure 10.15, in a distribution
supply chain with 3 echelons, only 4 cases need to be checked.
Figure 10.15 Different scenarios to optimize distribution supply chains.
The resulting risk-periods against which each node should be protected are shown for each
case in →Table 10.5.
Case Node
1 2 3 4 5
#1 L1 L2 L3 + R L4 + R L5 + R
#2 L1 – L3 + R L2 + L4 + R L2 + L5 + R
#3 – L1 + L2 L1 + L3 + R L4 + R L5 + R
#4 – – L1 + L3 + R L1 + L2 + L4 + R L1 + L2 + L5 + R
d , d . This is serious business because the optimization of a distribution supply chain depends
4 5
2 2
d 2 = d 4 + d 5 ∼ N (μ d4 + μ d5 , σ + σ )
d4 d5
But these relationships will only hold if all the final demands are normally and
independently distributed (see Section →4.3.3 for a discussion about demand
independence).
What if d is gamma-distributed? What if they are not independently distributed?
3
2. We can also estimate the demand at each node directly by studying the demand
flowing through this node. In our example it means that we would directly
estimate d by summing the observations of d , d , d and assessing the
1 3 4 5
Section →9.4. This second approach will usually be more accurate but will require
more data processing.
Even though the very first MEIO models were published in 1958 and 1960 (for the guaranteed-
service and stochastic-service models respectively), the application of MEIO is rather recent for
multiple reasons:
1. The first papers were limited to very specific and serial supply chain networks. We
had to wait until the end of the 20th century for new, more general and applicable
models to be published by academics.
2. MEIO requires information systems able to centrally manage wide supply chain
networks (including inventory, supply and demand visibility across multiple
countries and business units).
3. MEIO requires more computation power and is more complex than single-echelon
inventory optimization (SEIO).
The guaranteed-service time model was initially proposed in 1955 by Kimball. This framework was
used by Simpson (both consultants for A. D. Little) in 1958 to solve a serial supply chain.17 After
the initial papers in the late 50s, it took 30 years to see more advanced models thanks to a
renewed interest from the academic world that started in the 90s (as shown in →Figure 10.16).
Inderfurth was the first to show how to solve a distribution network in 1991.18 In the following
decade, more advanced models were proposed.19 Most notably, →Graves and Willems (→2000)
had a profound impact on GSM: they showed how to solve a general (acyclic) supply chain thanks
to dynamic programming.20 Since this article was published, many academics published new
models (removing some of the initial assumptions)... And software developers implemented them
as they developed tight relationships with academics.
MEIO has been seen as the new frontier for supply chain optimization software as of the mid
2000s to mid 2010s—and it is now being replaced by the rise of artificial intelligence.
10.8 Recap
Siloed supply chains face many risks (too much inventory, fights over shortages, bullwhip effect)
that can be overcome with a proper global inventory policy. In order to do it, we need:
Visibility and control over the inventory levels in the supply chain
Multi-Echelon Inventory Optimization (MEIO) models
We saw in Sections →10.4 and →10.6 how to optimize serial and distribution supply chains thanks
to the risk-period framework: a simplification of the guaranteed-service time model. It is based on
three rules:
The total risk-period of the supply chain to be covered
Each node can only take protection over the maximum risk-period they directly face
The nodes facing the final clients will support the review period
For more complex networks (assembly and acyclic general) you can use the guaranteed-service
time model. See →Graves and Willems (→2000), →Moncayo-Martínez and Ramirez (→2016) for its
implementation.
Part IV Discrete Inventory Optimization
11 Newsvendor
In this chapter, we will discuss the newsvendor model,1 one of the most thoroughly studied
inventory models among academics. We will first go through the model with an example of a
small bakery shop. Then, we will discuss the theory behind this model in detail. As we discover the
newsvendor model, we will take the opportunity to discuss discrete demand distributions for the
first time. Remember, discrete demand distributions means that the demand can only take integer
values. Whereas continuous demand distributions can take any value. In practice, it is often more
accurate to assume that the demand can only take integer values as often a client can only buy a
round number of products.
d. In this chapter, for the sake of clarity, we abuse the notation a bit by using p(d) instead of
p (d) , as we implicitly assume that we are referring to the demand probability mass
D
function.
P (D≤x) the probability for random discrete variable D to be smaller than or equal
You took the time to analyze your costs. It costs 2€ to bake a muffin (mostly flour, sugar,
chocolate, electricity and love) and you sell them at 6€ per piece. If at the end of the day you
couldn’t sell all of them, you reduce their price to 1€ and by doing so, they always get sold. We will
call this the salvage value. You have to do this, because the muffins will lose their taste and
texture throughout the night anyway.
11.1.1 Do It Yourself
Excel
In order to see how the quantity we decide to bake impacts our expected profits, let’s create a
simple model in Excel (later in Python), rather than diving directly into a mathematical model.
Let’s start by setting up a table as shown in →Figure 11.2.
The demand values and probabilities are on columns B and A respectively.
The different possible order quantities (or in this case, the baked quantities) are spread
across the second row (range C2:G2). Note that the choice is here arbitrary, you could create
another table to test a quantity of 20 muffins.
The different cost variables are on cells J2:J4.
Now, we have to compute the profit (or cost) for each combination of demand and quantity, we
note it 𝓟(Q,d) and compute it as below:
P(Q, d) = p ⋅ min(Q, d) + s v ⋅ max(0, Q − d) − c ⋅ Q
Where:
p ⋅ min(Q, d) is the price per unit multiplied by the amount of sales.
s v ⋅ max(0, Q − d) is the salvage value multiplied by the excess units (if any).
c ⋅ Q is the cost per unit multiplied by the order quantity.
This formula is translated into Excel by typing this formula in cell C3.
C3 = MIN($B3;C$2)*$J$2+MAX(0;C$2-$B3)*$J$4-C$2*$J$3
Finally we need to compute the expected profit for each quantity: we want to answer questions
like “What is the expected profit if I bake 4 muffins?” We can answer this by using the formula below:
where p(d) is the demand probability mass function (the probability for the demand to be d). We
can compute this easily in Excel by typing this formula in cell C10 and then copy and paste it in the
range C10:G10.
C10 = SUMPRODUCT(C3:C8,$A$3:$A$8)
Therefore, we have the answer to our question “How many muffins should I bake?” We should
bake between 4 and 6 muffins per day to maximize our profits.
Python
We can also solve this case easily with Python. Let’s first define the demand values and probability
mass function PMF and the possible order quantities as lists.
We will store the profits for each combination of demand and quantity in a NumPy array called
results.In order to do so, we will iterate through demandand quantityand update resultsfor each
combination. Note that, instead of the usual method range(), we use the method enumerate()which
returns at once an iterator and a counter.
We used here the escape character \nwhich prints a line break. We also used np.argmax()which
returns the position of the highest element of a list or array-like.
We can generalize this story (and the chocolate muffins one from above) as the case where, as
you won’t be able to replenish your stock through the sale cycle (or season), you have to decide
how many products you want to source before the sales come in. In other words, this model is
applied for products with a limited lifecycle that you need to produce or order in advance.
Let’s define 4 conditions for an inventory problem to be defined as a newsvendor problem:
1. The order is placed before the season.
2. You cannot make an order through the season.
3. There is a cost for buying too much (i. e., excess cost).
4. There is a cost for buying too low (i. e., shortage cost).
Here are some examples:
Seasonal products Products that are purchased ahead of the season. This is typically the case
for most of the fashion industry (especially when sourced overseas).
A typical historical example are calendars: these are seasonal products (with a
very finite lifecycle) for which the production setup cost is high. It may then be
cheaper to make one order for the whole year. Nowadays, thanks to digitization,
the printing industry could reduce these setup costs.
Stock for a special event How much coffee—or champagne—to buy for a special event is a
typical newsvendor problem: you can’t buy more during the event, you face
excess costs if there are any leftovers and shortage costs if you don’t buy enough
(attendees won’t be happy!).
Safety stock The safety stock model (as created in Part →II and →III) is a newsvendor problem
with the season being one order cycle: you have to decide before the cycle how
much you want to source (until the next one).
Now that we understood what the newsvendor problem is about, let’s solve it and determine
what is the best order quantity. In order to do so, we will first model the supply chain costs, then
minimize them and finally find the optimal order quantity as shown in →Figure 11.4.
Figure 11.4 Inventory optimization journey.
11.2.2 Costs
As we did in Chapter →2 for the EOQ model, let’s start this new model by discussing the costs and
see how we can minimize them later.
We will be looking at two types of costs for the newsvendor model: the overage costs c and
o
These are the costs the supply chain faces if a product is not sold at the end of a period (they
would literally be over the saleable age). These costs are also sometimes called excess costs and
actually have multiple components:
Purchase cost ( c ) If we assume that the products can’t be sold anymore at the end of a period
(in other words, they are considered to be lost), the main overage cost is then the
product purchasing costs (including all transportation, packaging and other
costs). Note that, in the newsvendor literature, the purchase cost is sometimes
noted w, as the model often describes a retailer buying its products from a
wholesaler.
Salvage value ( s ) The salvage value can either be an income (salvage price) or a cost (salvage
v
cost).
Income In some cases, you will be able to sell the remaining goods at the
end of a period at a discounted price. This happens, for example,
if your supplier will take back the goods or if you have a sales
channel selling the remaining goods at a discounted price (think
about the multiple yearly sales in the fashion industry). This
salvage value reduces the overage costs, as part of the purchase
cost will be recovered. When the salvage value is an extra income
we call it the salvage price.
Cost In other cases, a company faces extra costs to dispose of its
excess inventory (e. g., waste disposal). In such a case, the salvage
cost should then be added on top of the purchasing cost.
Holding costs ( h ) If you can sell your products over the next period, you don’t lose the full
purchase cost but simply the expense of the holding cost h (as defined in Section
→2.1.1 for the EOQ model).
Let’s recap the overage costs. If we assume that we cannot sell the products in a later period,
we have:
Overage Costs= Purchase cost − Salvage value
co = c − sv
co = h
Again, note that the salvage costs can be actually a salvage revenue in the case where the leftovers
can still be sold for a profit. For example, that was the case in our muffin case where the salvage
revenue was 1€ (i. e., you sold any remaining piece for 1€); so that the overall overage costs were
actually 1€ (the muffins initial selling price was 2€). We could imagine another scenario where you
have to pay a company to dispose of your leftovers (for example, in the case of hazardous goods).
These are the costs we face if we lose a sale due to a lack of inventory, they are sometimes called
shortage costs.
Profit ( p − c ) If you lose a sale, you lose the opportunity to make a profit. The amount of
unrealized profits are then more an opportunity cost rather than a real expense or
loss. We simply define the profit as the price p minus the cost c.
The profits are included as an underage cost in the newsvendor model when it
minimizes the costs (so that we want to minimize the unrealized profits); but are
not included in the underage cost when the newsvendor model maximizes the
overall profits (otherwise it would include an opportunity cost into an actual
profits estimation).
Goodwill ( g ) This represents any extra cost associated with the risk of losing a client or—even
worse—the damage to your reputation, which could affect other clients buying
decision. As we already discussed in Section →2.1.3, this aspect is particularly
difficult to estimate and might be left to gut feelings rather than academic
research.
Penalty A penalty can be incurred for each lost sale or demand that cannot be delivered
directly from the stock on-hand. For example, these penalties are often used for
maintenance parts when the client values a high service level. When there are
penalties between parties for a lack of service, they are usually defined in the
service agreement between the supplier and the client.
As penalties have a similar effect as goodwill (i. e., an extra cost), we won’t give it
a special symbol in our model. We will group the penalties directly into the
goodwill for the sake of simplicity.
We then have:
Underage Costs= Price − Cost + Goodwill
cu = p − c + g
Note that, in case of potential confusion, we will call the cost of ordering 1 unit too much
(respectively too low) the unit overage (underage) costs. Whereas we call the total expected
overage (underage) costs the total overage (underage) costs.
Keep in mind that this underage cost—as it includes the opportunity cost of losing a sale—is
for analysis purposes and not for accounting.
As shown in →Table 11.2, we can compute the expected sales, excess units and units short4 for any
given order quantity Q and demand d. Then, as we know the demand distribution (either discrete
or continuous), we can compute the expected outcomes only based on Q.
You could see the “Expression (Q, d) ” column as the formula you have to type in Excel to
compute the actual expected values based on Q and d; the “Discrete (Q) ” column are the
formulas we will investigate in this chapter; finally the column “Continuous (Q) ” contains the
formula we discussed in Chapter →7.
Remember, p(d) is the demand probability mass function PMF at the value d, that is the
probability that the demand is d. This is the discrete equivalent to f (d) . D
where p is the sales price, c the (unit) overage cost,5 c the (unit) underage cost and c the
o u
purchasing cost. Note that, in this equation, the underage costs shouldn’t include any opportunity
cost (i. e., the unrealized profit) but only costs such as penalties or goodwill.
Of course, this example only showed us what would happen if the demand was 1 piece. What
about all the other possibilities?
d≤Q
d<Q
d>Q
What is particularly interesting about this profit expression is that it is universal regardless of the
demand probability mass function. This was not the case with the continuous safety stock model
from parts →II & →III, where a formula might change depending on the demand probability
function. This means that we can use any discrete custom demand distribution we need.
Insights
As shown in →Figure 11.5, the intuition here is as Q increases, so do the sales incomes (the higher
Q is, the lower units short you face). The underage costs will also decrease as Q increases (again,
as we face less units short). But, the overage costs and the purchasing costs will grow.
Figure 11.5 Optimal order quantity for the newsvendor model based on profits.
d<Q d>Q
Insights
We already observe in Figures →11.6 and →11.7 that the minimal cost will be achieved when the
underage costs and the overage costs will be equal.
Figure 11.6 Optimal order quantity for the newsvendor model based on profits.
Figure 11.7 Optimal order quantity equilibrium for the newsvendor model.
d<Q d>Q
Note that here the underage costs c include the unrealized profits per unit short.
u
Continuous Model
Economics teach us that the optimal order quantity of our model will be found when the marginal
gain and loss of ordering an excess unit will be equal. In other words, we will reach the
economical optimum when the marginal expected overage and underage costs of ordering an
extra unit are equal. Let’s compute these two marginal costs for the Qth unit ordered. As a
reminder, we note F (Q) the demand CDF at Q, that is the probability that the (continuous)
D
This is the probability for the demand to be lower than the order quantity,
multiplied by the unit overage cost.
Expected marginal underage costs: c (1 − F (Q))
u D
This is the probability for the demand to be higher than the order quantity,
multiplied by the unit underage cost. Note that, for this model, we will include the
profit per unit in the expected marginal underage costs, in order to take into
account the opportunity costs in the total costs.
We can find the optimal order quantity Q by equalizing the expected marginal overage and
∗
Figure 11.8 Optimal order quantity for the newsvendor model based on marginal costs.
Mathematically, we have:
c o F D (Q)= c u (1 − F D (Q))
(c u + c o )F D (Q)= c u
cu
F D (Q)=
cu + co
This means that with the optimal order quantity Q , we have an optimal cycle service level α
∗ ∗
equal to the ratio c /(c + c ) . This ratio is called the critical ratio.
u u o
cu cu (11.3)
∗ ∗ ∗ −1
α =F D (Q )= ⇔ Q =F D ( )
cu + co cu + co
In other words, if the demand is assumed to be continuous, the optimal cycle service level α ∗
Discrete Model
Optimizing the discrete newsvendor model is slightly more complex than the continuous one. In
his book, Cachon proposes to tackle this problem by a similar approach (i. e., looking at marginal
costs).7 We want to increase our order quantity Q as long as the expected increase in overage
costs is lower than the expected underage cost reduction of ordering an extra unit.
The (total) expected underage cost reduction, if we order Q + 1 instead of Q is:
c u P (D > Q)
which is the probability that we sell more than Q, multiplied by the unit underage cost c . u
which is the probability that we sell Q or less units, multiplied by the unit overage cost c .
o
So, we want to order Q + 1 instead of Q only if the expected overage cost increase is lower
than the expected underage cost reduction:
c o P (D ≤ Q)≤ c u P (D > Q)
c o P (D ≤ Q)≤ c u (1 − P (D ≤ Q))
c o P (D ≤ Q)≤ c u − c u P (D ≤ Q)
c u P (D ≤ Q) + c o P (D ≤ Q)≤ c u
P (D ≤ Q)(c u + c o )≤ c u
cu
P (D ≤ Q)≤
cu + co
we want to increase Q (i. e., it is simply more profitable to order more units). So that the optimal
order quantity Q is the lowest order quantity Q that achieves
∗
cu
P (D ≤ Q) ≥
cu + co
That is, the lowest value for which we do not want to order more.
Another demonstration, based on total costs, is available in Appendix →B.5.
11.4 Recap
The newsvendor model allows us to answer the question “How much should I order before the
season?” for products that need to be ordered before the sales cycle. In order to do so, we have to
compute two types of costs:
Overage costs ( c ) All the costs related to having too many products at the end of the season.
o
Section →11.3.5):
∗
cu ∗ −1
cu
α = ⇔ Q = F ( )
D
cu + co cu + co
We can compute the expected sales, extra units and units short (see →Table 11.2) as:
We have this general expression for the profits (see eq. →11.3.2 in Section →11.3.2):
Revenues= p ⋅ Sales
If the demand is discrete, we can then express the total profits based on Q solely as we know the
demand probability mass function (see eq. →11.1 in Section →11.3.3):
P(Q) = p ∑ p(d)d − c o ∑ p(d)(Q − d) − c u ∑ p(d)(d − Q) − c ⋅ Q
d=Q
(d − Q)f (d) dd
12 Discrete Probabilistic Demand
In Part →II, “→Stochastic Supply Chains,” we initially assumed our demand to be normally
distributed. Later, in Chapter →9, “→Beyond Normality,” we analyzed gamma-distributed
demand. We will discuss in this chapter multiple techniques to estimate a demand distribution (or
density) via a custom probability mass distribution. In other words, we won’t use a predefined
continuous probability function to estimate our demand anymore, instead we will create a tailor-
fitted discrete distribution for it instead. Next, in Chapter →13 “→Simulation Optimization,” we
will discuss how to optimize a policy with a custom demand distribution.
12.1 Histograms
A first technique to estimate (discrete) demand density is to use histograms, as shown in →Figure
12.1 (using Toyota sales in Norway with an arbitrary choice of 10 bins starting at 550 and ending at
2050).1
Creating a histogram is simple (see Section →9.1.1 for a DIY in Python), but it requires that
you make arbitrary choices that come with issues. In order to understand the limitations, let’s
recap how a histogram is built.
12.1.1 Limitations
Using a histogram to estimate the demand distribution comes with 4 main issues:
1. A probability is only given to a few values: the values at the center of the bins. For
example, in the resulting demand distribution from →Table 12.1, there is 21.7%
chance to have a demand of 1375 units, but 0% of having 1376.
Figure 12.2 Demand density based on a histogram with 10 bins.
2. We do not know how many bins we should use. As shown in →Figure 12.3, the
number of bins will impact the representation we have of the demand
distribution.
3. We do not know what the histogram limits should be (left and right edges).
Choosing another set of limits will also change the demand distribution
representation. For example, the two distributions obtained in →Figure 12.2 do
not give us the same demand distribution, whereas the only difference is the
histogram edges (respectively [550,2050] and [668,1901]).
To summarize, based on the arbitrary choices we make about the number of bins
and where they start, we can get a completely different picture of the (demand)
distribution.
4. The resulting demand distribution is not continuous (in other words, smooth). As
you can see in →Figure 12.1 the variation between two consecutive bins can be
rather high. For example, we have 23.3% for the demand to be 1525, but only
10.8% to be 1675. This is an abrupt change and it would be more realistic to see a
smooth decrease, but obviously (as stated earlier), with only a few possible
demand values, a smooth variation is difficult.
Figure 12.3 Impact of different numbers of bins on the demand distribution.
12.2 Kernel Density Estimation
We can improve our demand distribution estimation by getting rid of the issue of the arbitrary
number of bins, and the histogram limits. In order to do so, we will allocate a small density
probability around each demand observation thanks to a kernel function.2
This should be more accurate than a histogram where each observation is allocated to the closest
bin. Now each observation will get its own bin.
Let’s see a first simple example to understand how it works.3
12.2.1 Squared Kernel
As a first test, we will use a squared (or box) kernel. In other words, we will allocate a density
around each observation by drawing a square around it as shown in →Figure 12.4 (here with a
bandwidth of 20). The overall (demand) density is then the sum of density around each point. In
other words, if the kernels (represented by the dotted squares) around neighboring points
overlap, we simply map the resulting density as the sum of these kernels. The resulting demand
distribution is then the normalized4 sum of the distribution around each and every demand point.
12.2.2 Limitations
We solved two issues of the histogram—we don’t have to determine arbitrarily the number of
bins nor the edges of our distribution—but we still face other limitations:
1. The resulting distribution is not smooth because we have used a discontinuous
kernel as our building block. This will result in abrupt changes in the demand
density estimation.
2. We do not know what the bandwidth of our kernel should be. In other words,
what the ideal width is for each square.
As you can see in →Figure 12.5 (with a bandwidth of 40), depending on the bandwidth we use for
the squares, we get a different demand estimation (even a different overall interpretation of its
distribution).
Figure 12.5 Demand distribution based on squared kernels (bandwidth = 40).
Kernel Optimization
We have one last issue to solve: how to optimize the bandwidth of our kernel. In other words, how
wide should the normal distributions we draw around each datapoint be?
Usually, academics use the Silverman or Scott rule of thumbs to optimize the kernel bandwidth.5
Both rules of thumbs compute the bandwidth in a (very) similar fashion:
1 (12.1)
Scott: bandwidth=σ d
1/5
n
1
Silverman: bandwidth= σ d
3 1/5
( n)
4
where n is the number of demand observations in the dataset and σ is the standard deviation
d
Based on practical experience, it seems that Scott’s rule of thumbs tends to underfit the true
underlying distribution.6 In other words, as you can see in →Figure 12.8, the resulting distribution
will be too smooth (loose). Setting the bandwidth at 90% of Scott’s rule might then be a more
appropriate choice (the resulting distribution will be less smooth based on a lower bandwidth).
12.3 From Gaussian Kernels to Discrete Distributions
We just used a Gaussian kernel density estimation to determine a custom continuous demand
distribution based on a set of demand observations. The objective of this Part is to build a discrete
simulation optimization (we will create the optimization engine in Chapter →13), therefore we
now have to transform this distribution from a continuous PDF to a discrete PMF. For each
possible (integer) demand value within the range of our demand distribution, we want to
estimate its probability to occur.
When we transfer this continuous distribution to a discrete one, it will not be feasible to compute
the probability for an infinite number of possible demand values. Especially as we know that the
probability for the demand to be extremely high (or low) is (virtually) zero.
This means that we have to define a reasonable range of possible demand values. In practice,
this means setting a lower and an upper bound to the demand distribution. A simple way to do
that is to set these arbitrarily. But we risk cutting the distribution too thin (resulting in losing some
possible values) or too wide (resulting in a slower simulation).
We can use a smarter technique: we can set these bounds based on the lowest and the
highest demand observations, respectively, subtracted or added to an arbitrary multiple of the
bandwidth.
As shown in →Figure 12.10, the lower bound can, for example, be set as the lowest
observation minus 3 times the bandwidth.
Figure 12.10 Lower and higher bounds for a demand distribution estimation via KDE.
As Φ(−3) = 0.13 , it means that there is a probability of only 0.13% for an occurrence of the
normal kernel around the lowest observation to be even lower.7 Moreover, as the overall
distribution contains n kernels, the probability for an occurrence of the demand distribution to be
below this threshold is 0.13
n
% (assuming that the probability for an occurrence of any other
kernel is lower than the lowest bound is 0). You can then set your own safety factor to arbitrarily
reduce this probability. Nevertheless, a factor such as 3 or 4 should be enough.
Finally, as we want to define our discrete distribution for round numbers, we have to round
the lower and upper bounds to an integer value. As a final conservative measure, we can round
them to the lower and upper integer respectively.
12.3.2 Demand Attributes
Now that we have defined a custom demand distribution (PMF) over a domain (x), we can
compute the demand distribution mean as:
μ d = ∑ pmf i ⋅ x i
2 2
Var d = ∑ x i ⋅ pmf i − ∑ (x i ⋅ pmf i )
i i
σ d = √ Var d
12.4 Recap
As shown in →Figure 12.11, we can estimate a demand probability distribution thanks to a kernel
distribution estimation (KDE). We do this in two steps:
1. Drawing a kernel (i. e., a distribution function) around each demand observation
2. Estimating the demand distribution as the (normalized) sum of the kernels
We saw that using a normal distribution as the kernel was a meaningful choice because it would
result in a smooth demand estimation.
Figure 12.11 Gaussian kernel with σ = 40 .
The kernel bandwidth (i. e., the standard deviation of the normal distribution around each
demand observation) can be estimated by Scott’s rule of thumb:
1
Bandwidth = σ d ⋅ (see eq. 12.1 in Section 12.2.3)
1/5
n
backorder cost b that is a cost per unit short as in Chapter →8). In other words, we pay a
penalty based on how long clients have to wait for their goods to be delivered (rather than a
single penalty for not having the goods immediately).
We want to find an inventory policy that minimizes the costs of our supply chain. This would be
difficult to do with the mathematical models we’ve seen so far. Therefore, we will use sim-opt.
then,
If the ratio between the returned cost and the optimal cost is higher than a
threshold, we stop our search algorithm:
cost
if > threshold ⇒ Stop
∗
cost
Figure 13.1 Method #1 – start at 0 and increase. Sim-opt with 248 iterations and a step-size of 14.
As we can see, starting with a safety stock level of 0 is not the smartest choice since the cost in
this region is particularly high. We will discuss a smarter technique later in this section.
Let’s discuss two important parameters of our search algorithm: the step-size and the
threshold.
Using a small step-size will make our algorithm slow. But it should allow us to find a better
inventory level thanks to a more detailed searching grid. Typically, the step-size can be set as an
arbitrary percentage of the mean demand (1 to 5%). It can also be based on practical limitations: if
you are required to buy a product in batches of 100 pieces, a step-size of 100 seems a good
choice.
The threshold defines the ratio (between the latest simulated cost and the current optimal cost)
determining when we stop the search algorithm.
cost
if > threshold ⇒ Stop
∗
cost
A high threshold will allow us to search in a larger area, at the expense of a longer running time.
Due to the simulation output variability (as you can see in →Figure 13.1), a too small threshold
might stop the simulation too early just because one simulation-step might return a skewed
result. The more complex your supply chain is (i. e., complex lead time, customer behavior), the
more variable the simulation result might be, and so you might want to increase the threshold.
Another way to decrease the variability is to increase the number of timesteps in the simulation,
which, unfortunately, will increase the running time.
Method #2 – Smart Start and Double Runs
We saw in →Figure 13.1 that starting the search with an initial safety stock of 0 is not the smartest
starting position: the simulated cost in this region is really high. A smarter starting position would
have been around 1500 to 2500 pieces.
Instead of starting at 0 and increasing the safety stock level at each step, we can choose a
smarter starting position and search the optimal safety stock level by performing a search in two
directions. In other words (as shown in →Figure 13.2), we will perform two searches: one with a
positive step-size, and a second search with a negative step-size (we decrease the safety stock to
see if it results in lower costs).
Figure 13.2 Method #2 – Smart Start and Double Runs.
Naturally, we do not know the optimal amount of safety stock, since this is the reason why we
are doing simulations. So how can we find a good starting position? We will use heuristics to find
a good starting position and start searching for the optimal policy from there.
Let’s assume that the demand and the lead time are normally distributed. Based on this
assumption, we know the optimal service level (see eq. →8.3 in Section →8.2.1) and we know how
much safety stock will be needed to achieve this cycle service level (see eq. →6.5 in Section
→6.3.3):
hR
α= 1 −
b
2 2 2
S s = z α √ (μ L + R)σ + σ μ
d L d
We can then start our search algorithm at this level of safety stock.
As you can see in Figure
→13.3, if we use this heuristic as a starting point for our simulation optimization, we end up
performing fewer iterations to find the optimal2 policy.
Figure 13.3 Method #2 – smart start and increase/decrease. Sim-opt with 153 iterations and a
step-size of 14 (against 248 iterations with Method #1).
Improving the Sim-Opt Further
The two methods presented here are of course simple ones. They only serve as an introduction to
simulation optimization. Here are a few ideas on how to achieve a faster optimization algorithm.
Feel free to test your own.
Faster simulation The code presented throughout this chapter is, as discussed in the
introduction, not optimized for speed. It seems feasible to make each simulation
loop 10x faster (and even more).
Two loops The idea here is to do a search in two loops. The first loop with a wide grid (i. e., a
big step-size); and a second one, starting at the optimum of the first, with a much
more detailed grid (i. e., small step-size). In other words, we first look quickly to
find the general area where the optimum might be; then we look in closer detail
to find where it actually is.
Smoothing results As you saw in →Figure 13.3, the simulated costs can be noisy. You could
reduce this variability by running each simulation during more timesteps, but this
will be (very) expensive (i. e., it will take time). Another way to reduce the result
variability is to smooth the results—for example, by replacing each result by the
average of the 3 closest observations.
Variable step-size Instead of performing fixed steps in the search algorithm, you could make
them bigger (or smaller) based on the slope of the cost decrease.
Approximation function After a few cost observations, you can fit a (polynomial) function to
them, and then look for this function’s minimum. Machine learning could even be
used here to approximate the cost function.
So far we’ve analyzed sim-opt techniques with one parameter (the safety stock in our case),
but what if we want to optimize more complex policies with multiple parameters at once?
Let’s imagine now that we want to follow an (R, s, Q) policy. Remember that, with this policy,3
we check every review period R if the inventory reached s. If so, we order Q units (or a multiple of
Q if this is not enough to bring the inventory level back to s).
This policy is rather difficult to optimize mathematically, even when you assume normal or
gamma-distributed demand with fixed lead times.4 Therefore, when we have a custom PMF for
the demand and for the lead time, together with a backlog cost, we should revert to a simulation
to optimize our policy.
In an (R, s, Q) policy, the ordering cost is usually optimized with Q. As we saw in Chapter →2,
“→How Much Should I Order?” the higher the order quantity is, the lower the ordering costs are;
but also the higher the holding costs are. We usually assume that simply checking the inventory
(once per review period) does not incur any cost. If this is indeed the case, you want R to be as
small as possible. On the other hand, if simply checking the inventory position is already a cost—
this can be the case if you need to physically count the inventory—you might want to try multiple
values for R following a similar method to the one we just discussed for the (R, S) policy.
In Chapter →8, “→Cost and Service Level Optimization,” we discussed two sets of equations to
determine the optimal service level. One for an (R, S) policy (eq. →8.3 in Section →8.2.1) and one
for an (s, Q) policy (eq. →8.4 in Section →8.3.1):
∗
hR
(R, S) α = 1 −
b
∗
hQ
(s, Q) α = 1 −
bD
None of these perfectly match the (R, s, Q) policy. Nevertheless, we have to find a heuristic to
find a good starting position. When hesitating between two estimations, a good approximation is
to take the average of the two. This is an application of the wisdom of the crowd.5 Our starting
service level could then be:
1 hR hQ
α = (1 − + 1 − )
2 b bD
Reorder-point s
We can use the usual equation of the (s, Q) policy in order to compute the required safety stock.
But the lead time L alone is not a good estimation of the risk-period x in an (R, s, Q) policy.
τ
Instead, we could use L + R as the risk-period length—as for an (R, S) policy—but as shown by
Tempelmeier,6 this might be too much. We will then choose an in-between solution and set the
risk-period x as L + R/2 . In other words, we assume that the risk-period is around L + R/2
τ
S s = zσ d √ L + R/2
s= d L + d R/2 + S s
Order Quantity Q
We can simply use the EOQ formula (see eq. →2.2 in Section →2.2.2):
∗
2kD
Q = √
h
or use a generalized expression of the stochastic EOQ formula (see eq. →8.5 in Section →8.3.1)
that includes the expected backorders per cycle:
2(k + b U s )D
∗ √
Q =
h
Using this equation is trickier: we do not know the expected backorders per cycle U . On top of
s
that, we use in our example a backlog cost b rather than a backorder cost b. Nevertheless, even
τ
by using rough approximations (such as U = 0.02 ⋅ Q and b = 1.1 ⋅ b ) you might get a better
s τ
13.3 Stability
Simulation optimizations have one (quite significant) issue: the results are random. If you run the
same sim-opt twice, you will most likely get different results. This is explained by the fact that
simulations are based on random events, so their ultimate cost estimation is random as well. Two
consecutive sim-opts will often recommend two very similar—but different—policies that will
achieve similar results. But you can also end up with very different policies that still achieve similar
outcomes!
Nevertheless, even small inventory policy variations will make supply chain planners nervous
(potentially causing a bullwhip effect8 with your suppliers). These variations will likely confuse (or
worry) any practitioner, ultimately resulting in a lack of confidence in your inventory policies.
Let’s discuss 3 ways to make your sim-opt more stable.
13.4 Recap
As we have seen throughout this book, mathematical models can only take us so far to optimize
real supply chains. This is where simulation optimization (sim-opt) will help by finding (very) good
inventory policies without requiring any mathematical model. Nevertheless, this comes at the
expense of computation time. Sim-opt should therefore be used when the supply chain at hand is
too complex to be properly approximated by mathematical models.
We discussed three sim-opt algorithms:
Simple search We start by simulating a policy with 0 safety stock. We perform new simulations
(each time increasing the safety stock by a step-size) until we find an “optimal”
amount.
Smart start and double search We start at a better initial position (based on heuristics) and
perform two searches: one by increasing the safety stock level and one by
decreasing it.
Black box algorithm We can also rely on external black box algorithms (such as those provided
by Python’s libraries).
In order to find an appropriate initial set of parameters for our search algorithms, we have to use
heuristics. These will allow us to perform a quicker search as we start closer to the optimal policy.
We can base our heuristics on the previous chapters, especially Chapter →8, “→Cost and Service
Level Optimization,” that gave us equations to optimize (R, S) and (s, Q) policies.
Finally, simulation optimizations face one drawback: they always provide (slightly) different
results. We saw that a good practice is to update an inventory policy only if it brings significant
improvement. You can also increase the number of timesteps in the sim-opt in order to get more
stable results.
A Python
If this is your first time using Python, let’s take some time to quickly introduce and discuss the
different libraries and data types we are going to use. Of course, the goal of this book is not to
give you full training in Python; if you wish an in-depth introduction (or if you are not yet
convinced to use Python) please refer to the recommended courses in the introduction.
Lists
The most basic object we will use in Python is a list. In Python, a list is simply an ordered sequence
of any number of objects (e. g., strings, numbers, other lists, more complex objects, etc.). You can
create a list by encoding these objects between []. Typically, we can define our first time series ts
as:
These lists are very efficient at storing and manipulating objects, but are not meant for
number computation. For example, if we want to add two different time series, we can’t simply
ask ts + ts2, as this is what we would get:
NumPy
This is where the famous NumPy1 library comes to help. Since its initial release in 2006, NumPy
has offered us a new data type: a NumPy array. This is similar to a list, as it contains a sequence of
different numeric values, but differs in the way that we can easily call any mathematical function
on them. You can create one directly from a list like this:
Note that the result is another NumPy array (and not a simple list).
NumPy most often works very well directly with regular lists because we can use most of the
NumPy functions directly on them. Here is an example:
You can always look for help on the NumPy official website.2As you will see yourself, most of
your Google searches about NumPy functions will actually end up directly in their documentation.
Slicing
To select a particular value in a list (or an array), you simply have to indicate between [] the index
of its location inside the list (array). The catch—as with many coding languages—is that the index
starts at 0 and not at 1; so that the first element in your list will have the index 0, the second
element the index 1, and so on.
If you want to select multiple items at once, you can simply indicate a range of index with this
format: [start:end]. Note that,
If you do not give a start value, Python will assume it is 0.
If you do not give an end, it will assume it is the end of the list.
Note that the result will include the start element but exclude the end element.
If you give a negative value as the end, Python will start by counting backward from the last
element of your list/array (-1 being the last element of your array).
You can slice a multi-dimensional array by separating each dimension with a comma.
Pandas
Pandas is one of the most used libraries in Python (it was created by Wes McKinney in 2008). The
name comes from panel data, because it helps to order data into tables. Think Excel-meets-
databases in Python. This library introduces a new data type: a DataFrame. If you’re a database
person, just think about a DataFrame as an SQL table. If you’re an Excel person, just imagine a
DataFrame as an Excel table. Actually, a DataFrame is a sort of data table where each column
would be a NumPy array with a specific name. That will come in pretty handy because we can
select each column of our DataFrame by its name.
There are many ways to create a DataFrame, let’s create our first one by using a list of our two
time series.
The convention is to import pandas as pdand to call our main DataFrame df. The output we get
is a DataFrame where we have 6 columns (named ’0’,’1’,’2’,’3’,’4’and ’5’) and 2 rows (actually,
they also have a name—or index—’0’and ’1’).
We can easily edit the column names:
Pandas comes with very simple and helpful official documentation.3When in doubt, do not
hesitate to look into it. Just as for NumPy, most of your Google searches will end up there.
Slicing DataFrames
There are many different techniques to slice a DataFrame to get the element or the part you want.
This might be confusing for beginners, but you’ll soon understand that each of these has its uses
and advantages. Do not worry if you get confused or overwhelmed: you won’t need to apply all of
these right now.
You can select a specific column by passing the name of this column directly to the
DataFrame either with df[’myColumn’] or even more directly with df.myColumn.
You can select a row based on its index value by simply typing df[myIndexValue].
If you want to select an element based on both its row and column, you can call the method
.loc on the DataFrame and give it the index value and the column name you want. You can
for example type df.loc[myIndexValue,’myColumn’]
You can also use the same slicing method as for lists and arrays based on the position of the
element you want to select. You then need to call the method .iloc to the DataFrame.
Typically, to select the first element (top left corner), you can type df.iloc[0,0].
As a recap, here are all the techniques you can use to select a column and/or a row:
Dictionaries
Another way to create a DataFrame is to construct it based on a dictionary of lists or arrays. A
dictionary is a collection of elements that links (unique) keys to values. You can create one by
including between {} a key and a value (both can be any Python object).
Here the key ’Small product’will give you the value ts, whereas the key ’Big product’will give
you ts2.
What is handy is that we can now create a DataFrame directly from this dictionary.
We now have a DataFrame where each product has its own column and where each row is a
separate period.
Other Libraries
We will also use other very well-known Python libraries. There are discussed below. We used the
usual import conventions for these libraries throughout the book. For the sake of clarity, we did
not show the import lines over and over in each code extract.
is a library used for all kinds of scientific computation, optimization, as well as statistical
computation (SciPy stands for Scientific Python). The documentation is available on
→docs.scipy.org/doc/scipy/reference but it is unfortunately not always as clear as we would wish
it to be. We mainly focus on the statistical tools and only import them as stats.
To make our code shorter, we will import some functions directly from scipy.statsin our
examples. We can import these as such:
is the library used for plotting graphs. Unfortunately, matplotlib is not the most user-friendly
library, and its documentation is only rarely helpful. If we want to make simple graphs we will
prefer using the .plot() method from pandas.
is another plotting library built on top of matplotlib. It is actually more user-friendly and
provides some refreshing visualization compared to matplotlib. You can check the official website
→seaborn.pydata.org as it provides both clear and inspiring examples.
We don’t use seaborn in this book. Nevertheless, I advise it as a good addition on top of
matplotlib.
B Proofs
B.1 Sum of a Random Number of Random Variables
A = B ⋅ C
The expected value of A is simply the expected value of B times the expected value of C.
E[A] = E[B] ⋅ E[C]
Let’s compute the variance of A. We will start from the definition of the variance of a random
variable X:
1
n (B.1)
2
V [X]= ∑ (x i − E[X])
n
x=1
n n
1 1 2
2
= ∑ xi + ∑ E[X]
n n
x=1 x=1
2 2
V [X]= E[X ] − E[X]
where the conditional operator | means that we estimate a stochastic variable based on the
condition that another variable is known. So that V [A|b] is the conditional probability of V [A]
knowing that B is b.
Thus, since we fixed B as a constant b, A is now defined as a constant times a distribution:
A|b = b ⋅ C
⇒ V [A|b] = b ⋅ V [C]
2 2 2
= ∑(E[A |b] ⋅ p(B = b)) − E[B] E[C]
2 2 2 2
= ∑((b ⋅ V [C] − b E[C] ) ⋅ p B (b)) − E[B] E[C]
Where p B (b) is the probability that the variable B takes the value b.
Let’s simplify →B.4 by using these two relationships:
2 2 2 2
∑ b E[C] ⋅ p B (b) = E[B ]E[C]
We obtain now,
2 2 2 2 (B.5)
V [A] = E[B]V [C] + E[B ]E[C] − E[B] E[C]
We can simplify this further as we know from →B.1 that E[B . So that we can
2 2
] = V [B] + E[B]
2 2 2 2
= E[B]V [C] + (V [B] + E[B] )E[C] − E[B] E[C]
2
= E[B]V [C] + V [B]E[C]
d=x
Where f (d) is the probability density function of the (normally distributed) demand. For the sake
of clarity, we abuse the PDF notation by using f (d) instead of f (d) , and the usual integral
D
d=x
∞ ∞
= ∫ d ⋅ f (d) − x ∫ f (d)
d=x d=x
= Int1 − x ⋅ Int2
−∞ −∞
So that,
∞ ∞ d=x
d=x −∞ −∞
√ 2πσ 2
So that
∞
Int2= ∫ d ⋅ f (d)
d=x
∞
2
d (d − μ)
= ∫ ⋅ exp(− )
2
√ 2πσ 2 2σ
d=x
∞
2
1 (d − μ)
= ∫ d ⋅ exp(− )
2
√ 2πσ 2 2σ
d=x
So that,
∞ ∞
2 2
(d − μ) −(uσ)
∫ d ⋅ exp(− )= ∫ σ(uσ + μ) ⋅ exp( )
2 2
2σ 2σ
x−μ
d=x u=
σ
∞
2
−u
= σ ∫ (uσ + μ) ⋅ exp( )
2
x−μ
u=
σ
∞ ∞
2 2
−u −u
2
= σ ∫ u ⋅ exp( ) + μσ ∫ ⋅exp( )
2 2
x−μ x−μ
u= u=
σ σ
2
= σ ⋅ Int2 1 + μ ⋅ Int2 2
∞
2
−u
Int2 1 = ∫ u ⋅ exp( )
2
x−μ
u=
σ
2
x−μ
−∞ −( )
√2σ
= −(e − e )
2
x−μ
−( )
√2σ
= e
Thanks to the definition of the normal density function (see eq. →B.6), we can transform →B.7
into
2 2
x − μ √ 2πσ 2 (x − μ)
) = √ 2πσ ⋅ f (x)
2
exp(−( ) ) = ⋅ exp(−
2
√ 2σ √ 2πσ 2 2σ
∞
2
−u
Int2 2 = σ ∫ exp( )
2
x−μ
u=
σ
So that,
Int2= ∫ d ⋅ f (d)
d=x
∞
2
1 (d − μ)
= ∫ d ⋅ exp(− )
2
√ 2πσ 2 2σ
d=x
1
2
= (σ ⋅ Int2 1 + μ ⋅ Int2 2 )
√ 2πσ 2
1
2
⋅ √ 2πσ ⋅ f (x) + μ ⋅ √ 2πσ (1 − F (x)))
2 2
= (σ
√ 2πσ 2
2
= σ f (x) + μ(1 − F (x))
d=x
∞ ∞
= ∫ d ⋅ f (d) − x ∫ f (d)
d=x d=x
= Int1 − x ⋅ Int2
2
= σ f (x) + μ(1 − F (x)) − x(1 − F (x))
2
= σ f (x) + (μ − x)(1 − F (x))
B.3 Loss Function Derivative
We define the loss function as
dι
dL (ι)
dι
L (ι) = ∫
Cost Expression
We compute the cost per period as
= ∫
= ∫
= −
= −
dL (ι)
dι
dι ⎝
⎜⎟
ι
dL (ι)
=
d ⎛
∫
⎝
∞
(x − ι)f (x) dx
∂ι
1 −
= −(1 − F (ι))
= F (ι) − 1
ι
ι
∞
= F (ι) − 1
(x − ι)f (x) dx
(x − ι)f (x) dx
−f (x) dx
f (x) dx
−∞
f (x) dx
⎞
(B.8)
k b Us
C period = h(C s + S s ) + +
R R
where h is the period unit holding cost (i. e., the cost of keeping one unit in stock for one period).
We also know that C = dR/2 . We will express the safety stock S based on ι the inventory level
s s
at the beginning of the risk-period (i. e., the policy parameter S):
S s = ι − μ x = ι − d(R + L)
k b L x (ι)
C = h(ι − d(R/2 + L)) + +
R R
where L x (ι) is the loss function of the demand over the risk-period computed at ι.
Remember that
∂L x (ι)
= F x (ι) − 1
∂ι
Cost Optimization
In order to compute the optimal service level, we can simply take the derivative of the cost
function based on ι and set it to zero.
∂C (z) ∂(ι − d(R/2 + L)) b ∂L x (ι)
= h + = 0
∂z ∂ι R ∂ι
hR + b (F x (ι) − 1) = 0
hR
+ F x (ι) − 1 = 0
b
hR
F x (ι) = 1 −
b
∗
hR
Optimal cycle service cycle = α = 1 −
b
and
∗ −1
hR
ι = Fx (1 − )
b
where h is the yearly unit holding cost (i. e., the cost of keeping one unit in stock for one year). We
also know that C = Q/2 . We will express the safety stock S based on ι the inventory level at
s s
the beginning of the risk-period (i. e., the policy parameter S):
S s = ι − μ x = ι − dL
D D
C = h(Q/2 + ι − dL) + k + b L x (ι)
Q Q
where L x (ι) is the loss function of the demand over the risk-period computed at ι.
Remember that
∂L x (ι)
= F x (ι) − 1
∂ι
Cost Optimization
In order to compute the optimal service level, we can simply take the derivative of the cost
function based on ι and set it to zero.
∂C (z) ∂(Q/2 + ι − dL) Db ∂L x (ι)
= h + = 0
∂z ∂ι Q ∂ι
bD
h + (F x (ι) − 1) = 0
Q
bD bD
h + F x (ι) − = 0
Q Q
hQ + bD F x (ι) − bD = 0
hQ
F x (ι) = 1 −
bD
and
∗ −1
hQ
ι = Fx (1 − )
bD
d=0 d=Q
where c and c are the overage and underage costs ( c includes the profits as the lost
o u u
C (Q) − C (Q + 1) ≤ 0
Figure B.1 Optimal order quantity for the newsvendor model based on profits.
Q Q+1 ∞ ∞
= ∑ p(d)(Q + 1 − d)
d=0
and,
∞ ∞
= ∑ p(d)(d − Q)
d=Q+1
Q ∞
d=0 d=Q+1
Q ∞
c o (∑ p(d)(−1)) + c u ( ∑ p(d)(1)) ≤ 0
d=0 d=Q+1
co
− P (D ≤ Q) + 1 − P (D ≤ Q) ≤ 0
cu
co
− P (D ≤ Q) − P (D ≤ Q) ≤ −1
cu
co
P (D ≤ Q) + P (D ≤ Q) ≥ 1
cu
co
P (D ≤ Q)( + 1) ≥ 1
cu
cu + co
P (D ≤ Q)( ) ≥ 1
cu
words, it means that ordering one more unit will increase the total costs as of when
P (D ≤ Q) ≥ (c )/(c + c ) . Since the cost function is concave, we conclude that, in order to
u u o
have the optimal Q , we have to pick the smallest order quantity Q that satisfies:
∗
cu
P (D ≤ Q) ≥
cu + co
Bibliography
Aberdeen (2012). Inventory optimization – impact of a multi-echelon approach. Technical report,
Aberdeen. a, b
Andrade, A. and Sikorski, C. (2016). Numerical approximation of the inverse standardized loss
function for inventory control subject to uncertain demand. Paper presented at the Canadian
Operations Research Society Conference, Banff, Alberta. a, b
Andriolo, A., Battini, D., Grubbström, R. W., Persona, A., and Sgarbossa, F. (2014). A century of
evolution from Harris’s basic lot size model: survey and research agenda. International Journal of
Production Economics, 155:16–38. a, b
Axsäter, S. (2015). Inventory Control (International Series in Operations Research & Management
Science Book 225). Springer. a, b, c, d
Billington, C., Callioni, G., Crane, B., Ruark, J. D., Rapp, J. U., White, T., and Willems, S. P. (2004).
Accelerating the profitability of Hewlett-Packard’s supply chains. INFORMS Journal on Applied
Analytics, 34(1):59–72. a, b
Burgin, T. A. (1972). Inventory control with normal demand and gamma lead times. Operational
Research Quarterly (1970–1977), 23(1):73–80. a, b, c, d
Burgin, T. A. (1975). The gamma distribution and inventory control. Journal of the Operational
Research Society, 26(3):507–525. →
Burgin, T. A. and Wild, A. R. (1967). Stock control—experience and usable theory. Journal of the
Operational Research Society, 18(1):35–52. a, b
Cachon, G. (2018). Matching supply with demand: an introduction to operations management.
McGraw-Hill Education, New York, NY. a, b, c, d, e, f
Ciortan, M. (2018). Kernel density.
https://github.com/ciortanmadalina/modality_tests/blob/master/kernel_density.ipynb. Online;
accessed 05-September-2019. a, b
Clark, A. J. and Scarf, H. (1960). Optimal policies for a multi-echelon inventory problem.
Management Science, 6(4):475–490. a, b
Cobb, B. R., Rumí, R., and Salmerón, A. (2013). Inventory management with log-normal demand
per unit time. Computers & Operations Research, 40(7):1842–1851. a, b
Cooper, W. L., Homem-de Mello, T., and Kleywegt, A. J. (2006). Models of the spiral-down effect in
revenue management. Operations Research, 54(5):968–987. a, b
de Kok, T. (1991). Basics of inventory management (Part 2): The (R,S)-model, volume FEW 521 of
Research Memorandum FEW. Faculteit der Economische Wetenschappen.
de Kok, T. (2018). Inventory Management: Modeling Real-life Supply Chains and Empirical Validity.
Foundations and Trends(R) in Technology, Information and Operations Management, 11(2):343–437. a,
b
De Smet, N., Aghezzaf, E.-H., and Desmet, B. (2018). Optimising installation (R,Q) policies in
distribution networks with stochastic lead times: a comparative analysis of guaranteed- and
stochastic service models. International Journal of Production Research, pages 1–18. a, b
Duong, T. (2001). An introduction to kernel density estimation.
http://www.mvstat.net/tduong/research/seminars/seminar-2001-05/. Online; accessed 05-
September-2019. a, b
Edgeworth, F. (1888). The mathematical theory of banking. Journal of the Royal Statistical Society,
pages 113–127. a, b
Ehrhardt, R. (1979). The power approximation for computing (s, S) inventory policies. Management
Science, 25(8):777–786. a, b
Ellenberg, J. (2014). How not to be wrong: the power of mathematical thinking. The Penguin Press,
New York. a, b
Erlenkotter, D. (1990). Ford Whitman Harris and the economic order quantity model. Operations
Research, 38(6):937–946. a, b
Eruguz, A. S. (2014). Contributions to the multi-echelon inventory optimisation problem using the
guaranteed-service model approach. Theses, Ecole Centrale Paris. a, b
Eruguz, A. S., Sahin, E., Jemai, Z., and Dallery, Y. (2016). A comprehensive survey of guaranteed-
service models for multi-echelon inventory optimization. International Journal of Production
Economics, 172:110–125. a, b, c, d
Graves, S. C. and Willems, S. P. (2000). Optimizing strategic safety stock placement in supply
chains. Manufacturing & Service Operations Management, 2(1):68–83. a, b, c, d, e, f
Graves, S. C. and Willems, S. P. (2003). Supply chain design: Safety stock placement and supply
chain configuration. In Supply Chain Management: Design, Coordination and Operation, volume 11 of
Handbooks in Operations Research and Management Science, pages 95–132. Elsevier. a, b
Grubbström, R. W. and Erdem, A. (1999). The EOQ with backlogging derived without derivatives.
International Journal of Production Economics, 59(1):529–530. a, b, c, d
Hadley, G. and Whitin, T. M. (1963). Analysis of inventory systems. Prentice-Hall. a, b, c, d, e, f
Harris, F. W. (1913a). How many parts to make at once. Factory, The Magazine of Management,
10:135–136, 152. a, b
Harris, F. W. (1913b). How much stock to keep at hand. Factory, The Magazine of Management,
10:240–241, 281–284. →
Hill, A. (2017). The newsvendor problem.
www.clamshellbeachpress.com/downloads/newsvendor_problem.pdf. Online; accessed 24-April-
2020. a, b
Inderfurth, K. (1991). Safety stock optimization in multi-stage inventory systems. International
Journal of Production Economics, 24(1):103–113. a, b, c, d
Johansen, S. G. and Hill, R. M. (2000). The (r,Q) control of a periodic-review inventory system with
continuous demand and lost sales. International Journal of Production Economics, 68(3):279–286. a,
b
Kenneth, J. A., Harris, T., and Marschak, J. (1951). Optimal inventory policy. Econometrica, 19(3):250–
272. a, b
Kimball, G. (1988). General principles of inventory control. Journal of Manufacturing and Operations
Management, 1:119–130. a, b, c, d
Klosterhalfen, S. and Minner, S. (2010). Safety stock optimisation in distribution systems: a
comparison of two competing approaches. International Journal of Logistics Research and
Applications, 13(2):99–120. a, b
Lee, H. L., Padmanabhan, V., and Whang, S. (1997). The bullwhip effect in supply chains. Sloan
management review, 38:93–102. a, b
Lerner, M. (2013). Histograms and kernel density estimation kde 2.
https://mglerner.github.io/posts/histograms-and-kernel-density-estimation-kde-2.html. Online;
accessed 05-September-2019. a, b
Li, P. (2013). Optimization of (R, Q) policies for multi-echelon inventory systems with guaranteed service.
PhD thesis, Université de Technologie de Troyes. a, b
Maister, D. H. (1976). Centralisation of inventories and the “square root law”. International Journal
of Physical Distribution, 6(3):124–134. a, b
Maxwell, W. L. and Muckstadt, J. A. (1985). Establishing consistent and realistic reorder intervals in
production-distribution systems. Operations Research, 33(6):1316–1341. a, b
Moncayo-Martínez, L. A. and Ramirez, A. (2016). A tutorial to set safety stock under guaranteed-
service time by dynamic programming. International Journal of Industrial and Systems Engineering,
24:490–509. a, b, c, d
Murphy, R. A. (1975). Inventory control with gamma demand and gamma lead times. International
Journal of System Science, 6:81–85. a, b, c, d
Nahmias, S. (1979). Simple approximations for a variety of dynamic leadtime lost-sales inventory
models. Operations Research, 27(5):904–924. a, b, c, d
Nahmias, S. (1994). Demand estimation in lost sales inventory systems. Naval Research Logistics
(NRL), 41:739–757. a, b
Nahmias, S. (2015). Production and operations analysis: strategy, quality, analytics, application.
Waveland Press, Inc., Long Grove, Illinois. a, b
Oroojlooyjadid, A., Snyder, L. V., and Takáč, M. (2020). Applying deep learning to the newsvendor
problem. IISE Transactions, 52(4):444–463.
Qin, Y., Wang, R., Vakharia, A. J., Chen, Y., and Seref, M. M. (2011). The newsvendor problem:
Review and directions for future research. European Journal of Operational Research, 213(2):361–
374.
Robert, R., Gino, K., and Peter, C. (2004). The EOQ and EPQ models with shortages derived without
derivatives. International Journal of Production Economics, 92:197–200. a, b
Scott, D. W. (1992). Multivariate Density Estimation: Theory, Practice, and Visualization. Wiley. a, b
Silver, E. A., Pyke, D. F., and Thomas, D. J. (2016). Inventory and production management in supply
chains. CRC Press, Taylor & Francis Group, Boca Raton. a, b, c, d, e, f
Silverman, B. W. (1986). Density estimation for statistics and data analysis. Chapman and Hall,
London, New York. a, b
Simpson, K. F. (1958). In-process inventories. Operations Research, 6(6):863–873. a, b, c, d
Snyder, R. (1984). Inventory control with the gamma probability distribution. European Journal of
Operational Research, 17(3):373–381. a, b
Sterman, J. (1992). Teaching takes off: Flight simulators for management education. OR/MS Today,
19:40–44. a, b
Strijbosch, L. and Moors, J. (1999). Simple expressions for safety factors in inventory control.
Workingpaper, Econometrics. a, b, c, d, e, f
Syntetos, A., Babai, M., and Altay, N. (2012). On the demand distributions of spare parts.
International Journal of Production Research, 50(8):2101–2117.
Taft, E. W. (1918). The most economical production lot. Iron Age, 101:1410–1412. a, b, c, d
Tayur, S. (2007). Supply & demand chain executive. Supply & Demand Chain Executive. a, b
Tempelmeier, H. (2011). Inventory Management in Supply Networks. Norderstedt. a, b, c, d, e, f, g, h,
i, j, k, l
Thonemann, U. W. (2011). Benefits of multi-stage inventory planning in process industries.
https://api.semanticscholar.org/CorpusID:12077335. Online; accessed 24-April-2020. a, b, c, d, e, f
Tijms, H. C. (1994). Stochastic models: an algorithmic approach. Wiley, Chichester, New York. a, b
Tijms, H. C. and Groenevelt, H. (1984). Simple approximations for the reorder point in periodic and
continuous review (s, S) inventory systems with service level constraints. European Journal of
Operational Research, 17(2):175–190. a, b
Trapero, J. R., Cardós, M., and Kourentzes, N. (2019). Empirical safety stock estimation based on
kernel and garch models. Omega, 84:199–211. a, b
Trietsch, D. (1995). Revisiting ROQ: EOQ for company-wide ROI maximization. Journal of the
Operational Research Society, 46(4):507–515. a, b, c, d
Turrini, L. and Meissner, J. (2019). Spare parts inventory management: New evidence from
distribution fitting. European Journal of Operational Research, 273(1):118–130. a, b
Tyworth, J., Guo, Y., and Ganeshan, R. (1996). Inventory control under gamma demand and
random lead time. Journal of Business Logistics, 17:291–304.
U.S. Census Bureau (2019). 2019 census, business and industry, manufacturing & trade inventories
& sales. a, b, c, d
Vandeput, N. (2021). Data Science for Supply Chain Forecasting. De Gruyter. a, b
VanderPlas, J. (2013). Kernel density estimation in Python.
https://jakevdp.github.io/blog/2013/12/01/kernel-density-estimation/. Online; accessed 05-
September-2019. a, b
VanderPlas, J. (2016). In-depth: Kernel density estimation.
https://jakevdp.github.io/PythonDataScienceHandbook/05.13-kernel-density-estimation.html.
Online; accessed 05-September-2019. a, b
Veinott, A. F. and Wagner, H. M. (1965). Computing optimal (s, S) inventory policies. Management
Science, 11(5):525–552. a, b
Vermorel, J. (2018). The quantitative supply chain. https://www.blurb.com/b/8517792-the-
quantitative-supply-chain. Online; accessed 24-April-2020. a, b
Wang, P., Zinn, W., and Croxton, K. L. (2010). Sizing inventory when lead time and demand are
correlated. Production and Operations Management, 19(4):480–484. a, b
Wanke, P. (2009). Consolidation effects and inventory portfolios. Transportation Research Part E:
Logistics and Transportation Review, 45:107–124. a, b
Wanke, P., Ewbank, H., Leiva, V., and Rojas, F. (2016). Inventory management for new products
with triangularly distributed demand and lead-time. Computers & Operations Research, 69:97–108.
a, b
Ward, J., Oca, A., Zimmerman, M., Acar, K., Sonthalia, B., and Sun, Y. (2019). 30th Annual Council of
Supply Chain Management Professionals (CSCMP) State of Logistics Report. Technical report,
ATKearny. a, b
Whitin, T. M. (1953). The Theory of Inventory Management. Princeton University Press. a, b
Wilson, R. H. (1934). A scientific routine for stock control. Harvard Business Review, 13:116–128. a, b
Glossary
array Data structure defined in NumPy. It is a list or a matrix of numeric values. See page
262
backorders Backlog of orders that are not yet fulfilled. This happens when you do not have
enough on-hand inventory to fulfill the orders directly and when the orders are
not lost. See page 3
coefficient of variation ( CV ) Expresses the relative dispersion of a dataset compared to its
mean, CV = σ/μ . See page 59
correlation ( ρ ) Measures the dependence between two variables. It varies between −1
(straight negative correlation) and 1 (straight positive correlation). A correlation of
0 means no linear correlation. See page 62
cumulative distribution function ( F 𝓧(z) ) Is the probability that an occurrence of a random
distribution X is lower than or equal to a threshold z. We note Φ(z) the CDF of a
standard normal distribution. See page 51
cycle service level ( α ) Probability of not having a stock-out during an order cycle. In other
words, the probability that the inventory at the beginning of an order cycle will be
higher (or equal) than the demand during this cycle. Often called the “Type 1
service level.” See page 46
cycle stock
Cs Stock dedicated to the normal demand (or forecast) consumption. See page
12
DataFrame Table of data as defined by the pandas library. It is similar to a table in Excel or an
SQL database. See page 264
EOQ ( EOQ ) Economical order quantity that optimizes the supply chain costs. Also
called the optimal order quantity. See page 19
excess demand Demand that cannot be served directly from the on-hand inventory. See page 76
fill rate ( β ) Over the long term, the fraction of demand that is supplied directly from on-
hand inventory. Often called the “Type 2 service level,” we note it β. See page 47
Gaussian See standard normal distribution. See page 50
goodwill ( g ) In inventory models, any extra cost associated with the risk of losing a client.
We note it g. See page 214
holding costs Costs related to storing (or simply possessing) products. We note h the yearly
holding costs for one single product (generally expressed as a % of the product
cost). See page 13
in-transit inventory ( I s ) Inventory that is currently ordered from a supplier but not yet
available in our warehouse. See page 35
net inventory Inventory level including: available on-hand inventory and in-transit inventory,
minus backorders, orders not yet shipped, etc. See page 3
NumPy One of the most famous Python libraries. It is focused on numeric computation.
The basic data structure in NumPy is an array. See page 262
on-hand inventory Inventory available right away (“on-hand”) for a client to buy. See page 3
order cycle Time elapsed between two orders. In periodic replenishment policies the order
cycle is R, in continuous policies it is Q/D . See page 12
pandas Python library specializing in data formatting and manipulation. Allows the use of
DataFrames to store data in tables. See page 263
period service level ( αp ) Probability of not having a stock-out during one demand period (e. g.,
day, week). This can be similar or different than the cycle service level depending
on the length of an order cycle. See page 46
probability density function ( f 𝓧(z) ) The higher the probability density function (PDF) of
random distribution X is around a value x, the higher the probability that an
occurrence of this distribution is close to this value x. In other words, if the PDF of
a distribution is high around 1, it is likely that an occurrence of this distribution
would fall close to 1. The PDF of a standard normal distribution is noted φ(x) . See
page 50
probability mass function ( p(x) ) The probability that a discrete probability function is exactly
the integer x. It is the discrete equivalent to the probability density function. See
page 208
risk-period ( xτ ) Maximum amount of time you need to wait to receive an order (from your
supplier). During this period your inventory is at risk of being depleted. See page
66
Root Mean Square Error
∑ e2t See page 157
1
RM SE = √
n
salvage value ( sv ) Either the discounted price at which a product is sold when the inventory
needs to be cleared. Or the cost a company incurs to clear its inventory (e. g.,
recycling, waste disposal). See page 213
service level factor ( z ) A value that multiplies the demand deviation in order to compute the
needed safety stock for a certain service level. See page 56
skewness
( γ1 ) Measure of a distribution asymmetry. It is expressed by a number—just as
the mean or the standard deviation. A positive one means a right skew, and a
negative one means a left skew. See page 149
SKU A stock keeping unit refers to a specific material kept in a specific location. Two
different pieces of the same SKU are indistinguishable. See page 38
standard normal distribution A standard normal distribution with a variance of 1 and a mean
of 0: N (0, 1) . It is also known as a Gaussian distribution. See page 50
transaction costs ( k ) Costs triggered by an order (or a transaction). See page 15
undershoot ( U ) In an (R, s, Q) policy, the expected level of inventory below the reorder
point s that is reached at the review period R when an order is made. See page 70
unit short ( U s ) Number of units missed to entirely fulfill the demand. Equal to the excess
demand. See page 100
vendor managed inventory (VMI) A business model where the supplier of a product takes the
ownership of the stock that its client holds. In practice, it means that the supplier
is managing and responsible for its client’s inventory policy. In some cases the
supplier can also own the inventory held at its client’s premises, we call this
consignment. See page 176
work-in-progress Unfinished piece of inventory currently in the production process or waiting
between two consecutive steps of the production process. Also known as WIP and
work-in-process. See page 84
List of Symbols
Statistics
μX Mean of variable X
σX Standard deviation of variable X
ρ X,Y Correlation between X and Y
E[x] Expectation of variable x
V [x] Variance of variable x
f X (x) Probability density function of distribution X evaluated at threshold x
F X (x) Cumulative distribution function of distribution X evaluated at threshold x
p(x)
Probability for a discrete random variable to be equal to x
P (X ≤ x)
Probability for random discrete variable X to be smaller than or equal to x.
Equivalent of F (x) for a continuous distribution.
X
F
−1
X
(α) Inverse cumulative distribution function of distribution X evaluated at
probability α
L X (z) Loss Function of distribution X evaluated at threshold z
L
−1
(x) Inverse loss function of distribution X evaluated at probability x
X
at threshold x
Φ(x) Standard normal cumulative distribution function evaluated at threshold x
F
N
−1
(α; μ, σ) Inverse cumulative distribution function of the normal distribution N (μ, σ )
2
evaluated at probability α
Φ
−1
(α) Inverse standard normal cumulative distribution function evaluated at probability
α
L N (z; μ, σ) Loss function of the normal distribution N (μ, σ ) evaluated at threshold z
2
probability x
L
N
−1
(x) Inverse standard loss function evaluated at probability x
Inventory Policies
Q Order quantity
R Review period
s Reorder point
S Order up-to level
Deterministic Models
D Yearly demand
d Demand per period
dL Demand over the lead time
dR Demand over the review period
k Fixed transaction costs per transaction
cT Variable transaction costs per unit
h Holding costs per unit per period
Q Order quantity
C (Q) Total (holding and transactions) costs with regard to Q
Q
∗
Optimal order quantity (or EOQ)
C
∗
Optimal total costs
QB
∗
Optimal order quantity with backorders B
B Maximal amount of backorders
bτ Backlog cost (cost per unit in the backlog per unit of time)
r Production throughput per period
ρ Throughput ratio ( ρ = 1 − d/r )
Qρ
∗
Optimal order quantity with production throughput ratio ρ
T Time between two consecutive orders
T
∗ Optimal time between two consecutive orders
Stochastic Models
Cs Cycle stock
Is In-transit stock
Ss Safety stock
Us Units short
α Cycle service level
αp Period service level
β Fill rate
z Service level factor
zα Service level factor for cycle service level α
zβ Service level factor for fill rate β
dc Expected demand over an order cycle
xτ Length of the risk-period
dx Demand distribution over the risk-period
μx Expected demand over the risk-period
σx Demand deviation over the risk-period
b Backorder cost (cost per unit backordered)
bτ Backlog cost (cost per unit in the backlog per unit of time)
Multi-echelon Models
Ss
i
Safety stock held at node i
S
i
Order up-to level at node i
xτ
i
Risk-period covered by node i
gs τ
i Guaranteed-service time at node i
hi
Holding cost at node i
Li
(Incoming) Lead time at node i
d(τ )
Demand over τ periods
ˆ )
Demand bound over τ periods
d(τ
Newsvendor
co Overage cost
cu Underage cost
c (Purchasing) Cost
p (Sales) Price
sv Salvage value
g Goodwill
h Holding cost
C (Q, D) Expected (total) costs based on Q and D
P(Q, D) Expected profits based on Q and D
Subject Index
0
(R, s, Q) policy 1, 2, 3
– heuristic 1, 2
– order quantity 1
– simulation optimization 1, 2
– undershoot 1
(R, s, S) policy 1
(R, S) policy 1
– compared to – – (s, Q) policy 1, 2
– cost optimization 1, 2
– cycle demand 1, 2
– fill rate 1, 2
– gamma demand 1
– heuristic 1
– loss function 1
– multi-echelon inventory optimization 1
– optimal cycle service level 1
– order quantity 1, 2
– order up-to level 1, 2
– periodic review 1, 2, 3
– review period 1
– safety stock 1
– simulation optimization 1
– stochastic lead time 1, 2
(s, Q) policy 1
– compared to – – (R, S) policy 1 see (R,S) policy, compared
to (s,Q) policy
– cost optimization 1, 2
– cycle demand 1, 2
– fill rate 1
– gamma demand 1
– loss function 1
– optimal cycle service level 1
– order quantity 1, 2, 3, 4
– safety stock 1, 2
– stochastic lead time 1, 2, 3
B
backlog 1 see backorder
– cost 1
– cost heuristic 1
– EOQ cost 1
backorder 1, 2
– cost 1, 2, 3, 4, 5, 6, 7, 8, 9
– EOQ 1, 2, 3
– excess demand 1, 2, 3, 4, 5, 6, 7
– KPI 1
– simulation 1, 2
E
EOQ 1, 2
– backorders 1 see backorders, EOQ
– costs 1
– equilibrium 1
– optimization 1, 2
– order quantity 1, 2, 3, 4
– sensitivity 1, 2
excess unit 1 see unit short
F
forecast 1, 2, 3, 4, 5, 6
– order forecasting 1
– unconstraining the demand 1
– with lost sales 1
G
gamma demand 1 see Chapter 9
H
holding cost 1, 2, 3, 4, 5
– EOQ 1 see EOQ
– periodic review 1
I
in-transit inventory 1, 2, 3, 4, 5, 6, 7
L
lost sale 1, 2, 3, 4, 5
M
multi-echelon inventory optimization
– guaranteed-service model 1, 2, 3, 4, 5, 6, 7
– bounded demand 1
– optimum 1 see Chapter 10
– risk-period framework 1
– stochastic-service model 1, 2
N
newsvendor 1, 2, 3
– cost 1, 2, 3
– optimum 1, 2, 3, 4, 5, 6, 7
O
overage cost 1, 2, 3, 4
– optimum 1 see newsvendor, optimum
P
purchasing cost 1, 2, 3, 4, 5, 6
– EOQ with discounts 1
S
service level 1, 2, 3, 4, 5, 6
– backorders 1
– cycle 1, 2, 3, 4, 5, 6, 7, 8
– cycle vs fill rate 1, 2, 3, 4, 5, 6
– factor 1, 2, 3
– fill rate 1, 2, 3, 4
– lost sales 1
– multi-echelon inventory optimization 1, 2
– optimum 1, 2, 3, 4, 5, 6 see Chapter 8
– period 1, 2, 3
– simulation 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
T
transaction cost 1, 2, 3, 4, 5
– EOQ 1 see EOQ
– periodic review 1, 2
U
underage cost 1, 2, 3, 4, 5, 6, 7
– optimum 1 see newsvendor, optimum
unit short 1, 2, 3, 4, 5, 6
V
vendor managed inventory 1, 2
W
work-in-progress 1
Notes
1 See Lokad TV episodes 30 and 33
→https://www.youtube.com/channel/UC5r43_A7T7qXAt
y-uvNuJ5Q
2 →Vermorel (→2018).
1 →Ward et al. (→2019).
2 Immanuel Kant (1724–1804), a German philosopher
during the Age of Enlightenment, prognosticated that,
“From such crooked wood as that which man is made of,
nothing straight can be fashioned.” Can we then really
expect our models to be perfect?
3 My friend François Grisay and I love to say at
conferences that “ 95% of the time, safety stock works
every time.”
4 →Ellenberg (→2014).
5 Stochastic is a fancy word for random. In a stochastic
model the outcome is not know in advance but can be
estimated by statistical distributions; whereas you
always know what will happen in a deterministic model.
6 Multi-echelon inventory policies refer to inventory
policies that deal with complex warehouse networks
with multiple layers (echelons) of stocking points.
7 →Silver et al. (→2016).
8 →Cachon (→2018).
9 →Axsäter (→2015).
10 →Tempelmeier (→2011).
11 →www.edx.org/course/supply-chain-fundamentals
12 →www.edx.orgns-and-manufacturing-systems-
planning-1
13 →www.edx.org/course/introduction-to-computer-
science-and-programming-7
1 We will discuss where to keep inventory in Chapter
→10.
2 MRP stands for Materials Requirements Planning, it is a
software/methodology that is used to plan the sourcing
and production of goods. DRP stands for Deployment
Requirement Planning, it is also a
software/methodology used to plan the delivery of
goods. Due to running time motives, these tools often
run daily or weekly, imposing therefore a periodic
review policy.
3 See →Tempelmeier (→2011), →Tijms (→1994) for more
information.
4 See →Veinott and Wagner (→1965), →Ehrhardt
(→1979), →Tijms and Groenevelt (→1984), →Strijbosch
and Moors (→1999) for detailed models.
5 Tractable is a fancy word that mathematicians use to
describe models or equations that are simple enough to
be used or solved.
1 Typically 10% ≤ h ≤ 25% depending on the industry.
2 Accountants often report it under the acronym COGS
(cost of goods sold).
3 Don’t hesitate to google “Single-minute exchange of
die” to learn more about these techniques.
4 For the sake of simplicity, we abuse the convention here
by discussing the “supply chain costs” whereas we keep
only the relevant costs to our analysis; putting aside
many other costs related to managing a supply chain
(for example, the purchasing costs).
5 The second derivative is positive—its computation is
outside the scope of the book—assuring that we are
looking at a minimum.
6 →Harris (→1913a,→b).
7 →Erlenkotter (→1990).
8 →Wilson (→1934).
9 →Andriolo et al. (→2014) for a thorough analysis.
10 →Taft (→1918).
11 →Hadley and Whitin (→1963).
12 →Grubbström and Erdem (→1999).
13 →Trietsch (→1995).
14 It is often called the Economical Production Quantity
model or EPQ.
15 →Hadley and Whitin (→1963).
16 See →Nahmias (→2015) for a complete overview of such
models.
17 →Trietsch (→1995).
1 We will discuss stochastic lead times later in Chapter
→6, “→Stochastic Lead Times.”
1 See →Strijbosch and Moors (→1999), →Tempelmeier
(→2011) for detailed models.
2 See →Vandeput (→2021).
3 We will discuss normality further in Chapter →9,
“→Beyond Normality.” Nevertheless, the exact
mathematics needed to test demand normality are
beyond the scope of this book, and unfortunately the
assumption of normality is frequently not strictly
respected. Nothing is normal in this world.
4 It is commonly accepted that Thomson Whitin (1923–
2013) introduced stochastic inventory optimization—
and the famous safety stock formula—with his book The
Theory of Inventory Management that he published in
1953 while he was working as a professor at the MIT.
See →Whitin (→1953).
5 See my previous book Data Science for Supply Chain
Forecasting for a detailed discussion about forecast
accuracy and bias.
6 A flat split means that you spread the monthly forecast
equally over each day in the month.
1 Remember, the net inventory level is the available on-
hand inventory and in-transit inventory, minus
backorders, orders not yet shipped, etc.
2 You can compute the probability that the demand
during one period is negative as F (0, μ , σ ) , which
N d d
this isn’t the case, your policy should account for a lead
time bias.
3 In most cases, the lead time variation can be assumed
to be independent of the demand variation. There are
exceptions of course. For example, during periods of
global high demand you could face a supply shortage.
→Wang et al. (→2010) provides mathematical
formulations for such cases.
4 Risk-period ( x ): maximum amount of time you need to
τ