Example: Product planning – LP model

1. Definition of variables

    … number of units of product A to be produced
    … number of units of product B to be produced
    P … total profit
2. Objective function
    Maximise: 
This equation states that the firm's total profit is made up of the profit from product A (8 times the number sold) plus the profit from product B (6 times the number sold).

3. Constraints

The first constraint relates to the availability of time on the first machine. Each unit of product A uses three hours of this machine, and each unit of product B uses two hours. Hence, the total hours used is expressed by the left-hand side of the expression above. This must be equal to or less than the total hours available on the first machine - right-hand side = 24.

For the second machine, the constraint is similar.

4. Non-negativity

In addition, implicit in any linear programming formulation are the constraints that restrict all variables are non-negative. In terms of the problem, this means that the firm can produce only zero or positive amounts.

Each LP model must have three parts 1-3 as above.

5. The total formulation

Maximise:  subject to: 

Precise definition of variables is necessary for understanding and interpretation of the solution.

This example is simple, and one would not need linear programming to solve it. However, problems involving dozens of products and many different constraints cannot be solved intuitively, and linear programming has proved valuable in these cases.