LINEAR PROGRAMMING Example 1 Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y.

Download Report

Transcript LINEAR PROGRAMMING Example 1 Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y.

LINEAR PROGRAMMING

y

960 800

Example 1

Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y  2400 640 480 320 160 0 0 160 320 480 640 800 960

x

Initial solution:

I = 0

at (0, 0)

LINEAR PROGRAMMING

Maximise subject to I = x + 0.8y x + y 2x + y 3x + 2y    1000 1500 2400

Example 1

Maximise where subject to

I

I - x - 0.8y x + y + s 1 2x + y 3x + 2y + s 2 + s 3 = 0 = 1000 = 1500 = 2400

SIMPLEX TABLEAU

I

1

0 0 0

x

-1 1 2 3

y

-0.8

1 1 2

s

1 0

1

0 0

Initial solution

s

2 0 0

1

0

s

3 0 0 0

1

RHS

0 1000 1500 2400

I = 0, x = 0, y = 0, s 1 = 1000, s 2 = 1500, s 3 = 2400

PIVOT 1

I

1 0 0 0

Choosing the pivot column

x

-1 1 2 3

y

-0.8

1 1 2

s

1 0 1 0 0

s

2 0 0 1 0

s

3 0 0 0 1 RHS 0 1000 1500 2400 Most negative number in objective row

I

1 0 0 0

PIVOT 1

x

-1 1 2 3

Choosing the pivot element

y

-0.8

1 1 2

s

1 0 1 0 0

s

2 0 0 1 0

s

3 0 0 0 1 RHS 0 1000 1000/1 1500 1500/2 2400 2400/3 Ratio test: Min. of 3 ratios gives 2 as pivot element

PIVOT 1

I

1 0

0

0

Making the pivot

x

-1 1

1

3

y

-0.8

1

0.5

2

s

1 0 1

0

0

s

2 0 0

0.5

0

s

3 0 0

0

1 RHS 0 1000

750

2400 Divide through the pivot row by the pivot element

PIVOT 1

I

1

0 0 0

Making the pivot

x

0

1 1 3

y

-0.3

1 0.5

2

s

1

0

1 0 0

s

2

0.5

0 0.5

0

s

3

0

0 0 1 RHS

750

1000 750 2400 Objective row + pivot row

PIVOT 1

I

1

0

0 0

x

0

0

1 3

Making the pivot

y

-0.3

0.5

0.5

2

s

1 0

1

0 0

s

2 0.5

-0.5

0.5

0

s

3 0

0

0 1 RHS 750

250

750 2400 First constraint row - pivot row

PIVOT 1

I

1 0 0

0

x

0 0 1

0 Making the pivot

y

-0.3

0.5

0.5

0.5

s

1 0 1 0

0

s

2 0.5

-0.5

0.5

-1.5

s

3 0 0 0

1

RHS 750 250 750

150

Third constraint row – 3 x pivot row

PIVOT 1

I

1

0 0 0

x

0 0

1

0

New solution

y

-0.3

0.5

0.5

0.5

s

1 0

1

0 0

s

2 0.5

-0.5

0.5

-1.5

s

3 0 0 0

1

RHS

750 250 750 150

I = 750, x = 750, y = 0, s 1 = 250, s 2 = 0, s 3 = 150

LINEAR PROGRAMMING

y

960 800

Example

Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y  2400 640 480 320 160 0 0 160 320 480 640 800 960

x

Solution after pivot 1:

I = 750

at (750, 0)

PIVOT 2

I

1 0 0 0

x

0 0 1 0

Choosing the pivot column

y

-0.3

0.5

0.5

0.5

s

1 0 1 0 0

s

2 0.5

-0.5

0.5

-1.5

s

3 0 0 0 1 RHS 750 250 750 150 Most negative number in objective row

PIVOT 2

I

1 0 0 0

x

0 0 1 0

Choosing the pivot element

y

-0.3

0.5

0.5

0.5

s

1 0 1 0 0

s

2 0.5

-0.5

0.5

-1.5

s

3 0 0 0 1 RHS 750 250 250/0.5

750 750/0.5

150 150/0.5

Ratio test: Min. of 3 ratios gives 0.5 as pivot element

PIVOT 2

I

