EE8212 Optimization Techniques for Engineers
Linear Programming
Definition
Linear programming is used in allocating limited resources
among competing activities in a best possible way. This
involves allocating the level of certain activities that
compete for limited resources that are required to perform
those activities.
Linear programming uses a mathematical model to
describe the problem. Here linear means that all the
mathematical functions used in the model are linear
functions. The word programming is used here as a
synonym for planning. Thus linear programming involves
planning of activities to obtain an optimal result.
2
Ex: Maharage and Co. produces two types of high quality household
electrical appliances. It has three plants.
• Aluminium frames are made in plant 1.
• Steel frames are made in plant 2.
• Electric motors and the final assembly is done in plant 3.
• Product 1 requires some production capacity in plants 1 & 3.
• Product 2 requires some production capacity in plants 2 & 3.
• Because the plants are used for other purposes, the number of
hours per week available for the two products in plants 1,2 & 3 are
4, 12 and 18 hours respectively.
• Product 1 requires 1 hr of plant 1 and 3 hrs of plant 3 per batch
produced.
• Product 2 requires 2 hrs of plant 2 and 2 hrs of plant 3 per batch
produced.
• Profit per batch of product 1 is Rs 300,000 and that of product 2
is Rs 500,000.
How many batches of products 1 and 2 need to be produced in order
to maximise the profit?
3
4
Formulation as a linear programming problem
To formulate the linear programming problem let,
x1 – number of batches of product 1 produced per week
x2 – number of batches of product 2 produced per week
Z – Total profit per week in Hundred thousand Rupees
Thus x1 and x2 are the decision variables for the model. From the given data
Z= 3x1 + 5x2
Our objective is to find two values of x1 and x2 so as to maximise Z, subject
to the constraints imposed by the production capacities of the plants. Each
batch of product 1 produced requires 1 hour of time in plant 1. Only 4 hours
of plant time available at plant 1. This restriction can be mathematically
expressed as x1 <= 4. Similarly plant 2 imposes the restriction 2x2 <= 12.
Similarly plant 3 imposes the restriction 3x1 + 2x2 <= 18. Since the production
rates cannot be negative we get two more constrains, x1 >= 0 and x2 >= 0.
5
To summarise in mathematical language the problem is to find two values x1
and x2 so as to
Maximise, Z= 3x1 + 5x2
Subject to the restrictions,
x1 <= 4
2x2 <= 12
3x1 + 2x2 <= 18
x1 >= 0
x2 >= 0
6
Graphical Solution
This problem has only two decision variables, as such can be solved
graphically. The procedure involves constructing a graph with x1 and x2 as
axes. First step is to identify the values of x1 and x2 that are permitted by the
restrictions. This is done by drawing each line that borders the range of
permissible values for the restriction. Let us start with the restrictions. This
require that the points x1 and x2 lies in the first quadrant. Next the restriction
x1 <= 4 means that x1 and x2 cannot lie to the right side of the line x1 = 4.
These results are shown in the figure below, where the shaded area indicate
the feasible values of x1 and x2.
7
Similarly the restriction 2x2 <= 12 implies that the line 2x2 = 12 should be
added to the boundary of the permissible region. Final restriction requires
the plotting of the line 3x1 + 2x2 = 18. The resulting region of permissible
values is called a feasible region as shown in figure below.
8
The final step is to select the point within this feasible region which
maximises the value of Z= 3x1 + 5x2
Let us begin by trial and error. To start with let us try Z= 10 = 3x1 + 5x2 . By
drawing the line 10 = 3x1 + 5x2 we can see there are several points in this
line lie within the feasible region. Next let us try 20 = 3x1 + 5x2 . As you
increase Z, the lines move away from the origin. As such the optimal solution
is represented by the line that is furthest away from the origin, that is within
the feasible region. As shown in figure below, this point is x1=2 , x2=6 and
which corresponds to Z=36. This means the company should produce 2
batches of product 1 and 6 batches of product 2 to maximise the profit. The
profit will be Rs. 3,600,000.
9
Standard form of the linear programming model
We can now formulate the mathematical model for the linear programming
problem. Purpose of this model is to find the values for x1, x2, x3,……….xn,
so as to
Maximize Z = c1x1 + c2x2 + ……….. + cnxn
Subject to the restrictions,
a11x1 + a12x2 +…………..+ a1nxn <= b1
a21x1 + a22x2 +…………..+ a2nxn <= b2
………………………………………….
am1x1 + am2x2 +…………..+ amnxn <= bm
and, x1 >= 0, x2 >= 0, ……….. xn >= 0
Any problem which fits into this model is a linear programming problem
10
Terminology used in linear programming
• Objective function is the function being maximised,
c1x1 + c2x2 + ……….. + cnxn
• The restrictions are referred too as constraints.
• The first m constraints where there is a function on
the left hand side are called functional constraints.
• The xj >= 0 restrictions are called nonnegativity
constraints.
• Any set of values of the decision variables (x1, x2,
………, xn) is called a solution. It may not be the
desirable choice.
• A feasible solution is a solution where all the
constraints are satisfied.
11
Terminology used in linear programming
• An infeasible solution is a solution where at least one
constraint is violated.
• The feasible region is the collection of all feasible
solutions.
• An optimal solution is the feasible solution that has the
most favourable value of the objective function.
• Most favourable value is the largest value if the
objective function is to be maximised, smallest value if
the objective function is to be minimised.
• A problem can have multiple optimal solutions each
with the same value of the objective function.
• A corner point feasible(CPF) solution is a solution that
lies at a corner of the feasible region.
12