Chapter Two Linear Programming
Chapter Two Linear Programming
LINEAR PROGRAMMING
Linear Programming- is an optimization method, which shows how to allocate scarce resources
such as money, materials, or time and how to do such allocation in the best possible way subject
to more than one limiting condition expressed in the form of inequalities and/or equations. It
enables users to find an optimal solution to certain problems in which the solution must satisfy a
given set of requirements or constraints.
Optimization in linear programming implies either maximization (such as profit, revenue, sales,
and market share) or minimization (such as cost, time, and distance) of a certain objective
function. It implies that we cannot max/min two quantities in one model in LP. It involves linearly
related multi-variate functions, i.e., functions with more than one independent variable. The goal
in linear programming is to find the best solution given the constraints imposed by the problem;
hence the term constrained optimization.
1. The Objective Function- is the mathematical or quantitative expression of the objective of the
company/model. The objective in problem-solving is the criterion by which all decisions are
evaluated. In LPMs a single quantifiable objective must be specified by the decision maker. For
A Maximization Problem
Example: Consider two models of color TV sets; Model A and B, which are
produced by a company to maximize profit. The profit realized is $300 from A
and $250 from set B. The limitations are
A. availability of only 40hrs of labor each day in the production department.
B. a daily availability of only 45 hrs on machine time
C. ability to sell 12 sets of model A.
How many sets of each model will be produced each day so that the total
profit will be as large as possible?
Resources used per unit
Constraints Model A Maximum Available hrs.
Model B
(X1)
(X2)
Labor hr. 2 1 40
Machine hr. 1 3 45
Marketing hr. 1 0 12
Profit $300
$250
Solution
1. Formulation of mathematical modeling of LPP
Max Z=300X1 +250X2
St:
Interpretation:
12 units of product A and 11 units of product B should be produced so that
the total profit will be $6350.
Exercise:
*The distributor will not take more than 12 SUPER tents per week. Thus, the
manufacturer should not produce more than 12 SUPER tents per week.
Let X1 =The No of REGULAR tents produced per week.
X2 =The No of SUPER tents produced per week.
X1 and X2 are called the decision variables
X2
X1
21 =0
16
Interpretation:
The manufacturer should produce and sell 20 REGULAR tents and 6 SUPERS tents
to get a maximum weekly profit of $1480.
B Minimization Problem
Example:
Suppose that a machine shop has two different types of machines; machine 1 and
machine 2, which can be used to make a single product. These machines vary in the
amount of product produced per hr., in the amount of labor used, and in the cost of
operation. Assume that at least a certain amount of product must be produced and
that we would like to utilize at least the regular labor force. How much should we
Solution
Min. Z=25 X 1 +30 X 2
St :
20 X 1 +15 X 2 ≥100 LPP Model
2 X 1 +3 X 2 ≥15
X 1 , X 2≥0
Constraint equation:
20X1 +15X2=100 ==> (0, 20/3) and (5, 0)
2X1+3X2=15 ==> (0, 5) and (7.5, 0)
X1 X2> 0
X2
X1 =0
A (0, 20/3)
Feasible
Region
B (2.5, 3.33)
X2
=0
X1
5 C (7.5, 0)
X2
X1 =0
6 6X1+2 X2=12
2X1+2 X2=8
4 FR
4X1+12 X2=24
(1, 3)
(3, 1)
X2 =0
X1
2 4 6
Note:
-In maximization problems, our point of interest is looking at the furthest point from the
origin.
-In minimization problems, our point of interest is looking at the point nearest to the
origin.
2.3. SPECIAL CASES IN GRAPHICS METHODS
1. Redundant Constraint
If a constraint when plotted on a graph doesn’t form part of the boundary making the feasible
region of the problem that constraint is said to be redundant.
Example:
A firm is engaged in producing two products A and B. Each unit of product A requires 2 kg of
raw materials and 4 labor-hrs for processing. Whereas each unit of product B requires 3 kg of raw
materials and 3hrs of labor. Every unit of product A needs 4hrs to package and every unit of
product B needs 3.5 hours to package. Every week the firm has availability of 60 kg of raw
materials, 96 labor hours, and 105 hrs in the packaging department. 1 unit of product A sold yields
a Br. 40 profit and 1 unit of B sod yield Br. 35 profit.
Required:
a. Formulate this problem as a LPP
b. Find the optimal solution
Solution
X2
(0, 32)
(0, 30)
Packaging: 4X1 +3.5X2 = 105
(0, 20) C (18,8)
Raw material: 2X1 +3X2 = 60
FR
X1
A (0, 0) D (24, 0) (26, 0) (30, 0)
Example:
The information given below is for products A and B.
Department Product A Product B Maximum available per
week
Cutting 3 6 900
Assembly 1 1 200
Profit per unit Br.8 Br.16
Assume that the company has a marketing constraint on selling product B and therefore it can sell
a maximum of 125 units of this product.
X 1 +X 2 ≤200 X2
A (0, 0)
X 2≤125
X 1 , X 2≥0
X1=0
D (100,100)
Cutting: 3X1+6X2=900
FR X2=0
X1
E (200, 0) (300,0)
Interpretation:
Both C and D are optimal solutions. Any point on the line segment CD will also lead to the same
optimal solution.
==>Multiple optimal solutions provide more choices for management to reach their objectives.
A solution is called feasible if it satisfies all the constraints and the constraints and non-negativity
condition. However, it is sometimes possible that the constraints may be inconsistent so that there
is no feasible solution to the problem. Such a situation is called infeasibility.
Example:
MaxZ=20X1+30X2
St:
2X1+X2< 40
4X1+X2< 60
X1 > 30
X1, X2 > 0
Solution:
X2 X1=0
(0, 60) X1=30
4X1+X2= 60
(0, 40)
2X1+X2= 40
X2=0
X1
(15, 0) (20, 0) (30, 0)
4. Mix of constraints
Example:
ABC gasoline company has two refineries with different production capacities. Refinery A can
produce 4,000 gallons per day of super unleaded gasoline, 2000 gallons per day of regular
unleaded gasoline, and 1000 gallons per day of leaded gasoline. On the other hand, refinery B
can produce 1000 gallons per day of super unleaded, 3000 gallons per day of regular unleaded,
and 4,000 gallons per day of leaded. The company has made a contract with an automobile
manufacturer to provide 24000 types of gasoline super unleaded, 42000 gallons of regular
unleaded, and 36000 gallons of leaded. The automobile manufacturer wants delivery in not more
than 14 days.
The cost of running refinery A is Br.1500 per day and refinery B is Br.2400 per day.
Required:
A. Formulate this problem as a LPP
B. Determine the number of days the gasoline company should operate each refinery in order to meet the
terms of the above contract most economically. (i.e., At a minimum running cost)
C. Which grades of gasoline would be overproduced?
Solution:
Production per day (in gallons) Contract with an automobile
manufacturer
Grade of gasoline A B
SUPER UNLEADED 4000 1000 24,000
REGULAR UNLEADED 2000 3000 42,000
LEADED 1000 4000 36,000
Running cost per day Br.1,500 Br.2,400
Unbounded
1 Feasible Region
X1
X2
A(0,3) Unbounded
Feasible Region
X1-X2=1
B (2, 1)
X1+X2=3
X1
Note: here that the two corners of the region are A (0,3) and B (2,1). The value of MaxZ (A)=6
and MaxZ (B)=8. But there exist a number of points in the shaded region for which the value of
the objective function is more than 8. For example, point (10, 12) lies in the region, and the
function value at this point is 70 which is more than 8.
Remark:
An unbounded solution does not mean that there is no solution to the given LPP but implies that
there exists an infinite number of solutions.
2.4 SIMPLEX METHOD
The graphical method of solving LPPs provides fundamental concepts for fully
understanding the LP process. However, the graphical method can handle problems
involving only two decision variables (say X1 and X2).
The simplex method is an ITERATIVE or “step by step” method or repetitive algebraic approach that
moves automatically from one basic feasible solution to another basic feasible solution improving the
situation each time until the optimal solution is reached.
Note:
The simplex method starts with a corner that is in the solution space or feasible
region and moves to another corner. The solution space improves the value of the
objective function each time until an optimal solution is reached at the optimal
corner.
Let that s1, s2, and s3 are unused labor, machine, and marketing hrs respectively.
Max.Z=300x1 +250x2 + 0 s1 +0 s2+ 0 s3
St:
2 x1+x2 + s1 +0 s2+ 0 s3= 40 Standard form
x1+3x2 +0s1 + s2+ 0 s3= 45
x1 + 0s1 + 0s2+ s3= 12
x1, x2, s1 , s2, s3 > 0
Step 3: Obtain the initial simplex tableau
To represent the data, the simplex method uses a table called the simplex
table or the simplex matrix.
In constructing the initial simplex tableau, the search for the optimal solution
begins at the origin. Indicating that nothing can be produced;
Thus, the first assumption, the number of productions implies that x1 =0 and x2=0
Or: basic variables are variables that are in the basic solution. Basic
variables have 0 values in the Cj-Zj row.
Or: non-basic variables are variables that are out of the solution.
==>n=5 variables (x1, x2, s1, s2, and s3) and m=3 constraints (Labor,
machine, and marketing constraints), excluding non-negativity.
Therefore, n-m=5-3=2 variables (x1 and x2) are set equal to zero in the 1st
simplex tableau. These are non-basic variables
. 3 Variables (s1, s2, and s3) are
basic variables (in the 1 st simplex tableau) because they have non-zero
solution values.
Real
Basic
columns
or
Pro or
decis
fit Solutio
ion
per n
varia
quantity
Solution
uni variabl
column
bles
t e
colu
col column
mn
um
Note: RR>0
The variable leaving the solution is called leaving variable or outgoing
variable.
The row associated with the leaving variable is called the key or pivot
row (s3 column in our case)
The element that lies at the intersection of the pivot column and pivot row
is called the pivot element (No 1 in our case)
Step 7: Repeat step 3-5 till an optimum basic feasible solution is
obtained.
Or: repeat steps 3-5 till no positive value occurs in the Cj - Zj row.
Cj 300 250 0 0 0
X1 X2 S1 S2
SV Q
S3
0 0 1 -1/3 -
0 S1 17/3
5/3
25 0 1 0 1/3 -
X2 31/3
0 1/3
30 1 0 0 0 R2 NEW=R2
X1 12
0 1 OLD/3
300 250 0 250/3 R1 NEW=R1
Zj 6350
650/3 OLD-R2 NEW
0 0 0 -250/3 -
Cj - Z j R3 NEW=R3
650/3
OLD
Since all the Cj - Zj < 0 optimal solution is reached.
Therefore, X1=12, X2=11, S1=5 and Max Z=6350