Вы находитесь на странице: 1из 51

Part 1: Foundation

Module 1b
Linear Programming Geometric Solution Simplex Method Revised Simplex Method

Dr. Gajendra Kumar Adil, SJMSOM

Linear Programming
A Linear Programme (LP) is of the following form

Minimize/Maximize

z = c1 x1 + c2 x2 + ...... + cn xn

Subject to ai1 x1 + ai 2 x2 + ..... + ain xn = bi , i = 1, 2,...., m x1 , x2 ,..., xn 0


In Compact form: Minimize/Maximize (j=1 to n) cj xj Subject to (j=1 to n) aij xj {<, = , >}bi, i=1 to m xj 0, j =1 to n
Dr. Gajendra Kumar Adil, SJMSOM

Standard and Canonical Forms of LP


MINIMIZATION PROBLEM STANDARD FORM Minimize (j=1 to n) cj xj (j 1 Subject to (j=1 to n) aij xj = bi, i=1 to m xj 0, j =1 to n , CANONICAL FORM Minimize (j=1 to n) cj xj Subject to (j=1 to n) aij xj bi, i =1 to m xj 0, j =1 to n MAXIMIZATION PROBLEM Maximize (j=1 to n) cj xj (j 1 Subject to (j=1 to n) aij xj = bi, i=1 to m xj 0, j =1 to n j , Maximize (j=1 to n) cj xj Subject to (j=1 to n) aij xj bi, i =1 to m xj 0, j =1 to n

Notice that the structure of LP in the standard form:


1.Objective function row 2.Technology constraints (system of simultaneous linear equations.) 3. Non-negativity constraints.
Dr. Gajendra Kumar Adil, SJMSOM

Problem Manipulation to Convert an LP into its Standard Form


A) Converting Inequality into Equation Add Slack variable, s (s has coefficient of 0 in the objective function) Less than type: 5 x1 + 2 x2 10, x 1, x 2 0 Add slack variable: 5 x1 + 2 x2 + s = 10, x1, x2 0, s0 Add Surplus Variable, s (s has coefficient of 0 in the objective function) Greater than type: 5 x1 + 2 x2 10, x 1, x 2 0 Add surplus variable: 5 x1 + 2 x2 - s = 10, x1, x2 0, s 0 B) Converting Variables with Unristricted in Sign (urs) into Nonnegate Variables 5 x1 + 2 x2 = 10, x1 0, x2 urs

Replace urs variable with difference of two non-negative variables. x1 0, x3, x4 0 5 x1 + 2 * (x3 - x4) = 10, C) Converting Minimization Problem to Maximization Problem and Vice Versa Maximize z1 = cx Minimize z2 = cx

Dr. Gajendra Kumar Adil, SJMSOM

Geometric Solution of a Linear Programme g


Draw feasible region defined by half-spaces satisfying linear inequalities corresponding to technological and non-negativity constraints. Draw contours of constant objective function value in the direction where objective function value improves until the contour has at least one point lying in feasible region.

x2 Max z = x1 + 2 x2 s.t. x1 + x2 < 5 x1 > 0 x2 > 0 (0) ( ) (1) (2) (3)

z = x1 + 2 x2 = 10 1

2 1

z = x1 + 2 x2 = 0

3 1

x1 z = x1 + 2 x2 = 5
Dr. Gajendra Kumar Adil, SJMSOM

Geometric Solution of a Linear Programme


Case 1. Unique Finite Optimal Solution
x2 Max z = x1 + 2 x 2 (0) s.t. st (1) x1 + x2 <= 5 x 1 >= 0 (2) x 2 >= 0 (3) 0 1 x1 2 3 Bounded regin 1 Min z = x1 + 2 x2 s.t. x1 + x 2 >= 5 x1 >= 0 x 2 >= 0 (0) (1) (2) (3)

3 Unbounded region

Case 2. Alternative Finite Optimal Solutions


x2 Max z = x1 + x2 (0) s.t. st x1 + x2 <= 5 (1) x1 >= 0 (2) x2 >= 0 (3) 1 0 Min z = x1 + x2 (0) s.t. st x1 + x2 >= 5 (1) x1 >= 0 (2) x2 >= 0 (3) 2 1 3 1 x1 3 1 Unbounded region

0 2 1

Bounded region

Dr. Gajendra Kumar Adil, SJMSOM

Geometric Solution of a Linear Programme


Case 3. Unbounded Solution
x2 Max z = x1 + x2 (0) s.t. x1 >= 0 (1) x2 >= 0 (2)

0 1 3 2 1

0 1

x1

Unbounded region

Case 4.Empty Feasible Region 4 Empty


