0% found this document useful (0 votes)
54 views33 pages

Dr. Joon-Yeoul Oh: IEEN 5335 Principles of Optimization

This document provides an overview of solving linear programs using the simplex method. It discusses: 1. The simplex method is an algebraic procedure for finding the optimal solution to a linear program by moving from one corner point feasible solution to another until an optimal solution is reached. 2. For a linear program with n decision variables, each corner point solution occurs at the intersection of n constraint boundaries. 3. The simplex algorithm focuses only on corner point feasible solutions and is iterative - it examines adjacent solutions to find one that increases the objective function until no such improvement is possible, indicating optimality.

Uploaded by

Soumojit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views33 pages

Dr. Joon-Yeoul Oh: IEEN 5335 Principles of Optimization

This document provides an overview of solving linear programs using the simplex method. It discusses: 1. The simplex method is an algebraic procedure for finding the optimal solution to a linear program by moving from one corner point feasible solution to another until an optimal solution is reached. 2. For a linear program with n decision variables, each corner point solution occurs at the intersection of n constraint boundaries. 3. The simplex algorithm focuses only on corner point feasible solutions and is iterative - it examines adjacent solutions to find one that increases the objective function until no such improvement is possible, indicating optimality.

Uploaded by

Soumojit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

IEEN 5335

Principles of Optimization

Lecture 4

Dr. Joon-Yeoul Oh

Dept. of Mechanical & Industrial Engineering


Texas A&M University – Kingsville
Solving LP – the simplex method

 The simplex method is an algebraic procedure.


 The underlying concepts are geometric.
 We used the graphical method to solve 2 variable linear
programs. What is the key observation for two variable
LPs?
 The optimal solution will be at a corner point of the
simplex.
 Each solution lies at the intersection of two
constraint boundaries.

2
Revisit the Wyndor glass problem

3
Revisit the Wyndor glass
 Corner Point Feasible solutions are:
 (0,0), (0,6), (2,6), (4,3), (4,0)
 Corner Point Infeasible solutions are:
 (0,9), (4,6), (6,0)

4
Solving LP – issues

 How do we avoid infeasible points?

 How do I do this without a lot of unnecessary


calculations? (find the best solution fast!)

 How do I know when I am done?

5
Solving LP – characteristics

 For an LP problem with n decision variables, each corner


point solution lies at the intersection on n constraint
boundaries.
 For any LP with n decision variables, two CPF solutions are
adjacent to each other if they share n-1 constraint
boundaries.
 The CPF solutions are connected by a line segment that lies
on the same shared constraint boundaries.

6
Solving LP – The Simplex Algorithm

 Algorithm focuses only on CPF solutions. The objective is


to find the best CPF solution
 The algorithm is iterative - it repeats a number of fixed
steps
 The algorithm initializes with the origin as a CPF solution
(but, can start with any CPF solution)
 Examine all feasible directions along intersecting
constraints
 Look for one which increases z
 If so, go as far as you can; If none, you are done.

7
Solving LP – The Simplex Algorithm (2)

 The algorithm selects best adjacent CPF solution based on


the rate of improvement in the objective function
 The algorithm chooses the edge that gives the greatest
improvement in the objective
 A positive rate of improvement in the objective function
implies that an adjacent CPF is better than the current CPF
 A negative rate of improvement in the objective function
indicates that an adjacent CPF is worse than the current
CPF

8
Solving LP – The Simplex Algorithm (3)

 The concept of improvement leads to a test for optimality.


 Optimality test: Consider any LP that possesses at least one
optimal solution.
 If a current CPF solution has no adjacent CPF solutions
that are better, then it must be an optimal solution.

9
The Simplex Algorithm – steps

1. Setting up – change LP to “standard (augmented) form”


2. Initialize – find a CPF solution (0,0)
3. Test for optimality:
 If false, go to step 4;
 Else stop.
4. Evaluate the rate of improvement for all adjacent edges;
select the best edge
5. Compute Z for new CPF solution and update current
location (coordinates)
6. Repeat step 3.
10
11
The Simplex Algorithm – standard form

 An LP is said to be in “standard form = augmented form”,


if:
 All technological constraints are equality constraints
 All the variables have a non-negativity sign
restriction.
 The objective function is maximize.
 All RHS are non-negative.

12
Standard form – slack variables

 Every LP can be transformed into standard form

 Consider the inequality, “less than equal to”:


a1x1+..+anxn <= b

 By adding a slack variable, s, we convert the inequality to


an equality
a1x1+..+anxn + s = b

13
Standard form – slack variables example

 Consider x1 <= 5
 The amount of slack variable is the difference between the
original inequality and the equality
 x1 + s = 5 and s >= 0

∑c x ≤ b
i =1
i i

∑c x + x
i =1
i i n +1
=b

14
Standard form – excess variables

 Excess variables = Surplus variables


 Consider the inequality, “greater than equal to”:
a1x1+..+anxn >= b

 By adding an excess variable, - e, we convert the inequality


to an equality
a1x1+..+anxn - e = b

15
Standard form – excess variables example

 Consider x1 >= 5
 The amount of slack variable is the difference between the
original inequality and the equality
 x1 - e = 5 and e >= 0

∑c x ≥ b
i =1
i i

∑c x − x
i =1
i i n +1
=b

16
Standard form – obj. function

 Express the objective function in the maximize form.


 If the original statement of the problem is to minimize,
convert the objective function to maximize.

n n
min z ( x) = ∑ cjxj max - z ( x) = ∑ − cjxj
j =1 j =1

17
The Simplex Algorithm – terms

 Non-Basic variable:
 A variable equal to zero
 Basic Variable
 A variable that may be not 0
 Right-Hand Side
 Values of basic variables

18
Standard (augmented) form – example
Original form of the model
Max z = 3x1 + 5x2
s.t. x1 ≤ 4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
x1, x2 ≥ 0

Augmented form of the model


Max z - 3x1 - 5x2 – 0x3 – 0x4 – 0x5 = 0
s.t. x1 + x3 = 4
2x2 + x4 = 12
3x1 + 2x2 + x5 = 18
x1, x2, x3, x4, x5 ≥ 0
19
Initial setting – example

(x1, x2, x3, x4, x5) = (0, 0, 4, 12, 18) Z=0


Is this optimal? Check Z-row.
20
Initial setting – graphic

(x1, x2) = (0, 0)


Z=0

21
Selecting entering variable

What if we select the biggest ratio???


22
Selecting leaving variable

23
First iteration

(x1, x2, x3, x4, x5) = (0, 6, 4, 0, 6) Z = 30


24
First iteration – graphic

(x1, x2) = (0, 6)


Z = 30

25
Second iteration – selecting entering var.

26
Second iteration – selecting leaving var.

27
Second iteration – graphic

(x1, x2) = (2, 6)


Z = 36

28
Simplex Algorithm – do it yourself

Original form of the model – product mix


Max z = 6 C + 12 T
s.t.
Pine) 3 C + 12 T <= 120
Oak) 8 C + 4 T <= 160
Time) 6 C + 10 T <= 150
C >= 0, T >= 0

29
Simplex Algorithm – do it yourself

Graphical method

30
Simplex Algorithm – do it yourself

Augmented form of the model – product mix

31
Simplex Algorithm – do it yourself

Setting up

32
Simplex Algorithm – do it yourself

More…?

33

You might also like