Title: BASIC CONCEPTS IN OPTIMIZATION: PART III: Continuous
1BASIC CONCEPTS IN OPTIMIZATION PART III
Continuous Constrained
Important concepts for the optimization of
systems with continuous variables and non-linear
equations. We will extend the coverage in Basics
II by adding constraints.
- Convert to Unconstrained - Penalty functions
- Concept of Equality Constrained Optimization
- - linear equalities / non-linear equalities /
Lagrangian - Concept of Inequality Constrained Optimization
- - definition of optimum / Lagrangian
- Optimality Conditions - KKT
2CONSTRAINED OPTIMIZATION
CLASS EXERCISE Is this system constrained or
unconstrained?
- The goal is to maximize CB in the effluent at
S-S - You can adjust only the flow rate of feed
- This is an isothermal CFSTR with the reaction
- A ? B ? C
- You can adjust F, CA0
- You can adjust F, CA0, Fc, and V
Before we solve it, can we recognize it?
3CONSTRAINED OPTIMIZATION
CLASS EXERCISE Is this system constrained or
unconstrained?
Optimization of XD and XB - energy/yield
tradeoff can be unconstrained in some situations
Increasing energy
XB, impurity
0
0
XD, impurity
Why might this be constrained?
4CONSTRAINED OPTIMIZATION
CLASS EXERCISE Is this system constrained or
unconstrained?
Optimization of XD and XB - energy/yield
tradeoff can be unconstrained in some situations
Reboiled vapor
pressure
Please explain the constraints. We need to model!
5CONSTRAINED OPTIMIZATION
CLASS EXERCISE Is this system constrained or
unconstrained?
Optimization of XD and XB - energy/yield
tradeoff can be unconstrained in some situations
Reboiled vapor
pressure
Now, where should we operate?
6Constrained Optimization Convert to Unconstrained
HARD SOFT CONSTRAINTS Convert inequality
constraints to terms in the objective function
that force the solution into (at least towards)
the feasible region.
The penalty parameter, r, can be adjusted using
an iterative method.
7Constrained Optimization Convert to Unconstrained
feasible
External Penalty Functions change the objective
in the infeasible region. For example,
F(x)
P(x)
Increasing r
x
8Constrained Optimization Convert to Unconstrained
- The power of violation lt 1, likely too weak a
penalty - The power of violation 1, can match
unconstrained optimum, but discontinuous
derivatives - The power of violations gt 1, (usually 2)
continuous derivatives
External Penalty Functions
9Constrained Optimization Convert to Unconstrained
Increasing r
Internal Penalty Functions change the objective
in the feasible region. For example,
F(x)
P(x)
feasible
x
10Constrained Optimization Convert to Unconstrained
Internal Penalty Functions
- Requires a feasible starting point and cannot
have infeasible point at any iteration - Constraints should be normalized to equally
penalize - Must modify r during iterations
11Constrained Optimization Convert to Unconstrained
CLASS EXERCISE Convert the following constrained
optimization to an unconstrained optimization.
A ? B ? C
12Constrained Optimization Convert to Unconstrained
CLASS EXERCISE This solution applies the
external penalty function, r.
13Constrained Optimization Convert to Unconstrained
- The penalty can strongly distort the contours, so
it is not typically used to convert the
constrained to unconstrained problem. - However, we will use these concepts in some
algorithms.
14EQUALITY CONSTRAINED
From Reklaitis et al, 1983
15EQUALITY CONSTRAINED
From Reklaitis et al, 1983
16EQUALITY CONSTRAINED
From Reklaitis et al, 1983
17EQUALITY CONSTRAINED
From Reklaitis et al, 1983
18INEQUALITY CONSTRAINED
INEQUALITY 5-X1-X2gt0
From Reklaitis et al, 1983
19INEQUALITY CONSTRAINED
From Reklaitis et al, 1983
20Constrained Optimization Basic Concepts
GENERAL CONCEPT FOR EQUALITY CONSTRAINED
OPTIMIZATION The constraints introduce
limitations on the allowable moves in the
variables (?x). For equality constrained
problems, the moves must remain on the curve of
the constraint.
Equality constraint
- f(x) 2.2 (x1)- 3( x1)2 .45 (x2)
- - .11 (x2)2
- How many DOF?
- How do we determine the gradient of profit?
x2
Can we move in this direction?
x1
21Equality Constrained Optimization Convert to
Unconstrained
x is a vector of variables (flows, compositions,
etc. ) It has a dimension n.
Dimension n-m
Dimension m
- If we have n variables and m (independent)
EQUALITY constraints, we have n-m degrees of
freedom for optimization. - We can solve the equations analytically to
eliminate m of the variables.
22Equality Constrained Optimization Convert to
Unconstrained
y is a vector of variables (flows, compositions,
etc. It has a dimension n-m. After solving for
y, we can solve for z Z(y)
- We must be able to analytically solve for z as a
function of y and substitute these into the
original problem. - This is always possible for linear equations, not
so for non-linear equations.
23Equality Constrained Optimization Convert to
Unconstrained
CLASS EXERCISE Convert the following constrained
optimization to an unconstrained optimization and
solve.
24Equality Constrained Optimization Convert to
Unconstrained
CLASS EXERCISE Start by eliminating one variable
using the linear equation.
25Equality Constrained Optimization Non-Linear
equalities
The total derivative of the objective function is
why?
The total derivative of the constraint must be
zero.
How can we use these results to determine the
constrained derivative?
26Equality Constrained Optimization Non-Linear
equalities
Rearrange the constraint equation to solve for
dx1 (we could have solved for dx2).
The derivatives are evaluated at a point (x1,
x2) dh/dx2 ? 0
This is the relationship between x1 and x2 that
is forced by the equality constraint at a
specific point.
27Equality Constrained Optimization Non-Linear
equalities
Replace with result from constrained change
Directional derivative or reduced gradient is
derivative while observing the equality
constraint(s) at a point
28Equality Constrained Optimization Non-Linear
equalities
All points on this curve satisfy h0
f
x1
NECESSARY CONDITION FOR OPTIMALITY From the basic
concept of optimality, the directional or reduced
gradient must be zero for a minimum. (This is
not sufficient).
29Equality Constrained Optimization Non-Linear
equalities
CLASS EXERCISE Express the necessary condition
for the equality constrained minimum of the
following problem.
30Equality Constrained Optimization Non-Linear
equalities
CLASS EXERCISE The method finds a search
direction that approximately remains on the
equality constraint.
How far should we go in this direction?
31Equality Constrained Optimization Non-Linear
equalities
CLASS EXERCISE The method finds a search
direction that approximately remains on the
equality constraint.
How far should we go in this direction?
f(x)
h0
32Equality Constrained Optimization Non-Linear
equalities
GENERALIZE THE CONDITION FOR A MINIMUM FOR MANY
EQUALITY CONSTRAINTS AND MANY VARIABLES.
These are the same conditions we have used
previously, but they are in a reduced space of
moves in x that satisfy h(x)0.
33Equality Constrained Optimization Lagrangian
Lets reconsider the equality constrained problem.
Necessary conditions
34Equality Constrained Optimization Lagrangian
The stationarity for the equality constrained
problem
Identical!
Can be restated as the stationarity of the
Lagrangian
Identical!
35Equality Constrained Optimization Lagrangian
The stationarity for the equality constrained
problem occurs at the same values of x as the
stationarity of the Lagrangian!
Definition
Stationarity
? is the Lagrange multiplier its value is
determined by the stationarity conditions.
36Equality Constrained Optimization Lagrangian
CLASS EXERCISE Express the necessary condition
for the equality constrained minimum of the
following problem using Lagrange multipliers.
37Equality Constrained Optimization Lagrangian
CLASS EXERCISE Determine the stationarity
equations.
These non-linear equations define the
stationarity point x1 -2.77 x2 -4.155 ?
0.36
Note, no sign limitation of the Lagrange
multiplier
38Constrained Optimization Lagrangian
How can we interpret the Lagrange multiplier?
Original problem with rhs isolated
Lagrangian
Stationarity or necessary conditions
39Constrained Optimization Lagrangian
Lets simplify to two x variables and one
equality
A
B
Multiply B by ? and subtract from A.
What is the result if we evaluate this at the
stationary point?
40Constrained Optimization Lagrangian
No sign restriction on ?
The Lagrange multiplier is the sensitivity of the
objective to the rhs - at the optimum!
41Constrained Optimization Basic Concepts
GENERAL CONCEPT FOR INEQUALITY CONSTRAINED
OPTIMIZATION
feasible
feasible
When the constraints are not active, no change.
What is the condition when a constraint is active?
42Constrained Optimization Basic Concepts
QUICK REVIEW FOR UNCONSTRAINED Basic Definition
The general definition of a minimum of f(x) is x
is a minimum if f(x) ? f(x ?x) for small ??x
43Inequality Constrained Optimization Basic
Concepts
FOR INEQUALITY CONSTRAINED Basic Definition For
a minimum, all feasible points around the minimum
have objective values higher than at the minimum.
x2
feasible
x1
44Inequality Constrained Optimization Basic
Concepts
FOR INEQUALITY CONSTRAINED
What goes here? , ? , ?
What limitations are placed on the ?x vector?
45Inequality Constrained Optimization Basic
Concepts
FOR INEQUALITY CONSTRAINED
For minimizing
Restrict the ?x vector to feasible directions.
46Inequality Constrained Optimization Basic
Concepts
CLASS EXERCISE Graphically represent the
conditions for the optimum of the system sketched
below.
47Inequality Constrained Optimization Basic
Concepts
We want to extend the Lagrangian for inequality
constraints to formulate optimality
conditions. 1. Convert inequalities to equalities
by adding slacks 2. Define a Lagrangian that
combines the objective and constraints 3. Find
stationarity conditions for this unconstrained
Lagrangian
48Inequality Constrained Optimization Basic
Concepts
Original problem statement
Lagrangian with u Lagrange multipiers
49Inequality Constrained Optimization Basic
Concepts
The stationarity for the inequality constrained
problem occurs at the stationarity of the
Lagrangian!
Definition
Stationarity
50Inequality Constrained Optimization Basic
Concepts
Discuss the interpretation of Lagrange multiplie
rs
- These are the complementarity conditions.
- When gj(x)gt 0 inactive, its Lagrange multiplier
uj 0 - When gj(x) 0 active, its Lagrange
multiplier uj gt 0
51 General Constrained Optimization The Lagrangian
Objective function
Equality constraints
Inequality constraints
x Problem variables (vector) ? Lagrange
multipliers for equalities (vector) u Lagrange
multipliers for inequalities (vector)
52 General Constrained Optimization The Lagrange
multipliers
? Lagrange multipliers for equalities
Shadow price for the constraint u Lagrange
multipliers for inequalities Shadow price
for the active constraints
Complementarity conditions
53 General Constrained Optimization Stationarity
- We note the following important properties
- We have transformed a constrained to an
unconstrained problem with variable bounds - L(x, ?, u) f(x) for feasible x
- A local minimum of L(x, ?, u) occurs at the
local minimum of f(x) thus, we determine the
x and the sensitivities of the constraints, ?,
u
54 General Constrained Optimization Stationarity
Necessary sufficient conditions for optimality
(ga(x)active)
Stationarity Curvature
55General Constrained Optimization
Karesh-Kuhn-Trucker Conditions
Necessary sufficient conditions for optimality
(ga(x)active)
Stationarity curvature
56General Constrained Optimization
Karesh-Kuhn-Trucker Conditions
CLASS EXERCISE What is the meaning of the
requirement that the Lagrange multipliers are
positive?
57General Constrained Optimization
Karesh-Kuhn-Trucker Conditions
CLASS EXERCISE Determine the necessary
conditions for a minimum in the following problem.
58General Constrained Optimization
Karesh-Kuhn-Trucker Conditions
- The preceding necessary and sufficient
conditions are a form of the famous
Karesh-Kuhn-Trucker (KKT) Conditions for
optimality. - The functions must be twice continuously
differentiable - The active constraints must be linearly
independent at the optimum - The result defines a local minimum
59Constrained Optimization Basic Concepts
- Using the Lagrangian to design NLP solvers.
- We will apply the concepts of the unconstrained
optimizers to L. - However, we must be careful about measuring
progress, because L k1 lt Lk ensures that P k1
lt Pk only if the points are feasible. - Our methods must ensure feasibility (for a
non-linear system) or devise a measure of
improvement (merit) that distorts the geometry
to create min(L) min P at the same x.