x2 Max z = x1 + x2 (0) s.t. x1 + x2 <= 5 (1) x1 + x2 >= 6 (2) x1 >= 0 (3) (4) x2 >= 0 x1

3 1

2 1

4 1 An empty feasible i

Dr. Gajendra Kumar Adil, SJMSOM

Some Observations to Make from Geometric Solution of LP


If optimum solution exists, it lies on one or more hyperplanes (not in the interior of feasible region). Will this be true if- (i) Objective function is non-linear? (ii) e s b e eg o ). W s ue ( ) Objec ve u c o s o e ( ) Variables are not continuous (i.e., discrete)? By scanning just the corner feasible points one can find the optimum solution. If it is a unique optimum then one of the corner point feasible solutions (CPFS) is optimum otherwise the edge joining two adjacent corner point feasible solutions (CPFS) is optimal. Thus corner points are very useful in LP. To prove this for bounded case simply substitute the variables in terms of corner points (known) and lambdas (convex combination) then you have just one constraint sum of lambdas equal to 1. The lambda with highest negative coefficient (for minimization l t 1 Th l bd ith hi h t ti ffi i t (f i i i ti problem) can be set to 1 (This is left as an exercise). There are a finite number of corner point feasible solutions (CPFS). What is the upper b bound on number of CPFS? d b f If a CPFS has no adjacent CPFS that are better, then such a CPFS is guaranteed to be an optimal solution. What happens if feasible set is non-convex?

Dr. Gajendra Kumar Adil, SJMSOM

Simplex Basics
Geometric solution is not possible beyond three dimensions for which simplex can be used. Therefore, we develop the following k id f ll i key ideas used in simplex algorithm: di i l l ith 1. Corner feasible points (CPFS). Concept of adjacent CFPS. p ( ) p j 2. Develop optimality criteria (a check if a CPFS is optimal, that is no adjacent CFPS is better) is, 3. How to move from one CPFC to better adjacent CPFS. j 4. The process of detecting situations, un-boundedness and infeasibility. infeasibility
Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions


(Characterization of CPFS) (Ch t i ti f
Geometrically: Consider the polyhedral set defined by following inequalities.
a11x1+ +a1p xp < b1 + a21x1+ +a2p xp < b2 : am1x1++amp xp < bm x1 > 0 x2 > 0 : xp > 0 m halfspaces (of form ai1x1 ++aip xp < bi); and m associated hyper planes (of form ai1x1 ++aip xp = bi)

p halfspaces (of form x1 > 0) ; and p associated hyper planes (of form xi = 0)

This can be geometrically interpreted in p dimensional space as follows. The feasible region is formed by the intersection of p+m half spaces. Hence, p+m associated hyperplanes or boundaries of half spaces. yp p p At Corner points, p independent hyperplanes (of dimension p) are binding or intersect. For example, (i) p=2, intersection of two hyperplanes (i.e. lines) defines a point; (ii) p=3, intersections of three hyperplanes (i.e planes) is a point and so on. Corner points where p hyperplanes are binding are called face of dimension zero. Edge is face with di Ed i a f ith dimension 1 and can b d fi d b i t i d be defined by intersection of p-1 h ti f 1 hyperplanes. l
Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions


(Characterization of CPFS)
Example Problem 1: Consider the polyhedral set (P1) defined by following
inequalities in 2 dimensional space (p=2). x1 + x2 6 x2 3 x1 0, x2 0 This can be geometrically shown in 2 dimensions, i.e., in x1-x2 space. The feasible region is formed by the intersection of four half spaces defined by the inequalities (1) to (4) (4). Four (=p+m) hyperplanes or boundaries of half spaces (replacing the inequality sign by equality sign in 1 to 4 gives the hyperplanes) are shown in figure. i fi There are five corner points (A, B, C, D and E) out of which A, B, C and D are four feasible corner points. One can see that the corner points are p nothing but intersections of 2 (p = 2) hyperplanes. (1) (2) (3-4)

P1

x2

x1=0 E x1+x2 =6

x2=3

x2=0 A B

x1

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions


a11x1+ +a1p xp + xp+1 = b1 a21x1+ +a2p xp + xp+2 = b2 : : slack, xp+m > 0 added slack, xp+1 > 0 added slack, xp+2 > 0 added and;

(Characterization of CPFS)

Algebraically: Al b i ll Consider the polyhedral set defined by the following equations and/ inequalities.
m halfspaces (of form ai1x1 ++aipxp < bi );

associated m hyper planes [of form xp+i = bi (ai1x1 ++aipxp)=0]

am1x1++amp xp + xp+m = bm x1 > 0 x2 > 0 : xp+m > 0

Represent p h lf R t halfspaces ( f f (of form xi > 0 1 < i < p) ; and 0, ) d p associated hyper planes (of form xi = 0) for structural variables. and m half spaces (xp+i > 0, 1 < i < m) and m hyper planes for slack variables.

Solution:
Number of variables, n = p + m Number of equations = m Basic Solution (all variables have unique values): ( q ) Number of basic variables = m Number of variables required to be nonbasic = p from p+m (these indicate the binding hyperplane) Corner Point (unique values for each variable): intersection of p hyperplanes i e basic solution hyperplanes., i.e., gives a corner point.
Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


Basic Solution To get a unique solution for n (= p + m) variables some n linearly independent equations are required. Out of required n equations the first m comes from q q q q technological constraints [A]mxn[x]n = [b]m and additional p (= n-m) come from the non-negativity constraints [x]n [0]n. y We choose a set of p variables and set each of these variables to zero to satisfy nonnegative constraints. These variables are called non-basic or independent variables, xN. Then [A]mxn[x]n = [b]m are solved to get unique solution for remaining variables called basic variable xB. Such a solution is called basic solution. Thus, effectively, partition columns of A into two sets, B and N, where B is a submatrix that consists of m linearly independent columns of A and N is another submatrix that consists of the remaining p (=m-n) columns.
[B , N ] [xB , xN]T = b B = basis or basic matrix. N = non-basic matrix. xB = basic variables; xN = non-basic or independent variables

Given B, the solution of the form xB = B1b and xN = 0 is called a basic solution.

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


Definition 1- Basic Solution: A basic solution to [A]mxn[x]n = [b]m and [x]n [0]n; is a solution with at least n - m zero Variables. The solution is a non-degenerate basic solution if exactly n-m variables are zero. The choice of the m non-zero variables is called the basis. Variables in the basis are called basic variables; the others are called non-basic or independent variables. Definition 2- basic feasible Solution (bfs): If a basic solution satisfies xB > 0 then it is called a basic feasible Solution (bfs).

Example Problem 2: Consider polyhedral set of Example Problem 1 (P1) and convert them

into standard form. Constraints Ax = b are two (=m) equations in four (n=m+p) unknowns. =6 (1) x1 + x2 + x3 x2 + x4 =3 (2) x1 0, x2 0, x3 0, x4 0 (3-6)
1 1 1 0 A = , x = [x1, x2, x3, x4]T , b = [6, 3] T . 0 1 0 1

It is possible to express any two (=m) basic variables in terms of other two (p=n-m) non-basic variables, assuming that equations 1 and 2 are independent (there are a maximum of 4C2 = 6 ways to select basis). The following illustrates the enumeration.

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


Non-Basic Variables, xN (set to be 0) x 1, x 2 x 2, x 3 x 3, x 4 x1,x4 x 1, x 3 x2,x4 Basic Variables, xB (solved for ) x 3, x 4 x 1, x 4 x 1, x 2 x 2, x 3 x 2, x 4 x 1, x 3 Basic Solution x1 0 6 3 0 0 x2 0 0 3 3 6 x3 6 0 0 3 0 x4 3 3 0 0 -3 Is it a Basic Feasible Solution (xB 0?) Yes Yes Yes Yes No Not applicable Correspon dence to Corner Point A B C D E None

Does not exist, as a1=a3 a (linearly dependent columns)

Correspondence to the Geometry


As illustrated above, each feasible basis corresponds to a corner point (A, B, C, D or E in above (A B C x1-x2 space). Further, the corner points are intersection of p (=2) hyperplanes. It is convenient to visualize the hyperplanes defining the boundary of feasible region by associating an indicating variable to each hyperplane such that the indicating variable assumes a value of zero on that hyperplane. Each variable (including slack) is associated to a hyperplane in a unique way.
Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


In x1-x2 space, the 4 lines (hyperplanes) defining the feasible set can be written x1= 0, x2 = 0, x3 = 0, x4 = 0 (see figure). Thus the corner point can be viewed in terms of hyperplanes intersecting at it or the indicating variables having zero values at it which are non-basic variables also. At each corner point represents a unique combination of non-basic variables.

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


How to associate variables to the hyperplanes? Write the LP in canonical form. Let there be m technological constraints of inequality type carrying p structural variables (excluding slack variables) and m slack variables. 2. Associate each slack variable to the hyperplane corresponding to the technological constraint. 3. Associate each structural variable to the non-negativity 3 constraint. Example Problem 3
x1 x2 + x3 2x1 x2 + 2x3 3x1 2x2 + 3x3 , , x1 0, x2 0, 10 40 50 x3 0 (1) (2) (3) [Introduce slack x4 0] [Introduce slack x5 0] [Introduce slack x6 0]

1.

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


Category of Constraint Technological Half space** x1 x2 + x3 10 2x1x2 + 2x3 40 3x12x2 + 3x3 50 Non-negativity of problem variables x1 0 x2 0 x3 0 Non-negativity of slack variable x4 0 x5 0 x6 0 Defining Hyperplane x1 x2 + x3 = 10 2x1x2 + 2x3 = 40 3x12x2 + 3x3 =50 x1 = 0 x2 = 0 x3 = 0 Already considered in technological constraints. x4 =0 x1 x2 + x3 =10 *Indicating Variable x4 (slack variable) x5 (slack variable) x6 (slack variable) x1 x2 x3 Not applicable

*Indicating Variable having value 0 on the hyperplane ** for technology constraint of other type the indicating variable is chosen as follows: type (introduce x6 surplus and x7 artificial variable) = type (introduce x8 artificial variable) x1 x2 + x3 20 x1 x2 + x3 = 20 x6 + x7

x1 x2 - x3 = 30

x1 x2 - x3 =

30

x8

Dr. Gajendra Kumar Adil, SJMSOM

Basic Feasible Solutions (Characterization of CPFS)


Example Problem 4: Add another constraint, x1 + 2 x2 9 in the
Example Problem 1 (P1) considered earlier. What happens? You can check it out. It results in the following degenerate bases. xB = [x1, x2, x5]T=[3, 3,0] T, xN = [x3, x4] T = [0 0] T [ [ ] [ [ ] & xB = [x1, x2, x3]T=[3, 3,0] T, xN = [x4, x5] T = [0 0] T & xB = [x1, x2, x4]T=[3, 3,0] T, xN = [x3, x5] T = [0 0] T Theorem. Theorem Basic feasible solutions extreme points of the feasible set or CFPS. Every basic feasible solution corresponds to corner feasible point (extreme point). (However, an extreme point may have several basic feasible solution representations, e.g., in case of degeneracy.)

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


How can one conclude that a basic feasible solution is optimum? The bfs is optimum if it is proved that increasing value of any of the nonbasic variables from current level of 0 does not improve the objective function value. We need to recast the problem in nonbasic variables for this purpose.

Key Idea of Simplex- Reduction of LP Problem in Terms of Nonbasic Variables:


The system of equations (constraints and objective row) representing a basic feasible solution is written in canonical form of nonbasic variables. We perform Pivoting considering basic variables as pivots. Note that the pivoting is necessary to compute the values of basic variables. The resulting system can then be easily written in terms of non-basic variables in canonical non basic form because basic variables just act as slack. Transforming matrix this way, achieves the following: i) ) It helps making checks if the current bfs is optimum, p g p ii) If current bfs is not optimum then it identifies the adjacent bfs(s) that can improve the objective function? and iii) It also helps in doing a ratio test that identifies which basic variable should leave the current basis to move to an adjacent bfs. h b i dj bf
Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Example Problem 5: Problem Reduction in term of Nonbasic Variables

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Lets take a basic feasible solution, say, xB=[x1, x4, x5]T, xN=[x2, x3]T . 1) Eliminate x1 from equations (0), (2) and (3); 2) Eliminate x4 from equations (0), (1) and (3) (already in that form); and 3) Eliminate x5 from equations (0), (1) and (2) (already in that form) respectively.

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


