# Constrained optimisation

Post on 24-May-2015

220 views

Embed Size (px)

TRANSCRIPT

<ul><li> 1. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin1Ref:Seider, Seader and Lewin (2003), Chapter 18054402 Design and Analysis IILECTURE NINEConstrained Optimization(Flowsheet Optimization) </li></ul>
<p> 2. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin2OBJECTIVESOn completion of this course unit, you are expected to be able to:Formulate and solve a linear program (LP)Formulate a nonlinear program (NLP) to optimize a process using equality and inequality constraintsBe able to optimize a process using HYSYS beginning with the results of a steady- state simulation 3. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin3THE NONLINEAR PROGRAM (NLP)Formulation begins with the steady-state simulation of the process flowsheet, for a nominal set of specifications or design variables: NV= NE+ NDThe NDdesign variables are first set using heuristics, and latter adjusted to better achieve design objectives (optimized)During this process, the models used are improved and refined, property prediction methods tuned, and profitability measures are computedThe NLP is then formulated, consisting of:Objective function to be minimizedSubject to: equality and inequality constraints 4. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin4OBJECTIVE FUNCTIONCandidates for the measure of goodness of a design, f(d), where dis a vector of NDdesign variables are approximate profitability measures:ROI Return of Investment (max)VP Venture Profit (max)PBP Payback period (min)CA-Annualized Cost (min) or more rigorous measuresNPV Net present value (max) IRR Investors rate of return (max) 5. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin5EQUALITY/INEQUALITY CONSTRAINTSIn process simulators, most of the equalityconstraints, c{x} = 0,are the model equations relating to M&E balances. These are not stated explicitly, but are invoked as each unit operation is installed on the flowsheetSome equality constraints are due to performance specifications (e.g., 95% recovery of species i in the distillate flow: xiD -0.95ziF = 0)A major advantage of using simulators is the ease with which inequalityconstraints, g{x} 0, can be introduced, to bound the feasible region of operation (e.g., at least 95% recoveryis specified by: xiD -0.95ziF 0) 6. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin6Minimizef{x} dsubjecttoc{x}=0g{x}0xL xxUTHE NONLINEAR PROGRAM (NLP) equality constraintsinequality constraintsobjective functiondesign variablesThe NDdesign variables, d, are adjusted to minimize f{x} while satisfying the constraints 7. 7 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9NONLINEAR INEQUALITY CONSTRAINTS Consider the quadratic objective: The maximum is found by differentiation:2f a0 a1x a2xSlack constraint Binding constraint211 2 20 2aaa a x xdxdf opt 8. 8 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9LINEAR INEQUALITY CONSTRAINTS Consider the linear objective:f a0 a1x Now consider the constraint: x xNo solution ! Solution onconstraint 9. 9 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9 vvvNi ii=1i VNij j i Ej=1Nij j i Ij=1MinimizeJ x f xdSubject to (s.t.) x 0,i 1, ,Na x b,i 1, ,Nc x d,i 1, ,NLINEAR PROGRAMING (LP)equality constraintsinequality constraintsobjective functiondesign variables The ND design variables, d, areadjusted to minimize f{x} whilesatisfying the constraints 10. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin10EXAMPLE LP GRAPHICAL SOLUTIONA refinery produces two crude oils, with yields as below.Volumetric YieldsMax. ProductionCrude #1Crude #2(bbl/day)Gasoline70316,000Kerosene692,400Fuel Oil246012,000The profit on processing each grade is: $2/bbl for Crude #1 and $1.4/bbl for Crude #2.a)What is the optimum daily processing rate for each grade?b)What is the optimum if 12,000 bbl/day of gasoline is needed? 11. 11 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9EXAMPLE LP SOLUTION (Contd)Step 1. Identify the variables. Let x1 and x2 be the dailyproduction rates of Crude #1 and Crude #2.Step 2. Select objective function. We need tomaximize profit: 1 2 J x 2.00x 1.40xStep 3. Develop models for process and constraints.Only constraints on the three products are given:Step 4. Simplification of model and objective function.Equality constraints are used to reduce the number ofindependent variables (ND = NV NE). Here NE = 0. 1 21 21 20.70x 0.31x 6,0000.06x 0.09x 2,4000.24x 0.60x 12,000 12. 12 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9EXAMPLE LP SOLUTION (Contd)Step 5. Compute optimum.a) Inequality constraints define feasible space. 1 2 0.70x 0.31x 6,000 1 2 0.06x 0.09x 2,400 1 2 0.24x 0.60x 12,000Feasible Space 13. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin13EXAMPLE LP SOLUTION (Contd)Step 5. Compute optimum.b)Constant J contours are positioned to find optimum.J = 10,000J = 20,000J = 27,097x1= 0, x2= 19,355 bbl/day 14. 14 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9EXAMPLE LP SOLUTION (Contd)Step 5. Compute optimum - Gasoline demand doubles.1 2 0.70x 0.31x 12,000J = 20,000J = 30,000J = 42,500x1 = 10,069 bbl/day, x2 = 15,972 bbl/day 1 2 0.70x 0.31x 6,000 15. 15 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9Minimize f{x}dSubject to: c{x} = 0g{x} 0xL x xUSUCCESSIVE QUADRATIC PROGRAMMINGThe NLP to be solved is:1. Definition of slack variables: gi x zi2 0,i 1,,m2. Formation of Lagrangian:Lx ,,,z f x T c x T g x z 2 Lagrange multipliersKuhn-Tucker multipliers 16. 16 DESIGN AND ANALYSIS II - (c) Daniel R. Lewin Optimization - 9SUCCESSIVE QUADRATIC PROGRAMMING2. Formation of Lagrangian:Lx ,,,z f x T c x T g x z 2 3. At the minimum: L 0 02 0 0, 1, ,0 (definition)002 L z g i mL g x zL c xL f x c x g xz i i i iXTXTX XiComplementary slackness equations:either gi = 0 (constraint active)or i = 0 (gi < 0, constraint slack)Jacobian matrices 17. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin17OPTIMIZATION ALGORITHMx*w{d, x*} Tear equations: h{d, x*} = x* -w{d, x*} = 0 18. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin18Minimizef{x,d} dSubjectto:h{x*,d}=x*-w{x*,d}=0c{x,d}=0g{x}0xL xxUOPTIMIZATION ALGORITHMequality constraintsinequality constraintsobjective functiondesign variablestear equations 19. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin19REPEATED SIMULATIONMinimizef{x,d} dS.t.h{x*,d}=x*-w{x*,d}=0c{x,d}=0g{x}0xL xxUSequential iteration of wand d(tear equations are converged each master iteration). 20. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin20INFEASIBLE PATH APPROACH (SQP) Minimizef{x,d} dS.t.h{x*,d}=x*-w{x*,d}=0c{x,d}=0g{x}0xL xxUBoth wand dare adjusted simultaneously, with normally only one iteration of the tear equations. 21. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin21COMPROMISE APPROACH (SQP) Minimizef{x,d} dS.t.h{x*,d}=x*-w{x*,d}=0c{x,d}=0g{x}0xL xxUTear equations converged loosely for each master iteration 22. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin22PRACTICAL ASPECTSDesign variables, need to be identified and kept free for manipulation by optimizere.g., in a distillation column, reflux ratio specification and distillate flow specification are degrees of freedom, rather than their actual values themselvesDesign variables should be selected AFTER ensuring that the objective function is sensitive to their valuese.g., the capital cost of a given column may be insensitive to the column feed temperatureDo not use discrete-valued variables in gradient- based optimization as they lead to discontinuities in f(d) 23. 9 - OptimizationDESIGN AND ANALYSIS II -(c) Daniel R. Lewin23Constrained Optimization -SummaryOn completion of this course unit, you are expected to be able to:Formulate and solve an LP using MATLAB, and for a system involving two decision variables, graphically.Create a nonlinear program (NLP) to optimize a process using equality and inequality constraintsBe able to optimize a process using HYSYS beginning with the results of a steady-state simulation To work efficiently, it is recommended that sensitivity analysis on the objective function and constraints be carried before invoking the automated NLP solvers. This will ensure correct initialization of solver.</p>

Recommended

View more >