You are on page 1of 14

Dr.

Bishram

Dr. Bishram

1
Minimization Problem
Minimize z = 4x1 + x2
ST
3x1 + x2 =3
4x1 + 3x2 >= 6
X1 + 2x2 <= 4
X1, x2 >= 0

Introducing slack & Surplus variables

3x1 + x2 =3
4x1 + 3x2 – s1= 6
X1 + 2x2 + s2 = 4
X1, x2, s1, s2 > = 0

Introducing Artificial Variables


Minimize z = 4x1 + x2 + 0s1 + MA1 + MA2 +0s2
3x1 + x2 + A1=3
4x1 + 3x2 – s1 + A2 = 6
x1 + 2x2 + s2 = 4
x1, x2, s1, s2, A1, A2 > = 0
Soluti
Basic x1 x2 s1 A1 A2 s2 on Ratio

z -4 -1 0-M -M 0 0

Initial A1 3 1 0 1 0 0 3
A2 4 3 -1 0 1 0 6
s2 1 2 0 0 0 1 4

2
Minimization Continued
Solutio
Basic x1 x2 s1 A1 A2 s2 n Ratio

Consistent
-4 + -1 + z=z + MA1 +
z 7M 4M -M 0 0 09M MA2

A1 3 1 0 1 0 0 3
A2 4 3 -1 0 1 0 6
s2 1 2 0 0 0 1 4

Basic x1 x2 s1 A1 A2 s2 Solution Ratio


iteration 1
1+5M/
z 03 -M 4-7M/3 0 04+2M

x1 1 0.333 0.000 0.333 0 0 1 3


A2 0 1.667 -1.000 -1.333 1 0 2 1.2
s2 0 1.667 0.000 -0.333 0 1 3 1.8

Minimization Continued
Basic x1 x2 s1 A1 A2 s2 Solution Ratio
iteration 2
4.8-
z 0 0 0.2 3M/3 -0.2-M 0 3.6

x1 1 0.000 0.200 0.600 -0.2 0 0.6


x2 0 1.000 -0.600 -0.800 0.6 0 1.2
s2 0 0.000 1.000 1.000 -1 1 1

Solutio
Basic x1 x2 s1 A1 A2 s2 n Ratio

4.6-
z 0 0 03M/3 0 -0.2 3.4
iteration 3
x1 1 0.000 0.000 0.400 0 -0.2 0.4
x2 0 1.000 0.000 -0.200 0 0.6 1.8
s1 0 0.000 1.000 1.000 -1 1 1

3
Criteria for pivoting
Primal Simplex
Pivot column
Maximization : Column with lowest value in z-row
Minimization : Column with Highest value in Z-row
Pivot Row
Ratio of RHS to +ve coefficients in Pivot Column
Take the minimum ratio as outgoing variable

4
Duality of LP problems
Each LP problem (called as Primal in this context) is associated with
its counterpart known as Dual LP problem.
Instead of primal, solving the dual LP problem is sometimes easier in
following cases
a) The dual has fewer constraints than primal
Time required for solving LP problems is directly affected by the number
of constraints, i.e., number of iterations necessary to converge to an
optimum solution, which in Simplex method usually ranges from 1.5 to 3
times the number of structural constraints in the problem
b) The dual involves maximization of an objective function
It may be possible to avoid artificial variables that otherwise would be
used in a primal minimization problem.

Primal-Dual Conversion Principles

Primal (Max) Dual (Min)


1 No of const No of variables
2 No of Variables No of Const
3 RHS Obj Function co-efficients
4 Obj Function Co-eff RHS
5 Co-eff Matrix A A-Transpose matrix
6 Equation Unrestricted variable
7 Unrestricted Variable Equation
8 Desired Constrain ( <=) Desired variable >=
9 Undesired Const ( >=) Undesired Variable (<=)
10 >= Variable >= Constraint
11 <= Variable <= Constraint

10

5
Finding Dual of a LP problem…contd.

Note:
Before finding its dual, all the constraints should be
transformed to ‘less-than-equal-to’ or ‘equal-to’ type for
maximization problem and to ‘greater-than-equal-to’ or
‘equal-to’ type for minimization problem.

It can be done by multiplying with -1 both sides of the


constraints, so that inequality sign gets reversed.

11

11

Finding Dual of a LP problem:


An example

Primal Dual
Maximize Z = 4 x1 + 3 x 2 Minimize Z ′ = 6000 y1 − 2000 y 2 + 4000 y 3
Subject to Subject to
2 y1 − y 2 + y 3 = 4
x1 + x 2 ≤ 6000
3
2
x1 − x 2 ≥ 2000 y1 + y 2 ≤ 3
3
x1 ≤ 4000 y1 ≥ 0
x1 unrestricted y2 ≥ 0
x2 ≥ 0 y3 ≥ 0
Note: Second constraint in the primal is transformed to − x1 + x2 ≤ −2000
before constructing the dual.

12

12

6
Primal-Dual relationships
If one problem (either primal or dual) has an optimal
feasible solution, other problem also has an optimal
feasible solution. The optimal objective function value is
same for both primal and dual.
If one problem has no solution (infeasible), the other
problem is either infeasible or unbounded.
If one problem is unbounded the other problem is
infeasible.

13

13

Dual Simplex Method


Simplex Method verses Dual Simplex Method

1. Simplex method starts with a nonoptimal but feasible


solution where as dual simplex method starts with an
optimal but infeasible solution.

