Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.

Similar presentations


Presentation on theme: "1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear."— Presentation transcript:

1 1 Simplex algorithm

2 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints. – Many real world problems can be described (approximated) as linear programming model. – There are well-known successful applications in: Manufacturing Marketing Finance (investment) Advertising Agriculture

3 3 Real LP Problems Real-world LP problems often involve: – Hundreds or thousands of constraints – Large quantities of data – Many products and/or services – Many time periods – Numerous decision alternatives – … and other complications

4 4 Construction of Linear Opt. Model Understand the problem Identify the decision variables State the objective function as a linear combination of the decision variables State the constraints – linear combinations of the decision variables – upper or lower bounds on the decision variables, including non-negativity constraints if applicable

5 5 Linear optimization model min z = c 1 x 1 + c 2 x 2 + … + c n x n Subject to a 11 x 1 + a 12 x 2 + … + a 1n x n ≥ b 1 a 21 x 1 + a 22 x 2 + … + a 2n x n = b 2 : a m1 x 1 + a m2 x 2 + … + a mn x n ≤ b m, x T =(x 1, x 2,..., x n ) T ≥ 0  R n

6 6 Linear optimization model

7 7 Problem II - cauliflower or kohlrabi Suppose that a farmer has 35 acres of farm land to be planted with either cauliflower or kohlrabi. The farmer wants to have at least 8 acres of cauliflower. Let 5000 CZK be the selling price of cauliflower per acre, and 2400 CZK be the price of kohlrabi. He wants to maximize his revenue.

8 8 Linear optimization model x1 - area of cauliflower (ac) x2 - area of kohlrabi (ac) Maximize: – 5000 x1 + 2400 x2 (maximize the revenue) Subject to: – x1 + x2 ≤ 35 (limit on total area) – x1 ≥ 8 (limit on area of cauliflower ) – x1 ≥ 0, x2 ≥ 0 (cannot plant a negative area).

9 9 Simplex Method The simplex algorithm was discovered in 1957 by George Dantzig Simplex method – Starts with a feasible solution – Tests whether or not it is optimum. – If not, the method proceeds a better solution It is based on Jordanian elimination procedure. – It deals with equations and not with inequations It solves huge problems on today’s computers.

10 10 The Simplex Algorithm Step 0 – Initial simplex tableau Step 1 – Test for optimality Step 2 – Choose the entering variable Step 3 – Test for unbounded objective function Step 4 – Choose the leaving variable Step 5 – Change the basis (JEM) STOP

11 11 The Simplex Algorithm: Step 0 Converting LP into equations – standard form Definition of slack variables Capacities or Capacity constraints – Slack variable in the meaning of LACK (capacity reserve) Requirements or Requirement constraints – Slack variable in the meaning of SURPLUS

12 12 Solution of problem II x1 - area of cauliflower (ar) x2 - area of kohlrabi (ar) x3 – reserve - slack of the whole area (ar) x4 – surplus - slack of the desired cauliflower area (ar) Maximize: – 5000 x1 + 2400 x2 + 0x3 + 0x4 (maximize the revenue) Subject to: – x1 + x2 + x3 = 35 (limit on total area) – x1 – x4 = 8 (limit on area of cauliflower ) – x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0 (cannot plant a negative area).

13 13 The Simplex Algorithm: Step 0 Converting LP into a canonical form Definition of slack variables for constraints “<=“ Definition of artificial var. for const. “=“ and “>=“ Big M method for the objective function Where o T = (0;0;0…..0) and m T = (M;M;M…..M) M=10 or 100 or 1000 … for minimization M=-10 or -100 or -1000 … for maximization

14 14 Solution of problem II x1 - area of cauliflower (ar) x2 - area of kohlrabi (ar) x3 – reserve - slack of the whole area (ar) x4 – surplus - slack of the desired cauliflower area (ar) x5 – artificial variable Maximize revenue – 5000 x1 + 2400 x2 + 0x3 + 0x4 - 10000x5 → MAX Subject to – x1 + x2 + x3 = 35 (limit on total area) – x1 – x4 + x5 = 8 (limit on area of cauliflower ) – x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0 (no negative area).

15 15 The Simplex Algorithm: Step 0 Augmented matrix of system of linear equations Criterial row Criterial column

16 16 The Simplex Algorithm: Step 1 Test for optimality z j is the amount of profit given by replacing some of the present basic variables mix with one unit of the column variable. – For obtaining z j we have to multiply the objective function coefficients c j and the values in j-th column (called substitution coefficients) z j - c j =  i  ij.c i – z j - c j  0 basic variables mix cost is higher then real cost – z j - c j  0 basic variables mix cost is lower then real cost – Total cost change - x j.(z j - c j ) → x j nonnegative

17 17 The Simplex Algorithm: Step 1 Profit given by replacing some of the present basic variables mix with one unit of the column variable.

18 18 The Simplex Algorithm: Step 2 Determine the entering basic variable Maximization – x j : z j - c j  0 – the largest negative value z j - c j for max Minimization – x j : z j - c j  0 – the largest positive value z j - c j for min

19 19 The Simplex Algorithm: Step 2 Determine the entering basic variable

20 20 The Simplex Algorithm: Step 3 Test for unbounded objective function Test for feasibility - x i  0 x i = b i -  ij.x j  0 – If  ij > 0 then x j  b j /  ij – For  ij  0 always true – Picking out each coefficient in the column that is strictly positive – Dividing by each of them the “right side” for the same row

21 21 The Simplex Algorithm: Step 3 Test for unbounded objective function Test for feasibility

22 22 The Simplex Algorithm: Step 4 Determine the leaving basic variable – Identifying the equation that has the smallest ratio – x j : min (b j /  ij )

23 23 The Simplex Algorithm: Step 4 Determine the leaving basic variable

24 24 The Simplex Algorithm: Step 5 Changing basis Leading column transformed into unit vector Transf. leading row = leading row / pivot Transf. other rows = other row – leading row * proper number

25 25 The Simplex Algorithm: Step 5 Changing basis

26 26 Next steps

27 27 Optimal solution Depending on the optimality test, – we found that the solution is optimal – because none of the coefficients z j - c j are negative, – so the algorithm is finished. Maximum revenue is 175000 35- area of cauliflower (ar) 0- area of kohlrabi (ar) 0- reserve - slack of the whole area (ar) 27- surplus - slack of the desired cauliflower area (ar)

28 28 Simplex tableau

29 29 Solubility of linear model One optimal solution Infinite number of optimal solution – Alternate solutions - If the z j - c j value for one or more nonbasic variables is 0 in the optimal tableau, No solution – Unbounded Linear programs If all entries in the pivot column are nonpositive, the linear program is unbounded. – Infeasible Linear Programs If an artificial variable remains positive in the “optimal tableau,” the problem is infeasible.


Download ppt "1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear."

Similar presentations


Ads by Google