The resulting system becomes:

z x1

+ x2 +x2 x2 x2

-x3 +x3 + x4 -x3 +x5

= -6 =6 =3 =3

( ) (0) (1) (2) (3)

The above can be re-written as a problem reduced in terms of nonbasic variables ( (xN) as the basic variables (xB) just act as slack variables (i.e., they appear in ( j ( y pp just one equation with coefficient 1).

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Optimality Check: The new problem is not optimal as increasing x2 will improve z further from -6. By observing the sign of coefficient of x2 and x3 in the j ( ), ( ) objective function row (or row 0), (called reduced costs) conclusions whether optimum has reached can be made. How much can x2 be increased? As much as the constraints allow. For this problem one can graphically show in (x2, x3) space in which origin (0, 0) is the (0 cbfs. Move from origin along x3 (so that x3 stays at 0 or NBV and x2 increases) until it reaches the adjacent vertex (it will hit one hyperplane corresponding to one of the three constraints). One may also note that one of the basic variables will then assume a value of 0 at this hyperplane. (verify it graphically). hyperplane graphically) Expressing the Elements in the Transformed Tableau in Terms of B-1 and the Original LP. g An alternative to pivoting just described can be used using matrix operations. This alternate method computes B-1 and uses it to get the equations in the desired form form.
Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Original LP in Matrix Form
Consider (Min z = [c]1 [x]nx1) s.t. [A]mxn[x]n = [b]m and [x]n 0) 1xn 1 Min z = cB xB + cN xN s.t. BxB + NxN = b xB, xN > 0
Where,

A = [a1 cB = [ cB1 B = [a B1

a 2 L a n ] (original columns) cB 2 L cBm ] , c N = cN 1 a B 2 L a Bm ] , N = a N 1 cN 2 L cN ( m n ) (original costs) a N 2 L a N (mn)

xN 1 xB1 b1 0 x b 0 xN 2 xB = B 2 , x N = , 0 = ,b = 2 M M M M xN ( m n ) 0 xBm bm

Example Problem 6 (in the next slide):

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Example Problem 6

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Problem Reduction in terms of nonbasic variables I. Expressing the constraints columns using B-1 and the original constraints columns Multiplying the constraints by B-1, we obtain the columns of the transformed matrix. B-1 B xB + B -1 N xN = B -1 b
1 1 = xB + B -1 N xN = B -1 b

xB +

y
jR

xj = b

(T1 - Tm )

(where R is the current set of indices of the nonbasic variable) xB1 y1, N 1 x y B 2 + 2, N 1 M M xBm ym , N 1 y1, N 2 y2, N 2 M ym , N 2 y1, N ( m n ) y2, N ( m n ) M M L ym , N ( m n ) L L xN 1 b1 x N 2 = b2 M M xN ( m n ) bm
Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


We are interested in computing column yj of non-basic variable xj and the right side column. These can be computed by premultiplying the columns from the original LP by B-1, as follows follows. yj = B -1 aj and b = B -1 b
y1j B 111 1 y 2j -1 B 21 = B aj = yj = M M 1 y mj B m1 b1 B 111 1 b2 B = B-1 b = 21 b= M M 1 bm B m1 B 112 B 122 B 1m 2 B 112 B 122 B 1m 2 M M B 11m a1 j L B 12 m a2 j M M M 1 L B mm amj L

L B 11m b1 L B 12 m b2 M M M L B 1mm bm
Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


II. Determining the Row 0 in terms of Initial LP and B-1
Eliminate xB from row 0: pre-multiply the transformed constraints (T1-Tm) by cB or the original constraints by xB B-1 and add to the row 0.
z + (cB B B - cB )xB + (cB B N - cN ) xN = cB B b z + 0 xB + Or, z + 0 xB + (where, zj = cB B aj
1 1 1 1

jR

(cB B aj cj ) xj = cB B b

jR

(zj cj ) xj = z0
1

(0)

and

z0 = cB B b is a constant)

Thus, Reduced Problem (RP) in Non-basic Variable Space is: Minimize z = z0 - jR (zj cj ) xj ( Subject to jR yj xj b , xj > 0 jR
Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Example Problem 7: Transformation using Matrix form: Minimize Subject t S bj t to x1 + x 2 x1 + 2 x2 < 4 x2 < 1 x 1, x 2 > 0
1 2 1 0 1 0 1

add slack x3 dd l k add slack x4

A = [a1, a2, a3, a4] = 0


1

; xB = [x1, x2]; B=[a1, a2] ; xN = [x3, x4], N=[a3, a4]


4 z0 = cBB-1b = [1 1] = 3 1 1 z3 c3 = cBB-1a3 c3 = [1 1] 0 = 1 0 0 z4 c4 = cBB-1a4 c4 = [1 1] 0 = 1 1

1 2 1 2 1 2 = , cB B-1 = [1 1] B-1 = = [1 1] 0 1 0 1 0 1 1 2 1 1 1 2 0 2 = , y4 = B-1a4 = = y3 = B-1a3 = 0 1 0 0 0 1 1 1 1 2 4 2 = b = B-1 b = 0 1 1 1

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


Example Problem 7: Transformed problem.

System Representation in tableau form

Dr. Gajendra Kumar Adil, SJMSOM

Optimum Basic Feasible Solution


z z 1 x B1 0 1 0 : 0 x B2 0 0 1 : 0 x Bm x N1 0 0 0 : : 1 xj x Np
(p=n-m) ( )

RHS Objective Row 0 C Row 1 C Row 2 : C Row m

zN1 cN1 zj c j y 1,N1 y 2,N1 : y m,N1 y 1,j y 2,j : : y m,j :

x B1 0 x B1 0 : : x Bm 0

z Np cNp cB B -1b = cB b b y 1,Np 1 y 2,Np b


2

: y m,Np

:
bm

Feasibility condition: The basic solution is feasible if, xB = B1b 0 (should satisfy non-negativity constraints to be a bfs). Optimality condition: If reduced cost (zj cj) 0 for all jR the jR, current basic feasible solution (cbfs) is optimal for a minimization problem.

Dr. Gajendra Kumar Adil, SJMSOM

Moving to an Adjacent CPFS


What happens if optimal has not reached? That is if (zj cj) > 0 for some j = kR, then by bringing xk into basis objective function value p y ( ) improves at the rate defined by the coefficient of xk, i.e., (zk ck). This can be observed in reduced problem. z = z0 (zk ck) xk Thus it is possible to find a new basis by replacing one of the existing column r with the column of entering variable xk g k. Extent of Improvement in the objective function value and leaving variable?

xB1 b1 y1k x b y B 2 2 2k M M M = xk xBr br yrk M M M xBm bm ymk

Dr. Gajendra Kumar Adil, SJMSOM

Moving to an Adjacent CPFS


What happens if optimal has not reached? If yik < 0, then xBi increases as xk increases and so xBi continues to be non-negative. Hence problem is unbounded if yik < 0, for all i. Otherwise, for some i, yik > 0 then xBi will decrease as xk increases In order to satisfy nonnegtaivity xk is increased until the first point at which a increases. nonnegtaivity, basic variable xBr drops to zero (equivalently hits a hyperplane for which it is the indicating variable). This gives the following condition.

bi br xk = Minimum : yik > 0 1i m yrk yik


A new feasible solution is obtained.

In the absence of degeneracy degeneracy,


br > 0, and hence xk = br > 0. yrk

yik xBi = bi br yrk

br i = 1, 2,...., m; and xk = yrk

Note that at the current bfs there are p hyperplanes (including xk=0) are binding. When we set xk > 0, we have only p-1 binding hyperplanes which defines the edge along which we travel until we hit the hyperplane xBr =0, at the next corner point and we again have p binding hyperplanes. Or if we cannot find xBr =0 the we hit unboundness and in that case the edge is an extreme direction).
Dr. Gajendra Kumar Adil, SJMSOM

Moving to an Adjacent CPFS


Geometric Interpretation: In Ax < b; x > 0, each constraint, including nonnegativity constraints can be uniquely associated with a certain variable. Thus x1 > 0 can be associated with the variables x1, and the line ( yp p (hyperplane x1=0). ) Example Problem 8: Consider Example Problem 7. A constraint such as, x1 + 2 x2 < 4 can be associated with the slack variable x3, and x3 = 0 (i.e., x1 + 2 x2 = 4) is the hyperplane and so on. Intersections of the p (=n-m) hyperplanes define bf and th associated defining variables are nonbasic h l d fi bfs d the i t d d fi i i bl b i variables.

Dr. Gajendra Kumar Adil, SJMSOM

Moving to an Adjacent CPFS


The feasible region in (x1, x2) and (x3, x4) space is shown. How many such representations are possible? As many as choices of basis (or rather nonbasic variables). Introducing x3 will improve objective function value. One ) g p j moves along an edge. On edge p-1 hyperplanes are binding. How? [Hint: variables are expressed in terms of x3] xB = B-1 b B-1 a3 x3

x1 2 1 x = 1 0 x3 2
Maximum value of x3 is 2 (any larger value of x3 will force x1 to be negative). Which hyperplane it hits first? x1= 0. New bfs [x1, x2, x3, x4] = [0,1,2,0] (Note: old bfs =[2, 1, 0, 0]. Thus the direction of travel along the edge is: [0-2,1-1, 2-0, 2-0 0-0]) x3 enters basis improvement in z = (z3-c3)*x3 = 2.
Dr. Gajendra Kumar Adil, SJMSOM

Moving to an Adjacent CPFS


Meaning of Reduced Cost, zk-ck: It is to be noted that zk-ck is the amount of improvement in the objective function value if value of xk is increased by 1. One unit of increase in xk reduced a basic variable xBr by yBrk,. Thus zk represents the amount by which objective function value reduces (sum total for all basic variables) and ck represents the amount by which objective function value increases due to variable xk. The net improvement in objective function for a minimization problem is (zkck). Note that for a maximization problem the improvement will be -(zk-ck). Simplex: Simplex method at each iteration transforms the problem into p nonbasic variable space with current solution at origin. To check the improvement in cost function one can evaluate p current axis directions. Simplex in p di f i l i di i Si l i dimensions is a i i convex hull of a set of p+1 non-coplanar points, that is the points not lying in the same hyperplane.

Simplex for p =1

Simplex for p =2 2

Simplex for p =3

Dr. Gajendra Kumar Adil, SJMSOM

Termination: Unique & Alternate Solutions and Infeasibility


Unique Solution
If (zj cj) < 0 [(zj cj) > 0] for all non-basic variables, j then non basic variables unique solutions for minimization [maximization] problem.

Alternative Solution(s) Alt ti S l ti ( )


If (zj cj) = 0 for some non-basic variables, j indicates the presence of an alternate solution.

Infeasibility
Solution does not improve with artificial variable(s) still in the basis.

Dr. Gajendra Kumar Adil, SJMSOM

(Original) Simplex Method


Step 1. Obtain the initial feasible basis. Step 2. Check the optimality of the current basis. CBFS is optimal iff every coefficient i row 0 i nonpositive ( ffi i t in is iti (nonnegative) for minimization ti ) f i i i ti (maximization) problem. [that is, zj cj 0 (or zj cj > 0) for each j R for minimization (or maximization) problem]). If optimal, STOP. Step 3. th St 3 If the current basis is not optimal, identify the entering variable xk [th t tb i i t ti l id tif th t i i bl [that is, zk ck > 0 (or zk ck < 0) for minimization (or maximization) problem]. Step 4. Perform the minimum ratio test to determine the leaving variable xBr. -Select strictly positive coefficients in pivot column. -Divide coefficients into RHS of same row. -Identify row with smallest ratio, this is the pivot row. -Replace variable of that row with entering basic variable. R l i bl f th t ith t i b i i bl Step 5. Perform a pivot operation to update the basis and go to Step 2.

Dr. Gajendra Kumar Adil, SJMSOM

Illustration of Simplex Method: Example Prob. 10

Dr. Gajendra Kumar Adil, SJMSOM

Illustration of Simplex Method

Dr. Gajendra Kumar Adil, SJMSOM

Illustration of Simplex Method

Dr. Gajendra Kumar Adil, SJMSOM

Termination: Unboundedness
Unboundedness: There is no blocking hyperplane from the current solution along the simplex or simplices. Or one moves from the current vertex along an extreme direction. Example Problem 9: Minimize z = -x1 3x2 x Subject to x1 2x2 + x3 =4 -x1 + x2 + x4 = 3 x1, x2, x3, x4 > 0 0.
Coefficient Iteration BV z 1 x3 x4 z 2 x3 x2 z 1 0 0 1 0 0 x1 1 1 (-1) 4 (-1) (-1) x2 3 (-2) 1 0 0 1 x3 0 1 0 0 1 0 x4 0 0 1 (-3) ( ) 2 1 RHS 0 4 3 (-9) ( ) 10 3 0 3 .... .... x2 enters x4 leaves x1 can enter soln unbounded Ratio Remarks

Dr. Gajendra Kumar Adil, SJMSOM

Direction of Unboundedness

In case x1 is increased and x4 is kept at 0, the solution is unbounded. We can represent a direction along which the solution is unbounded in terms of current bfs (cbfs) as vertex as shown next.

Dr. Gajendra Kumar Adil, SJMSOM

Direction of Unboundedness
x1 x2 x3 x4 xB xN xB xj xk x1 x2 x3 x4 =
k

x1 x2 = x3 x4 xB = xN xB = 0 0 0 3 10 0 + x1 bfs
bfs

d1 + bfs d2 d3 d4 dB + xk dN -yk + xk 0 1 1 1 1 0

where, =xk can be increased infinitely large

Extreme direction d = (1, 1, 1, 0). For minimization problem the condition for unboundedness, cd < 0.
Extreme direction

Dr. Gajendra Kumar Adil, SJMSOM

Revised Simplex Method


Revised simplex method is a systematic procedure for implementing the steps in the simplex method in a smaller array, thus saving storage space. Columns for nonbasic variables are not stored but generated for checking optimality and performing ratio test. First recap the simplex tableau:

As can be seen, for a given basis and hence B and B-1, we can generate the information on RHS column and column of nonbasic variables to conduct optimality check and ratio test using the following formulas:
Let simplex multipliers (shadow prices) (Row 0 ) w = cB B-1 Column of a nonbasic variable xj: (Not stored) The reduced costs of xj = cB B-1 aj cj = w aj cj cB B-1 b =wb = B-1b
Dr. Gajendra Kumar Adil, SJMSOM

(Constraint rows) Column of xj in the constraints = yj = B-1 aj Right hand side column(Row 0 ) (Constraint rows)

Revised Simplex Method


Steps in Revised Simplex Method for Minimization Problem:
Step 1. Obtain the initial feasible basis, xB and B. Step 2 i) Compute B-1, the simplex multipliers w = cB B-1 and current basic feasible 2. solution (xB = = B-1 b, xN = 0 and z = cB B-1 b =wb= cB b ) ii) Calculate reduced cost zj-cj = cB B-1 aj cj = w aj-cj for each nonbasic variable, xj. B iii) Let zk-ck = cmaximum j ( zj - cj). If zk-ck < 0, then stop; the current solution is optimal. Otherwise go to step 3. 3 Step 3. Calculate yk = B-1 ak. If yk < 0, then stop; the optimal solution is unbounded. Otherwise determine the index of the variable xBr leaving the basis by ratio test. b Step 4. Update the basis B by replacing aBr with ak (or more efficiently update B-1 directly) and go to step 2. d t t 2 The above can be carried out using a smaller array. Suppose we have a basic feasible solution with a known B. The following array is constructed.
BASIS INVERSE Variable w = cB B-1 B-1 z= xB= SOLUTION Value (RHS) wb= cB b = B-1 b xj=N1 zN1-cN1 Not required Computation on xN columns xj=k zk-ck yk xj=Np zNp-cNp