2. Simplex method maintains the feasibility during


successive iterations where as dual simplex method
maintains the optimality.

14

14

7
Dual Simplex Method: Iterative steps
Steps involved in the dual simplex method are:
1. All the constraints (except those with equality (=) sign) are
modified to ‘less-than-equal-to’ sign. Constraints with greater-
than-equal-to’ sign are multiplied by -1 through out so that
inequality sign gets reversed. Finally, all these constraints are
transformed to equality sign by introducing required slack
variables.
2. Modified problem, as in step one, is expressed in the form of a
simplex tableau. If all the cost coefficients are positive (i.e.,
optimality condition is satisfied) and one or more basic variables
have negative values (i.e., non-feasible solution), then dual
simplex method is applicable.

15

15

Dual Simplex Method: Iterative steps…contd.


3. Selection of exiting variable: The basic variable with the highest
negative value is the exiting variable. If there are two candidates for
exiting variable, any one is selected. The row of the selected exiting
variable is marked as pivotal row.
4. Selection of entering variable: Cost coefficients, corresponding to
all the negative elements of the pivotal row, are identified. Their
ratios are calculated after changing the sign of the elements of
pivotal row, i.e.,

The column corresponding to minimum ratio is identified as the


pivotal column and associated decision variable is the entering
variable.
 Cost Coefficients 
ratio =  
 − 1 × Elements of pivotal row 

16

16

8
Criteria for pivoting
Primal Simplex
Pivot column
Maximization : Column with lowest value in z-row
Minimization : Column with Highest value in Z-row
Pivot Row
Ratio of RHS to +ve coefficients in Pivot Column
Take the minimum ratio as outgoing variable
Dual Simplex
Pivot Row
Row with lowest –ve value i.e. –ve RHS with highest modulus
Pivot Column
Ratio of z-row/ -(-ve coefficients)
Choose the lowest Modulus (Ratio)

17

Dual Simplex Method: Iterative steps…contd.


5. Pivotal operation: Pivotal operation is exactly same as
in the case of simplex method, considering the pivotal
element as the element at the intersection of pivotal row
and pivotal column.

6. Check for optimality: If all the basic variables have


nonnegative values then the optimum solution is
reached. Otherwise, Steps 3 to 5 are repeated until the
optimum is reached.

18

18

9
Dual Simplex Method:
An Example
Consider the following problem:

Minimize Z = 2 x1 + x 2
subject to x1 ≥ 2
3x1 + 4 x 2 ≤ 24
4 x1 + 3x 2 ≥ 12
− x1 + 2 x 2 ≥ 1

19

19

Dual Simplex Method:


An Example…contd.

Minimize Z = 2 x1 + x 2
subject to − x1 + x 3 = −2
3 x1 +4 x 2 + x 4 = 24
−4 x1 −3 x 2 + x 5 = −12
x1 −2 x 2 + x 6 = −1

Max z = -2x1 – x2

20

20

10
Iteration1

x1 x2 x3 x4 x5 x6 RHS

x3 -1 0 1 0 0 0 -2
x4 3 4 0 1 0 0 24
x5 -4 -3 0 0 1 0 -12
x6 1 -2 0 0 0 1 -1
Zj-Cj 2 1 0 0 0 0 0
0.50 0.33

21

Iteration 2
x1 x2 x3 x4 x5 x6 RHS

x3 -1 0 1 0 0 0 -2
x4 -2.333 0 0 1 1.333333 0 8
x2 1.3333 1 0 0-0.33333 0 4
3.666 -
x6 7 0 0 0 0.66667 1 7
0.666
Zj-Cj 7 0 0 00.333333 0 -4

22

11
Iteration 3
x1 x2 x3 x4 x5 x6 RHS

x1 1 0 -1 0 0 0 2
x4 0.00 0.00 -2.33 1.00 1.33 0.00 12.67
x2 0 1 1.33 0 -0.33 0 1.33
x6 0 0 3.67 0 -0.67 1 -0.33
Zj-Cj 0 0 0.67 0 0.33 0 -5.33

23

Iteration 4
x1 x2 x3 x4 x5 x6 RHS

x1 1 0 -1 0 0 0 2
x4 0.00 0.00 4.95 1.00 0.00 1.99 12.01
x2 0 1 -0.49 0 0 -0.5 1.49
- -
5.4776 1.4925 0.4925
x5 0 0 1 0 1 4 37
Zj-Cj 0 0 2.49 0 0 0.5 -5.49

24

12
Solution of Dual from Primal Simplex

Primal
Maximize Z = 4 x1 − x2 + 2 x3 y1
subject to 2 x1 + x2 + 2 x3 ≤ 6
Z’
x1 − 4 x2 + 2 x3 ≤ 0 y2
5 x1 − 2 x2 − 2 x3 ≤ 4
x1 , x2 , x3 ≥ 0 y3
Dual
Minimize Z ' = 6 y1 + 0 y2 + 4 y3
subject to 2 y1 + y 2 + 5 y3 ≥ 4
y1 − 4 y2 − 2 y3 ≥ −1
2 y1 + 2 y2 − 2 y3 ≥ 2
y1 , y2 , y3 ≥ 0

25

25

Lingo
1. Download LINGO Ver 18.0 from LINDO.com

Syntax

MAX = 20 * x1 + 30* x2;


x1 <= 50;
x2 <= 60;
x1 + 2 * x2 <= 120;

26

13
Thank You

27

14

You might also like