Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Optimization Linear Programming and Simplex Method.

Similar presentations


Presentation on theme: "1 Optimization Linear Programming and Simplex Method."— Presentation transcript:

1 1 Optimization Linear Programming and Simplex Method

2 2 Optimization Methods One-Dimensional Unconstrained Optimization Golden-Section Search Quadratic Interpolation Newton's Method Multi-Dimensional Unconstrained Optimization Non-gradient or direct methods Gradient methods Linear Programming (Constrained) Graphical Solution Simplex Method

3 3 Basic linear programming (LP) problem consists of two major parts: –The objective function –A set of constraints For maximization problem, the objective function is generally expressed as c j = payoff of each unit of the jth activity that is undertaken x j = magnitude of the jth activity Z= total payoff due to the total number of activities Standard Form Linear Programming Problem

4 4 The constraints can be represented generally as where a ij = amount of the ith resource that is consumed for each unit of the jth activity b i = amount of the ith resource that is available The general second type of constraint specifies that all activities must have a positive value. That is, x i > 0. Standard Form Linear Programming Problem

5 5 Problem Products ResourceRegularPremiumResource Availability Raw gas7 m 3 /tonne11 m 3 /tonne77 m 3 /week Production time 10 hr/tonne8 hr/tonne80 hr/week Storage9 tonne6 tonne Profit$150/tonne$175/tonne How many tonnes of regular and premium gas to produce in order to maximize weekly profit?

6 6 Developing LP Formulation Let x 1 = 1 tonne of regular gas x 2 = 1 tonne of premium gas Maximize Z = 150x 1 + 175x 2 subject to 7x 1 + 11x 2 ≤ 77 (material constraint) (1) 10x 1 + 8x 2 ≤ 80 (time constraint)(2) x 1 ≤ 9 (regular gas storage)(3) x 2 ≤ 6 (premium gas storage)(4) x 1, x 2 ≥ 0 (positivity)(5, 6)

7 7 Graphical Solution Feasible solution space (the shaded area) contains all points that obey the constraints or points that represent the feasible solutions. Points located outside of this area are known as infeasible solution.

8 8 Graphical Solution We can adjust the line representing the objective function Z = 150x 2 + 175x 2 to locate the optimum point. One of the corner points (points where two or more lines intersect) will be an optimum point. –Corner points can be feasible or infeasible

9 9 Graphical Solution Some insights: Storage constraints, (3) and (4), have no effect on the optimum point. Raising either materials or production time can improve profit.

10 10 Possible outcomes that can be generally obtained in a linear programming problem 1.Unique solution. The maximum objective function intersects a single point. 2.Alternate solutions. Problem has an infinite number of optima corresponding to a line segment. 3.No feasible solution. 4.Unbounded problems. Problem is under- constrained and therefore open-ended.

11 11 (a)Unique solution – represented by a corner point Alternate solutions – represented by points on one of the constraint line (b) No feasible solution (c) Unbounded problems

12 12 Key properties of LP that drives the design of Simplex Method 1.The optimum point is always at a feasible corner point. (Why?) –We only need to check the corner points. 2.If a corner point feasible solution has an objective function value that is better that or equal to all adjacent corner point feasible solutions, then it is optimal. –We don't necessarily need to search all corner points.

13 13 Key properties of LP that drives the design of Simplex Method 3.There are finite number of corner point feasible solutions. –Any method that checks only corner points will terminate eventually.

14 14 Basic idea behind the Simplex method 1.Starting at a feasible corner point solution. 2.Repeatedly move to a better adjacent corner point feasible solution until an optimum point is found.

15 15 Finding Corner Points Algebraically How to find corner points algebraically? How to locate adjacent corner points? How to decide which adjacent point to move to next? Simplex method offers a neat solution (involves the use of slack variables) to address these questions.

16 16 Constraint equations are reformulated as equalities by introducing slack variables – variables that measures how much of a constrained resource is available. Slack variables S i > 0 means the corresponding resource is not fully consumed. S i < 0 means the corresponding resource is over-consumed.

17 17 Adding slack variables results in an augmented system of linear equations which is under specified (has more unknowns than equations). –6 unknowns (= 2 original variables + 4 slack variables) –4 equations We need to make 2 of the variables constants before we can solve the system of equations. –Which 2 variables and what constant values? –Typically, we set x 1 and x 2 to zero (Why?) Characteristics of Slack Variables Continue …

