Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mechanical Engineering Department 1 سورة النحل (78)

Similar presentations


Presentation on theme: "Mechanical Engineering Department 1 سورة النحل (78)"— Presentation transcript:

1 Mechanical Engineering Department 1 سورة النحل (78)

2 Mechanical Engineering Department 2 Chapter 2 Linear Programming (LP) Lecture Objective THE SIMPLEX METHOD

3 Mechanical Engineering Department 3 SIMPLEX LINEAR PROGRAMMING

4 Mechanical Engineering Department 4 1. INTRODUCTION 1. INTRODUCTION The simplex method is a general-purpose linear programming algorithm that is widely used to solve large-scale problems. The simplex technique involves a series of iterations; successive improvements are made until an optimal solution is achieved. Most users of the technique rely on computers to handle the computations while they concentrate on the solutions. It is best to work with numbers in fractional form.

5 Mechanical Engineering Department 5 Example Consider the simplex solution to the following Problem:

6 Mechanical Engineering Department 6 Graphical solution x1x1

7 Mechanical Engineering Department 7 Introduction Introduction The simplex technique involves generating a series of solutions in tabular form, called tableaus. By inspecting the bottom row of each tableau, one can immediately tell if it represents the optimal solution. Each tableau corresponds to a corner point of the feasible solution space. The first tableau corresponds to the origin. Subsequent tableaus are developed by shifting to an adjacent corner point in the direction that yields the highest rate of profit.

8 Mechanical Engineering Department 8 Simplex Method Steps Simplex Method Steps 1.Set up the initial tableau. 2.Develop a revised tableau using the information contained in the first tableau. 3.Inspect to see if it is optimum. 4.Repeat steps 2 and 3 until no further improvement is possible.

9 Mechanical Engineering Department 9 Maximization Problem with only ≤ constraints Maximization Problem with only ≤ constraints 1. Set up the initial tableau. A.Rewrite the constraints so that they become equalities; add a slack variable to each constraint. B.Rewrite the objective function to include the slack variables. Give slack variables coefficients of 0. C.Put the objective coefficients and constraint coefficients into tableau form. D.Compute values for the Z row. E.Compute values for the C - Z row.

10 Mechanical Engineering Department 10 Slack variables Slack variables represent the amount of each resource that will not be used if the solution is implemented.

11 Mechanical Engineering Department 11 Adding Slack variables to each Constraint In the initial solution, with each of the real variables equal to zero, the solution consists only of slack. It is useful in setting up the table to represent each slack variable in every equation.

12 Mechanical Engineering Department 12 Adding Slack variables to the Objective Function The objective function can be written in similar form: The slack variables are given coefficients of zero in the objective function because they do not produce any contributions to profits.

13 Mechanical Engineering Department 13 The Problem After Adding Slack variables

14 Mechanical Engineering Department 14 QuestionsQuestions

15 Mechanical Engineering Department 15 The Initial Tableau

16 Mechanical Engineering Department 16 Compute values for the Z row and C- Z row To compute the Z values, multiply the coefficients in each column by their respective row profit per unit amounts, and sum within columns. To begin with, all values are zero.To compute the Z values, multiply the coefficients in each column by their respective row profit per unit amounts, and sum within columns. To begin with, all values are zero. The last value in the Z row indicates the total profit associated with a given solution (tableau). Since the initial solution has x1 = 0 and x2 = 0, it is not surprising that profit is 0.The last value in the Z row indicates the total profit associated with a given solution (tableau). Since the initial solution has x1 = 0 and x2 = 0, it is not surprising that profit is 0. To compute in the C - Z row values, subtract the Z value in each column from the value of the objective row for that column.To compute in the C - Z row values, subtract the Z value in each column from the value of the objective row for that column.

17 Mechanical Engineering Department 17 The Test for Optimality If all the values in the C - Z row of any tableau are zero or negative, the optimal solution has been obtained. In this case, the C - Z row contains two positive values, 4 and 5, indicating that improvement is possible.

