l13 optimization using excel see revised schedule read 8(1-4) + excel “help” for mar 12 test...

22
L13 Optimization using Excel • See revised schedule read 8(1-4) + Excel “help” for Mar 12 • Test Answers • Review: Convex Prog. Prob. • Worksheet modifications • Excel optimization • Summary 1

Upload: willis-casey

Post on 11-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

L13 Optimization using Excel

• See revised scheduleread 8(1-4) + Excel “help” for Mar 12

• Test Answers• Review: Convex Prog. Prob.• Worksheet modifications• Excel optimization• Summary

1

Page 2: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Trendline in Excel

2

Excel help

“trendline”

for Wed

Page 3: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Theorem 4.9

3

}to1,0)(g; to1for,0)(|{

SetConstraint

j mjpihS i

xxx

Given:

S is convex if:1. hi are linear2. gj are convex i.e. Hg PD or PSD

When f(x) and S are convex= “convex programming problem”

Page 4: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

“Sufficient” Theorem 4.10, pg 165

4

The first-order KKT conditions are Necessary and Sufficient for a GLOBAL minimum….if:

1. f(x) is convexHf(x) Positive definite

2. x is defined as a convex feasible set SEquality constraints must be linearInequality constraints must be convex

HINT: linear functions are convex!

Page 5: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Worksheet Modifications

• Naming cells• Inserting shapes• Inserting MS Equation “object”• Recording macros• Attaching a macro to a shape• Creating a SOLVER hot button• Visual basic, tools/references/solver

5

Page 6: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

6

Figure 6.1 Excel worksheet for finding roots of 2x/3 – sin x : (a) worksheet; (b) worksheet with formulas showing.

Excel Applications

Page 7: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Solver parameters

7

Figure 6.2 A Solver Parameters dialog box to define the problem.

Page 8: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

8

Figure 6.3 A Solver Results dialog box and the final worksheet.

Page 9: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

9

Figure 6.4 A Solver Answer Report for roots of 2x/3 – sin x = 0.

Page 10: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

10

Figure 6.5 Worksheet and Solver Parameters dialog box for KKT conditions for Example 4.31.

Page 11: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

11

Figure 6.6 Solver Results for KKT conditions for Example 4.31.

Page 12: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

KKT system of NL EQNs

Prob 4.59 and 4.122

12

Page 13: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

13

Figure 6.7 Excel worksheet and Solver Parameters dialog box for unconstrained problem.

Page 14: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Constrained Optimization

Prob. 4.69 and 4.122

14

4

13subject to

)3()3(),(

21

21

22

2121

xxg

xxh

xxxxfMin

Page 15: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Graphical Solution

15

21

125.500

075.025.175.025.3

2

1

fsu

xx

Page 16: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

16

Figure 6.8 Excel worksheet for the linear programming problem.

Page 17: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

17

Figure 6.9 Solver Parameters dialog box for the linear programming problem.

Page 18: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

18

Figure 6.10 Solver Results dialog box for the linear programming problem.

Page 19: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

19

Figure 6.11 Answer Report from Solver for linear programming problem.

Page 20: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

20

Figure 6.12 Sensitivity Report from Solver for the linear programming problem.

Page 21: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

21

Figure 6.13 Excel worksheet for the spring design problem.

Page 22: L13 Optimization using Excel See revised schedule read 8(1-4) + Excel “help” for Mar 12 Test Answers Review: Convex Prog. Prob. Worksheet modifications

Summary• KKT pt from a Convex Prog. Prob. Is a

global min!• Use modifications for “ease of use”• Pay attention to layout

– Design variables– Parameters– Analysis/Performance “Variables”– Objective function– Constraints

• May need multiple starting points22