You are on page 1of 36

Lecture Day 3

Solving Linear Programming Problems


Using the Graphical Method
Special Cases in Using the Graphical Method
Solving Linear Programming Problems
Using the Simplex Method

Point C:
(-4)(0.5X1 + X2 = 81)
1.2X1 + 4X2 = 240

X2 = 81 0.5X1
1.2X1 + 4(81 0.5X1) = 240
1.2X1 + 324 - 2X1 = 240

-2X1 - 4X2 = -324


1.2X1 + 4X2 = 240
-0.8X1

= -84

-0.8

-0.8
X1 = 105

Z = 200X1 + 500X2
= 200(105) + 500(28.5)
= 21,000 + 14,250
Z = 35,250

-0.8X1 = -84
-0.8

-0.8

X1 = 105

X2 = 81 0.5X1
= 81 0.5(105)
= 81 52.5

X2 = 28.5

X2
150

100

Techniques to Determine
Which Extreme Point
Gives the Optimal Solution
1. Use the objective function to single out the
extreme point that is the optimum.
2. Find the coordinates of the extreme points and
compute the profit associated with each
0.5X1 + X2 = 81
X2 = 40

50
A

50

100

1.2X1 + 4X2 = 240

150 D 200

X1

Max. Z = 200X1 + 500X2

Point A

150

Subject to:

X1 = 0
X2 = 40

X2

X2 < 40

Z = 200X1 + 500X2
= 200(0) + 500(40)
= 20,000

1.2X1 + 4X2 < 240

0.5X1 + X2 < 81

100

X1 ,

X2 > 0

0.5X1 + X2 = 81
X2 = 40

50
A

50

100

1.2X1 + 4X2 = 240

150 D 200

X1

Max. Z = 200X1 + 500X2

Point B

X2
150

100

X2 < 40

1.2X1 + 4(40) = 240


1.2X1 + 160 = 240
1.2X1 = 240 - 160

1.2X1 + 4X2 < 240

0.5X1 + X2 < 81
X1 ,

1.2X1 = 80
1.2

50
A

Subject to:

1.2X1 + 4X2 = 240


X2 = 40

X2 > 0

0.5X1 + X2 = 81

1.2

X2 = 40

X1 = 66.6

Z = 200X1 + 500X
C2
= 200(66.6) + 500(40)
= 33,333.33

50

100

150 D 200

1.2X1 + 4X2 = 240

X1

Max. Z = 200X1 + 500X2

Point D

X2
150

X2 < 40

0.5X1 = 81

1.2X1 + 4X2 < 240

0.5

0.5X1 + X2 < 81

0.5

X1 = 162

100

50
A

Subject to:

0.5X1 + X2 = 81
X2 = 0

X1 ,

Z = 200X1 + 500X2
= 200(162) + 500(0)
= 32,400
B

50

100

X2 > 0

0.5X1 + X2 = 81
X2 = 40

1.2X1 + 4X2 = 240

150 D 200

X1

Sample Problem # 2
The Reed Pump Co. manufactures pumping apparatus for the
petroleum industry. It is trying to determine an optimal production
and distribution plan for its new submersible pump. They have one
main plant and two regional warehouses. Warehouse 1 has demand
for at least 80 pumps this month, and warehouse 2 has demand for
at least 100 units. The following are the combined costs of producing
and shipping to the two warehouses:
Cost of Producing & Shipping
From Plant

Warehouse 1

Warehouse 2

P240

P280

To achieve economies of scale, the company wants to produce at


least 300 pumps this month. The only resource limitation involves
manufacturing resource hours. Pumps sent to regional warehouse 1
need an extra-fine filter and require five hours of manufacturing time.
Those pumps sent to warehouse 2 require only four hours of
manufacturing time. The company has 2,000 hours of manufacturingresource time available per month.

Let: X1 = number of pumps to be


delivered to Warehouse 1
X2 = number of pumps to be
delivered to Warehouse 2

Min. Z = 240X1 + 280X2


Subject to:
X1 > 80
X2 > 100
X1 + X2 > 300
5X1 + 4X2 < 2,000

X2

X1 = 80

500

Min. Z = 240X1 + 280X2


Subject to:
X1 >

80

X2 >

100

X1 + X2 >

300

400
300

5X1 + 4X2 < 2,000

200
X2 = 100

100

100

200

300

400

X1 + X2 = 300

500

X1

5X1 + 4X2 = 2,000


if X2 = 0
5X1 = 2,000
5

5
X1 = 400

if X1 = 0
4X2 = 2,000
4
4
X2 = 500

Min. Z = 240X1 + 280X2


Subject to:
X1 >

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

X2

X1 = 80

500

Min. Z = 240X1 + 280X2


Subject to:
X1 >

80

X2 >

100

X1 + X2 >

