Hey,

I'm having trouble formulating this as a linear program. If anyone could help at all it would be much appreciated. Thanks

A manufacturer has contracted to produce 2,000 units of a particular product over the next eight months. Deliveries are scheduled as follows:

Month Units
January 100
February 200
March 300
April 400
May 100
June 100
July 500
August 300
Total 2,000

The manufacturer has estimated that it costs her $1 to store one unit of product for one month. She has a warehouse capacity of 300 units. The manufacturer can produce any number of units in a given month, since the units can be produced mostly with part-time labour, which can be easily obtained. However, there are costs of training new personnel and costs associated with laying off personnel who have been hired. The manufacturer has estimated that it costs approximately 75 cents per unit to increase the production level from one month to the next ( e.g., if productionin January is 200 and is increased to 300 in February, the cost is $75 for training the additional people required to produce at the 300-unit level ).

Similarly, it costs 50 cents per unit to reduce production from one month to the next.

At the end of eight months, all employees will be laid off, with the corresponding production-reduction costs. Assume the production level before January is zero.

What i have done so far is:

Inventory in Storage (Ii) = Xi + Yi-1 - Orders <= 300 for i = {1,....,8}
Xi is that months storage
Yi-1 is last months storage

In the first period, storage is:
X1 - 100 <= 300 -> X1<=400
Cost of storage is $1(X1 - 100) {so cost of storage is the amount of storage}
Total Cost in first period is (X1 - 100) + 0.75X1 = 1.75X1 - 100

To formulate this as a linear program, we need to define the decision variables, the objective function, and the constraints.

Decision Variables:
Let's define the decision variables:
- xi: the number of units produced in month i (where i represents the months from January to August).

Objective Function:
The objective is to minimize the total cost, which includes the storage cost and the production level change costs. We can express the objective function as follows:

Minimize: 1 * (x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8) + (0.75 * (x2 - x1) + 0.75 * (x3 - x2) + 0.75 * (x4 - x3) + 0.75 * (x5 - x4) + 0.75 * (x6 - x5) + 0.75 * (x7 - x6) + 0.75 * (x8 - x7) + 0.5 * x8)

Constraints:
Now, let's consider the constraints:
1. Total production should be equal to 2,000 units:
x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 = 2000

2. Storage capacity should not be exceeded in any month:
x1 ≤ 300
x2 - x1 + x3 ≤ 300
x3 - x2 + x4 ≤ 300
x4 - x3 + x5 ≤ 300
x5 - x4 + x6 ≤ 300
x6 - x5 + x7 ≤ 300
x7 - x6 + x8 ≤ 300
x8 - x7 ≤ 300

3. Non-negativity constraints:
xi ≥ 0 for all i

Now that we have defined the decision variables, objective function, and constraints, you can solve this linear program using any optimization software or tool, such as Excel Solver or an optimization library in a programming language like Python.