Simplex part i

48
02/11/13 1 FOSTIIMA Business School

Transcript of Simplex part i

02/11/13 1FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

(i) Pick out important information(ii) Formulate constraints(iii) Formulate objective function

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

5. Get the solution 02/11/13 2FOSTIIMA Business School

THE PROBLEM

• A small factory produces two types of toys: cars and dolls. In the manufacturing process two machines are used: the moulder and the assembler. A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler. The moulder can be operated for 16 hours a day and the assembler for 9 hours a day. Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14. The profit needs to be maximised.

• How do we formulate this problem?

02/11/13 3FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

(i) pick out important information(ii) formulate constraints(iii) formulate objective function

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 4FOSTIIMA Business School

PICKING OUT IMPORTANT INFORMATION

• A small factory produces two types of toys: cars and dolls. In the manufacturing process two machines are used: the moulder and the assembler.

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

02/11/13 5FOSTIIMA Business School

PICKING OUT IMPORTANT INFORMATION

• A small factory produces two types of toys: cars and dolls. In the manufacturing process two machines are used: the moulder and the assembler.

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

02/11/13 6FOSTIIMA Business School

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

02/11/13 7FOSTIIMA Business School

PICKING OUT IMPORTANT INFORMATION

• A small factory produces two types of toys: cars and dolls. In the manufacturing process two machines are used: the moulder and the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

02/11/13 8FOSTIIMA Business School

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

02/11/13 9FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

(i) pick out important information(ii) formulate constraints(iii) formulate objective function

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 10FOSTIIMA Business School

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

• Using the decision variables

d = number of dolls c = number of cars

make two constraints from this information.02/11/13 11FOSTIIMA Business School

FORMING CONSTRAINT 1THE MOULDER

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

2d + c ≤ 1602/11/13 12FOSTIIMA Business School

FORMING CONSTRAINT 2The assembler

• A doll needs 2 hours on the moulder and 1 hour on the assembler. A car needs 1 hour on the moulder and 1 hour on the assembler.

• The moulder can be operated for 16 hours a day and the assembler for 9 hours a day.

d + c ≤ 902/11/13 13FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

i) pick out important informationii) formulate constraintsiii) formulate objective function

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 14FOSTIIMA Business School

PICKING OUT IMPORTANT INFORMATION

• A small factory produces two types of toys: cars and dolls. In the manufacturing process two machines are used: the moulder and the assembler.

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

02/11/13 15FOSTIIMA Business School

FORMING THE OBJECTIVE FUNCTION

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

• Let Z be the total profit; formulate the objective function

02/11/13 16FOSTIIMA Business School

FORMING THE OBJECTIVE FUNCTION

• Each doll gives a profit of Rs.16 and each car gives a profit of Rs.14.

Z = 16d + 14c

02/11/13 17FOSTIIMA Business School

THE LINEAR PROGRAMMING PROBLEM

• MAXIMISE Z = 16d + 14csubject to the constraints:

(i) 2d + c ≤ 16(ii) d + c ≤ 9(iii) c ≥ 0 , d ≥ 0

• VERY IMPORTANT

• DON’T FORGET YOUR NON – NEGATIVITY CONSTRAINTS !

02/11/13 18FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 19FOSTIIMA Business School

INTRODUCING SLACK VARIABLES

To change inequalities (i) and (ii) into equations we add slack variables s and t

This gives:

(i) 2d + c + s = 16

(ii) d + c + t = 9

02/11/13 20FOSTIIMA Business School

THE NEW LINEAR PROGRAMMING PROBLEM

• MAXIMISE Z = 16d + 14c + 0s + 0t

subject to the constraints:

2d + c + s + 0t = 16

d + c + 0s + t = 9

c ≥ 0 , d ≥ 0 , s ≥ 0 , t ≥ 0

02/11/13 21FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 22FOSTIIMA Business School

We want to put all the information in the form of a table. This is called the initial tableau.

To form the initial tableau we need tochange the objective function from

Z = 16d + 14c + 0s + 0tto

Z – 16d – 14c – 0s – 0t = 002/11/13 23FOSTIIMA Business School

FORMING THE INITIAL TABLEAU

Label the table with your basic variables, s and t

and with your non – basic variables, d and c.

BASIC VARIABLES

d c s t VALUE

s

t

Z 02/11/13 24FOSTIIMA Business School

FORMING THE INITIAL TABLEAU

2d + 1c + 1s + 0t = 161d + 1c + 0s + 1t = 9

Z – 16d – 14c – 0s – 0t = 0BASIC

VARIABLESd c s t VALUE

s

t

Z

2 16011

1 1 0 1 9

-16 -14 0 0 002/11/13 26FOSTIIMA Business School

FORMING THE INITIAL TABLEAU

This is the objective row

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

02/11/13 27FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

3. Get the solution

02/11/13 28FOSTIIMA Business School

