In an attempt to make this appendix self-contained, several of the formulas shown previously in the chapter are repeated here. The objective is to minimize the total, long-range inventory cost subject to the fill rate service constraint. The total inventory cost includes the ordering cost and the holding costs for the cycle and the safety inventory. The optimization problem is thus:

$$ \min \quad TC = \frac{D}{Q}oc + hc\frac{Q}{2} + hc \cdot \left( {s - d \cdot lt} \right) $$

(10.104)

$$ s.t.\quad \frac{{ns\left( s \right)}}{Q} \le \left( {1 - \beta } \right) $$

(10.105)

This is a nonlinear optimization problem with a single inequality constraint. Given that both the objective function and the constraint are convex in function of *Q*, the Karush–Kuhn–Tucker (KTT) conditions are sufficient conditions for a nonnegative *Q* ^{*} to be the global optimum. The optimization problem can be written in the following standard form.

$$ \begin{array}{l} \min \quad f\left( x \right) \\s.t.\quad g\left( x \right) \le 0 \\\end{array} $$

(10.106)

The sufficient KKT conditions for a feasible *x* ^{*} to be the global optimum are then as follows, where ∇*f*(*x*) denotes the gradient of the function *f*(*x*). The gradient has to be taken with respect to the two variables *Q* and *s*.

$$ \nabla f\left( {x^* } \right) + \mu\cdot \nabla g\left( {x^* } \right) = 0 $$

(10.107)

$$ \mu\cdot g\left( {x^* } \right) = 0 $$

(10.108)

For the inventory problem, the sufficient KKT conditions can then be written as follows.

$$ \nabla \left( {\frac{D}{{Q^* }}oc + hc\frac{{Q^* }}{2} + hc \cdot \left( {s^*- d \cdot lt} \right)} \right) + \mu \nabla \left( {\frac{{ns\left( {s^* } \right)}}{{Q^* }} - \left( {1 - \beta } \right)} \right) = 0 $$

(10.110)

$$ \mu \left( {\frac{{ns\left( {s^* } \right)}}{{Q^* }} - \left( {1 - \beta } \right)} \right) = 0 $$

(10.111)

If *m* equals zero, then the EOQ quantity provides the optimal solution to this problem and the safety inventory level is equal to zero. This can be interpreted as the case where the inventory level is computed using the EOQ formula while ignoring the service level requirement and this inventory level satisfies the service level. In other words, ordering enough inventory to cover the expected demand during the lead time satisfies the required service level.

$$ \begin{array}{l} Q^*= \sqrt {\displaystyle \frac{{2 \cdot D \cdot oc}}{{hc}}}\\s^*= d \cdot lt \\\end{array} $$

(10.113)

The remainder of the discussion treats the case where *m* is strictly positive. In this case, the following equality must be satisfied.

$$ ns\left( {s^* } \right) = Q^* \left( {1 - \beta } \right) $$

(10.114)

First we focus on the computation of the gradient constraint with respect to the reorder point *s*. This yields the following equality.

$$ hc + \frac{{\mu ^* }}{{Q^* }}\,\frac{{dns\left( {s^* } \right)}}{{ds}} = 0 $$

(10.115)

Recall that *ns(s)* is the expected number of units short per cycle, or

$$ ns\left( s \right) = E\left[ {NS\left( s \right)} \right] = \int_s^\infty{\left( {x - s} \right)f\left( x \right)dx}$$

(10.116)

The derivative of *ns(s)* with respect to the reorder point *s* can be computed with Leibniz’s rule.

$$ \begin{aligned} \frac{d}{{dy}}\int_{l\left( y \right)}^{u\left( y \right)} {h\left( {x,y} \right)} dx &= \int_{l\left( y \right)}^{u\left( y \right)} {\left( {\frac{{\partial h\left( {x,y} \right)}}{{\partial y}}} \right)dx}+ h\left( {u\left( y \right),y} \right)\frac{{du\left( y \right)}}{{dy}} \\& \quad - h\left( {l\left( y \right),y} \right)\frac{{dl\left( y \right)}}{{dy}} \end{aligned}$$

(10.117)

This yields the following substitutions:

$$ \begin{array}{l} y = s \\h\left( {x,y} \right) = \left( {x - s} \right)f\left( x \right) \\u\left( y \right) = \infty ,\,\displaystyle\frac{{du\left( y \right)}}{{dy}} = 0 \\l\left( y \right) = s,\,\displaystyle\frac{{dl\left( y \right)}}{{dy}} = 1,\,h\left( {l\left( y \right),y} \right) = \left( {s - s} \right)f\left( s \right) = 0 \\ \displaystyle\frac{{\partial h\left( {x,y} \right)}}{{\partial y}} = \displaystyle\frac{{\partial \left( {x - s} \right)}}{{\partial s}}f\left( x \right) + \left( {x - s} \right)\displaystyle\frac{{\partial f\left( x \right)}}{{\partial s}} =- f\left( x \right) \\\end{array} $$

$$ \frac{{dns\left( s \right)}}{{ds}} = \int_s^\infty{ - f\left( x \right)dx}= \left. { - F\left( x \right)} \right|_s^\infty =- \left( {1 - F\left( s \right)} \right) $$

(10.118)

Substituting this in the gradient equation (10.115) yields

$$ hc + \frac{{\mu ^* }}{{Q^* }}\left( { - \left( {1 - F\left( {s^* } \right)} \right)} \right) = 0 $$

(10.119)

which can be rewritten as

$$ F\left( {s^* } \right) = 1 - \frac{{hc \cdot Q^* }}{{\mu ^* }} $$

The same equation can also be rewritten to determine the optimal value of *μ* ^{*}.

$$ \mu ^*= \frac{{hc \cdot Q^* }}{{1 - F\left( {s^* } \right)}} $$

(10.120)

Next we focus on the computation of the gradient constraint with respect to the reorder quantity *Q*. This yields the following equality.

$$- \frac{{oc \cdot D}}{{Q^{*2} }} + \frac{{hc}}{2} + \mu ^* \left[ { - \frac{{ns\left( {s^* } \right)}}{{Q^{*2} }}} \right] = 0 $$

(10.121)

Multiplying all terms by \({{2Q^{*2} } \mathord{\left/ {\vphantom {{2Q^{*2} } {hc}}} \right. \kern-\nulldelimiterspace} {hc}}\) and substituting for *μ* ^{*} with (10.120) yields the following quadratic equation

$$ \frac{{ - 2D \cdot oc}}{{hc}} + Q^{*2}- \frac{{2 \cdot ns\left( {s^* } \right)}}{{1 - F\left( {s^* } \right)}}Q^*= 0 $$

(10.122)

The general quadratic equation

$$ ax^2+ bx + c = 0 $$

(10.123)

has the following two roots, which are two real numbers provided the discriminant, which is the expression under the square root sign in this equation, is positive.

$$ x^*= \frac{{ - b \pm \sqrt {b^2- 4ac} }}{{2a}} $$

(10.124)

Since for the quadratic equation given in (10.122) *a* is equal to 1 and *c* is negative, the discriminant for this equation is always positive. For the quadratic equation for the reorder quantity only the root value computed with the positive sign yields a root with a positive value and is thus feasible. The optimal reorder quantity is given by.

$$ Q^*= \frac{{ns\left( {s^* } \right)}}{{1 - F\left( {s^* } \right)}} + \sqrt {\left( {\frac{{ns\left( {s^* } \right)}}{{1 - F\left( {s^* } \right)}}} \right)^2+ \frac{{2D \cdot oc}}{{hc}}}$$

(10.125)

For a normal demand distribution, *ns*(*s* ^{*}) can be written in function of the unit loss function, which yields the following equation for *z* ^{*}.

$$ z^*= L^{ - 1} \left( {\frac{{Q^* \left( {1 - \beta } \right)}}{{s_{dlt} }}} \right) $$

(10.126)

$$ s^*= d \cdot lt + z^*\cdot s_{dlt}= d \cdot lt + s_{dlt}\cdot L^{ - 1} \left( {\frac{{Q^* \left( {1 - \beta } \right)}}{{s_{dlt} }}} \right) $$

(10.127)

The optimal values of *ns*(*s* ^{*}) and *F*(*s* ^{*}) can then be determined from *s* ^{*}.

The Eqs. (10.125) and (10.127) provide two equations for the optimal reorder quantity and the optimal reorder point. Because the variables are mutually dependent in the equations, they have to be solved for iteratively through the method of cyclical coordinates. Finally, the optimal value of *μ* ^{*} can be computed with (10.120). Based on (10.71) and (10.120), the optimal value of *μ* ^{*} can thus be interpreted as the penalty for having a shortage equal to the total annual demand.

$$ \mu ^*= sc \cdot D $$

(10.128)