Optimality conditions for constrained local optima, Lagrange multipliers and their use for sensitivity of optimal solutions Today’s lecture is on optimality.

Slides:



Advertisements
Similar presentations
Optimality conditions for constrained local optima, Lagrange multipliers and their use for sensitivity of optimal solutions.
Advertisements

Optimization with Constraints
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Geometry and Theory of LP Standard (Inequality) Primal Problem: Dual Problem:
Engineering Optimization
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Page 1 Page 1 ENGINEERING OPTIMIZATION Methods and Applications A. Ravindran, K. M. Ragsdell, G. V. Reklaitis Book Review.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Lagrange Multipliers OBJECTIVES  Find maximum and minimum values using Lagrange.
Slide Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Lecture 8 – Nonlinear Programming Models Topics General formulations Local vs. global solutions Solution characteristics Convexity and convex programming.
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
Separating Hyperplanes
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
EE 553 Introduction to Optimization
Optimization in Engineering Design 1 Lagrange Multipliers.
Numerical Optimization
Optimization using Calculus
Engineering Optimization
15 PARTIAL DERIVATIVES.
Constrained Optimization
Constrained Optimization Rong Jin. Outline  Equality constraints  Inequality constraints  Linear Programming  Quadratic Programming.
Design Optimization School of Engineering University of Bradford 1 Formulation of a design improvement problem as a formal mathematical optimization problem.
Unconstrained Optimization Problem
MAE 552 – Heuristic Optimization Lecture 1 January 23, 2002.
D Nagesh Kumar, IIScOptimization Methods: M2L5 1 Optimization using Calculus Kuhn-Tucker Conditions.
5.6 Maximization and Minimization with Mixed Problem Constraints
1 Optimization. 2 General Problem 3 One Independent Variable x y (Local) maximum Slope = 0.
Constrained Optimization Rong Jin. Outline  Equality constraints  Inequality constraints  Linear Programming  Quadratic Programming.
Tier I: Mathematical Methods of Optimization
Lecture 9 – Nonlinear Programming Models
KKT Practice and Second Order Conditions from Nash and Sofer
1 The Role of Sensitivity Analysis of the Optimal Solution Is the optimal solution sensitive to changes in input parameters? Possible reasons for asking.
Linear Programming - Standard Form
Machine Learning Week 4 Lecture 1. Hand In Data Is coming online later today. I keep test set with approx test images That will be your real test.
Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253.
Survey of gradient based constrained optimization algorithms Select algorithms based on their popularity. Additional details and additional algorithms.
Nonlinear Programming Models
EASTERN MEDITERRANEAN UNIVERSITY Department of Industrial Engineering Non linear Optimization Spring Instructor: Prof.Dr.Sahand Daneshvar Submited.
D Nagesh Kumar, IIScOptimization Methods: M2L4 1 Optimization using Calculus Optimization of Functions of Multiple Variables subject to Equality Constraints.
Optimization unconstrained and constrained Calculus part II.
L8 Optimal Design concepts pt D
(iii) Lagrange Multipliers and Kuhn-tucker Conditions D Nagesh Kumar, IISc Introduction to Optimization Water Resources Systems Planning and Management:
Introduction to Optimization
Optimization and Lagrangian. Partial Derivative Concept Consider a demand function dependent of both price and advertising Q = f(P,A) Analyzing a multivariate.
Nonlinear Programming In this handout Gradient Search for Multivariable Unconstrained Optimization KKT Conditions for Optimality of Constrained Optimization.
Copyright © Cengage Learning. All rights reserved. Applications of Differentiation.
Copyright © Cengage Learning. All rights reserved. 14 Partial Derivatives.
1 Introduction Optimization: Produce best quality of life with the available resources Engineering design optimization: Find the best system that satisfies.
Operations Research By: Saeed Yaghoubi 1 Graphical Analysis 2.
OR II GSLM
D Nagesh Kumar, IISc Water Resources Systems Planning and Management: M2L2 Introduction to Optimization (ii) Constrained and Unconstrained Optimization.
Optimal Control.
1 Support Vector Machines: Maximum Margin Classifiers Machine Learning and Pattern Recognition: September 23, 2010 Piotr Mirowski Based on slides by Sumit.
Bounded Nonlinear Optimization to Fit a Model of Acoustic Foams
Chapter 11 Optimization with Equality Constraints
Module E3-a Economic Dispatch.
3-3 Optimization with Linear Programming
Part 3. Linear Programming
The Lagrange Multiplier Method
Optimization Problems
PRELIMINARY MATHEMATICS
Linear Programming Example: Maximize x + y x and y are called
Copyright © Cengage Learning. All rights reserved.
EE 458 Introduction to Optimization
Part 3. Linear Programming
Multivariable optimization with no constraints
EE/Econ 458 Introduction to Optimization
Constraints.
Presentation transcript:

Optimality conditions for constrained local optima, Lagrange multipliers and their use for sensitivity of optimal solutions Today’s lecture is on optimality conditions for local constrained optima. An important by product of these conditions are Lagrange multipliers. These are sometimes called “shadow prices’ because they can be used to assess the price of constraints. More generally, they allow us to estimate the derivative of the optimum objective with respect to changes in problem parameters. Much of the material in this lecture is from Chapter 5 of Haftka and Gurdal’s Elements of Structural Optimization. From Wikipedia: Joseph-Louis Lagrange (born Giuseppe Lodovico Lagrangia [1][2][3] (also reported as Giuseppe Luigi Lagrangia [4]), 25 January 1736 in Turin, Piedmont; died 10 April 1813 in Paris) was an Italian Enlightenment Era mathematician and astronomer. He made significant contributions to all fields of analysis, number theory, and both classical and celestial mechanics.

Constrained optimization Inequality constraints x2 g2(x) g1(x) Infeasible regions Optimum Consider first the case of only inequality constraints. The figure shows the contours of the objective function and the boundaries of two constraints that are depicted linear for simplicity. Three of the four regions defined by the constraint boundaries are infeasible. Two correspond to one constraint being violated and one region where both are violated. In the feasible domain, it is clear that the optimum is found at the intersection of two constraints. Indeed as we saw in linear programming, for a problem of n variables, the optimum is at a vertex where n constraints intersect. When the problem is nonlinear, this does not necessarily happen, but it often does. Decreasing f(x) x1 Feasible region

Equality constraints We will develop the optimality conditions for equality constraints and then generalize them for inequality constraints Give an example of an engineering equality constraint. In engineering optimization, inequality constraints are much more common than equality constraints, but it will be convenient to develop the optimality conditions for equality constraints first.

Lagrangian and stationarity Lagrangian function where j are unknown Lagrange multipliers Stationary point conditions for equality constraints: The trick for obtaining the optimality conditions is to add to the objective function a linear combination of the equality constraints, with the coefficients known as Lagrange multipliers. The combined function is called the Lagrangian. Then necessary conditions for stationarity are that the derivatives of the Lagrangian with respect to the design variables are equal to zero. The derivatives with resepct to the Lagrange multipliers are also zero, because they are the equality constraints. Altogether this gives us n+ne equations for n+ne unknowns.

Example Quadratic objective and constraint Lagrangian Stationarity conditions Four stationary points As an example we will use a quadratic objective function and a quadratic constraint that requires the design to be on a circle with radius 10 and center at the origin. Since the objective function prefers x1 to x2, the minimum may be expected for high x1 and low x2. Creating the Lagrangian and taking the derivatives with respect to x1, x2, and lambda, we get three equations, with the last being the constraint equations. The first two equations will produce contradictory values for lambda if both x1 and x2 are non-zero. That indicates that a minimum will be obtained when x2=0 and a maximum when x1=0. Since all the terms are quadratic, we can change the sign of x1 or x2 without changing the results. These correspond to moving 180-deg around the circle.

Problem Lagrange multipliers Solve the problem of minimizing the surface area of a cylinder of given value V. The two design variables are the radius and height. The equality constraint is the volume constraint.

Inequality constraints Inequality constraints require transformation to equality constraints: This yields the following Lagrangian: Why is the slack variable squared? To deal with inequality constraints we convert them to equality constraints by adding a slack tj and squaring it. If we did not square it, we would have needed to add a constraint that it is positive, which would add another inequality constraint. The square guarantees that the original constraint is satisfied. Now the Lagrangian function has n+2ng variables, since each constraint has a Langrange multiplier and a slack variable.

Karush-Kuhn-Tucker conditions Conditions for stationary points are then: If inequality constraint is inactive (t ≠ 0) then Lagrange multiplier = 0 For minimum, non-negative multipliers The conditions for a minimum obtained by differentiating the Lagrangian were first published in 1951 by two Princeton math professors, Harold Kahn and Albert Tucker. Later it was found that Wiliam Karush who became professor at Cal State Northridge had them in his MS thesis in 1939. Differentiating with respect to the design variables and the Lagrange multipliers yields similar results to the case of equality constraints. However differentiating with respect to the slack variables yields the important result that if the Lagrange multiplier is non zero the slack variable must be zero, hence the constraint must be active. This conditions is often called the constraint qualification condition. Later on we will see that the Lagrange multipliers are the price of the constraints. That is they give you the cost in the objective function of making the constraint more demanding by one unit. For a minimum, making the constraint more demanding cannot decrease the objective function, so the Lagrange multiplier must be non-negative.

Convex problems Convex optimization problem has convex objective function convex feasible domain if the line segment connecting any two feasible points is entirely feasible. All inequality constraints are convex (or gj = convex) All equality constraints are linear only one optimum Karush-Kuhn-Tucker conditions necessary and will also be sufficient for global minimum Why do the equality constraints have to be linear? As in the unconstrained case, if we have a convex problem we will have only one local optimum, which is then the global optimum. Only convexity is more complicated. We need to have a convex objective function and a convex feasible domain. The feasible domain is convex if the line segment connecting any two feasible points is entirely feasible. This will happen if all the inequality constraints are convex and all the equality constraints are linear. Then the KKT conditions are also sufficient for a global optimum.

