Some math background for supply-chain
Ariel Cal˜
Abstract
Notations and Conventions
Trough all the paper we assume that we have two series of pairs: O=(o_{\textrm{i}},d_{i})_{i=0}^{n} (orders) and S=(q{i},d{i})_{i=0}^{n} (stock movements) each pair up to n-1 is composed of a quantity and a date and represents a log in our inventory archive. the last pair has 0 for quantity by convention and the date is the last day for the time interval under consideration.
For simplicity we assume that we have only one article in stock, so if we have the following logs for the period 1-10 January:
32 items in stock.
1 Jan
Ordered 100 items.
3 Jan
20 items sold.
4 Jan
100 items arrived.
6 Jan
15 items sold.
6 Jan
then we have the following series: O=\{(0,1-\textrm{jan}),(100,3-\textrm{jan}),(-100,6-\textrm{jan}),(0,10-jan)\} and S=\{(32,1-\textrm{jan}),(-20,4-\textrm{jan}),(100,6-\textrm{jan}),(-15,6-\textrm{jan}),(0,10-jan)\} we also denote with t the time interval.
Base statistics
Quantity in stock
Definition
The Quantity in stock is denoted by Q and is given by: Q=\sum _{i=0}^{n}q_{i} .
Rationale
The sum of all the logs gives the amount that is in stock at the end of the period. This is usually the first information that a user wants to know.
Example
Q=32-20+100-15+0=97=
Total sales
Definition
The Total sales is denoted by TS and is given by: TS=\sum _{i=0}^{n}IsSale(q_{i})\qquad \textrm{where}\qquad IsSale(q_{i})=\left\{ \begin{array}{lcl}
-q_{i} & \textrm{if} & q_{i}<0\\
0 & \textrm{if} & q_{i}\geq 0
\end{array}\right.
Rationale
We sum only the negative(sales) amounts changing the sign. this is also an useful information on itself, moreover, dividing it by the total time we have the average daily sale that will be used later for more sophisticated calculations.
Example
TS=0+20+0+15+0=35
Average stock quantity
Definition
The Average stock quantity is denoted by \overline{S} and is given by: \overline{S}=\frac{\sum _{i=0}^{n-1}\left[ \left( \sum _{k=0}^{i}q_{k}\right) (d_{i+1}-d_{i})\right] }{t}
Rationale
For each period of time that the stock amount was unchanged we multiply that period by the corresponding amount adding it to the grand total, at least we divide by the total period. this is an indicator of how much items (in average) we have in stock. If it is too low we are at risk to running out of stock, if too high we maintain a stock greater than we need, and this reflects in increased costs.
Example
i
\sum ^{i}_{k=0}q_{k}
d_{i+1}-d_{i}
(\sum ^{i}_{k=0}q_{k})(d_{i+1}-d_{i)}
0
32
2
64
1
12
3
36
2
112
0
0
3
97
4
388
Total
-
-
488
\overline{S}=\frac{488}{9}=54.\overline{2}
Algorithm
A naive approach can lead to a complexity of O(n^{2}) due to the two nested summatories in the formula, but storing the partial sum in a variable can reduce it to O(n):
PartialTotal = 0
Total = 0
For i=0 to n-1
PartialTotal += q_{i}
Total += PartialTotal * (d_{i+1}-d_{i})
EndFor
Result = Total/t
An alternate way to calculate it.
It can be demonstrated that:
\overline{S}=\frac{\sum _{i=0}^{n-1}\left[ \left( \sum _{k=0}^{i}q_{k}\right) (d_{i+1}-d_{i})\right] }{t}=\frac{\sum ^{n}_{_{i=0}}q_{i}(d_{n}-d_{i})}{t}
this will require a simpler algorithm:
Total = 0
For i=0 to n
Total += q_{i}*(d_{n}-d_{i})
EndFor
Result = Total/t
Example
i
q_{i}
d_{n}-d_{i}
q_{i}(d_{n}-d_{i})
0
32
9
288
1
-20
7
-140
2
100
4
400
3
-15
4
-60
4
0
0
0
Total
-
-
488
\overline{S}=\frac{488}{9}=54.\overline{2}
Average supply time
Definition
The Average supply time also called Average lead time is the average number of days occurring between the order issue and the receiving, is denoted by \overline{L}
Rationale
There is no standard way to calculate it, due to the following factors:
a) The amount received does not necessarily correspond to the amount ordered (i.e. ordered 100 and received 98 or 102).
b) Different quantities can be received in different days.
The best way to estimate it is the judgment of the purchasing responsible.
Example
In our case we received exactly the amount ordered (100 items on 3Th January) 3 days later (6Th January) so we can put \overline{L}=3. Suppose that in the paste we also ordered 100 item but that we received 30 items after 2 day and the remaining 70 after 4 days. what would be the average supply time?
a) \frac{4+2}{2}=3,
b) \frac{4+2}{4}=1.5, or
c) \frac{2x30+4x70}{100}=3.4 ?
Average daily sale
Definition
The Average daily sale is denoted by \overline{D} and is given by: \overline{D}=\frac{TS}{t}
Rationale
Interesting by itself, in that it indicate the average amount sold daily, is needed for the calculation of reorder point (see below).
Example
\overline{D}=\frac{TS}{t}=\frac{35}{9}=3.\overline{8}
Rotation Index
Definition
The Rotation Index is denoted by I_{rot} and is given by: I_{rot}=\frac{TS}{\overline{S}}
Rationale
This very important indicator counts how many cycles of the supply chain are effectuated in the period. The more it is high, the better is the performance. Its inverse indicates how many periods are needed, in average, to complete a cycle.
Example
I_{rot}=\frac{35}{54.\overline{2}}=0.645 thus in the period we completed, in average, little more than an half of the supply chain cycle. The inverse \frac{1}{0.645}=1.55 tell us that we need, in average, 1.55x9=13.95 days to complete a supply chain cycle.
Reorder Point and Safety Stock
Theoretical order point
Definition
The Theoretical order point is denoted by P_{theortical} and is given by: P_{theortical}=\overline{D}\quad \overline{L}
Rationale
Supposing that the demand and the supply time are constant, this indicates the level of stock at which we must issue an order, because, in the time we will receive the items ordered, we will sell all the remaining stock, i.e. if we sell two items each day and we will receive new items ten days after the order was issued, we must order before the stock level falls under twenty items, for not running short of items. On the other hand the more this 'before' is shorter, the best we achieve in performance, since we reduce the dead stock. The ideal is that the new items arrive exactly when the old ones are all sold, no before no later.
Example
P_{theorethical}=3.\overline{8}\, 3=11.\overline{6}so, theoretically, we must order when the stock level falls under twelve.
Safety Stock
Definition
The Safety Stock is denoted by S_{safety} The classical definition is: S_{safety}=\frac{P_{theoretical}}{2} a more general general and flexible (although requires human judgment and intervention) is: S_{safety}=\overline{D}xK where K is a constant denoting the number of supply days we hold in reserve and is defined by the inventory/sales responsible. Note that when K=\frac{\overline{L}}{2} then () is equivalent to ()
Jan Schreibfeder has proposed an alternative definition, details can be found at <www.effectiveinventory.com\article29.html>.
Rationale
In the definition of the theoretical order point we made two assumptions: that both the demand and the supply time are constant. In the real word this is almost never true, so we take a margin of safety to not run short of stock before the replenishment, but we want this margin to be as little as possible to minimize dead stock and improve performance.
Example
S_{safety}=\frac{11.\overline{6}}{2}=5.8\overline{3} for the classical definition, if we use the second definition with, say, K=2 we have S_{safety=11.\overline{6}\, 2=23.\overline{3}}
Order point
Definition
The Order point is denoted by P and is given by:
P=P_{theoretical}+S_{safety}
Rationale
Self evident: we add our margin of safety to the optimal, but risky, theoretical order point.
Example
In the first case: 17.4\overline{9}. In the other one: 34.\overline{9}
Economic Order Quantity (EOQ)
The Economic Order Quantity is the answer to the following question: “how many items do i have to buy in order to minimize the accessory costs related to buy and keeping?”
Before we present the formula, we have to define two variables that we need to carry out the calculation.
The cost of placing an order is the sum of all the costs related to processing orders (purchasing dept.,supplies,phone bills ...) divided by the number of orders (better: the number of item lines in orders) in the time period.
The Inventory cost per item is the sum of all inventory related costs (warehouse dept. warehouse rent, equipment ...) divided by the average stock \overline{S}.
Definition
Let C_{order} be the cost of placing an order, and C_{item}be the inventory cost per item for all the time period, then the Economic order quantity is defined by:
EOQ=\sqrt{\frac{2\, TS\, C_{order}}{C_{item}}}
for the evaluation of C_{order} and C_{item} see section .
Assumptions
This formula is valid under the following assumptions:
The demand rate is known and uniform.
The price is the same for any quantity.
The total orders cost is a function of the number of orders.
The total inventory cost is a function of average stock
Stock-outs are a rare event.
Rationale
In one period of time we sell TS, if we want to avoid both dead stock and running short, we need also to buy TS items, but how? All in one time or in n orders each of \frac{TS}{n} items? Making the assumption that the price do not vary with the quantity (i.e. no quantity discounts) we can concentrate only on the accessory costs. Each order costs us C_{order}, on the other hand we sustain a cost for keeping the items in the inventory. suppose that Q is the quantity bought each time, let us calculate the total accessory cost for buying many times the same quantity Q in our period of time. Clearly we will issue \frac{TS}{Q}orders in the period, sustaining a cost of C_{order}\times \frac{TS}{Q}. On the other hand, assuming that the demand rate is constant, we will have an average stock of \frac{Q}{2} items, because...
we can define the total cost function T(Q) as:
T(Q)=C_{order}\times \frac{TS}{Q}+\frac{Q}{2}\times C_{item}
we then find the minimum by the usual technique of finding the root of the derivative:
T'(Q)=-C_{order}\times \frac{TS}{Q^{2}}+\frac{C_{item}}{2}=0
solving this equation for Q gives us our formula.
Example
Assuming that C_{order} = $2 and C_{item}=\$5, we have:
EOQ=\sqrt{\frac{2\times 35\times 2}{5}}=\sqrt{28}=5.29
Dealing with the assumptions
Assumptions 3 and 4 are necessary, but fortunately, quite often true.
Evaluation of the inventory
Effective cost method
TBD
Average cost method
TBD
LIFO method
TBD
FIFO method
TBD
Cost analysis
Direct costing
TBD
Full costing
TBD
ABC Analysis
TBD
PUBLIC LICENSE
TBD