PIVOTAL COLUMN• We now need to find where to pivot and we start by

entering the basis by choosing the column with the most negative entry in the objective row.

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

This is the most negative coefficient with corresponding variable d and it’s column is called the pivotal column. d is now called the entering variable.

02/11/13 29FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

3. Get the solution

02/11/13 31FOSTIIMA Business School

FINDING θ-VALUES

• You are now going to find the pivotal row and the leaving variable.

• You need to find θ-values. 1. Identify positive entries in the pivotal column.2. Divide each entry in value column by the corresponding

positive entry in the pivotal column.

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

02/11/13 32FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

5. Get the solution

02/11/13 34FOSTIIMA Business School

PIVOTAL ROW

• The row with the smallest θ-value is called the pivotal row.

• Here the pivotal row is row (i)

162 8θ = =

91 = 9θ =

• For row (i)

• For row (ii)

02/11/13 35FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

5. Get the solution

02/11/13 36FOSTIIMA Business School

THE PIVOT

The pivot!

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

The pivotal column

The pivotal row

02/11/13 37FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux(i) Identify pivotal column(ii) Find θ-values(iii) Identify pivotal row(iv) Identify pivot(v) Pivot

5. Get a solution

02/11/13 38FOSTIIMA Business School

PIVOTING

1. Replace the leaving variable with the entering variable.

2. Divide all entries in the pivotal row by the pivot. The pivot becomes 1.

3. Add suitable multiples of the pivotal row to all other rows until all entries, apart from the pivot, in the pivotal column are zero.

02/11/13 39FOSTIIMA Business School

Step 1 - Replace the leaving variable with the entering variable.

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

d

Z

t

801/21/21s

VALUEtscdBASIC VARIABLES

Step 2 - Divide all entries in the pivotal row by the pivot. The pivot becomes 1.

02/11/13 40FOSTIIMA Business School

t

PIVOTING

Step 3 - Add suitable multiples of the pivotal row to all other rows until all

entries, apart from the pivot, in the pivotal column are zero.

row (ii) – ½ row (i)gives

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

0 1/2 1 1-1/2

02/11/13 41FOSTIIMA Business School

PIVOTING

Z

t

801/21/21d

VALUEtscdBASIC VARIABLES

t 0 1/2 -1/2 1 1

02/11/13 42FOSTIIMA Business School

-16 -14 0 0 0

16 8 8 0 128x160 -6 8 0 128

PIVOTING

Z

t

801/21/21d

VALUEtscdBASIC VARIABLES

t 0 1/2 -1/2 1 1

02/11/13 43FOSTIIMA Business School

This is our second tableau

Z

t

801/21/21d

VALUEtscdBASIC VARIABLES

t 0 1/2 -1/2 1 1

Z 0 -6 8 0 128

02/11/13 44FOSTIIMA Business School

PIVOTING

• Follow the rules for finding a pivot on your second tableau.

• Pivot as before.

• Continue this process until there are no negative entries in the objective row.

• This will be your final tableau. This is called the optimal tableau.

02/11/13 45FOSTIIMA Business School

Z

t

801/21/21d

VALUEtscdBASIC VARIABLES

t 0 1/2 -1/2 1 1

Z 0 -6 8 0 128

d 1 0 1 -1 7

c 0 1 -1 2 2

Z 0 0 2 12 140

OPTIMAL TABLEAU

• Note there are no negative entries in the objective row.

• Can you see the solution?

BASIC VARIABLES

d c s t VALUE

d 1 0 1 -1 7

c 0 1 -1 2 2

Z 0 0 2 12 140

02/11/13 47FOSTIIMA Business School

STEP BY STEP GUIDE1. Formulate the problem

2. Introduce slack variables

3. Form initial tableau

4. Obtain new tableaux

5. Get the solution

02/11/13 48FOSTIIMA Business School

OBTAINING THE SOLUTION

• Remember that since s and t are now non–basic variables they are set to zero.

• This corresponds to the solution:s = 0, t = 0,

d = 7c = 2

Z = 140

BASIC VARIABLES

d c s t VALUE

1 0 1 -1

0 1 -1 2

0 0 2 12

d

c

Z

7

2

140

02/11/13 49FOSTIIMA Business School

THE SOLUTION

• Don’t forget to put your solution back into the context of the problem.

Z = 140

d = 7

c = 2

• The maximum profit is Rs.140

• To make this profit the factory should produce 7 dolls and 2 cars.

02/11/13 50FOSTIIMA Business School

Z

PIVOTING

Step 3 - Add suitable multiples of the pivotal row to all other rows until all

entries, apart from the pivot, in the pivotal column are zero.

row (iii) + 8 row (i)gives

Z

t

s

VALUEtscdBASIC VARIABLES

2 16011

1 1 0 1 9

-16 -14 0 0 0

0 -6 0 1288

02/11/13 51FOSTIIMA Business School