Not required

Dr. Gajendra Kumar Adil, SJMSOM

Revised Simplex Method


Example Prob. 11: Illustration of Revised Simplex Method

Max z = -x1 - x2 + 4 x3 x s.t. x1 + x2 + 2x3 + x4 = 9 x1 + x2 x3 + x5 = 2 x1 + x2 + x3 + x6 = 4 xi > 0 for i = 1 2 3 4 5 6 0, 1, 2, 3, 4, 5, 6. j= 1 2 3 4 5 xj x1 x2 x3 x4 x5 cj = -1 -1 4 0 0 1 1 2 1 aj = 1 1 -1 0 -1 1 1 0 0 1 0 6 x6 0 b 9 2 4

Note that x4, x5 and x6 are slack variables.

0 0 1

Row No R1 R2 R3

Dr. Gajendra Kumar Adil, SJMSOM

Revised Simplex Method


Step 1.Assume that initial basis is xB ={x4, x5, x6}, B =[a4, a5, a6]
Iteration 1 Step 2
B= xB = cB = Basis B= a4 X4 0 1 0 0 a5 X5 0 0 1 0 a6 X6 0 0 0 1 1 X1 2 X2 w =cBB = Basis Inv B =
-1 -1

Solution

Varble RHS
0 1 0 0 0 0 1 0 0 0 0 1 z= 0 9 2 4