18 Mechanical Engineering Department 18 2. Set up subsequent tableaus. A.Determine the entering variable (the largest positive value in the C - Z row). B.Determine the leaving variable: Divide each constraint row's solution quantity by the row's pivot value; the smallest positive ratio indicates the leaving variable.

19 Mechanical Engineering Department 19 The leaving and entering variables

20 Mechanical Engineering Department 20 2. Set up subsequent tableaus. C.Form the new main row of the next tableau. Enter these values in the next tableau in the same row positions. D.Compute new values for remaining constraint rows. Enter these in the new tableau in the same positions as the original row. E.Compute values for Z and C - Z rows. F.Check to see if any values in the C - Z row are positive; if they are, repeat 2A-2F Otherwise, the optimal solution has been obtained.

21 Mechanical Engineering Department 21 Completed Second Tableau

22 Mechanical Engineering Department 22 Developing the Third Tableau

23 Mechanical Engineering Department 23 The Third Tableau (Optimum Solution)

24 Mechanical Engineering Department 24 Graphical analogies to Simplex Tableaus

25 Mechanical Engineering Department 25 QuestionsQuestions

26 Mechanical Engineering Department 26 A MINIMIZATION PROBLEM ≥ and = Constraints For = constraint, add an artificial variable. For example, the equalities Using artificial variables a 1 and a 2. Slack variables would not be added. 4

27 Mechanical Engineering Department 27 A MINIMIZATION PROBLEM ≥ and = Constraints A MINIMIZATION PROBLEM ≥ and = Constraints The objective function, say, Z = 2x 1 + 3x 2 would be rewritten as: where M = A large number (e.g., 999) The artificial variables are not desired in the final solution, selecting a large value of M (much larger than the other objective coefficients) will insure their deletion during the solution process.

28 Mechanical Engineering Department 28 A MINIMIZATION PROBLEM ≥ and = Constraints A MINIMIZATION PROBLEM ≥ and = Constraints For a ≥ constraint, surplus variables must be subtracted instead of added to each constraint. For example, the constraints would be rewritten as equalities:

29 Mechanical Engineering Department 29 A MINIMIZATION PROBLEM ≥ and = Constraints A MINIMIZATION PROBLEM ≥ and = Constraints As equalities, each constraint must then be adjusted by addition of an artificial variable. The final result looks like this:

30 Mechanical Engineering Department 30 A MINIMIZATION PROBLEM ≥ and = Constraints A MINIMIZATION PROBLEM ≥ and = Constraints If the objective function happened to be it would become

31 Mechanical Engineering Department 31 Two Ways to Solve a Minimization Problem Two Ways to Solve a Minimization Problem The first approach We select the variable with the MOST NEGATIVE C j - Z j ; as the one to introduce next. We would STOP when every value in the net evaluation row is ZERO or POSITIVE.

32 Mechanical Engineering Department 32 Two Ways to Solve a Minimization Problem Two Ways to Solve a Minimization Problem The second approach Any minimization problem can be converted to an equivalent maximization problem by multiplying the objective function by -1. Solving the resulting maximization problem wil1 provide the optimal solution to the minimization problem.

33 Mechanical Engineering Department 33 Problem Problem Let us illustrate this second approach The mathematical statement of the problem is

34 Mechanical Engineering Department 34 Solution Solution

35 Mechanical Engineering Department 35 Solution (Continue) Solution (Continue) The tableau form for this problem is

36 Mechanical Engineering Department 36 Solution (Continue) Solution (Continue) The initial simplex tableau is:

37 Mechanical Engineering Department 37 Solution (Continue) Solution (Continue) At the first iteration, x 1 is brought into the basis and a 1 is removed. After dropping the a 1 column from the tableau, The first iteration is:

38 Mechanical Engineering Department 38 Solution (Continue) Solution (Continue) The final simplex tableau: The minimum total cost of the optimal solution is $800

39 Mechanical Engineering Department 39 Thank You


Download ppt "Mechanical Engineering Department 1 سورة النحل (78)"

Similar presentations


Ads by Google