l15 lp problems
DESCRIPTION
L15 LP Problems. Homework Review Why bother studying LP methods History N design variables, m equations Summary. H14 part 1. H14 Part 1. H14 Part 1. H14. Curve fitting. Curve Fitting. Need to find the parameters a i Another way? Especially for non-linear curve fits?. - PowerPoint PPT PresentationTRANSCRIPT
L15 LP Problems
• Homework• Review• Why bother studying LP methods• History• N design variables, m equations• Summary
1
H14 part 1
2
x0 11.1993beta 0.2700omega 0.8300
-4
-2
0
2
4
6
8
10
0 0.5 1 1.5 2 2.5 3 3.5
H14 Part 1
3
x0 13.0724beta 0.2362omega 5.6133
-10
-5
0
5
10
15
0 0.5 1 1.5 2 2.5 3 3.5
H14 Part 1
4
x0 12.9713beta 0.2381omega 11.8867
-10
-5
0
5
10
0 0.5 1 1.5 2 2.5 3 3.5
5
Linear
Quadratic
Power
Exponential
a0
4.086
6.335
a1 -0.454 -1.434
a2
0.0775
a3
a4
5.908
a5
-1.113
a6
8.965
a7
-0.463
SSE 9.385 1.914 3.515 0.8304 r2 0.726 0.944 0.897 0.9758
H14
6
Curve fitting
7
)(xf
)(
)(
),(),(),(
),(
444
333
222
111
iii
i
xfyeeerror
xfy
yxPyxPyxPyxP
Curve Fitting
8
xa
a
eaxf
xaxf
xaxaxaaxf
xaxaaxf
xaaxf
7
5
6
4
33
2210
2210
10
)(lexponentia
)(power
)(cubic
)(quadratic
)(linear
Need to find the parameters ai Another way? Especially for non-linear curve fits?
i
iii
i xfyez 22 )]([)( minimize a
Curve Fit example
9
Goodness of fit?• R2 = coefficient of determination
0≤ R2 ≤1.• R = correlation coefficien
10
Curve Fit example
11
Linear Programming Prob.s
12
j
k
jjijKiki
j
k
jjijKiki
j
k
jjijiKiki
kk
bxaorbxaxa
bxaorbxaxa
bxaorbxaxa
tsxcxcxcfMinimize
111
111
111
2211
..)(
x
Why study LP methods
• LP problems are “convex”If there is a solution…it’s global optimum
• Many real problems are LPTransportation, petroleum refining, stock portfolio, airline crew scheduling, communication networks
• Some NL problems can be transformed into LP• Most widely used method in industry
13
Std Form LP Problem
14
ntojxmtoib
bxaxa
bxaxabxaxa
tsxcxcxcfMin
j
i
mnmnm
nn
nn
nn
1,01,0
..)(
11
22121
11111
2211
x Matrix form
All “≥0” i.e. non-neg.
How do we transform an given LP problem into a Standard LP Prob.?
0x0bbAx
xcx T
..
)(tsfMin
All “=“
Recall LaGrange/KKT method
15
0,0
0,0
11
11
11
11
iiiiKiki
Kiki
iiiiKiki
iKiki
sbbsxaxabxaxa
sbbsxaxabxaxa
Add
slack variable
Subtractsurplus variable
Handling negative xi
16
0
0
0,0;
jjj
jjj
jjjjj
xmeansxx
xmeansxx
xxxxx
When x is unrestricted in sign:
Transformation example
17
Transformation example pg2
18
Trans pg3
19
Solving systems of linear equations
n equations in n unknownsProduces a unique solution, for example
20
62242
21
21
xxxx
Elimination methods
21
2x42(1)x42x x
row1 usingtutebacksubsti122
220
421 row2to then2 by row1x
622
421
11
21
22
xx
622
421
62242
21
21
xxxx Gaussian Elimination
Elimination methods cont’d
22
622
421
62242
21
21
xxxx
1x1
110
2012- by row2divide row1, torow2
220
421 row2to then2 by row1x
622
421
2
1
x
Gauss-Jordan Elimination
Can we find unique solutions forn unknowns with m equations?
23
5 unknowns and 2 equations!
What’s the best you can do?
MUST set 3 xi to zero! Solve for remaining 2. Just like us=0 in LaGrange Method!
m equations= m unknowns
Most we can do is to solve for m unknowns,e.g. we can “solve” for 2 xi
but which 2? 24
Combinations?
2554
53
43
52
42
32
51
41
31
21
54321
m=2, n=5
102
45
)123(12
12345
!25!2
!5!!
!
25
-C
n-mm
nCmn
Combinations from m=2, n=2
26
m=2, n=4
43
42
32
41
31
21
4321
62
34
)12(12
1234
!24!2
!4!!
!
24
-C
n-mm
nCmn
27
Example 8.2Figure 8.1 Solution to the profit maximization problem. Optimum point = (4, 12). Optimum cost = -8800.
5 unknowns, n=53 equations, m=310 combinations
Example 8.2 cont’d
28
Solutions are vertexes (i.e. extreme points, corners) of polyhedron formed by the constraints
Example 8.2 cont’d
• Ten solutions created by setting (n-m) variables to zero, they are called basic solutions
• Some of them were basic feasible solutions• Any solution in polygon is a feasible solution• Variables not set to zero are basic variables• Variables set to zero = non-basic variables
29
Canonical form Ex 8.4 & TABLEAU
30
124
1
14
1
114
1
28
116
521
421
321
xxx
xxx
xxx
basis
Ex 8.4 cont’d
31
0,,124
543
2
1
xxxxx
Pivot row
Pivot column
Method?
1. Set up LP prob in “tableau”2. Select variable to leave basis3. Select variable to enter basis (replace the one
that is leaving)4. Use Gauss-Jordan elimination to form
identity sub-matrix, (i.e. new basis, identity columns)
5. Repeat steps 2-4 until opt sol’n is found!
32
Can we be efficient?
• Do we need to calculate all the combinations?• Is there a more efficient way to move from
one vertex to another?• How do we know if we have found the opt
solution, or need to calculate another tableau?
SIMPLEX METHOD! (Next class)
33
Summary• Curve fit = min Sum Squared Errors
Min SSE, check R
• Many important LP problems• LP probs are “convex prog probs”• Need to transform into Std LP format
slack, surplus variables, non-negative b and x
• Polygon surrounds infinite # of sol’ns• Opt solution is on a vertex• Must find combinations of basic variables
34