1 CHAPTER 3 LINEAR PROGRAMMING: SIMPLEX METHOD

CHAPTER 3
LINEAR PROGRAMMING: SIMPLEX METHOD
Linear programming is optimization problem where the objective function is linear and all equality and
inequality constraints are linear. This problem was first defined mathematically in the thirties in the field
of economics. It became important tool of allocating resources during World War II.
Linear programming problems can be easily solved geometrically for the case of two variables and few
constraints. However, finding a solution becomes increasingly difficult to solve as dimensionality of the
problem increase. For example, consider the problem of airline planning allocation a limited number of
planes to serve a fixed schedule of travel between multiple cities while minimizing fuel cost. As of 1979
(before the introduction of personal computers), 25% of all computational time worldwide was
dedicated to solving linear programming problems.
A breakthrough was achieved by George Dantzig who proposed the simplex method based on his work
for the US Airforce. His solution as we will see is both simple and elegant. The simplex method remained
the standard for solving linear programming problem until Karamarkar of Bell Labs developed an
alternative that is 50 times faster.
George Dantzig (1914-2005),
http://www.austincc.edu/powens/+BusEco/HTML/
5-3/5-3.html
1
Narendra Karamarkar (1957- ),
http://www.slideshare.net/geronimo101/india
n-mathematicians-31908937
Standard Form of the Linear Programming Problem
There are two possible forms to express the linear programming problem:
๏‚ท
Scalar Form:
Minimize,
๐‘›
๐‘“ (๐‘ฅ) = โˆ‘ ๐‘๐‘– ๐‘ฅ๐‘–
๐‘–=1
Subject to,
๐‘›
โˆ‘ ๐‘Ž1๐‘– ๐‘ฅ๐‘– = ๐‘1
๐‘–=1
๐‘›
โ‹ฎ
โˆ‘ ๐‘Ž๐‘š๐‘– ๐‘ฅ๐‘– = ๐‘๐‘š
๐‘–=1
๐‘ฅ๐‘– โ‰ฅ 0
๐‘– = 1,2, โ€ฆ , ๐‘›
where x are the decision variables. c, b, and a are constant coefficients.
๏‚ท
Matrix Form:
Minimize,
๐‘“(๐‘ฅ) = ๐‘ ๐‘‡ ๐‘ฅ
Subject to,
๐‘Ž๐‘ฅ = ๐‘
๐‘ฅโ‰ฅ0
In this case, a will be m x n matrix.
Comments:
๏‚ท
๏‚ท
The problem is formulated as minimization. If you want to maximize, simply minimize the negative
of the objective function.
Other clarifications of the problem will be presented later.
Homework: 3.1, 3.2
2
Geometry of Linear Programming Problems
As mentioned earlier, the two variable problem can be solved geometrically. In this case, the feasible
area is a polygon in the upper right corner of the x1-x2 plane.
The objective function will be a family of parallel straight line forming a plan in the case of two variables
and a hyperplane when the number of variables is more than two.
The extremum will be at one if the vertices of the polygon. A proof will be presented later but for now,
inspection can show this.
x2
Various values of the
objective function
x1
3
Special Case #1:
Sometime the problem is ill-conditioned and is unbounded as can be seen in the figure below. An
example may be maximizing a function while including no relevant upper bound constraints on the
variables.
x2
x1
Special Case #2:
The objective function has the same slope as one of the constraints. If the minimum is related to this
constraint, there is no unique solution.
x2
x1
4
Example 3.1:
Consider this quality control problem. 1800 items has to be inspected in 8 hours day. The factory has
two types of inspectors: Grade 1 and Grade 2 inspectors.
Grade 1 inspectors can inspect 25 pieces per hour. Their accuracy is 98%. Their hourly wage is $4.00 per
hour.
Grade 2 inspectors can inspect 15 pieces per hour. Their accuracy is 95%. Their hourly wage is $3.00 per
hour.
An error cost the factory $2 per item.
The factory has access to 8 Grade 1 inspectors and 10 Grade 2 inspectors.
Find a way to minimize the total cost of inspection.
5
Formulation:
Variables:
x1: Number of Grade 1 inspectors
x2: Number of Grade 2 inspectors
Constraints:
Lower limit:
๐‘ฅ1 โ‰ฅ 0
๐‘ฅ2 โ‰ฅ 0
Upper limit:
๐‘ฅ1 โ‰ค 8
๐‘ฅ2 โ‰ค 10
Number of items inspected constrained:
8(25)๐‘ฅ1 + 8(15)๐‘ฅ2 โ‰ฅ 1800
5๐‘ฅ1 + 3๐‘ฅ2 โ‰ฅ 45
Objective function:
Minimize,
๐ถ = 8(4๐‘ฅ1 + 3๐‘ฅ2 ) + 8(2)((25)(1 โˆ’ 0.98)๐‘ฅ1 + (15)(1 โˆ’ 0.95)๐‘ฅ2 )
๐ถ = 40๐‘ฅ1 + 36๐‘ฅ2
6
Solution:
x2
5x1+3x2>=45
x1<=8
x2<=10
x1
The polygon is a triangle with three vertices as two of the constraints were rendered obsolete.
๐‘ฅ1 โ‰ฅ 0
๐‘ฅ2 โ‰ฅ 0
Possible solutions are:
Vertex
(3, 10)
(8, 10)
(8, 5/3)
Value of the Objective Function (C)
3(40) + 10(36) = 120 + 360 = 480
8(40) + 10(36) = 320 + 360 = 680
8(40) + (5/3)(36) = 32 0+ 60 = 380
Since we are minimizing, it is clear that (8, 5/3) is the optimal solution.
However, it may be difficult to find 5/3 of Grade 2 inspectors! (why?).
Therefore, we will switch to the nearest feasible integer solution, which is (8, 2). In this case the
objective function value is,
8(40) + (2)(36) = 320 + 72 = 392
7
Example 3.2:
Consider this oil refinery problem. The refinery deals with two kinds of crude oil: Crude A and Crude B.
Crude A costs $30 per barrel. There are 20,000 barrels available.
Crude B costs $36 per barrel. There are 30,000 barrels available.
Both crudes can be refined to produce gasoline and lube oil. The yields of both crudes are listed in the
table below.
Gasoline
Lube Oil
Yield/Barrel (A)
Yield/Barrel (B)
Sale Price ($)
0.6
0.4
0.8
0.2
50
120
Maximize the profit of the refinery.
8
Market Capacity
(Barrels)
20,000
10,000
Formulation:
Variables:
x1: Number of Crude A barrels
x2: Number of Crude B barrels
Constraints:
Lower limit:
๐‘ฅ1 โ‰ฅ 0
Upper limit:
๐‘ฅ1 โ‰ค 20000
Market capacity constraints:
๐‘ฅ2 โ‰ฅ 0
๐‘ฅ2 โ‰ค 30000
0.6๐‘ฅ1 + 0.8๐‘ฅ2 โ‰ฅ 20000
0.4๐‘ฅ1 + 0.2๐‘ฅ2 โ‰ฅ 10000
Objective function:
Maximize,
๐‘ƒ = 50(0.6๐‘ฅ1 + 0.8๐‘ฅ2 ) + 120(0.4๐‘ฅ1 + 0.2๐‘ฅ2 ) โˆ’ 30๐‘ฅ1 โˆ’ 36๐‘ฅ2
๐‘ƒ = 48๐‘ฅ1 + 28๐‘ฅ2
9
Solution:
0.4x1+0.2x2>= x2
10000
x1<=20000
x2<=30000
0.6x1+0.8x2>=
20000
x1
The polygon is a triangle with three vertices as two constraints intersect at the same point. Additionally,
two of the constraints were rendered obsolete.
๐‘ฅ1 โ‰ฅ 0
๐‘ฅ2 โ‰ฅ 0
Possible solutions are:
Vertex
(10000, 30000)
(20000, 30000)
(20000, 10000)
Value of the Objective Function (P)
10000(48) + 30000(28) = 1,320,000
20000(48) + 30000(28) = 1,800,000
20000(48) + 10000(28) = 1,240,000
Since we are maximizing, it is clear that (20000, 30000) is the optimal solution.
Notes:
๏‚ท
This problem is unrealistic as refining cost and cost of storage excess are not included.
Homework:
๏‚ท
๏‚ท
3.9
Formulate these problems and solve graphically: 3.94, 3.96
10