Chapter 2 LP-4
Chapter 2 LP-4
Chapter 2 LP-4
Chapter Two
Linear Programing
Introduction to Linear Programming 2
• An objective function.
• A set of constraints.
Cot’d 3
The term linear implies that all the mathematical relations used in the
problem are linear or straight-line relations, while
the term programming refers to the method of determining a particular
program or plan of action.
the term linear programming refers to a family of mathematical
techniques for determining the optimum allocation of resources and
obtaining a particular objective when there are alternative uses of the
limited or constrained resources.
Linear programming models are mathematical representations of LP
problems.
Introduction to Linear Programming 4
The Importance of Linear Programming
Many real world problems lend themselves to linear
programming modeling.
Many real world problems can be approximated by linear models.
There are well-known successful applications in:
Manufacturing
Marketing
Finance (investment)
Advertising
Agriculture
Characteristics of LP 5
These characteristics can be grouped as components and assumptions. The
components relate to the structure of a model, where as the assumptions reveal
the conditions under which the model is valid.
COMPONENTS OF LP MODELS
There are four major components of LP models including: Objective function,
decision variables, constraints and parameters.
Objective and Objective Function
The objective in problem solving is the criterion by which all decisions are
evaluated.
It provides the focus for problem solving.
Cont’d……Component 6
Parameters
The objective function and the constraints consist of symbols that represent the decision
variables (e.g., X1, X2, etc.) and numerical values called parameters.
The parameters are fixed values that specify the impact that one unit of each decision variable
will have on the objective and on any constraint
Steps in Formulating LP Models
9
Formulating linear programming models involves the
following steps:
1. Define the decision variables.
2. Determine the objective function.
3. Identify the constraints.
4. Determine appropriate values for parameters and
determine whether an upper limit (<=), lower limit (>=), or
equality (=) is called for.
5. Use this information to build a model.
6. Validate the model.
Expressing optimization problems mathematically
Decision variables
X1 , X2 , X3 , … , Xn
e.g. the quantities of different products
Index n = the number of product types
Constraints
a less than or equal to constraint : f(X1 , X2 , X3 , … , Xn) < b
a greater than or equal to constraint : f(X1 , X2 , X3 , … , Xn) > b
an equal to constraint : f(X1 , X2 , X3 , … , Xn) = b
Objective
MAX(or MIN) Z : f(X1 , X2 , X3, …, Xn) 10
Example: The Micro Computer Problem
11
3. Note that, no demand limit. That mean what ever the combination of Microcomputer produced will be
sold.
Formulate the model 13
1. Identify the Decision Variable;
the decision variable will is determining the quantity of each microcomputer to produce.
Therefore:
a. Tpe1 requires 4 hours of assembly time and type2 requires 10 hours assembly time
so,
b. Tpe1 requires 2 hours of inspection time and type2 requires 1 hours inspection time
so,
c. Both Tpe1 and Type 2 requires 3 cubic feet each so,
Formulate the model (Cont.) 15
4. Formulate Non-negativity
Both type of quantity may not have opportunity to be negative, i.e. if produced
there is value above zero otherwise equal to Zero if not produced.
Therefore,
Model Summary :
Subject to:
Assembly
Inspection
Storage
Methods of Solving LP model 16
Two Methods:
Graphical Methods
Simplex Methods
Graphical Method to Solve LP model 17
1. Formulate the LP
ABC Furniture manufacturer produces two products: Beds and Chairs. Each unit of
Bed requires 3 hrs in molding unit, 4hrs in painting unit, and 1 hr in finishing. On the
other hand, each unit of Chair requires 3 hrs in molding unit, 2 hrs in the paint shop
and 2 hours in finishing. Each week, there are 210 hrs available in molding, 200hrs in
painting, and 120 hrs in finishing unit. The demand for Beds cannot exceed 40 units
per week. Each unit of Bed contributes Birr 20 to profit, while each unit of chair
contributes Birr 30.
2. Maximize Z 3x + 4y
3. Minimize Z: 10x + 4y
S.T.
S.T.
5x + 4y ≤ 200 3x + 6y ≥ 250
3x + 5y ≤ 150 15x + y ≥ 150
5x + 4y ≤ 100 2x + 9y ≥ 200
8x + 4y ≤ 80 X,y ≥ 0
Some Special Issues
32
No Feasible/Infeasible Solutions
Occurs in problems where to satisfy one of the constraints, another
constraint must be violated.
Remark:
An unbounded solution does not mean that there
is no solution to the given LPP, but implies that
there exits an infinite number of solutions.
Redundant Constraints
A constraint that does not form a unique boundary of the feasible solution 34
space; its removal would not alter the feasible solution space.
Ifa 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.
Note:
The packaging hour’s constraint does not form
part of the boundary making the feasible region.
Thus, this constraint is of no consequence and is
therefore, redundant.
The inclusion or exclusion of a redundant
constraint does not affect the optimal solution of
the problem.
Multiple Optimal Solutions 35
Problems in which different combinations of values of the
decision variables yield the same optimal value.
problems
The graphical approach is useful in solving linear programming
models having only two variables.
When the model has more than two variables, the appropriate
approach is the Simplex procedure.
Itbegins with a feasible solution which is not optimal, and the
solution is improved through continuous algebraic
manipulations (iterations) until the optimal solution is
determined.
Cont’d (Simplex) 37
The graphical method to 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).
Simplex Method which is an efficient approach to solve applied problems
containing numerous constraints and involving many variables that
cannot be solved by the graphical method.
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 at.
Steps in solving LP using simplex approach 38
() constraints
Step 1: To solve LP model convert it in to Standard Form:
To Write in to standard form follow the following rules:
1. Introduce or add a slack variable for each constraint of the form
2. Introduce or subtract a surplus variable and add an artificial variable in each
constraint.
3. Introduce an artificial variable in each = constraint.
4. For each artificial variable A, add -MA to the objective function. Use the same
constant M for all artificial variables.
2X1 + X2 22
3X1 + 3X2 39
X1, X2 0
42
Standard form
Zmax = 60X1 + 50X2 + 0S1 + S2 + 0S3
47
Step 3 cont’d
Cj 60 50 0 0 0
48
RHSV Ratio
Basic X1 X2 S1 S2 S3
variable
S1 0 4 10 1 0 0 100 100/4 = 25
S2 0 2* 1 0 1 0 22 22/2 = 11
S3 0 3 3 0 0 1 39 39/3 = 13
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0 0
Evaluate, the initial Tableau, does it 49
optimal or not?
The entering variable is the variable that has the most positive value in
the Cj - Zj row also called as indicator row.
Or the entering variable is the variable that has the highest contribution
to profit per unit.
a) X1 in our case is the entering variable
b) The column associated with the entering variable is called key or
pivot column ( X1 column in our case )
Step 5
51
Choose the “leaving “or “outgoing” variable
In this step, we determine the variable that will leave the solution for X1 (or entering variable)
Note:
The row with the minimum or lowest positive (non-negative) replacement ratio
shows the variable to leave the solution.
Replacement Ratio (RR) = Solution Quantity (Q)
Corresponding values in pivot column
Note: RR>0
The variable leaving the solution is called leaving variable or outgoing variable.
The row associated with the leaving variable is called 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 pivot
element(No 2 in our case)
Step 6: Develop subsequent tableaus 52
Note:
o Divide each element of the pivot row by the pivot element to find new
values in the key or pivot row.
o Perform row operations to make all other entries for the pivot column
equal to zero.
Raw operation= old Raw Value – Key column Value (New raw value
Cont’d 53
Cj 60 50 0 0 0
Basic RHSV Ratio
variable
X1 X2 S1 S2 S3
S1 0 0 8 1 -2 0 56 56/8 = 7
X1 60 1 1/2 0 1/2 0 11 11/. 5 = 22
S3 0 0 3/2 0 -3/2 1 6 6/1.5 = 4
Zj 60 30 0 30 0 660
Cj-Zj 0 20 0 -30 0 0
Optimal table 54
Cj 60 50 0 0 0 Ratio
Basic RHSV
variable X1 X2 S1 S2 S3
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
X2 50 0 1 0 -1 2/3 4
Zj 60 50 0 10 40/3 740
Subject to:
20x1+15x2- s1+A1 = 100
2x1+ 3x2 –s2+A2 = 15
x1, x2 , s1, s2 ,A1 ,A2 > 0
Step 2: Initial simplex tableau
The initial basic feasible solution is obtained by setting x 1= x2= s1= s2=0
No production, x1= x2= s1=0==>20(0) +15(0) - 0+A1 = 100 ==> A1 = 100
x1= x2= s2=0==>0(0)+3(0) - 0+A2 =15==> A2 = 15
Initial simplex tableau
Cont’d
63
Note:
Once an artificial variable has left the basis, it has served its purpose and can therefore be removed from the simplex
tableau. An artificial variable is never considered for re-entry into the basis.
2 Simplex Tableau
nd
Cont’d
64
Cont’d
3rd Simplex Tableau 65
Cont’d 66
X1=5/2
X2=10/3 and
MinZ=162.5
Note:
As long as an “A” variable is available in the solution variable column, the
solution is infeasible.
Maximization with mixed constraints 67
Max! 6X + 8Y
Subject to: Y≤4
X+Y=9
6X+ 2Y ≥ 24
X, Y ≥ 0
70
In standard form
BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M
S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24
BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M
S1 0 0 1 1 0 0 0 4
A2 -M 0 2/3 0 1/6 1 -1/6 5
X 6 1 1/3 0 -1/6 0 1/6 4
Y 0 0 1 1 0 0 4
A2 -M 0 0 -2/3 1/6 1 7/3
X 6 1 0 -1/3 -1/6 0 8/3
6 8 0 0
Y 8 0 1 1 0 4
S3 0 14
X 6 0 0 -4 1 5
Reading Assignment