# Nonlinear Programming by Wiley 3rd ed, 1.2 a,b (I don't understand obj function)

The following is from page 30, chapter 1 of Wiley's Nonlinear Programming: Theory and Algorithms (third edition). This is for a graduate course in Optimization Theory. My problem is that I do not understand how they came up with the objective function from the given information.

[1.2] Suppose that the daily demand for product $j$ is $d_j$ for $j=1,2$. The demand should be met from inventory, and the latter is replenished from production whenever the inventory reaches zero. Here, the production time is assumed to be insignificant. During each production run, $Q_j$ units can be produced at a fixed setup cost of $k_j$ and a variable cost of $c_j Q_j$. Also, a variable inventory-holding cost of $h_j$ per unit per day is also incurred, based on the average inventory. Thus, the total cost associated with product $j$ during $T$ days is $T d_j k_j/Q_j + T c_j d_j + T Q_j h_j/2$. Adequate storage area for handling the maximum inventory $Q_j$ has to be reserved for each product $j$. Each unit of product $j$ needs $s_j$ square feet of storage space, and the total space available is $S$.

a. We wish to find optimal production quantities $Q_1$ and $Q_2$ to minimize the total cost. Construct a model for this problem.

b. Now suppose that shortages are permitted and that production need not start when inventory reaches a level of zero. During the period when inventory is zero, demand is not met and the sales are lost. The loss per unit thus incurred is $l_j$. On the other hand, if a sale is made, the profit per unit is $P_j$. Reformulate the mathematical model.

I have fooled around with this function a little, but have still yet to understand it. The subscripted quantities are clearly vectors. Something strange here is that the quantity $c_j Q_j$ is given meaning in the description but does not appear in the objective function. Why is the third term divided by 2? Is that because half of production is for product 1 and the other half is for product 2 (that doesn't make sense)?

I am not principally concerned with even answering the questions yet, I want to understand the premise first. Can anyone explain this, please?

• $Q_{j}$ units has a production cost of $k_{j}$. So, one unit has a production cost of $k_{j}/Q_{j}$. Daily demand for a day is $d_{j}$, so the daily cost associated with it is $d_{j}\times(k_{j}/Q_{j})$. Variable cost in a production run for $Q_{j}$ units is $c_{j}Q_{j}$, so for one unit the cost is $c_{j}$; therefore, for $d_{j}$ units the variable cost per day is $c_{j}d_{j}$. I am still trying to figure out the last part. Hope this helps. – Radz Oct 1 '17 at 6:18
• That is extremely helpful, makes very good sense. Thank you – user391838 Oct 1 '17 at 7:03
• I get the last term, now: The last term, $T Q_j h_j/2$, is for inventory costs. $Q_j$ are the number of products being held that were ordered for sale, and $h_j$ is the cost associated with holding a single unit. So, $T Q_j h_j$ is the cost associated with holding Q units for T days. We divide by 2 because there are two products and we are calculating an average. – user391838 Oct 1 '17 at 7:08
• So now I need to know what "average inventory" means? Oh, the average inventory over $T$ days! Wouldn't we divide by T then, not 2? – user391838 Oct 1 '17 at 7:16
• Yes, that makes sense. – Radz Oct 1 '17 at 7:36

## 1 Answer

I am mostly comfortable with the objective function now, and propose the following solution:

Let $C(Q_j)=T[d_j k_j/Q_j + c_j d_j + Q_j h_j/2]$, under the (possibly erroneous) assumption that only $Q_j$ varies and the rest of the unknowns are constant. Under the simplification that all other unknowns are constant, let $a=Td_j k_j$, $b=Th_j/2$, $c=T c_j d_j$. Then

$C(Q_j)=a/Q_j + bQ_j + c$.

Differentiating and setting the derivative equal to zero, we have

$C'(Q_j)=-a(Q_j)^{-2} + b = 0$

$\implies (Q_j)^{2} = b/a$

$\implies Q_j = \pm\sqrt{b/a}$

So then $Q_j = \pm \sqrt{\frac{Td_jk_j}{Th_j/2}}$

In this context, $Q_j \approx \sqrt{\frac{2d_jk_j}{h_j}}$.

Presumably, the information given after the objective function was provided for use in Part b. I'm still thinking about that solution.