Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

The Simplex Algorithm for Linear Programming: Maximization Problem - Prof. Cameron Thraen, Study notes of Agricultural engineering

An explanation of the simplex algorithm for solving maximization problems in linear programming. It includes the steps of the algorithm, the calculation of ratios, and the use of elementary row operations for pivoting. The document also shows the canonical forms and the interpretation of the results.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-s3k
koofers-user-s3k 🇺🇸

5

(1)

10 documents

1 / 20

Toggle sidebar

Related documents


Partial preview of the text

Download The Simplex Algorithm for Linear Programming: Maximization Problem - Prof. Cameron Thraen and more Study notes Agricultural engineering in PDF only on Docsity! 1AEDEcon 702 Slide AED Economics 702: Computational Economics Linear Programming: Finding a Solution – An Overview of the simplex method…Dakota Furniture Model. Class Lecture notes IV (W&V Chapter 4). 2AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) Consider the simplex algorithm applied to the maximization below: The Dakota Furniture company manufactures desk, tables, and chairs. The manufacturer of each type of furniture requires lumber and two types of skilled labor: finishing and carpentry. The amount of each resource needed to make each type of furniture is given in the table below. Resource Desk Table Chair Lumber 8 board ft 6 board ft 1 board ft Finishing hours 4 hours 2 hours 1.5 hours Carpentry hours 2 hours 1.5 hours 0.5 hours 5AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) Step 1 - Convert the LP to Standard Form Canonical Form Basic Variable Row 0 z – 60x1 – 30x2 – 20x3 = 0 z = 0 Row 1 8x1 + 6x2 + x3 + s1 = 48 s1 = 48 Row 2 4x1 + 2x2 + 1.5x3 + s2 = 20 s2 = 20 Row 3 2x1 + 1.5x2 + 0.5x3 + s3 = 8 s3 = 8 Row 4 x2 + s4 = 5 s4 = 5 If we set x1 = x2 = x3 = 0, we can solve for the values s1, s2, s3, s4. Thus, BV = {s1, s2, s3, s4} and NBV = {x1, x2, x3 }. Since each constraint is then in canonical form (BVs have a coefficient = 1 in one row and zeros in all other rows) with a nonnegative rhs, a bfs can be obtained by inspection. 6AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) Step 2 – Obtain a Basic Feasible Solution To perform the simplex algorithm, we need a basic (although not necessarily nonnegative) variable for row 0. Since z appears in row 0 with a coefficient of 1, and z does not appear in any other row, we use z as the basic variable. With this convention, the basic feasible solution for our initial canonical form has: BV = {z, s1, s2, s3, s4} and NBV = {x1, x2, x3 }. For this initial bfs, z = 0, s1= 48, s2= 20, s3 = 8, s4 =5, x1= x2 = x3 = 0. As this example indicates, a slack variable can be used as a basic variable if the rhs of the constraint is nonnegative. 7AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) Step 3 – Determine if the Current BFS is Optimal Once we have obtained a bfs, we need to determine whether it is optimal. To do this, we try to determine if there is any way z can be increased by increasing some nonbasic variable from its current value of zero while holding all other nonbasic variables at their current values of zero. Solving for z in row 0 yields: Z = 60x1 + 30x2 + 20x3 For each nonbasic variable, we can use the equation above to determine if increasing a nonbasic variable (while holding all other nonbasic variables to zero) will increase z. Increasing any of the nonbasic variables will cause an increase in z. However increasing x1 causes the greatest rate of increase in z. If x1 increases from its current value of zero, it will have to become a basic variable. For this reason, x1 is called the entering variable. Observe x1 has the most negative coefficient in row 0. 10AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) To make x1 a basic variable in row 3, we use elementary row operations (ero’s) to make x1 have a coefficient of 1 in row 3 and a coefficient of 0 in all other rows. This procedure is called pivoting on row 3; and row 3 is called the pivot row. The final result is that x1 replaces s3 as the basic variable for row 3. The term in the pivot row that involves the entering basic variable is called the pivot term. The Gauss-Jordan method using ero’s and simplex tableaus shown on the next slide makes x1 a basic variable. (For review see Chapter 2) 11AEDEcon 702 Slide ero 1 z x1 x2 x3 s1 s2 s3 s4 rhs ero 0 1 -60 -30 -20 1 8 6 1 1 48 2 4 2 1.5 1 20 3 1 0.75 0.25 0.5 4 row 3 divided by 1/2 4 1 1 5 ero 2 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 15 -5 30 240 60 times row 3 added to row 0 1 8 6 1 1 48 2 4 2 1.5 1 20 3 1 0.75 0.25 0.5 4 4 1 1 5 ero 3 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 15 -5 30 240 1 -1 1 -4 16 - 8 times row 3 added to row 1 2 4 2 1.5 1 20 3 1 0.75 0.25 0.5 4 4 1 1 5 ero 4 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 15 -5 30 240 1 -1 1 -4 16 2 -1 0.5 1 -2 4 - 4 times row 3 added to row 2 3 1 0.75 0.25 0.5 4 4 1 1 5 12AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) The result is: Canonical Form 1 Basic Variable Row 0 z + 15x2 - 5x3 + 30s3 = 240 z = 240 Row 1 - x3 + s1 - 4s3 = 16 s1 = 16 Row 2 - x2 + 0.5 x3 + s2 - 2 s3 = 4 s2 = 4 Row 3 x1 + 0.75x2 + 0.25x3 + 0.5s3 = 4 x1 = 4 Row 4 x2 + s4 = 5 s4 = 5 In canonical form 1, BV = {z, s1, s2, x1, s4} and NBV = {s3, x2, x3 }. yielding the bfs z = 240, s1 = 16, s2 = 4, x1 = 4, s4 = 5, s3 = x2 = x3 = 0. The procedure of going to one bfs to a better adjacent bfs is called an iteration (or a pivot) of the simplex algorithm. 15AEDEcon 702 Slide ero 1 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 15 -5 30 240 1 -1 1 -4 16 2 -2 1 2 -4 8 multiplied row 2 by 2 3 1 0.75 0.25 0.5 4 4 1 1 5 ero 2 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 5 10 10 280 add 5 times row 2 to row 0 1 -1 1 -4 16 2 -2 1 2 -4 8 3 1 0.75 0.25 0.5 4 4 1 1 5 ero 3 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 5 10 10 280 1 -2 1 2 -8 24 add row 2 to row 1 2 -2 1 2 -4 8 3 1 0.75 0.25 0.5 4 4 1 1 5 ero 4 z x1 x2 x3 s1 s2 s3 s4 rhs 0 1 5 10 10 280 1 -2 1 2 -8 24 2 -2 1 2 -4 8 3 1 1.25 -0.5 1.5 2 add -1/4 times row 2 to row 3 4 1 1 5 16AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) The result is: Canonical Form 2 Basic Variable Row 0 z + 5x2 + 10s2 + 10s3 = 280 z = 280 Row 1 - 2x2 + s1 + 2s2 - 8s3 = 24 s1 = 24 Row 2 - 2x2 + x3 + 2s2 - 4s3 = 8 x3 = 8 Row 3 x1 + 1.25x2 - 0.5 s2 + 1.5s3 = 2 x1 = 2 Row 4 x2 + s4 = 5 s4 = 5 In Canonical Form 2, BV = {z, s1, x3, x1, s4} and NBV = {s3, s2, x2 }, yielding the bfs z = 280, s1 = 24, x3 = 8, x1 = 2, s4 = 5, s2 = s3 = x2 = 0. 17AEDEcon 702 Slide 4.3 – The Simplex Algorithm (max LPs) Z = 280 - 5x2 - 10s2 -10s3Solving for z in row 0 yields: We can see that increasing x2, s2, or s3 (while holding the other NBVs to zero) will not cause the value of z to increase. The solution at the end of iteration 2 is therefore the optimal basic feasible solution. The following rule can be applied to determine whether a canonical form’s bfs is optimal: A canonical form is optimal (for a max problem) if each nonbasic variable has a nonnegative coefficient in the canonical form’s row 0. Row 0 z + 5x2 + 10s2 + 10s3 = 280 z = 280
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved