Ch 2
Ch 2
Linear Programming
1
2.1 Concepts of Linear Programming
• Linear programming- is an optimization
method which shows how to allocate scarce
resources 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 optional solution to
certain problems in which the solution must
satisfy a given set of requirements or constraints.
• Optimization in linear programming implies
maximization (max) Profit, revenue, sales, market
share or minimization (min) Cost, time, distance,
or a certain objective function.
• The goal in linear programming is to find the best
solution given the constraints imposed by the
problem, hence the term constrained
optimization. 2
Formulation of Linear Programming Model
•
8
9
10
• System constraints- involve more
than one decision variables.
• None-negativity constrains-
specify that no variable will be
allowed to take on a negative value.
The non negativity constraints
typically apply in an LP model,
whether they are explicitly stated or
not.
11
Assumption of LP models
1. Linearity: The linearity requirement is that each
decision variable has a linear impact on the
objective function and in each constraint in
which it appears.
• Taking the above example, producing one more
unit of products add birr 4 to the total profit. This
is true over the entire range of possible values of
x1. The same applies (true) to each of the
constraints.
2. Divisibility: The divisibility requirement
pertains to potential values of decision variables.
It is assumed that non-integer values are
acceptable. For example: 3.5 TV sets/ hr would
be acceptable 7 TV sets/ 2hr.
12
3. Certainty: The parameters are known and constant.
It is assumed that the decision maker here is
completely certain (i.e., deterministic conditions)
regarding all aspects of the situation, i.e., availability
of resources, profit contribution of the products,
technology, courses of action and their consequences
etc.
4. Non-negativity: The non-negativity constraint is
that negative values of variables are unrealistic and,
therefore, will not be considered in any potential
solutions, only positive values and zero will be
allowed.
5. We assume here fixed technology. Fixed
technology refers to the fact that the production
requirements are fixed during the planning period
and will not change in the period.
13
Formulating Linear
Programming Models
The formulation of LPM involves the following steps:
28
Graphical Method
30
Maximization Problem
33
Solution
Step 2: Plot the constraints on the graph by
taking two coordinates satisfying the equation
5X1 + 20X2 < 400 i.e. X1 + 4X2 < 80
- - - (a)
10X1 + 15X2 < 450 i.e. 2X1 + 3X2 <
90 - - - (b)
X1, X2 > 0
Converting (a) and (b) to equality, we get
X1 + 4X2 = 80 . . . . (1)
2X1 + 3X2 = 90 . . . (2)
34
Solution
Step 3: Identify the area that satisfies the entire set of
constraints (Feasible region), determine corners and their
coordinate either from graphing procedure or by the
elimination procedure.
the minimum.
If two corners have the same optimal value, then the
40
Solution
Exercise the next steps
Step 2: Plot the constraints on the graph
Step 3: Identify the feasible region
Step 4: Evaluate the objective function at
each corner points
41
Solution
Coordinate of corner Objective Function Value
point Min Z= 50x1 +
80x2
(46.7, 0) 50 × 46.7 + 80× 0 2335
(16.40, 18.18 ) 50 ×18.18+ 80× 2221*
16.40
(0,40)
Therefore, 50× 0+
the company can80minimize
× 30 2400
its cost
to $2221 by operating machine 1 for 18.18
hours and Machine 2 for 16.40 hours
42
The Simplex Method
43
The Simplex Method
• Graphical method of solving LPP can be
used when we have two decision variables
in the problem.
• If we have more than two decision
variables, we can’t use graphical method
• There fore, SIMPLEX Method is useful
to solve LPP with two and more decision
variables
44
The Simplex Method
• Simplex method deals with iterative
process, which consists of first designing a
Basic Feasible Solution and proceed
towards the Optimal Solution and testing
each feasible solution for Optimality to
know whether the solution on hand is
optimal or not
45
Comparison b/n graphical and
Simplex
1. The graphical method is used when we have
two decision variables in the problem.
Whereas in simplex, the problem may have
any number of decision variables
2. In graphical method, the inequalities are
assumed to be equations, so as to enable to
draw straight lines. Whereas in simplex
method the inequalities are converted to
equations by adding Slack variable (in
maximization) and Surplus variable (in
minimization)
46
The Simplex Method: Maximization Example
49
The Simplex Method: Maximization
Example
54
Maximization Example
Max Z = 60X1+50X2
Subject to:
4X1+10X2 < 100
2X1+ X2 < 22
3X1+ 3X2 <39
X1, X2 > 0
55
Solution
Step 1: Formulate the linear programming model
of the real world problem i.e mathematical
representation of LPP
Step 2: Put in Standard form
Max Z = 60X1+50X2+0S1+0S2+0S3
Subject to:
4X1+10X2+S1 = 100
2X1+ X2+ S2 = 22
3X1+ 3X2+ S3 = 39
X1, X2, S1, S2, S3 > 0
56
Solution
Step 3: Design the initial feasible solution.
X1= X2=0 so S1= 100 S2= 22 S3=39
Step 4: Set up the initial simplex tableau
Cj 60 50 0 0 0 Quantity
Basic Variables X1 X2 S1 S2 S3
S1 0 4 10 1 0 0 100
S2 0 2 1 0 1 0 22
S3 0 3 3 0 0 1 39
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0
57
Second Tableau
Cj 60 50 0 0 0 Quantity
BVs X1 X2 S1 S2 S3
S1 0 4 10 1 0 0 100 100/4=
25
2
S2 0 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 0
Cj-Zj 60 50 0 0 0
Smallest non-negative
quotient
Pivot Row Pivot Column Pivot Element
58
Second tableau
Cj 60 50 0 0 0
Quantity
X1 X2 S1 S2 S3
S1 0 0 8 1 -2 0
56
X1 60 1 1/2 0 1/2 0
11
S3 0 0 3/2 0 -3/2 1
6
Zj 60 30 0 30 0 59
Third tableau
Cj 60 50 0 0 0 Quantity
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
Cj-Zj 0 0 0 -10 -40/3
60
Minimization
Examples
61
Minimization Example
The various steps involved in using simplex
method for minimization problems are:
Step1: Formulate the linear programming
model, and express the mathematical model
of LPP in the standard form by introducing
surplus and artificial variables in the left
hand side of the constraints.
Assign a 0 (zero) and +M as coefficient for
surplus and artificial variables
respectively in the objective function.
M is considered to be a very large number
so as to finally drive out the artificial
variables out of basic solution. 62
Minimization Example
• Artificial variables have no physical
interpretation, they merely serve as a
device to enable us to use simplex process.
• During simplex process, any artificial
variables are quickly eliminated from the
solution and hence the optimal solution
should never contains an artificial variable
with a non-zero value
• Artificial variables are required only for
manual solution; computer codes do not
require to input artificial variables
63
Minimization Example
Step 2: Set up an initial solution
• Just to start the solution procedure, the
initial basic feasible solution is obtained by
assigning zero value to decision variables.
• This solution is summarized in the initial
simplex tableau.
• Complete the initial simplex tableau by
adding two final rows Zj, and Cj- Zj. These
two rows help us to know whether the
current solution is optimum or not.
64
Minimization Example
Step 3: Test for optimality of the solution
If all the entries of Cj - Zj, row are
positive and zero, then the solution is
optimum.
However, this situation may come after a
number of iterations. But if at least one of
the Cj - Zj values is less than zero, the
current solution can be further improved
by removing one basic variable from the
basis and replacing it by some non-basic
one.
65
Minimization Example
Step 4: (i) Determine the entering variable into
the basic solution. To do this, we identify the
column with the largest negative value in the
Cj - Zj row of the tableau (the variable in this
column is entering variable)
(ii) Next, determine the departing variable from
the basic solution. If an artificial variable goes
out of solution, then we discard it totally and
even this variable may not form part of further
iterations. Same procedure, as in maximization
case, is employed to determine the departing
and entering variable.
66
Minimization Example
Step 5: Update the new solution
• We evaluate the entries for next
simplex tableau in exactly the same
manner as was discussed earlier in the
maximization example.
67
Minimization Example
Step 6: Step (3-5) are repeated until an
optimum solution is obtained
• So the following are the essential things to
observe in solving for minimization problems:
• The entering variable is the one with the largest
negative value in the Cj-Zj row while the leaving
variable is the one with the smallest non-
negative ratio.
• The optimal solution is obtained when the Cj-Zj
68
Example
Min Z = 7X1+9X2
Subject to
3X1+6X2 > 36
8X1+4X2 > 64
X1, X2 > 0
69
Solution
First, put the LPM in standard
form
Min Z = 7X1+9X2+0S1+0S2+MA1+MA2
Subject to
3X1+6X2-S1+A1 = 36
8X1+4X2-S2+ A2 = 64
X1, X2 , S1,S2,A1, A2> 0
70
Solution
Then, develop the Initial Simplex Tableau
Cj 7 9 0 0 M M
BV X1 X2 S1 S2 A1 A2
Quantity
A1 M 3 6 -1 0 1 0 36
A2 M 8 4 0 -1 0 1 64
Zj 11M 10M -M -M M M 100M
Cj-Zj 7-11M 9-10M M M 0 0
71
Solution
Next, develop the second Simplex Tableau
Cj 7 9 0 0 M
X1 X2 S1 S2 A1
Quantity
A1 M 0 9/2 -1 3/8 1 12
X1 7 1 ½ 0 -1/8 0 8
Zj 7 7/2+9/2M -M 3/8M-7/8 M
56+12M
Cj-Zj 0 11/2-9/2M M 7/8-3/8M 0
72
Solution
Next, develop the third Simplex Tableau
Cj 7 9 0 0
X1 X2 S1 S2 Quantity
X2 9 0 1 -2/9 1/12 8/3
X1 7 1 0 1/9 -1/6 20/3
Zj 7 9 -11/9 -5/12 212/3
Cj-Zj 0 0 11/9 5/12
74
Thank you
75