LP Examples: another Max and a min
4K - views

LP Examples: another Max and a min

Similar presentations


Download Presentation

LP Examples: another Max and a min




Download Presentation - The PPT/PDF document "LP Examples: another Max and a min" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.



Presentation on theme: "LP Examples: another Max and a min"— Presentation transcript:

Slide1

LP Examples: another Max and a min

Dr. Ron Lembke

Slide2

Example 2

mp3 - 4

min electronics

- 2

min assembly

DVD

- 3

min electronics

- 1

min assembly

Min available

: 240 (elect) 100 (

assy

)

Profit / unit: mp3 $7, DVD $5

X

1

= number of mp3 players to make

X

2

= number of DVD players to make

Slide3

Standard Form

Max 7x

1

+ 5x

2

s.t. 4x1 + 3x2 <= 240 2x1 + 1x2 <= 100 x1 >= 0 x2 >= 0

electronics

assembly

Slide4

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

2

X

1

Slide5

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

1

= 0, X

2

= 80

X

1

= 60, X

2

= 0

Electronics Constraint

X

2

X

1

4x

1

+

3x

2

<=

240

x

1

=0, x

2

=80

x

2

=0, x

1

=60

Slide6

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

1

= 0, X

2

= 100

X

1

= 50, X

2

= 0

Assembly Constraint

X

2

X

1

2x

1

+

1x

2

<=

100

x

1

=0, x

2

=100

x

2

=0, x

1

=50

Slide7

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

Assembly Constraint

Electronics Constraint

Feasible Region – Satisfies all constraints

X

2

X

1

Slide8

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

Isoprofit Line:

$7X

1

+ $5X

2

= $210

(0, 42)

(30,0)

Isoprofit Lnes

X

2

X

1

Slide9

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

$210

$280

X

2

X

1

Slide10

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

$210

$280

$350

X

2

X

1

Slide11

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

(0, 82)

(58.6, 0)

$7X

1

+ $5X

2

= $410

X

2

X

1

Slide12

Mathematical Solution

Obviously, graphical solution is slow

We can prove that an optimal solution always exists at the intersection of constraints.

Why not just go directly to the places where the constraints intersect?

Slide13

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

1

= 0 and 4X

1

+ 3X

2

<= 240

So X

2

= 80

X

2

X

1

4X

1

+ 3X

2

<= 240

(0, 0)

(0, 80)

Slide14

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

2

= 0 and 2X

1

+ 1X

2

<= 100

So X

1

= 50

X

2

X

1

(0, 0)

(0, 80)

(50, 0)

Slide15

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

4X

1

+ 3X

2

=

240

2X

1

+ 1X

2

=

100 – multiply by -2

X

2

X

1

(0, 0)

(0, 80)

(50, 0)

4X

1

+ 3X

2

=

240

-4X

1

-2X

2

=

-200 add rows together

0X

1

+ 1X

2

=

40 X

2

= 40 substitute into #2

2

X

1

+ 40

=

100 So X

1

= 30

Slide16

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

2

X

1

(0, 0)

$0

(0, 80)

$400

(50, 0)

$350

(30,40)

$410

Find profits of each point.

Substitute into

$

7X

1

+ $5X

2

Slide17

Do we have to do this?

Obviously, this is not much fun: slow and tedious

Yes, you have to

know

how to do this to solve a two-variable problem.

We won’t solve every problem this way.

Slide18

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X

2

X

1

Start at (0,0), or some other easy feasible point.

Find a profitable direction to go along an edge

Go until you hit a corner, find profits of point.

If new is better, repeat, otherwise, stop.

Good news:

Excel can do

this for us

.

Using the

Simplex Algorithm

Slide19

Minimization Example

Min

8x

1

+ 12x2 s.t. 5x1 + 2x2 ≥ 20 4x1 + 3x2 ≥ 24 x2 ≥ 2

x1 , x2 ≥ 0

Slide20

Minimization Example

Min

8x

1

+ 12x2 s.t. 5x1 + 2x2 ≥ 20 4x1 + 3x2 ≥ 24 x2 ≥ 2

x1 , x2 ≥ 05x1 + 2x

2

=20

If x

1

=0, 2x

2=20, x2=10 (0,10)If x2=0, 5x1=20, x

1=4 (4,0)

4x

1 + 3x2 =24

If x1=0, 3x2=24, x2=8 (0,8)If x2=0, 4x1

=24, x1=6 (6,0)x2= 2

If x

1=0, x2=2No matter what x1 is, x2=2

Slide21

Graphical Solution

0

2

4

6

8

8

2

4

6

0

10

5x

1

+ 2x

2

=20

X

2

X

1

4x

1

+

3x

2

=24

x

2

=2

Slide22

0

2

4

6

8

8

2

4

6

0

10

5x

1

+ 2x

2

=20

X

2

X

1

4x

1

+3x

2

=24

x

2

=2

(0,10)

[5x

1

+

2x

2

=

20]*3

[4x

1

+3x

2

=

24]*2

1

5x

1

+

6x

2

= 60

8x

1

+6x

2

= 48

-

7x

1

= 12

x

1

= 12/7= 1.71

5x

1

+2x

2

=

20

5*1.71 + 2x

2

=

20

2x

2

= 11.45

x

2

= 5.725

(1.71,5.73)

(1.71,5.73)

Slide23

0

2

4

6

8

8

2

4

6

0

10

5x

1

+ 2x

2

=20

X

2

X

1

4x

1

+3x

2

=24

x

2

=2

(0,10)

(1.71,5.73)

4x

1

+3x

2

=24

x

2

=2

4x

1

+3*2 =24

4x

1

=18

x

1

=18/4 = 4.5

(4.5,2)

(4.5,2)

Slide24

0

2

4

6

8

8

2

4

6

0

10

5x

1

+ 2x

2

=20

X

2

X

1

4x

1

+3x

2

=24

x

2

=2

(0,10)

(1.71,5.73)

Z=8x

1

+12x

2

8*0 + 12*10 =

120

(4.5,2)

Z=8x

1

+12x

2

8*1.71 + 12*5.73 =

82.44

Z=8x

1

+12x

2

8*4.5+ 12*2 =

60

Lowest Cost

Slide25

IsoCost

Lines

0

2

4

6

8

10 12

8

2

4

6

0

10

5x

1

+ 2x

2

=20

X

2

X

1

4x

1

+

3x

2

=24

x

2

=2

Z=8x

1

+

12x2Try 8*12 = 96x1=0

12x

2

=96, x

2

=8

x

2

=0

8x

1

=96

,

x

1

=12

Slide26

Summary

Method for solving a two-variable problem graphically

Find end points of each constraint

Draw constraints

Figure out which intersections are interesting

Use algebra to solve for intersection ptsFind profits (or costs) of intersectionsChoose the best one Iso-profit (or Iso-Cost) lines can help find the most interesting points