X4 = X5 = X6=

NBV, j R = xj aj = cj = Red. Cost = w aj-cj Entering Variable, xk

3 X3

1 1 -1 -1 1
1

1 1 1 -1 1
1

2 -1 1 4
-4 X3

Data from Original LP. Reproduced for sake of clarity

Step 3
i Basis X4 X5 X6 Column for Entering -1 Variable, yk = B ak 2 -1 1 RHS Column Ratio ( bi /yik) 4.5 --4 Leaving Variable

b
9 2 4

1 2 3

X6

Dr. Gajendra Kumar Adil, SJMSOM

Revised Simplex Method


Step 4 Basis updated. xB ={x4, x5, x3}, B =[a4, a5, a3]
Iteration 2 Step 2
B = a4 xB = X4 cB = Basis B= 0 1 0 0 a5 X5 0 0 1 0 a3 X3 4 2 -1 1 1 X1 2 X2 w =cBB = Basis Inv B =
-1 -1

Solution

VarbleValue (RHS)
0 1 0 0 0 0 1 0 4 z= -2 16 1 6 4

X4 = 1 X5= 1 X3=

NBV, j R = xj aj = cj = Red. Cost = w aj-cj Entering Variable, xk

6 X6

1 1 -1 1 -1
-3 X1

1 1 1 -1
5