300

400
300

5X1 + 4X2 < 2,000

200
X2 = 100

100

5X1 + 4X2 = 2,000

100

200

300

400

X1 + X2 = 300

500

X1

X2

X1 = 80

500

Min. Z = 240X1 + 280X2


Subject to:

400
300

200

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

A
C

100

X1 >

X2 = 100

D
100

200

5X1 + 4X2 = 2,000

300

400

X1 + X2 = 300

500

X1

240X1 + 280X2 = 100,000


if X2 = 0

Min. Z = 240X1 + 280X2


Subject to:

240X1 = 100,000

X1 >

80

240
240
X1 = 416.67

X2 >

100

X1 + X2 >

300

if X1 = 0
280X2 = 100,000
280
280
X2 = 357.14

5X1 + 4X2 < 2,000

X2

X1 = 80

500

Min. Z = 240X1 + 280X2


Subject to:

400
300

200

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

A
C

100

X1 >

X2 = 100

D
100

200

5X1 + 4X2 = 2,000

300

400

X1 + X2 = 300

500

X1

240X1 + 280X2 = 50,000


if X2 = 0

Min. Z = 240X1 + 280X2


Subject to:

240X1 = 50,000

X1 >

80

240
240
X1 = 208.33

X2 >

100

X1 + X2 >

300

if X1 = 0
280X2 = 50,000
280
280
X2 = 178.57

5X1 + 4X2 < 2,000

X2

X1 = 80

500

Min. Z = 240X1 + 280X2


Subject to:

400
300

200

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

A
C

100

X1 >

X2 = 100

D
100

200

5X1 + 4X2 = 2,000

300

400

X1 + X2 = 300

500

X1

X2

X1 = 80
Point D

500

X1 + X2 = 300
X2 = 100

X1 + 100 = 300
X1= 300 - 100
X1= 200

300

100

Subject to:

400

200

Min. Z = 240X1 + 280X2


80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

Z = 240X1 + 280X2
= 240(200) + 280(100) C
= 48,000 + 28,000

X2 = 100

5X1 + 4X2 = 2,000

Z = 76,000

X1 >

100

200

300

400

X1 + X2 = 300

500

X1

X2

Point XA1 = 80

500

X1 + X2 = 300
X1 = 80

80 + X2 = 300
X2= 300 - 80
X2= 220

300

100

Subject to:

400

200

Min. Z = 240X1 + 280X2


80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

Z = 240X1 + 280X2
= 240(80) + 280(220) C
= 19,200 + 61,600

X2 = 100

5X1 + 4X2 = 2,000

Z = 80,800

X1 >

100

200

300

400

X1 + X2 = 300

500

X1

X2

Point XB1 = 80

500

5X1 + 4X2 = 2,000


X1 = 80

300

100

Subject to:

400

200

Min. Z = 240X1 + 280X2

5(80) + 4X2 = 2,000


400 + 4X2 = 2,000
4X2 = 2,000 - 400
4X2 = 1,600

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

4
X2 = 400

Z = 240X1 + 280X2

X2 = 100

= 240(80) + 280(400)
= 19,200 + 112,000

100

X1 >

200

Z = 131,200

300

5X1 + 4X2 = 2,000

400

X1 + X2 = 300

500

X1

X2

Point XC1 = 80

500
400
300

200
100

Min. Z = 240X1 + 280X2

5X1 + 4X2 = 2,000


X2 = 100

Subject to:

5X1 + 4(100)= 2,000


5X1 + 400= 2,000
5X1 = 2,000 - 400
5X1 = 1,600

80

X2 >

100

X1 + X2 >

300

5X1 + 4X2 < 2,000

5
X1 = 320

Z = 240X1 + 280X2

X2 = 100

= 240(320) + 280(100)
= 76,800 + 28,000

100

X1 >

200

Z = 104,800

300

5X1 + 4X2 = 2,000

400

X1 + X2 = 300

500

X1

Special Cases in the Graphical Solution


to Linear Programming Problems
Alternative Optima

It is possible that an adjacent extreme point will yield


the same value. Graphically, this happens whenever
the slope of the objective function equals the slope
of a constraint equation that passes through an
optimal extreme point.

Max. Z = 200X1 + 500X2


Subject to:

X2

X2 < 40

150

1.2X1 + 4X2 < 240


0.5X1 + X2 < 81
X1 ,

100

X2 > 0
0.5X1 + X2 = 81
X2 = 40

50
A

50

100

1.2X1 + 4X2 = 240

150 D 200

X1

Special Cases in the Graphical Solution


to Linear Programming Problems
Unbounded Solution

It is possible for an LP problem to have a non-empty