1 0 0

0

x

0 0 1

0 Making the pivot

y

-0.3

0.5

0.5

1

s

1 0 1 0

0

s

2 0.5

-0.5

0.5

-3

s

3 0 0 0

2

RHS 750 250 750

300

Divide through the pivot row by the pivot element

PIVOT 2

I

1

0 0 0

x

0

0 1 0

y

0

0.5

0.5

1

Making the pivot

s

1

0

1 0 0

s

2

-0.4

s

3

0.6

RHS

840

-0.5

0 250 0.5

0 750 -3 2 300 Objective row + 0.3 x pivot row

PIVOT 2

I

1

0

0 0

x

0

0

1 0

y

0

0

0.5

1

Making the pivot

s

1 0

1

0 0

s

2 -0.4

1

0.5

-3

s

3 0.6

-1

RHS 840

100

0 750 2 300 First constraint row – 0.5 x pivot row

PIVOT 2

I

1 0

0

0

x

0 0

1

0

y

0 0

0

1

s

1 0 1

0

0

Making the pivot

s

2 -0.4

1

2

-3

s

3 0.6

-1 RHS 840 100

-1 600

2 300 Second constraint row – 0.5 x pivot row

PIVOT 2

I

1

0 0 0

x

0 0

1

0

y

0 0 0

1

s

1 0

1

0 0

New solution

s

2 -0.4

1 2 -3

s

3 0.6

-1 RHS

840 100

-1

600

2

300

I = 840, x = 600, y = 300, s 1 = 100, s 2 = 0, s 3 = 0

LINEAR PROGRAMMING

y

960 800

Example

Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y  2400 640 480 320 160 0 0 160 320 480 640 800 960

x

Solution after pivot 2:

I = 840

at (600, 300)

PIVOT 3

I

1 0 0 0

x

0 0 1 0

Choosing the pivot column

y

0 0 0 1

s

1 0 1 0 0

s

2 -0.4

1 2 -3

s

3 0.6

-1 RHS 840 100 -1 600 2 300 Most negative number in objective row

PIVOT 3

I

1 0 0 0

x

0 0 1 0

Choosing the pivot element

y

0 0 0 1

s

1 0 1 0 0

s

2 -0.4

1 2 -3

s

3 0.6

-1 RHS 840 100 100/1 -1 600 600/2 2 300 Ratio test: Min. of 2 ratios gives 1 as pivot element

PIVOT 3

I

1

0

0 0

x

0

0

1 0

y

0

0

0 1

s

1 0

1

0 0

Making the pivot

s

2 -0.4

1

2 -3

s

3 0.6

-1

RHS 840

100

-1 600 2 300 Divide through the pivot row by the pivot element

PIVOT 3

I

1

0 0 0

x

0

0 1 0

y

0

0 0 1

Making the pivot

s

1

0.4

1 0 0

s

2

0

1 2 -3

s

3

0.2

RHS

880

-1 100 -1 600 2 300 Objective row + 0.4 x pivot row

PIVOT 3

I

1 0

0

0

x

0 0

1

0

y

0 0

0

1

s

1 0.4

1

-2

0

Making the pivot

s

2 0 1

0

-3

s

3 0.2

-1 RHS 880 100

1

2

400

300 Second constraint row – 2 x pivot row

PIVOT 3

I

1 0 0

0

x

0 0 1

0

y

0 0 0

1

s

1 0.4

1 -2

3 Making the pivot

s

2 0 1 0

0

s

3 0.2

-1 RHS 880 100 1

-1

400

600

Third constraint row + 3 x pivot row

PIVOT 3

I

1

0 0 0

x

0 0

1

0

y

0 0 0

1

s

1 0.4

1 -2 3

Optimal solution

s

2 0

1

0 0

s

3 0.2

-1 RHS

880 100

1 -1

400 600

I = 880, x = 400, y = 600, s 1 = 0, s 2 = 100, s 3 = 0

LINEAR PROGRAMMING

y

960 800

Example

Maximise I = x + 0.8y subject to x + y  1000 2x + y  1500 3x + 2y  2400 640 480 320 160 0 0 160 320 480 640 800 960

x

Optimal solution after pivot 3:

I = 880

at (400, 600)