17
Linear Programming (LP) Problems MAX (or MIN): 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 j1 X 1 + a j2 X 2 + … + a jn X n >=b j : a m1 X 1 + a m2 X 2 + … + a mn X n = b m

Linear Programming (LP) Problems MAX (or MIN): 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

Embed Size (px)

DESCRIPTION

X1 is the number of Chairs X2 is the number of Tables Large brick constraint X1+2X2 = 0 Problem Formulation

Citation preview

Page 1: Linear Programming (LP) Problems MAX (or MIN): 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

Linear Programming (LP) Problems

MAX (or MIN): c1X1 + c2X2 + … + cnXn

Subject to: a11X1 + a12X2 + … + a1nXn <= b1

:aj1X1 + aj2X2 + … + ajnXn >=bj

:am1X1 + am2X2 + … + amnXn = bm

Page 2: Linear Programming (LP) Problems MAX (or MIN): 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

Weekly supply of raw materials:

6 Large Bricks8 Small Bricks Product

s:

Table Chair Profit = $20/Table Profit = $15/Chair

The Lego Production Problem

Page 3: Linear Programming (LP) Problems MAX (or MIN): 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

X1 is the number of ChairsX2 is the number of TablesLarge brick constraintX1+2X2 <= 6Small brick constraint 2X1+2X2 <= 8Objective function is to Maximize15X1+20 X2X1>=0X2>= 0

Problem Formulation

Page 4: Linear Programming (LP) Problems MAX (or MIN): 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

0

Graphical Solution to the Prototype Problem

1 2 3 4 5 6

1

2

3

4

5

Chairs

Tables

X1 + 2 X2 = 6 Large Bricks

Page 5: Linear Programming (LP) Problems MAX (or MIN): 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

0

Graphical Solution to the Prototype Problem

1 2 3 4 5 6

1

2

3

4

5

Chairs

Tables

2 X1 + 2 X2 = 8 Small Bricks

Page 6: Linear Programming (LP) Problems MAX (or MIN): 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

0

Graphical Solution to the Prototype Problem

1 2 3 4 5 6

1

2

3

4

5

Chairs

Tables

X1 + 2 X2 = 6 Large Bricks

2 X1 + 2 X2 = 8 Small Bricks

Page 7: Linear Programming (LP) Problems MAX (or MIN): 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

0

Graphical Solution to the Prototype Problem

1 2 3 4 5 6

1

2

3

4

5

Chairs

Tables

X1 + 2 X2 = 6 Large Bricks

2 X1 + 2 X2 = 8 Small Bricks

Page 8: Linear Programming (LP) Problems MAX (or MIN): 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

Z = 15 X1 + 20 X2

Lets draw it for

15 X1 + 20 X2 = 30

In this case if # of chair = 0, then # of table = 30/20 = 1.5

if # of table = 0, then # of chair = 30/15 = 2

The Objective Function

Page 9: Linear Programming (LP) Problems MAX (or MIN): 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

0

Graphical Solution to the Prototype Problem

1 2 3 4 5 6

1

2

3

4

5

Chairs

Tables

X1 + 2 X2 = 6 Large Bricks

2 X1 + 2 X2 = 8 Small Bricks

Page 10: Linear Programming (LP) Problems MAX (or MIN): 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

We can make Product1 and or Product2.

There are 3 resources; Resource1, Resource2, Resource3.

Product1 needs one unit of Resource1, nothing of Resource2, and three units of resource3.

Product2 needs nothing from Resource1, two units of Resource2, and two units of resource3.

Net profit of product 1 and Product2 are 3 and 5, respectively.• Formulate the Problem• Solve it graphically• Solve it using excel.

A second example

Page 11: Linear Programming (LP) Problems MAX (or MIN): 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

Objective Function Z = 3 x1 +5 x2

ConstraintsResource 1x1 4 Resource 2 2x2 12Resource 3 3 x1 + 2 x2 18Nonnegativityx1 0, x2 0

Problem 2 : Original version

Product 1 needs 1 unit of resource 1, and 3 units of resource 3.Product 2 needs 2 units of resource 2 and 2 units of resource 3There are 4 units of resource 1, 12 units of resource 2, and 18 units of resource 3

Page 12: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Max Z = x1 + x2

Subject tox1 4 2x2 123 x1 + 2 x2 18x1 0, x2 0

Problem 2 : Original version

Page 13: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Max Z = 3x1 + 5x2

Subject tox1 4 2x2 123 x1 + 2 x2 18x1 0, x2 0

Problem 2

Page 14: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Problem 2 : Original version

Max Z = 2x1 + 3x2

Subject to x1 +3x2 64x1 +3x2 124x1 +x2 8x1 0, x2 0

x2=0x1 =6x1 =0x2 =2

Page 15: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Problem 2 : Original version

Max Z = 2x1 + 3x2

Subject to x1 +3x2 64x1 +3x2 124x1 +x2 8x1 0, x2 0

x2=0x1 =3x1 =0x2 =4

Page 16: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Problem 2 : Original version

Max Z = 2x1 + 3x2

Subject to x1 +3x2 64x1 +3x2 124x1 +x2 8x1 0, x2 0x2=0x1 =2x1 =0x2 =8

How many corner points:3 functional constraints plus two non-negativity constraints =5Each time we solve two equations and two unknowns.Select two out of five (m+n)!/m!n! = COMBIN(5,2)= 10How many feasible corner points: 4

Page 17: Linear Programming (LP) Problems MAX (or MIN): 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

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

x2

x1

Problem 2 : Original version

Max Z = 2x1 + 3x2

Subject to x1 +3x2 64x1 +3x2 124x1 +x2 8x1 0, x2 0

2x1+3x2 = 6x2=0x1=3x1=0x2= 2