0 0 1 0
4

Data from Original LP. Reproduced for sake of clarity

Step 3
i Basis 1 X4 2 X5 3 X3 Column for Entering -1 Variable, yk = B ak 3 0 -1 RHS Column

b =B b
1 6 4

-1

Ratio Leaving ( bi /yik) Variable 0.3333 ----X4

Dr. Gajendra Kumar Adil, SJMSOM

Revised Simplex Method


Step 4 Basis updated. xB ={x1, x5, x3}, B =[a1, a5, a3] Iteration 3 Step 2
B = a1 xB = X1 cB = Basis B= -1 1 1 -1 a5 X5 0 0 1 0 a3 X3 4 2 -1 1 w =cBB = B =
-1 -1

Solution Vrble Value(R HS) 17 z=

1 0 0.3333

0 0 1 0

2 -0.667 0.667

Basis Inv 0.3333

X1 = 0.3333 X5= b 1 6 0.3333 X3= 4.3333

NBV, j R = xj aj = cj = Red. Cost = w aj-cj Entering Variable, xk

5 X4

2 X2

6 X6

1 0 0 0
4

1 1 1 -1
1

0 Data from 0 Original LP. 1 Reproduced


for sake of

0 clarity
2

None- Optimal reached

Dr. Gajendra Kumar Adil, SJMSOM

Вам также может понравиться