Introduction To Linear Programming: Algorithmic and Geometric Foundations of Optimization
Introduction To Linear Programming: Algorithmic and Geometric Foundations of Optimization
Introduction To Linear Programming: Algorithmic and Geometric Foundations of Optimization
Linear Programming
•Unconstrained: max f äã x ëí = x
x
Easy: ∞
•Unconstrained: max f äã x ëí = x äã 1 − x ëí
x
df äã x ëí í 1
Still easy: = 1 − 2x = 0 àx =
dx 2
Necessity Sufficiency
df äã x ëí
=0 d 2 f äã x ëí
Maximum <0
dx dx
df äã x ëí
=0 d 2 f äã x ëí
Minimum >0
dx dx
f "(x) > 0
f '(x) = 0
Some Complications
max f äã x, y, z ëí = x äã 1 − y ëí + y äã 1 − x ëí + z äã 1 − x − y ëí
x, y, z
x x
Uncertainty Integer Restrictions
f(x) f(x)
x x
The Need for Algorithmic Methods
Limitations/Requirements Alternatives
Sometimes expectations can be used, but
(1) Decisions are made under certainty (1) generally stochastic programming is required
NLP (tough!). No guaranteed global optimizer
Objective function and constraints must be
(2) linear (2) other than enumeration! GA, GP, SA, heuristic
search, tabu, adaptive grid refinement, active sets
(3) Additivity (3) NLP
•Decision Variables
-Quantities to be allocated
-Number of units to be produced
-Time intervals, unit quantities, proportions...
•Objective Function
-What is being maximized or minimized?
-Thought: How do we reduce the world to a set of
linear equations?
•Constraints
-(In)equalities specifying limits on the unbounded
optimization of a function.
-If Π = P H Q, why not just set Q to ∞?
Setting up a LP Problem: Product Mix
max Π
¯ = ΠA x A + ΠB x B
xA , xB
(1) A Labor Constraint: They can’t use more than 40 hours of labor
per day (5 employees working regular shifts).
(2) A Manufacturing Constraint: They only have 45 hours of
machine time available (9 machines available for 5 hours each).
(3) A Marketing Constraint: They can’t sell more than 12 units of
set A per day.
Identifying the Problem Variables
•Decision Variables
Profit! (Cost!)
Thought: Max Profit = Min Cost = Max –Cost = ...
-How is it determined?
Π
¯ = Π A x A + Π B x B , but w e know that Π A = 300 and Π B = 250 .
So, the objective function is Π ¯ = 300x A + 250x B .
Identifying the Constraints
x A + 3x B # 45
x A # 12
The Entire LP and Possible Implications
max Π
¯ = 300x A + 250x B
xA , xB
such that: 2x A + x B # 40
x A + 3x B # 45
x A # 12
xA $ 0
xB $ 0
max Π
¯ = 300x A + 250x B
xA , xB
such that: 2x A + x B # 40
x A + 3x B # 45
x A # 12
xA $ 0
xB $ 0
Graphical Solutions
x(B)
1001010101 1
0
1100010101010101001
1
10010101010101010101
1
0 1
0 1
0
x(A)
1
0
Step One: Graphing the Constraints
x(B)
2x(A) + x(B) = 40
1001010101010101010101010101010101010101
0101010101010101010101010101010101010101
0101010101010101010101010101010101010101
40
x(A)
20
Constraint #2: x A + 3x B # 45
•When x A = 0, then x B # 15. Anchoring the line, when
x B = 0, then x A # 45.
x(B)
x(A) + 3x(B) = 45
10010101010101010101
0101010101
01010101010101010101
0101010101
01010101010101010101
0101010101
01010101010101010101
15 x(A) + 3x(B) < 45
x(A)
45
1 1
0 1
0 1
0
x(B)
100101010101010101010101010101010 10
0 10101
1 1
0 1
0 1
0
12
010101010101010101010101010101010
10
0 10101
•This constraint requires no solving for.
Constraint #3: x A # 12
x(A)
15
40
x(B)
0
1 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 0
1 0
1
11000101010101010101010101010101010101010101010101010 1
1
0
0
1
1
0
1
0
1
0
1 10
0 1
12
01010101010101010101010101010101010101010101010101010 1
0
1
says nothing about the optimal set!
20
0101010101010101010101010101010
010101010101010101010101010101010101010 1
01010101010101010101
010101010101010101010101
010101010101
(Profit)
010101010101010101010101
Feasible Set
45
x(A)
010101010101010101010101
Combining the Constraints: The Feasible Set
solutions (if a solution exists). Keep in mind that this is the feasible set - it
•The intersection of all constraint-feasible sets represents the set of feasible
Identifying the Optimal Points Within the Feasible Set
•Method #1: Corner-Point Enumeration
(Close-Up)
(0,15)
15 (?,?)
(12,0)
(0,0) 0 12
•To start, pick a value for the objective function - say, $1,500. This
becomes an isoprofit curve: 300x A + 250x B = 1500.
x(B)
300x(A) + 250x(B)=1500
1001010101010101
0101010101010101
01010101
0101010101010101
01010101
0101010101010101
x(A)
5
Adding Constraints to the Isoprofit Curves
x(B)
15
1
0
1
0
10
1
1
0
1
0
10
1
1
0
10
1
1001010101010101010101010 1
0101010101010 1
0
0101010101010101010101010 1
1
0
0101010101010
0101010101010101010101010
1
0
11
x(A)
12
-Relatively quick
-Guaranteed to find optimal solution
-Provides natural sensitivity analysis (shadow prices)
Disadvantages of Linear Programming