Documente Academic
Documente Profesional
Documente Cultură
Contributions from:
Brian Williams
Eric Feron. Sommer
Gentry, Paul Robertson,
and Emilio Frazzoli.
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
Inputs:
Solutions:
History
Outline
Linear Programs.
Example 1: Maximizing Revenue.
Geometric Representation.
Example 2: Resource Allocation.
Geometric Representation
Maximize z=8x1+
x1
Subject to
Linear Program:
Objective
Our first LP
objective
function
x2 0
x1 + x2 10
x2 3
x1 0
x1 + x2 10
x2 3
x1, x2 0
x1 + x2 10
x2 3
x1, x2 0
feasible
region
x2 capital
3000
x2
Constraint
11/3/14
Geometric Representation
Geometric Representation
x1
infeasible
x1
feasible
region
x1 + x2 10
x1 + x2 10
feasible
x2 0
x2
feasible
region
Answer 1
x1 + x2 10
Answer 2
x1 0
Max z=8x1+
objective
function
x1 + x2 10
x2 capital
3000
x2 3
x2
Answer 1
x2 0
active
feasible
region
x2 capital
3000
x2 3
x1
Max z=8x1+
objective
function
x2 0
Geometric Representation
active
x2
x1 0
Geometric Representation
x1
x2 3
x2
Answer depends upon the
orientation of Zs gradient.
x1 0
Example 2 Continued
Plant
A
Production
Time Per
Engine 1
1
Production
Time Per
Engine 2
0
Production Time
Available
Per Week
4
12
18
Profit/ $300,000
Engine
x1: # of Engine 1s
x2: # of Engine 2s
$500,000
3x1 + 5x2
s.t. x1 4
2x2 12
3x1+ 2x2 18
11/3/14
Example 2
Geometric Representation
Z*=36
x2
(0,6)
objective
contours
(4,3)
1.6
x1 0
x1
0
(4,0)
x2 0
Maximize Z = c1 x1 + ... + cn xn
Subject to a11 x1 + ... + a1n xn b1
2x2 12
(2,6)
feasible
region
x1 4
3x1 + 2x2 18
where:
Z: Overall measure of performance.
xj: Activity level for product j.
cj: Marginal improvement of Z associated with product j.
bi: Available resource I.
aij: Amount of resource I to produce j.
Other forms:
Arbitrary signs on ci, bj, aij, xi.
Equality constraints.
x2
x2
x1
x1
x2
x1
x1
x1>0
Unbounded feasible region (infinite cost).
and x2>0
Constraint 1 and
(Constraint 2
Or Constraint 3)
11/3/14
Outline
x2
Linear Programs.
Geometric Solutions to Linear Programs.
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
Assume:
n decision variables x.
x1
No interior solutions:
An interior optimum x* must satisfy z(x*) = 0,
but z(x*) = c 0.
Solutions only at corner points:
Let x be on a constraint boundary B, but not a corner point.
B is the intersection of at most k < n constraints.
x is in the interior of a lower dimensional (n-k) subspace
not a soln.
Z=36
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
x1
Z=0
x2
corner
point
solutions
Z=12
corner
point
solutions
Z=30
corner
point
solutions
Z=36
1
Z=0
Z=29
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
x1
Z=12
incumbent x = nil 1 2 3
incumbent z = -inf 0 30 36
If feasible cp and
z at cp > incumbent z,
Then incumbent x = cp, incumbent z = z at cp;
3
36
Outline
Linear Programs.
Geometric Solutions to Linear Programs.
Generate and Test.
The Simplex Method.
! m $
m!
&=
" n % n!(m n)!
# corner points = #
11/3/14
Z=30
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
Z=29
corner
point
solutions
Simplex Method
x2
Z=36
Z=36
Standard Form:
Maximize
z = cTx
Subject to:
Ax b
x0
Z=29
corner
point
solutions
x1
Z=12
Z=0
Outline
x1
Z=12
Z=0
Linear Programs.
Geometric Solutions to Linear Programs.
Solution using Simplex Tableau
Algebraic Solutions to Linear Programs.
Generate and Test.
The Simplex Method.
(2,6)
Maximize Z=3x1 + 5x2
Subject to: x1 4
2x2 12
3x1 + 2x2 18
x1, x2 0
x4 3
x5
x1
1
Assume:
n decision variables.
m > n inequality
constraints.
x3
x2
x4
3
x5
x1
1
x3
x2
18 3x1 2 x 2
13
proportional to
x5 = 18-3x1-2x2.
Standard Form:
Maximize
Subject to:
z = cTx
Ax b
x0
Augmented Form:
Maximize: Z
Subject to: Z-3x1-5x2 = 0
x1+x3 = 4
2x2+x4 = 12
3x1+2x2+x5 = 18
x1, x2, x3, x4, x5 0
Maximize
Subject to:
z = cTx
z - cTx = 0
Ax+xT = b
x0
11/3/14
Augmented Solution
L augmented constraints
K augmented variables
Basic Solution
An augmented
corner-point solution
(not necessarily feasible).
L basic variables
n = K-L non-basic variables
= # non-decision variables.
basic
x3 = 4
x4 = 6
x5=18
Outline
Linear Programs.
Geometric Solutions to Linear Programs.
Algebraic Solutions to Linear Programs.
Generate and Test.
The Simplex Method.
x1+x3 = 4
2x2+x4 = 12
3x1+2x2+x5 = 18
basic
x1 = 2
x2 = 6
x3 = 2
x1+x3 = 4
2x2+x4 = 12
3x1+2x2+x5 = 18
Simplex Tableau.
Algebraic Interpretation.
(0,0), Z=0
Linear Programs.
Geometric Solutions to Linear Programs.
Algebraic Solutions to Linear Programs.
Generate and Test.
The Simplex Method.
Simplex Tableau.
Algebraic Interpretation.
(2,6), Z=36
4
Outline
(4,3), Z=29
5
(4,0), Z=12
11/3/14
Maximize: Z
Subject to: Z-3x1-5x2 = 0
x1+x3 = 4
2x2+x4 = 12
3x1+2x2+x5 = 18
x1, x2, x3, x4, x5 0
Augmented Form:
x1
x2
-3
-5
r1
x3
x4
r2
2
3
12
18
x1
x2
-3
Solution in column b:
x1=2, x2=6, x3=2,
x4=x5=0, z=36.
r2
1
3
-1
x2
x3
1
b
30
4
1/2
x1
x5
5/2
r3
x4
z
r1
x3
6
1
x4
x5
3/2
36
1/3
-1/3
1/2
-1/3
-5
r1
x3
x1
x2
-3
1
3
b
0
4
12
1
x3
x4
x5
5/2
18
b
30
r2
r3
x5
1
2
r1
x4
1/2
-1
6
1
Outline
Linear Programs.
Geometric Solutions to Linear Programs.
Algebraic Solutions to Linear Programs.
x2
-3
6
1/3
x1
Second Iteration:
z
b
0
r3
x5
First Iteration:
1. Choose column
with the most negative
entry in row z.
(2,6), Z=36
4
1
(0,0), Z=0
(4,3), Z=29
5
(4,0), Z=12
11/3/14
Step 2: Initialize
Maximize Z subject to:
a) Z -3x1 -5x2
= 0
b)
+x1
+x3
= 4
c)
+2x2
+x4
= 12
d) +3x1 +2x2
+ x5 = 18
Start at vertex (0,0):
Usually feasible.
x1, x2
non-basic;
Z, x3, x4, x5
basic.
x10, x20 are active constraints.
Z, x3, x4, and x5 are easily
determined from x1, x2.
(0,0) centered coordinates,
with axes x1, x2.
3
x5
x4
x1
x1
1
x3
x2x2
5
= 0
= 4
= 12
= 18
3
x5
x4
x1
x2
x3
5
(2,6)
2
3
4
x1
x2
(2,6)
2
! dZ
$
argmax #
= ci&
" dxi
%
xi
0
4
12
18
(2,6)
2
3
x4
x5
x1
x2
Maximize Z subject to
a) Z -3x1 -5x2
=
b)
+x1
+x3
=
c)
+2x2
+x4
=
d) +3x1 +2x2
+ x5 =
Maximize Z subject to
a) Z -3x1 -5x2
=
b)
+x1
+x3
=
c)
+2x2
+x4
=
d) +3x1 +2x2
+ x5 =
0
4
12
18
(2,6)
2
x4
x1
1
0
4
12
18
(2,6)
2
x4
x1
1
= 30
= 4
= 12
= 6
11/3/14
= 30
= 4
= 12
= 6
Is (0,6) a maximum?
Increasing x1 increases Z. Why?
Not a maximum.
(2,6)
2
3
x4
x1
1
Maximize Z subject to
a) Z -3x1
+5x4
= 30
b)
+x1
+x3
= 4
c)
+2x2
+x4
= 12
d) +3x1
-2x4 +x5 = 6
Which corner, 3 or 1?
Increasing x1 increases Z.
Increasing x4 decreases Z.
(2,6)
2
3
x4
x1
x1 enters as basic.
= 30
= 4
= 12
= 6
(2,6)
2
x4
3
x5
x1
4
x3
= 30
= 4
= 12
= 6
(2,6)
2
x4
3
x5
b)
c)
d)
+x1
+x3
= 4
+2x2
+x4
= 12
+3x1
-2x4 +x5 = 6
x4 = 0
x3 = 4 x1 0
x2 = 6
0
x5 = 6 3x1 0
x1 4/1 = 4
x1 6/3 = 2
(2,6)
2
x4
Is (2,6) a maximum?
Increasing x4 decreases Z.
Increasing x5 decreases Z.
Optimal solution!
3
x5
x1
1