\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt
QUESTION
Solve the following five-period production planning problem for
which no shortages must occur. The initial stock level is zero.
The cost of a set-up in any period is \pounds 100, and the holding
cost is \pounds2 per unit of stock held at the end of each period.
Determine an optimal production plan if demnd is as follows.
\begin{tabular}{lccccc}
\hline Period&1&2&3&4&5\\ \hline Demand&40&20&10&30&20\\ \hline
\end{tabular}
If the stock level at the end of period 5 is required to be 40,
what production plan would you use?
ANSWER
This is the Wagner-Whitin dynamic model with $h=2,\ s=100$ and
$N=5$.
DIAGRAM
\begin{eqnarray*}
l_0&=&0\\ l_1&=&0+100=100\\ l_2&=&min\{0+140,100+100\}=140\\
l_3&=&min\{0+180,100+120,140+100\}=180\\
l_4&=&min\{0+360,100+240,140+160,180+100\}=280\\
l_5&=&min\{0+520,100+360,140+240,180_140,280+100\}=320
\end{eqnarray*}
The shortest path in the network is 0 - 3 - 5. The production plan
is
\begin{tabular}{l|ccccc}
Period&1&2&3&4&5\\ \hline Production&70&0&0&50&0
\end{tabular}
Cost=\pounds320.
In the final stock is required to be 40, the demand in period 5 is
effectively 60. Costs are as in the network above except the costs
of arcs entering node 5 become 840, 600, 400, 220 and 100. We
obtain $l_1,l_2,l_3$ and $l_4$ as before.
$$l_5=min\{0+840,100+600,140+400,180+220,280+100\}=380$$
The shortest path in the network is 0 - 3 - 4 - 5. The production
plan is
\begin{tabular}{l|ccccc}
Period&1&2&3&4&5\\ \hline Production&10&0&0&30&60
\end{tabular}
Cost=\pounds380 (excluding the holding cost at the end of period
5).
\end{document}