set of feasible solutions and yet have no finite optimal
solution.
This can occur whenever the feasible region extends
infinitely in the direction of improvement for the
objective function.
Having this scenario implies that the model has been
formulated incorrectly. Usually, a constraint has been
omitted or the signs on some of the coefficients have
been reversed.

5X1 X2 = 10

X2
Max. Z = X1 + X2
Subject to:
5X1 - X2 > 10
3X1 - 2X2 < 9
X1 , X2 > 0

5
4
3
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10

3X1 2X2 = 9

1 2 3 4 5

X1

Special Cases in the Graphical Solution


to Linear Programming Problems
No Feasible Solution

It is also possible to have an LP problem in which no


feasible solution exists.
This situation corresponds to a problem that is
formulated incorrectly or has conflicting restrictions
within the constraint set.

X2
Min. Z = X1 + X2
Subject to:
X1 - X2 > 1
-X1 + X2 > 1
X1 , X2 > 0

3
2
1
-3 -2 -1
-2
-3

1 2 3

X1

Solving
Linear Programming Problems
Using the Simplex Method

George Dantzig developed the simplex method


in 1947. It is the most widely used method for
solving LP problems.

The simplex method is a solution algorithm. An


algorithm is an iterative procedure with
specific computational rules that solves a
problem in a finite number of steps.
The simplex algorithm is a systematic algebraic
procedure for examining the extreme points of
the LP feasible region. The extreme points are
examined in a sequence such that each
successive point yields a solution that is at least
as effective as the previous point.

The simplex method requires that all constraints be


expressed as equations, or that the problem be
transformed in standard form.

That is, there is a need to convert less-thanor-equal-to and greater-than-or-equal-to


constraints into equations.

This can be done by adding dummy


variables to the inequalities.

Sample Problem

In Standard Form

Let : X1 = number of
power amplifiers
X2 = number of
preamplifiers
Max. Z = 200X1 + 500X2

Subject to:
X2 < 40
1.2X1 + 4X2 < 240
0.5X1 + X2 < 81
X1 ,

X2 > 0

0X1 + 1X2 + 1S1 = 40


1.2X1 + 4X2 + 0S1 + 1S2 = 240

Sample Problem

In Standard Form

Let : X1 = number of
power amplifiers
X2 = number of
preamplifiers
Max. Z = 200X1 + 500X2

Subject to:
X2 < 40

0X1 + 1X2 + 1S1 + 0S2 = 40

1.2X1 + 4X2 < 240

1.2X1 + 4X2 + 0S1 + 1S2 = 240

0.5X1 + X2 < 81

0.5X1 + 1X2 + 0S1 + 0S2 + 1S3 = 81

X1 ,

X2 > 0

Sample Problem

In Standard Form

Let : X1 = number of
power amplifiers
X2 = number of
preamplifiers
Max. Z = 200X1 + 500X2

200X1 + 500X2 + 0S1 + 0S2 + 0S3

Subject to:
X2 < 40

0X1 + 1X2 + 1S1 + 0S2 + 0S3 = 40

1.2X1 + 4X2 < 240

1.2X1 + 4X2 + 0S1 + 1S2 + 0S3 = 240

0.5X1 + X2 < 81

0.5X1 + 1X2 + 0S1 + 0S2 + 1S3 = 81

X1 ,

X2 > 0

Canonical Form of the Simplex Tableau


The table consisting of the system equations and other relevant
information of an LP problem is called a Simplex Tableau.
Decision Variables

Cj

C1

CB

Basic
X1
Variables

0
0
.
.
.
0

S1
S2
.
.
.
Sm
Zj
Cj - Zj

C2 . . . Cn
X2 . . . Xn

Slack Variables

a11 a12 . . . a1n 1


a21 a22 . . . a2n 0
.
.
.
.
.
.
.
.
.
.
.
.
am1 am2 . . . amn 0

0 ... 0
S2 . . . Sm Solution
Values

0 ... 0
1 ... 0
.
.
.
.
.
.
0 ... 1

b1
b2
.
.
.
bm

Sample Problem

In Standard Form

Let : X1 = number of
power amplifiers
X2 = number of
preamplifiers
Max. Z = 200X1 + 500X2

200X1 + 500X2 + 0S1 + 0S2 + 0S3

Subject to:
X2 < 40

0X1 + 1X2 + 1S1 + 0S2 + 0S3 = 40

1.2X1 + 4X2 < 240

1.2X1 + 4X2 + 0S1 + 1S2 + 0S3 = 240

0.5X1 + X2 < 81

0.5X1 + 1X2 + 0S1 + 0S2 + 1S3 = 81

X1 ,

X2 > 0

Tableau 1
Cj

200

500

CB

Basic
Variables

X1

X2

S1

S2

S3

Solution
Values

S1

40

S2

1.2

240

S3

0.5

81

Zj

Cj - Zj

200

500

End of Lecture Day 3

You might also like