18 18 Solving the augmented system yields an augmented solution. i.e., values of all (original + slack) variables are given. –e.g.: At point A, the values of all variables are (x 1 =0, x 2 =0, S 1 =77, S 2 =80, S 3 =9, S 4 =6) Basic solution: An augmented corner point solution. –For basic feasible solution, all variables ≥ 0. Setting x 1 = 0, x 2 = 0 yields

19 19 The equations (or constraints) have a one-to-one relationship with the slack variables. –For example, S 1 relates to the 1 st equation, S 4 relates to the 4 th equation. If a point is on the line 7x 1 + 11x 2 = 77 (line labeled "1"), what's the value of S 1 ? If a point is on the line 10x 1 + 8x 2 = 80 (line labeled "2"), which variable has the value zero? At the corner point D, which variables have the value zero? Characteristics of Slack Variables Show Graph & Equations

20 20 Setting two variables to zero has the effect of "selecting two lines", and solving the resulting system means finding the intersecting point (a corner point) of the selected lines. Characteristics of Slack Variables The value of x 1 and x 2 of this system is the coordinate of the corner point C (the point where line "1" and line "2" intersect.) For example, let S 1 =0, S 2 =0. Then the system becomes

21 21 Finding Corner Points Algebraically We now know how to find the corner points. Next How to find an adjacent corner point? How to decide which adjacent corner point to move to?

22 22 Basic and Non-Basic Variables Corner Point Non-Basic Variables Basic Variables A x 1, x 2 S 1, S 2, S 3, S 4 B x 2, S 2 x 1, S 1, S 3, S 4 C S 1, S 2 x 1, x 2, S 3, S 4 D S 1, S 4 x 1, x 2, S 2, S 3 E x 1, S 4 x 2, S 1, S 2, S 3 F x 1, S 2 x 2, S 1, S 3, S 4 Variables in which their values are set to zero are called non-basic variables. Remember: Non-basic, variable set to zero, corresponding constraint is active Do you see a pattern between any pair of adjacent corner points?

23 23 Basic and Non-Basic Variables If two points are adjacent corner points, then –Their basic sets are identical except for one member. –Their non-basic sets are identical except for one member. The reverse of the above statement is not always true. Questions: –To find an adjacent corner point, can we just switch one variable between the basic and non-basic sets? –How should we decide which corner point to move to next?

24 24 Basic and Non-Basic Variables How do we make sure the following conditions are satisfied? –The corner points are adjacent. –The corner points are feasible. –The new corner point gives better value for the objective function than the current corner point.

25 25 Which variables to switch? All three conditions from the previous slide can be satisfied if the following steps are taken: Selecting an entering basic variable – a non- basic variable that will increase the objective function value the most if allowed to take on a positive value. Move this variable from the non- basic set to the basic set. Finding the leaving basic variable – a basic variable that is forced to a value zero first after allowing the entering basic variable to increase. Move the variable that is forced to zero from the basic set to the non-basic set.

26 26 Which variables to switch? Suppose we are currently at point A. Basic set = { S 1, S 2, S 3, S 4 }, non-basic set = { x 1, x 2 } Which variable should be the entering basic variable? Which variable should be the leaving basic variable?

27 27 Which variables to switch? x 2 has a larger coefficient in the objective function, so we should make x 2 the entering basic variable. ( x 1 is non-basic, so it has the value zero) If we keep increasing x 2, other basic variables will decrease. Which basic variable will become zero first?

28 28 Which variables to switch? If we take the ratio of the RHS value to the coefficient of the entering basic variable ( x 2 ), the smallest non- negative ratio can tell us which basic variable will reach zero first if we keep increasing the value of x 2. So S 4 should be made the leaving basic variable. Show Graph & Equations Minimum ratio test

29 29 Which variables to switch? So setting x 1 =0, S 4 =0 and solve the system of equations would yield an augmented solution correspond to point E. Solving the system of equations at every corner point is not very efficient. Simplex method offers an efficient way to compute the value of each variable by updating the equations incrementally.

30 30 1 2 4 35 6 E AB C D F


Download ppt "1 Optimization Linear Programming and Simplex Method."

Similar presentations


Ads by Google