Everything today assumes demand is known and constant. That is the strongest assumption available, and we spend the rest of the course removing it one piece at a time.
You have probably met the economic order quantity before. You may also have met the production quantity model, the planned backorder model, and the production model with backorders.
They are not four models. They are one cycle with assumptions switched off.
So we derive the general cycle once, carefully, and then obtain each classical result by imposing an assumption on it.
The payoff is not elegance. It is that the service measures at the end of the chapter come for free, because they are ratios of segment lengths we will have already computed.
A single item at a single location.
Unsatisfied demand is backordered, not lost. Every cycle is identical to the last.
Two quantities are ours to choose:
A notation convention that will save you repeatedly:
\[ \hat{I} = \max_t I(t), \qquad \hat{B} = \max_t B(t) \]
\[ \bar{I} = \frac{1}{T}\int_0^T I(t)\,dt, \qquad \bar{B} = \frac{1}{T}\int_0^T B(t)\,dt \]
\(\hat{B}\) is a decision. \(\bar{B}\) is a consequence of that decision. They are not close to each other numerically, as we will see.
Net inventory starts at its lowest point, \(-\hat{B}\).
Replenishment begins. Production runs at \(p\) while demand continues at \(\lambda\), so net inventory climbs at the net rate \(p - \lambda\).
Notice the line crosses zero partway up the first rise. At that instant the accumulated backorders have all been filled. Every unit arriving after it becomes stock rather than a shipment to a waiting customer.
Replenishment stops. Demand alone acts, so net inventory falls at \(\lambda\), crosses zero a second time, and reaches \(-\hat{B}\) again.
Only two rates act anywhere in the cycle. That is why the two rising segments share a slope and the two falling segments share a slope.
\(Q\) units are produced at rate \(p\), so the replenishment period is
\[ Q = p\,T_p \quad\Longrightarrow\quad T_p = \frac{Q}{p} \]
Over \(T_p\) the net inventory climbs the whole distance from \(-\hat{B}\) to \(\hat{I}\) at rate \(p - \lambda\):
\[ \hat{I} + \hat{B} = (p-\lambda)\frac{Q}{p} \quad\Longrightarrow\quad \hat{I} = Q\left(1 - \frac{\lambda}{p}\right) - \hat{B} \]
\[ \left(1 - \frac{\lambda}{p}\right) \]
This is the fraction of the order quantity that survives to become stock. The rest was consumed by demand while it was still being produced.
For example, an item produced at twice its demand rate keeps half of each order:
\[ 1 - \frac{\lambda}{2\lambda} = \frac{1}{2} \]
Watch for this factor. It appears in every result today, and when we set \(p \to \infty\) it becomes 1 and the production models collapse into the order models.
Backorders clear at the net rate, the peak builds at the net rate, the peak is consumed at the demand rate, and backorders accumulate at the demand rate:
\[ T_1 = \frac{\hat{B}}{p-\lambda}, \qquad T_2 = \frac{\hat{I}}{p-\lambda}, \qquad T_3 = \frac{\hat{I}}{\lambda}, \qquad T_4 = \frac{\hat{B}}{\lambda} \]
Their sum must also be the time to consume \(Q\) at rate \(\lambda\):
\[ T = T_1 + T_2 + T_3 + T_4 = \frac{Q}{\lambda} \]
That identity is your arithmetic check. Perform it every single time. It catches most algebra errors immediately.
The averages are time integrals over the cycle. Here the integrands are triangles, so the integrals are areas.
On-hand inventory is positive over \(T_2\) and \(T_3\): a triangle of height \(\hat{I}\) on a base of \(T_2 + T_3\).
Backorders are positive over \(T_4\) and \(T_1\): a triangle of height \(\hat{B}\) on a base of \(T_1 + T_4\).
\[ \bar{I} = \frac{1}{T}\cdot\frac{\hat{I}}{2}\left(T_2 + T_3\right), \qquad \bar{B} = \frac{1}{T}\cdot\frac{\hat{B}}{2}\left(T_1 + T_4\right) \]
Substituting the segment lengths and simplifying:
\[ \bar{I} = \frac{\hat{I}^{2}}{2Q\left(1-\frac{\lambda}{p}\right)} = \frac{\left[Q\left(1-\frac{\lambda}{p}\right) - \hat{B}\right]^{2}} {2Q\left(1-\frac{\lambda}{p}\right)} \]
\[ \bar{B} = \frac{\hat{B}^{2}}{2Q\left(1-\frac{\lambda}{p}\right)} \]
We now have two routes to each average: the triangle areas, and these formulas. They must agree. That is the second check.
An item is demanded at \(\lambda = 100\) units per year and replenished at \(p = 250\) units per year. The order quantity is \(Q = 400\) units, and the policy permits a maximum backorder level of \(\hat{B} = 30\) units.
What is stocked? One item at one location.
What is the demand process? Continuous at a known, constant rate.
What triggers replenishment, and how much? A fixed quantity \(Q = 400\).
What happens to unmet demand? It is backordered, up to 30 units.
\[ \hat{I} = Q\left(1 - \frac{\lambda}{p}\right) - \hat{B} \]
\[ \hat{I} = 400\left(1 - \frac{100}{250}\right) - 30 \]
\[ \hat{I} = 400(0.6) - 30 = \mathbf{210} \text{ units} \]
Note \(p - \lambda = 150\) units per year. We will need it four times.
With \(p - \lambda = 150\) and \(\lambda = 100\):
| Segment | What happens | Length |
|---|---|---|
| \(T_1\) | backorders clear at \(p-\lambda\) | \(30/150 = 0.2\) |
| Segment | What happens | Length |
|---|---|---|
| \(T_1\) | backorders clear at \(p-\lambda\) | \(30/150 = 0.2\) |
| \(T_2\) | the peak builds at \(p-\lambda\) | \(210/150 = 1.4\) |
| Segment | What happens | Length |
|---|---|---|
| \(T_1\) | backorders clear at \(p-\lambda\) | \(30/150 = 0.2\) |
| \(T_2\) | the peak builds at \(p-\lambda\) | \(210/150 = 1.4\) |
| \(T_3\) | the peak is consumed at \(\lambda\) | \(210/100 = 2.1\) |
| Segment | What happens | Length |
|---|---|---|
| \(T_1\) | backorders clear at \(p-\lambda\) | \(30/150 = 0.2\) |
| \(T_2\) | the peak builds at \(p-\lambda\) | \(210/150 = 1.4\) |
| \(T_3\) | the peak is consumed at \(\lambda\) | \(210/100 = 2.1\) |
| \(T_4\) | backorders accumulate at \(\lambda\) | \(30/100 = 0.3\) |
| Sum | \(\mathbf{4.0}\) |
\[ \frac{Q}{\lambda} = \frac{400}{100} = 4.0 \quad\checkmark \]
The segments sum to the cycle length. Do this every time.
From the triangle areas:
\[ \bar{I} = \frac{1}{4}\cdot\frac{210}{2}(1.4 + 2.1) = \frac{1}{4}(105)(3.5) = 91.875 \]
\[ \bar{B} = \frac{1}{4}\cdot\frac{30}{2}(0.2 + 0.3) = \frac{1}{4}(15)(0.5) = 1.875 \]
From the closed forms, with \(Q(1-\lambda/p) = 240\):
\[ \bar{I} = \frac{210^{2}}{2(240)} = \frac{44{,}100}{480} = 91.875 \qquad \bar{B} = \frac{30^{2}}{2(240)} = \frac{900}{480} = 1.875 \]
Both routes agree. That is the second check.
The system holds about 92 units on average and owes about 2.
Notice the asymmetry. A backorder allowance of 30 units, a seventh of the peak, produces an average backorder level of under two units.
Why? Look at the segments. The system spends
\[ T_1 + T_4 = 0.5 \text{ years of every } 4 \]
in a shortage position. The backorder triangle is short as well as low.
Do not read a maximum backorder level as though it described the usual state of the system. It describes the worst instant of each cycle.
| Term | Price | Quantity | Rate |
|---|---|---|---|
| Ordering | \(k\) per order | \(\lambda/Q\) orders per year | \(k\lambda/Q\) |
| Purchasing | \(c\) per unit | \(\lambda\) units per year | \(c\lambda\) |
| Holding | \(h\) per unit-year | \(\bar{I}\) units | \(h\bar{I}\) |
| Backordering | \(b\) per unit-year | \(\bar{B}\) units | \(b\bar{B}\) |
| Stockout | \(\pi\) per unit | \(\lambda_{\ell}\) units per year arriving short | \(\pi\lambda_{\ell}\) |
Check the units as you read down. Every row multiplies out to dollars per year, which is what lets them be added.
The purchase term \(c\lambda\) does not depend on \(Q\) or \(\hat{B}\), so it cannot affect the optimization. It is part of the total and not part of the relevant cost.
Four of the five quantities we already have. The fifth, \(\lambda_{\ell}\), is the one the next slide has to work out.
The stockout price \(\pi\) is charged on every unit of demand that arrives to an empty shelf.
That count is not \(\hat{B}\).
\(\hat{B}\) is the depth the queue of waiting demand reaches. Units keep arriving while it drains. Over \(T_1\) another \(\lambda T_1\) of them join the queue and wait.
\[ \lambda\left(T_4 + T_1\right) = \lambda\left(\frac{\hat{B}}{\lambda} + \frac{\hat{B}}{p-\lambda}\right) = \frac{\hat{B}}{1-\frac{\lambda}{p}} \]
That is a count per cycle. At \(\lambda/Q\) cycles per year it becomes the rate the table asked for:
\[ \lambda_{\ell} = \frac{\lambda}{Q}\cdot\frac{\hat{B}}{1-\frac{\lambda}{p}} \qquad\Longrightarrow\qquad \pi\lambda_{\ell} = \frac{\pi\hat{B}\lambda}{Q\left(1-\frac{\lambda}{p}\right)} \]
The backorder term needs no such correction: \(\bar{B}\) integrates the queue over both segments, so that waiting is already counted.
\[ \mathit{TC}(Q, \hat{B}) = \frac{k\lambda}{Q} + c\lambda + h\,\frac{\left[Q\left(1-\frac{\lambda}{p}\right) - \hat{B}\right]^{2}} {2Q\left(1-\frac{\lambda}{p}\right)} + b\,\frac{\hat{B}^{2}}{2Q\left(1-\frac{\lambda}{p}\right)} + \frac{\pi\hat{B}\lambda}{Q\left(1-\frac{\lambda}{p}\right)} \]
Both shortage prices appear. They describe different physical situations:
A backordering model with an expedite charge has both. Setting either to zero is a modeling choice, and we are about to make several.
Minimize over both decisions:
\[ \frac{\partial \mathit{TC}}{\partial Q} = 0, \qquad \frac{\partial \mathit{TC}}{\partial \hat{B}} = 0 \]
\[ Q^{*} = \sqrt{\frac{h+b}{b}}\; \sqrt{\frac{2k\lambda}{h\left(1-\frac{\lambda}{p}\right)} - \frac{(\pi\lambda)^{2}}{h(h+b)\left(1-\frac{\lambda}{p}\right)^{2}}} \]
\[ \hat{B}^{*} = \frac{hQ^{*}\left(1-\frac{\lambda}{p}\right) - \pi\lambda}{h+b} \]
Every classical result in this chapter is these two expressions with something switched off.
The factor \(\sqrt{(h+b)/b}\) is greater than one, and grows as \(b\) falls.
Cheaper backordering means larger orders, because the system is willing to run short for longer between replenishments.
\(\hat{B}^{*}\) turns on the ratio \(h/(h+b)\).
The cost of holding against the cost of holding plus the cost of owing. You will meet this exact ratio again as the newsvendor’s critical ratio.
Neither expression is unconditionally usable, and you should see why now rather than discover it later.
In both cases the stationary point lies outside the feasible region, so the optimum sits on the boundary \(\hat{B} = 0\).
With \(\lambda = 100\), \(p = 250\), \(k = 20\), \(h = 4\), \(b = 6\): the backorder level turns negative by \(\pi = 1\), and the root disappears by \(\pi = 1.55\).
A high enough price on being short means the right answer is never to be short.
| Assumptions | Model | Order quantity |
|---|---|---|
| \(p\) finite, backorders, both \(\pi\) and \(b\) | General | above |
| \(p\) finite, backorders, \(\pi = 0\) | No expedite charge | \(\sqrt{\dfrac{h+b}{b}}\sqrt{\dfrac{2k\lambda}{h\left(1-\frac{\lambda}{p}\right)}}\) |
| \(p\) finite, no backorders | Economic production quantity | \(\sqrt{\dfrac{2k\lambda}{h\left(1-\frac{\lambda}{p}\right)}}\) |
| \(p \to \infty\), backorders, \(\pi = 0\) | EOQ with planned backorders | \(\sqrt{\dfrac{h+b}{b}}\sqrt{\dfrac{2k\lambda}{h}}\) |
| \(p \to \infty\), no backorders | Classical EOQ | \(\sqrt{\dfrac{2k\lambda}{h}}\) |
Read down the last column. Each row drops one factor from the row above it.
Important
You may be tempted to obtain the production quantity by setting \(b = 0\).
That is wrong.
A zero backorder cost makes shortages free, not forbidden. With \(b = 0\),
\[ \sqrt{\frac{h+b}{b}} \longrightarrow \infty \]
and the order quantity is unbounded.
Forbidding shortages is the limit \(b \to \infty\), where \(\sqrt{(h+b)/b} \to 1\) and \(\hat{B}^{*} \to 0\).
Charging an infinite price for owing a unit is how a model is told never to owe one. This is the single most common error in this material.
If a replenishment arrives all at once rather than being produced over time, then \(p \to \infty\) and \(\lambda/p \to 0\).
The sawtooth becomes vertical on the way up. \(T_1\) and \(T_2\) vanish, and what is left is a rise, a fall, and a shortage.
Impose both instantaneous replenishment and no backorders:
\[ \mathit{TC}(Q) = \frac{k\lambda}{Q} + c\lambda + \frac{hQ}{2} \]
An ordering term falling in \(Q\), a holding term rising in \(Q\), and a purchase term that does not depend on \(Q\) at all.
\[ \frac{d\,\mathit{TC}}{dQ} = -\frac{k\lambda}{Q^{2}} + \frac{h}{2} = 0 \quad\Longrightarrow\quad Q^{*} = \sqrt{\frac{2k\lambda}{h}} \]
\[ \mathit{TC}^{*} = \sqrt{2k\lambda h} + c\lambda \]
At the optimum, the ordering and holding terms are equal, each contributing
\[ \frac{1}{2}\sqrt{2k\lambda h} \]
That is not a coincidence, and it is the fastest way to check a numerical answer.
Compute both terms at your candidate \(Q\). If holding exceeds ordering, your \(Q\) is too large. If ordering exceeds holding, it is too small. No square roots required.
One cycle, derived once. Four segments, two rates, and every average is a triangle area.
Two checks you now owe on every problem. The segments sum to \(Q/\lambda\), and the two routes to \(\bar{I}\) and \(\bar{B}\) agree.
Four classical models, each one assumption away from the general result.
A maximum is not an average. \(\hat{B} = 30\) gave \(\bar{B} = 1.875\).
Forbidding a shortage is \(b \to \infty\), never \(b = 0\).
Read before next session: Lead Time and the Reorder Point, and Sensitivity of the Order Quantity.
Today’s material runs through The Classical Models as Special Cases. Give it a second pass if the general derivation went quickly.
Next session:
Bring the segment-sum check with you. Every problem from here to the end of the chapter uses it.