Chapter 2 LP-3
Chapter 2 LP-3
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
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.
Decision variables
They represent unknown quantities to be solved for.
Constraints
However, the ability of a decision maker to select values of the decision variables in an LP problem is subject to
certain restrictions or limits coming from a variety of sources.
Only solutions that satisfy all constraints in a model are acceptable and are referred
to as feasible solutions. 6
Generally speaking, a constraint has four elements:
A right hand side (RHS) quantity that specifies the limit for that constraint.
It must be a constant, not a variable.
An algebraic sign that indicates whether the limit is an upper bound that
cannot be exceeded, a lower bound that is the lowest acceptable amount, or
an equality that must be met exactly.
The decision variables to which the constraint applies.
The impact that one unit of each decision variable will have on the right-
hand side quantity of the constraint.
Constraints can be arranged into three groups: 7
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
8
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.
Example: The Micro Computer Problem
9
3. Note that, no demand limit. That mean what ever the combination of Microcomputer produced will be
sold.
Formulate the model 11
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.) 13
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 14
Two Methods:
Graphical Methods
Simplex Methods
Graphical Method to Solve LP model 15
This method can be used only to solve problems that involve two decision
variables.
The graphical approach:
1. Plot each of the constraints. Convert each inequality equation into
equality
2. Determine the region or area that contains all of the points that
satisfy the entire set of constraints.
3. Determine the optimal solution.
Figure 2-1 Feasible Region Based on a Plot of the First Constraint
(assembly time) and the Non-negativity Constraint
16
Figure 2–2 A Completed Graph of the Server Problem Showing the
Assembly and Inspection Constraints and the Feasible
Solution Space
17
Figure 2–3 Completed Graph of the Server Problem Showing All of the
Constraints and the Feasible Solution Space
18
Finding the Optimal Solution
19
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
S.T.
5x + 4y ≤ 200 3. Minimize Z: 10x + 4y
3x + 5y ≤ 150 S.T.
5x + 4y ≤ 100 3x + 6y ≥ 250
8x + 4y ≤ 80 15x + y ≥ 150
X,y ≥ 0
2x + 9y ≥ 200
X,y ≥ 0
Some Special Issues
28
No Feasible/Infeasible Solutions
Occurs in problems where to satisfy one of the constraints, another
constraint must be violated.
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 31
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) 33
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 34
() constraints
1: To solve LP model convert it in to Standard Form:
Step
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 42
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.
X1 in our case is the entering variable
The column associated with the entering variable is called key or pivot
column ( X1 column in our case )
Step 5
44
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 45
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.
Cont’d 46
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 47
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
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
57
Cont’d
3rd Simplex Tableau 58
Cont’d 59
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 60
Max! 6X + 8Y
Subject to: Y≤4
X+Y=9
6X+ 2Y ≥ 24
X, Y ≥ 0
63
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