Method to convert a worded problem to a linear problem Acme manufacturing company has contracted to deliver home windows over the next $6$ months. The demands for each month are $100, 250, 190, 140, 220,$ and $110$ units, respectively. Production cost per window varies from month to month depending on the cost of labour, material, and utilities. Acme estimates the production cost per window over the next $6$ months to be
$£50,£45,£55,£48,£52$, and $£50$, respectively. To take advantage of the fluctuations in manufacturing cost, Acme may elect to produce more than is needed in a given month and hold the excess units for delivery in later months. This, however, will incur storage costs at the rate of $£8$ per window per month assessed on end-of-month inventory. 

Formulate the LP to this problem

 A: Converting a word problem into equations isn't an algorithm. It's about reading it and understanding what is happening.
So, you ask yourself questions like:


*

*OK, what is it that I need to calculate? Well, it's how many windows I need to produce each month for the next $6$ months. That means I need to calculate $6$ numbers, i.e. I need a 6-tuple of numbers, or an element of $(x_1,x_2,x_3,x_4,x_5,x_6)\in\mathbb R^6$.

*What do I want to maximize or minimize? Well, the cost, obviously. Now, what are the costs?

*Well, first I have production costs. I know the production cost per unit, and I know that I will produce $x_i$ units on the $i$-th month, so obviously, the total cost of production will be $50\cdot x_1 + 45 \cdot x_2 +\dots + 50\cdot x_3$

*I also have storage costs. For the end of the first month, I will produce $x_1$ windows, and I will sell $100$ of them, so I need to store $x_1-100$ of them at a cos of $8$, so the storage price for the end of the first month is $8\cdot(x_1-100)$. You can similarly calculate storage costs for other months.

*Now, what are the demands on the six numbers? Well, I know that in the first month, I must produce at least $100$ units. In other words, $x_1\geq 100$. And in the second, I must produce enough units so that in the first two months, I must produce at least $250+100$ units. So $x_1+x_2\geq 350$. Continue that for all months.


Now write all the equations you just discovered. What you are left with is a linear program.