Example extended to inequality constraints Minimize quadratic objective in a ring Is feasible domain convex? Example solved with fmincon using two functions: quad2 for the objective and ring for constraints (see note page) We replace the equality constraint in Slide 5 that limited the feasible domain to a circle to a ring with inner radius of 10 and outer radius of 20. The solution will stay the same, since we minimize the objective, it will want to go to the inner ring. We will solve with fmincon using the script below: function f=quad2(x) f=x(1)^2+10*x(2)^2; end function [c,ceq]=ring(x) global ri ro c(1)=ri^2-x(1)^2-x(2)^2; c(2)=x(1)^2+x(2)^2-ro^2; ceq=[]; End global ri,ro x0=[1,10];ri=10.; ro=20; [x,fval,exitflag,output,lambda]=fmincon(@quad2,x0,[],[],[],[],[],[],@ring)

Message and solution Warning: The default trust-region-reflective algorithm does not solve …. FMINCON will use the active-set algorithm instead. Local minimum found …. Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints are satisfied to within the default value of the constraint tolerance. x =10.0000 -0.0000 fval =100.0000 lambda = lower: [2x1 double] upper: [2x1 double] eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] lambda.ineqnonlin’=1.0000 0 What assumption Matlab likely makes in selecting the default value of the constraint tolerance? The output from fmincon first warns us that it has to switch from its default algorithm to another, which at this point we will ignore. It also tells us that it satisfied convergence criteria based on lack of progress on the objective function and constraint satisfaction. In both cases, this is based on tolerances that we can change with the optimset function, but since we did not, it is warning us that it used the default tolerances. For example, the constraint satisfaction tolerance is 1e-6, which may be good if the constraint is normalized, but may be too strict if the constraint is on stresses with values in the million s. With the calling sequence we had, it gives us the objective function value of 100 and the optimum x at (10,0), and it also tells us that it created a data structure lambda that has all the Lagrange multipliers, and it tells us their names so that we can display them if needed. “lower” and “upper” refers to lower and upper limits on the design variables, that it creates even if we did not. There are no equality constraints or linear inequality constraints, so these are empty. The last command displays the Lagrange multipliers for the nonlinear constraint, and we get the 10 for the inner circle and 0 for the inactive constraint on the outer circle.

Problem inequality Solve the problem of minimizing the surface area of the cylinder subject to a minimum value constraint as an inequality constraint. Do also with Matlab by defining non-dimensional radius and height using the cubic root of the volume.

Sensitivity of optimum solution to problem parameters Assuming problem objective and constraints depend on parameter p The optimum solution is x*(p) The corresponding function value f*(p)=f(x*(p),p) The Lagrange multipliers are useful when we want to estimate how a change in a problem parameter will affect the result of the objective function. So, for example, if we minimize the weight of a structure subject to stress constraints, we may want to get an estimate of how much weight we will save if we increase the stress limit by going to a better grade of material. So we now formulate an optimization problem that depends on some input parameter p, so that the optimum design x* is a function of p and the function value at the optimum f* is also a function of p. We want to calculate the derivative of f* with respect to p.

Sensitivity of optimum solution to problem parameters (contd.) We would like to obtain derivatives of f* w.r.t. p After manipulating governing equations we obtain Lagrange multipliers called “shadow prices” because they provide the price of imposing constraints Why do we have ordinary derivative on the left side and partial on the right side? Doing a bit of algebra one can show that the derivative of the optimum objective f* with respect to the parameter obeys the equation in the slide. There are two special cases that are worth noting. When only the objective function depends on the parameter, it is remarkable that the derivative is equal to the partial derivative. That means, that the effect of the optimum position x* is also a function of p can be neglected. When p is the bound on a single constraint. That is when the constraint can be written as g(x)-p<=0. In that case, the derivative of f* with respect to p is equal to the Lagrange multiplier of that constraint, which is why the Lagrange multipliers are called shadow prices.

Example A simpler version of ring problem For p=100 we found Here it is easy to see that solution is Which agrees with Since the outer circle constraint was not active for the ring problem, we drop it for this example. If we make p be the square of the radius of the circle, then we calculated that for p=100 the Lagrange multiplier was equal to 1. This means that the derivative of the optimum objective with respect to p is equal to 1. This is easily verified, since for any value of p we get that the optimum is at x*2=0 and x*1=sqrt(p), so f*(p)=p.

Problems sensitivity of optima For find the optimum for p=0, estimate the derivative df*/dp there, and check by solving again for p=0.1 and comparing to finite difference derivative Check in a similar way the derivative of the surface area with respect to 1% change in volume (once from the Lagrange multiplier, and once from finite difference of exact solution).