Está en la página 1de 95

Course notes for EE394V

Restructured Electricity Markets:


Locational Marginal Pricing
Ross Baldick
Copyright
c 2011 Ross Baldick

Title Page ◭◭ ◮◮ ◭ ◮ 1 of 95 Go Back Full Screen Close Quit


2
Optimization

(i) Definition of optimization problem,


(ii) Linear programming,
(iii) Quadratic programming,
(iv) Non-linear programming,
(v) Convexity,
(vi) Duality,
(vii) Optimality conditions and sensitivity for continuous problems,

Title Page ◭◭ ◮◮ ◭ ◮ 2 of 95 Go Back Full Screen Close Quit


(viii) Integer programming,
(ix) Mixed-integer programming,
(x) Homework 2: Due Thursday, February 10.

Title Page ◭◭ ◮◮ ◭ ◮ 3 of 95 Go Back Full Screen Close Quit


2.1 Definitions
2.1.1 Decision vector
• The optimization problems we consider will involve choices of a value of
a decision vector from n-dimensional Euclidean space Rn or from some
subset S of Rn , where:
– R is the set of real numbers, and
– Rn is the set of n-tuples of real numbers.
• We will usually denote the decision vector by x.

2.1.2 Objective
• Consider a function f : Rn → R that denominates the “cost” or lack of
desirability of solutions for a particular model or system.
• That is, f (x) is the cost of using x as the solution.
• The function is called an objective function.
• The operating cost of a generator, and the sum of the operating costs of all
generators in a system, are examples of objective functions.

Title Page ◭◭ ◮◮ ◭ ◮ 4 of 95 Go Back Full Screen Close Quit


2.1.2.1 Example
• An example of a quadratic function f : R2 → R is given by:
∀x ∈ R2 , f (x) = (x1 )2 + (x2 )2 + 2x2 − 3. (2.1)

f (x)
60

50

40

30

20

10

−10
5
5
0
Fig. 2.1. Graph of the
x2
0
x1 example objective func-
−5 −5 tion defined in (2.1).

Title Page ◭◭ ◮◮ ◭ ◮ 5 of 95 Go Back Full Screen Close Quit


2.1.2.2 Discussion
• We can categorize objectives according to the highest power of any entry
in the argument.
• We will categorize objectives in a different way in Section 2.5.2 once we
have discussed optimization in more detail.

Title Page ◭◭ ◮◮ ◭ ◮ 6 of 95 Go Back Full Screen Close Quit


2.1.3 Feasible set
• Our problem might involve restrictions on the choices of values of x.
• We can imagine a feasible set S ⊆ Rn from which we must select a
solution.

2.1.4 Problem
• A minimization problem means to find the minimum value of f (x) over
choices of x that lie in the feasible set S.
Definition 2.1 Let S ⊆ Rn , f : S → R, and f ⋆ ∈ R. Then by:
f ⋆ = min f (x), (2.2)
x∈S
we mean that:
∃x⋆ ∈ S such that: ( f ⋆ = f (x⋆ )) and ((x ∈ S) ⇒ ( f (x⋆) ≤ f (x))). (2.3)
2

Title Page ◭◭ ◮◮ ◭ ◮ 7 of 95 Go Back Full Screen Close Quit


2.1.5 Set of minimizers
• The set of all the minimizers of minx∈S f (x) is denoted by:
argmin f (x).
x∈S
• If the problem has no minimum (and, therefore, no minimizers) then we
define:
/
argmin f (x) = 0.
x∈S
• To emphasize the role of S, we also use the following notations:
min { f (x)|x ∈ S} and argminn { f (x)|x ∈ S}.
x∈Rn x∈R
• We will often use a more explicit notation if S is defined as the set of
points satisfying a criterion.
• For example, if f : Rn → R, g : Rn → Rm , h : Rn → Rr , and
S = {x ∈ Rn |g(x) = 0, h(x) ≤ 0} then we will write
minx∈Rn { f (x)|g(x) = 0, h(x) ≤ 0} for minx∈S f (x).

Title Page ◭◭ ◮◮ ◭ ◮ 8 of 95 Go Back Full Screen Close Quit


2.1.6 Lower bound
Definition 2.2 Let S ⊆ Rn , f : S → R, and f ∈ R. If f satisfies:
∀x ∈ S, f ≤ f (x),
then we say that f is a lower bound for the problem minx∈S f (x) or that the
problem minx∈S f (x) is bounded below by f . If S 6= 0/ but no such f exists,
then we say that the problem minx∈S f (x) is unbounded below (or
unbounded if the “below” is clear from context.) 2
• Consider f : R2 → R defined in (2.1), which we repeat here:
∀x ∈ R2 , f (x) = (x1 )2 + (x2 )2 + 2x2 − 3.
• This function is illustrated in Figure 2.1.
• For the feasible set S = R2 , the value f = −10 is a lower bound for the
problem minx∈S f (x), as shown in Figure 2.1.

Title Page ◭◭ ◮◮ ◭ ◮ 9 of 95 Go Back Full Screen Close Quit


2.1.7 Level and contour sets
Definition 2.3 Let S ⊆ Rn , f : S → R, and f˜ ∈ R. Then the level set at
value f˜ of the function f is the set:
L f ( f˜) = {x ∈ S| f (x) ≤ f˜}.
The contour set at value f˜ of the function f is the set:
C f ( f˜) = {x ∈ S| f (x) = f˜}.
2

Title Page ◭◭ ◮◮ ◭ ◮ 10 of 95 Go Back Full Screen Close Quit


2.1.7.1 Example
• Consider the function f : R2 → R defined by:
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 . (2.4)

f (x)
100

80

60

40

20

0
5

0
Fig. 2.2. Graph of
x2
0
x1 function defined
−5 −5 in (2.4).

Title Page ◭◭ ◮◮ ◭ ◮ 11 of 95 Go Back Full Screen Close Quit


2.1.7.2 Contour set for example
• The contour sets C f ( f˜) can be shown in a two-dimensional
representation.
x2
5

2 Fig. 2.3. Contour sets


C f ( f˜) of the function
1
defined in (2.4) for
0 values f˜ = 0, 2, 4, 6, . . ..
−1 The heights of the con-
tours decrease
  towards
−2
1
the point , which is
−3 3
−4
illustrated with a • and
is the contour of height
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5 x1 0.

Title Page ◭◭ ◮◮ ◭ ◮ 12 of 95 Go Back Full Screen Close Quit


2.2 Problems with continuous variables
• The first type of optimization problems we will consider involve
continuous variables.
• For continuous problems, the three general forms of S that we will
consider are:
– unconstrained optimization,
– equality-constrained optimization, and
– inequality-constrained optimization.

Title Page ◭◭ ◮◮ ◭ ◮ 13 of 95 Go Back Full Screen Close Quit


2.2.1 Unconstrained optimization
• If S = Rn then the problem is said to be unconstrained.
2.2.1.1 Example
• For example, consider the objective f : R2 → R defined in (2.4):
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 .
• From Figure 2.3, which shows the contour sets of f , we can see that:
min f (x) = f ⋆ = 0,
x∈R2
 
1
argmin f (x) = ,
x∈R2 3
 
1
• so that there is a minimum f ⋆ = 0 and a unique minimizer x⋆ = of
3
this problem.

Title Page ◭◭ ◮◮ ◭ ◮ 14 of 95 Go Back Full Screen Close Quit


2.2.2 Equality-constrained optimization
• If g : Rn → Rm and S = {x ∈ Rn |g(x) = 0} then the problem is said to be
equality-constrained.
• The power flow equations are examples of equality constraints.
2.2.2.1 Sub-types of equality-constrained optimization problems
Linearly constrained
• If g is affine then the problem is called linearly constrained.
• The linearized power flow equations are examples of linear constraints.
Example
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 ,
∀x ∈ R2 , g(x) = x1 − x2 , (2.5)
min { f (x)|g(x) = 0} = min { f (x)|x1 − x2 = 0}. (2.6)
x∈R2 x∈R2

Title Page ◭◭ ◮◮ ◭ ◮ 15 of 95 Go Back Full Screen Close Quit


Example, continued
 
2
• The unique minimizer of Problem (2.6) is x⋆ = .
2

x2
5

4
Fig. 2.4. Contour sets
3 C f ( f˜) of function re-
peated from Figure 2.3
2
with feasible set from
1 Problem (2.6) super-
0 imposed. The heights
of the contours de-
−1
crease
  towards the point
−2 1
. The minimizer
−3
3
 
2
−4 x⋆ = is illustrated
2
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5 x1 with a •.

Title Page ◭◭ ◮◮ ◭ ◮ 16 of 95 Go Back Full Screen Close Quit


Non-linearly constrained
• If there is no restriction on g then the problem is called non-linearly
constrained.
Example
• For example, consider the same objective as previously, f : R2 → R
defined in (2.4):
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 .
• However, let g : R2 → R be defined by:
∀x ∈ R2 , g(x) = (x1 )2 + (x2 )2 + 2x2 − 3.
• Consider the equality-constrained problem:
min { f (x)|g(x) = 0}. (2.7)
x∈R2

Title Page ◭◭ ◮◮ ◭ ◮ 17 of 95 Go Back Full Screen Close Quit


Example, continued
 
0.5
• The unique minimizer of Problem (2.7) is x⋆ ≈ .
0.9

x2
5

Fig. 2.5. Contour sets


1
˜
C f ( f ) of function repeated
0 from Figure 2.3 with feasi-
−1 ble set from Problem (2.7)
superimposed. The heights
−2
of the contours  decrease

−3 1
towards the point . The
−4
3
minimizer x⋆ is illustrated
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5 x1 as a •.

Title Page ◭◭ ◮◮ ◭ ◮ 18 of 95 Go Back Full Screen Close Quit


2.2.3 Inequality-constrained optimization
• If g : Rn → Rm , h : Rn → Rr , and S = {x ∈ Rn |g(x) = 0, h(x) ≤ 0} then
the problem is said to be inequality-constrained.
• The line flow constraints are examples of inequality constraints.
2.2.3.1 Sub-types of inequality-constrained optimization problems
Non-negatively constrained
• If h is of the form:
∀x, h(x) = −x,
• so that the constraints are of the form x ≥ 0 then the problem is
non-negatively constrained.
Linear inequality constraints
• If h is affine then the problem is linear inequality-constrained.
• The DC power flow approximation to line flow constraints are examples
of linear inequality constraints.

Title Page ◭◭ ◮◮ ◭ ◮ 19 of 95 Go Back Full Screen Close Quit


Linear program
• If the objective is linear and g and h are affine then the problem is called a
linear program or a linear optimization problem.
Example
∀x ∈ R2 , f (x) = x1 − x2 ,
∀x ∈ R2 , g(x) = x1 + x2 − 1,
 
−x 1
∀x ∈ R2 , h(x) = ,
−x2

min { f (x)|g(x) = 0, h(x) ≤ 0} = min {x1 −x2 |x1 +x2 −1 = 0, x1 ≥ 0, x2 ≥ 0}.


x∈R2 x∈R2
(2.8)

Title Page ◭◭ ◮◮ ◭ ◮ 20 of 95 Go Back Full Screen Close Quit


Example, continued
x2
2
Fig. 2.6. Contour sets
1.8 C f ( f˜) of objective func-
1.6 tion and feasible set for
Problem (2.8). The contour
1.4
sets are the parallel lines.
1.2
The feasible set is shown
1 as the line joining
 the
 two
1 0
0.8 points and . The
0 1
0.6
heights of the contours
0.4 decrease to the left and up.
0
0.2 The minimizer x⋆ = is
1
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x1 illustrated as a •.

Title Page ◭◭ ◮◮ ◭ ◮ 21 of 95 Go Back Full Screen Close Quit


Linear program, continued
• We often emphasize the linear and affine functions by writing:
min {c† x|Ax = b,Cx ≤ d},
x∈R2

• where c ∈ Rn , A ∈ Rm×n , b ∈ Rm , C ∈ Rr×n , and d ∈ Rr .


• For Problem (2.8), the appropriate vectors and matrices are:
     
1 −1 0 0
c= , A = [ 1 1 ] , b = [1],C = ,d = .
−1 0 −1 0
• We can write this non-negatively constrained problem even more
concisely as:
min {c† x|Ax = b, x ≥ 0}. (2.9)
x∈R2

Title Page ◭◭ ◮◮ ◭ ◮ 22 of 95 Go Back Full Screen Close Quit


Linear program, continued
• There is a rich body of literature on linear programming and there are
special purpose algorithms to solve linear programming problems.
• The best known are:
– the simplex algorithm (and variants), and
– interior point algorithms.
Standard format
• If g is affine and the inequality constraints are non-negativity constraints
then the problem is said to be in the standard format.
• Problem (2.9) is a linear program in standard format.

Title Page ◭◭ ◮◮ ◭ ◮ 23 of 95 Go Back Full Screen Close Quit


Quadratic program
• If f is quadratic and g and h are affine then the problem is called a
quadratic program or a quadratic optimization problem.
Example
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 ,
∀x ∈ R2 , g(x) = x1 − x2 ,
∀x ∈ R2 , h(x) = 3 − x2 . (2.10)

Title Page ◭◭ ◮◮ ◭ ◮ 24 of 95 Go Back Full Screen Close Quit


Example, continued
x2
5

4
Fig. 2.7. Contour sets
3
C f ( f˜) of objective function
2 and feasible set for Prob-
lem (2.11). The heights
1
of the contours  decrease

0 1
towards the point . The
−1
3
feasible set is the “half-line”
 
−2 3
starting at the point .
−3
3
 
3
−4 The minimizer x⋆ = is
3
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5 x1 illustrated with a •.

Title Page ◭◭ ◮◮ ◭ ◮ 25 of 95 Go Back Full Screen Close Quit


Example, continued
min { f (x)|g(x) = 0, h(x) ≤ 0} = 4, (2.11)
x∈R2
 
3
argmin { f (x)|g(x) = 0, h(x) ≤ 0} = = {x⋆ }.
x∈R2 3

Quadratic program, continued


• We can emphasize the quadratic and linear functions by writing:
 
1 †
min x Qx + c† x|Ax = b,Cx ≤ d ,
x∈R2 2
• where we have omitted the constant term.
• For Problem (2.11), the appropriate vectors and matrices are:
   
2 0 −2
Q= ,c = , A = [ 1 −1 ] , b = [0],C = [ 0 −1 ] , d = [−3].
0 2 −6

Title Page ◭◭ ◮◮ ◭ ◮ 26 of 95 Go Back Full Screen Close Quit


Non-linear program
• If there are no restrictions on f , g, and h, then the problem is called a
non-linear program or a non-linear optimization problem.
Example
min { f (x)|g(x) = 0, h(x) ≤ 0}, (2.12)
x∈R3

• where f : R3 → R, g : R3 → R2 , and h : R3 → R are defined by:


∀x ∈ R3, f (x) = (x1)2 + 2(x2 )2,
 
2 − x 2 − sin(x 3 )
∀x ∈ R3 , g(x) = ,
−x1 + sin(x3 )
∀x ∈ R3 , h(x) = sin(x3) − 0.5.
Convexity
• We will see in Section 2.5.2 that we can also classify problems on the
basis of the notion of convexity.

Title Page ◭◭ ◮◮ ◭ ◮ 27 of 95 Go Back Full Screen Close Quit


2.2.3.2 Satisfaction of constraints
Definition 2.4 Let h : Rn → Rr . An inequality constraint hℓ (x) ≤ 0 is called
a binding constraint or an active constraint at x⋆ if hℓ (x⋆ ) = 0. It is called
non-binding or inactive at x⋆ if hℓ (x⋆ ) < 0. The set:
A(x⋆ ) = {ℓ ∈ {1, . . . , r} |hℓ (x⋆) = 0}
is called the set of active constraints or the active set for h(x) ≤ 0 at x⋆ . 2

Title Page ◭◭ ◮◮ ◭ ◮ 28 of 95 Go Back Full Screen Close Quit


Example
 
3 − x 2
∀x ∈ R2 , h(x) = .
x1 + x2 − 10

x2
10

6
Fig. 2.8. Points x⋆ , x⋆⋆ ,
5
and x⋆⋆⋆ that are fea-
x⋆ sible with respect to
4
x⋆⋆⋆ inequality constraints.
3

x⋆⋆ The feasible set is the


2
shaded triangular region
1
for which x2 ≥ 3 and
0
0 1 2 3 4 5 6 7 8 9 10 x1 x1 + x2 ≤ 10.

Title Page ◭◭ ◮◮ ◭ ◮ 29 of 95 Go Back Full Screen Close Quit


Example, continued
 
5
x⋆ =
4
• The constraints h1 (x) ≤ 0 and h2 (x) ≤ 0 are non-binding so that the
/
active set is A(x⋆ ) = 0.
• This point is in the interior of the set {x ∈ R2 |h(x) ≤ 0}.
 
5
x⋆⋆ =
3
• The constraint h2 (x) ≤ 0 is non-binding while the constraint
h1 (x) ≤ 0 is binding so that the active set is A(x⋆⋆ ) = {1}.
• This point is on the boundary of the set {x ∈ R2 |h(x) ≤ 0}.
 
7
x⋆⋆⋆ =
3
• The constraints h1 (x) ≤ 0 and h2 (x) ≤ 0 are both binding so that the
active set is A(x⋆⋆⋆ ) = {1, 2}.
• This point is on the boundary of the set {x ∈ R2 |h(x) ≤ 0}.

Title Page ◭◭ ◮◮ ◭ ◮ 30 of 95 Go Back Full Screen Close Quit


Example in higher dimension
• Consider Figure 2.9, which shows a dodecahedron, a twelve-sided solid,
in R3 .
• The dodecahedron is an example of a set that can be described in the form
S = {x ∈ R3 |h(x) ≤ 0} with h : R3 → R12 affine.

Fig. 2.9. Dodecahe-


dron in R3 .

Title Page ◭◭ ◮◮ ◭ ◮ 31 of 95 Go Back Full Screen Close Quit


Various cases for a point in S
x⋆ is in the interior of the dodecahedron.
• We have h(x⋆ ) < 0 and A(x⋆) = 0. /
x⋆⋆ is on a face of the dodecahedron but not on an edge or vertex.
• That is, exactly one constraint ℓ is binding and A(x⋆⋆) = {ℓ}.
• x⋆⋆ is on the boundary.
x⋆⋆⋆ is on an edge but not a vertex of the dodecahedron.
• That is, exactly two constraints ℓ, ℓ′ are binding and
A(x⋆⋆⋆) = {ℓ, ℓ′ }.
• x⋆⋆⋆ is on the boundary.
x⋆⋆⋆⋆ is a vertex of the dodecahedron.
• That is, exactly three constraints ℓ, ℓ′, and ℓ′′ are binding and
A(x⋆⋆⋆⋆) = {ℓ, ℓ′ , ℓ′′}.
• x⋆⋆⋆⋆ is on the boundary.

Title Page ◭◭ ◮◮ ◭ ◮ 32 of 95 Go Back Full Screen Close Quit


Discussion
• The importance of the notion of binding constraints is that it is typical for
some but not all of the inequality constraints to be binding at the
optimum.

2.2.4 Summary
• For small example problems, inspection of a carefully drawn diagram can
yield the minimum and minimizer.
• For larger problems where the dimension of x increases significantly past
two, or the dimension of g or h increases, the geometry becomes more
difficult to visualize and intuition becomes less reliable in predicting the
solution.
• For larger problems we will use special-purpose software to find the
minimum and minimizer.

Title Page ◭◭ ◮◮ ◭ ◮ 33 of 95 Go Back Full Screen Close Quit


2.3 Problems without minimum and the infimum
2.3.1 Analysis
• To discuss problems that do not have a minimum, we need a more general
definition.
Definition 2.5 Let S ⊆ Rn , f : S → R. Then, infx∈S f (x), the infimum of
the corresponding minimization problem, minx∈S f (x), is defined by:

 the greatest lower bound for
minx∈S f (x), if minx∈S f (x) is bounded below,

inf f (x) =
x∈S −∞, if minx∈S f (x) is unbounded below,
∞, if minx∈S f (x) is infeasible.

By definition, the infimum is equal to the minimum of the corresponding


minimization problem minx∈S f (x) if the minimum exists, but the infimum
exists even if the problem has no minimum. To emphasize the role of S, we
also use the notation infx∈Rn { f (x)|x ∈ S} and analogous notations for the
infimum. 2

Title Page ◭◭ ◮◮ ◭ ◮ 34 of 95 Go Back Full Screen Close Quit


2.3.2 Example
Unconstrained problem with unbounded objective
∀x ∈ R, f (x) = x. (2.13)
• There is no f ⋆ ∈ R such that ∀x ∈ R, f ⋆ ≤ f (x).
• The problem minx∈R f (x) is unbounded below.
• The infimum is infx∈R f (x) = −∞.

Title Page ◭◭ ◮◮ ◭ ◮ 35 of 95 Go Back Full Screen Close Quit


2.4 Maximization problems and the supremum

max f (x) = − min(− f (x)). (2.14)


x∈S x∈S

Definition 2.6 Let S ⊆ Rn, f : S → R. Then, supx∈S f (x), the supremum of


the corresponding maximization problem maxx∈S f (x) is defined by:

 the least upper bound for
maxx∈S f (x), if maxx∈S f (x) is bounded above,

sup f (x) =
x∈S  ∞, if maxx∈S f (x) is unbounded above,
−∞, if maxx∈S f (x) is infeasible.

The supremum is equal to the maximum of the corresponding


maximization problem maxx∈S f (x) if the maximum exists. 2

Title Page ◭◭ ◮◮ ◭ ◮ 36 of 95 Go Back Full Screen Close Quit


2.5 Solutions of optimization problems
2.5.1 Local and global minima
2.5.1.1 Definitions
• Recall Problem (2.2) and its minimum f ⋆ :
f ⋆ = min f (x).
x∈S
• Sometimes, we call f ⋆ in Problem (2.2) the global minimum of the
problem to emphasize that there is no x ∈ S that has a smaller value of
f (x).
Definition 2.7 Let k•k be a norm on Rn , S ⊆ Rn , x⋆ ∈ S, and f : S → R. We
say that x⋆ is a local minimizer of the problem minx∈S f (x) if:
∃ε > 0 such that ∀x ∈ S, (kx − x⋆ k < ε) ⇒ ( f (x⋆) ≤ f (x)). (2.15)
The value f ⋆ = f (x⋆ ) is called a local minimum of the problem. 2

Title Page ◭◭ ◮◮ ◭ ◮ 37 of 95 Go Back Full Screen Close Quit


Local minimizer and minimum
• A local minimum may or may not be a global minimum but if a problem
possesses a minimum then there is exactly one global minimum, by
definition.
• The global minimum is also a local minimum.

Title Page ◭◭ ◮◮ ◭ ◮ 38 of 95 Go Back Full Screen Close Quit


2.5.1.2 Convex sets
Definition 2.8 Let S ⊆ Rn . We say that S is a convex set or that S is
convex if ∀x, x′ ∈ S, ∀t ∈ [0, 1], (1 − t)x + tx′ ∈ S. 2
• A line segment joining any two points in a convex set S is itself entirely
contained in S.

Title Page ◭◭ ◮◮ ◭ ◮ 39 of 95 Go Back Full Screen Close Quit


Examples of convex sets

Fig. 2.10. Convex sets


with pairs of points
joined by line segments.

Title Page ◭◭ ◮◮ ◭ ◮ 40 of 95 Go Back Full Screen Close Quit


Examples of non-convex sets
• Non-convex sets have “indentations.”

Fig. 2.11. Non-convex


sets.

Title Page ◭◭ ◮◮ ◭ ◮ 41 of 95 Go Back Full Screen Close Quit


2.5.1.3 Examples of local and global minimizers
Multiple local minimizers over a convex set
• f : R → R has two local minimizers at x⋆ = 3, x⋆⋆ = −3 over S.
f (x)
3

f ⋆⋆ 2

1 local minimum
and minimizer
0

−1
Fig. 2.12. Local min-
−2 not a local minimum ima, f ⋆ and f ⋆⋆, with
−3 corresponding local
⋆ ⋆
f −4
minimizers x and
local and global ⋆⋆
x , over a set S. The
−5 minimum and minimizer point x⋆ is the global
−6
−4 −3 −2 −1 0 1 2 3 4 x minimizer and f ⋆ the
⋆⋆ ⋆
x x̂ x global minimum over S.

Title Page ◭◭ ◮◮ ◭ ◮ 42 of 95 Go Back Full Screen Close Quit


Multiple local minimizers over a non-convex set
• Over the non-convex set P = {x ∈ R| − 4 ≤ x ≤ 1 or 2 ≤ x ≤ 4} there are
three local minimizers, x⋆ = 3, x⋆⋆ = −3, and x⋆⋆⋆ = 1.
f (x)
3

f ⋆⋆ 2

1
local minimum
⋆⋆⋆
f 0
and minimizer
−1
local minimum
and minimizer
−2

−3 Fig. 2.13. Local


f⋆ −4
and global minima
local and global and minimizers of a
−5
minimum and minimizer problem over a set
−6
−4 −3 −2 −1 0 1 2 3 4 x P = {x ∈ R| − 4 ≤ x ≤
⋆⋆ ⋆⋆⋆ ⋆
x x x 1 or 2 ≤ x ≤ 4}.

Title Page ◭◭ ◮◮ ◭ ◮ 43 of 95 Go Back Full Screen Close Quit


Multiple local minimizers over a non-convex set in higher dimension
   
2.4 0.8
• The local minimizers are x⋆ ≈ and x⋆⋆ ≈ .
−0.1 −0.7

x2
5

1
Fig. 2.14. Contour sets
of the function defined
0
in (2.4) with feasible
−1 set shaded. The two
−2 local minimizers are in-
dicated by bullets. The
−3
heights of the contours
−4
decrease
  towards the
x1 1
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5 point .
3

Title Page ◭◭ ◮◮ ◭ ◮ 44 of 95 Go Back Full Screen Close Quit


2.5.1.4 Discussion
• Iterative improvement algorithms, as typically used in minimizing
problems defined in terms of continuous variables, involve generating a
sequence of successively “better” points that provide successively better
values of the objective or closer satisfaction of the constraints or both.
• With an iterative improvement algorithm, we can usually only guarantee,
at best, that we are moving towards a local minimum and minimizer.

Title Page ◭◭ ◮◮ ◭ ◮ 45 of 95 Go Back Full Screen Close Quit


2.5.1.5 Strict and non-strict minimizers
• There can be more than one minimizer even if the minimum is global.

f (x)
10

3 Fig. 2.15. A function


2
with multiple global
1
minimizers. The set of
minimizers is indicated
0
−4 −3 −2 −1 0 1 2 3 4 x by a thick line.

Title Page ◭◭ ◮◮ ◭ ◮ 46 of 95 Go Back Full Screen Close Quit


2.5.2 Convex functions
2.5.2.1 Definitions

Definition 2.9 Let S ⊆ Rn be a convex set and let f : S → R. Then, f is a


convex function on S if:
∀x, x′ ∈ S, ∀t ∈ [0, 1], f ([1 − t]x + tx′ ) ≤ [1 − t] f (x) + t f (x′ ). (2.16)
If f : Rn → R is convex on Rn then we say that f is convex. A function
h : S → Rr is convex on S if each of its components hℓ is convex on S. If
h : Rn → Rr is convex on Rn then we say that h is convex. The set S is
called the test set.
Furthermore, f is a strictly convex function on S if:
∀x, x′ ∈ S, (x 6= x′ ) ⇒ ∀t ∈ (0, 1), f ([1 − t]x + tx′ ) < [1 − t] f (x) + t f (x′ ) .


If f : Rn → R is strictly convex on Rn then we say that f is strictly convex.


A function h : S → Rr is strictly convex on S if each of its components hℓ is
strictly convex on S. If h : Rn → Rr is strictly convex on Rn then we say
that h is strictly convex. 2

Title Page ◭◭ ◮◮ ◭ ◮ 47 of 95 Go Back Full Screen Close Quit


Discussion
• The condition in (2.16) means that linear interpolation of convex f
between points on the curve is never below the function values.

f (x)
10

8
Fig. 2.16. Linear in-
terpolation of a convex
7
function between points
6
never under-estimates
5
the function. (For clar-
4 ity, the line interpolating
3
f between x = 0 and
2
x = 1 is drawn slightly
above the solid curve:
1
it should be coincident
0
−4 −3 −2 −1 0 1 2 3 4 x with the solid curve.)

Title Page ◭◭ ◮◮ ◭ ◮ 48 of 95 Go Back Full Screen Close Quit


Definition 2.10 Let S ⊆ Rn be a convex set and let f : S → R. We say that
f is a concave function on S if (− f ) is a convex function on S. 2
2.5.2.2 Examples
• A linear or affine function is convex and concave on any convex set.
• The function f : R → R shown in Figure 2.12 is not convex on the convex
set S = {x ∈ R| − 4 ≤ x ≤ 4}.
• Qualitatively, convex functions are “bowl-shaped” and have level sets that
are convex sets as specified in:
Definition 2.11 Let S ⊆ Rn and f : S → R. Then the function f has convex
level sets on S if for all f˜ ∈ R we have that L f ( f˜) is convex. If f : Rn → R
has convex level sets on Rn then we say that f has convex level sets. 2

Title Page ◭◭ ◮◮ ◭ ◮ 49 of 95 Go Back Full Screen Close Quit


Convexity of level sets of convex function
∀x ∈ R2 , f (x) = (x1 − 1)2 + (x2 − 3)2 − 1.8(x1 − 1)(x2 − 3). (2.17)

x2
5

−1 Fig. 2.17. Contour sets


−2
C f ( f˜) of the function
−3
defined in (2.17). The
heights of the contours
−4
decrease  towards the
−5
x1 1
−5 −4 −3 −2 −1 0 1 2 3 4 5
point .
3

Title Page ◭◭ ◮◮ ◭ ◮ 50 of 95 Go Back Full Screen Close Quit


2.5.2.3 Relationship to optimization problems

Theorem 2.1 Let S ⊆ Rn be a convex set and f : S → R. Then:


(i) If f is convex on S then it has at most one local minimum over S.
(ii) If f is convex on S and has a local minimum over S then the local
minimum is the global minimum.
(iii) If f is strictly convex on S then it has at most one minimizer over
S.
2
Definition 2.12 If S ⊆ Rn is a convex set and f : Rn → R is convex on S,
then minx∈S f (x) is called a convex problem. 2
• If:
– the function f : Rn → R is convex,
– the function g : Rn → Rm is affine, with ∀x ∈ Rn , g(x) = Ax − b, and
– the function h : Rn → Rr is convex,
• then minx∈Rn { f (x)|g(x) = 0, h(x) ≤ 0} is a convex problem.

Title Page ◭◭ ◮◮ ◭ ◮ 51 of 95 Go Back Full Screen Close Quit


2.5.2.4 Discussion
• Theorem 2.1 shows that a convex problem has at most one local
minimum.
• If we find a local minimum for a convex problem, it is in fact the global
minimum.
• Iterative improvement algorithms can find the global minima of convex
problems.
• Non-convex problems are generally much more difficult to solve.

Title Page ◭◭ ◮◮ ◭ ◮ 52 of 95 Go Back Full Screen Close Quit


2.5.2.5 Characterizing convex functions
First derivative
Theorem 2.2 Let S ⊆ Rn be a convex set and suppose that f : S → R is
partially differentiable with continuous partial derivatives on S. Then f
is convex on S if and only if:

∀x, x′ ∈ S, f (x) ≥ f (x′ ) + ∇f (x′ ) (x − x′ ). (2.18)
2
• The function φ : Rn → R on the right-hand side of (2.18) defined by:

∀x ∈ Rn , φ(x) = f (x′) + ∇f (x′ ) (x − x′ ),
• is called the first-order Taylor approximation of the function f ,
linearized about x′ .

Title Page ◭◭ ◮◮ ◭ ◮ 53 of 95 Go Back Full Screen Close Quit


First-order Taylor expansion
• The inequality in (2.18) shows that the first-order Taylor approximation
of a convex function never over-estimates the function.

f (x), φ(x)
10

5 Fig. 2.18. First order


4 Taylor approximation
3
about x = −2 (shown
2
dashed) and about x = 3
(shown dotted) of a
1
convex function (shown
0
−4 −3 −2 −1 0 1 2 3 4 x solid).

Title Page ◭◭ ◮◮ ◭ ◮ 54 of 95 Go Back Full Screen Close Quit


Sandwiching of convex function

f (x), φ(x)
10 Fig. 2.19. Sandwiching of
9 convex function between
8
two affine functions. The
first-order Taylor approx-
7
imation about x = −2
6
(shown dashed) is a lower
5
bound to the function.
4 The linear interpolation
3 of f between x = −3 and
2
x = −0.5 (shown dash-
dotted) is an upper bound to
1
the function on the interval
0
−4 −3 −2 −1 0 1 2 3 4 x {x ∈ R| − 3 ≤ x ≤ −0.5}.

Title Page ◭◭ ◮◮ ◭ ◮ 55 of 95 Go Back Full Screen Close Quit


Second derivative
• There are also tests of convexity involving positive semi-definiteness of
the matrix of second derivatives, which is called the Hessian and is
denoted ∇2f or ∇xx2 f.

Theorem 2.3 Let S ⊆ Rn be convex and suppose that f : S → R is twice


partially differentiable with continuous second partial derivatives on S.
Suppose that the second derivative ∇2f is positive semi-definite
throughout S. Then f is convex on S. If ∇2f is positive definite
throughout S then f is strictly convex throughout S. 2

Title Page ◭◭ ◮◮ ◭ ◮ 56 of 95 Go Back Full Screen Close Quit


2.5.2.6 Quadratic functions

1
∀x ∈ Rn , f (x) = x† Qx + c† x, (2.19)
2
• where Q ∈ Rn×n and c ∈ Rn are constants and Q is symmetric.
• The Hessian of this function is Q, which is constant and independent of x.
• If Q is positive definite then, by Theorem 2.3, f is convex.

Title Page ◭◭ ◮◮ ◭ ◮ 57 of 95 Go Back Full Screen Close Quit


2.6 Duality
• Taking the dual of a constrained problem is a process whereby a new
problem is defined where the role of the variables and the constraints is
either partially or completely exchanged.
• Let f : Rn → R, g : Rn → Rm , and h : Rn → Rr .
• Consider the problem:
min { f (x)|g(x) = 0, h(x) ≤ 0}. (2.20)
x∈Rn
• We define two functions associated with f , g, and h, called the
Lagrangian and the dual function.
• We then consider the relationship between these functions and
minimizing f .

Title Page ◭◭ ◮◮ ◭ ◮ 58 of 95 Go Back Full Screen Close Quit


2.6.1 Lagrangian

Definition 2.13 Consider the function L : Rn × Rm × Rr → R defined by:


∀x ∈ Rn , ∀λ ∈ Rm , ∀µ ∈ Rr , L (x, λ, µ) = f (x) + λ† g(x) + µ† h(x). (2.21)
The function L is called the Lagrangian and the variables λ and µ are
called the dual variables. If there are no equality constraints then
L : Rn × Rr → R is defined by omitting the term λ†g(x) from the definition,
while if there are no inequality constraints then L : Rn × Rm → R is defined
by omitting the term µ† h(x) from the definition. 2
• Sometimes, the symbol for the dual variables is introduced when the
problem is defined by writing it in parenthesis after the constraint, as in
the following:
min f (x) such that g(x) = 0, (λ).
x∈Rn

Title Page ◭◭ ◮◮ ◭ ◮ 59 of 95 Go Back Full Screen Close Quit


2.6.2 Dual function
• Associated with the Lagrangian, we make:
Definition 2.14 Consider the function D : Rm × Rr → R ∪ {−∞} defined
by:
λ
 
∀ ∈ Rm+r , D (λ, µ) = infn L (x, λ, µ). (2.22)
µ x∈R

The function D is called the dual function. It is an extended real function.


If there are no equality constraints or there are no inequality constraints,
respectively, then the dual function D : Rr → R ∪ {−∞} or
D : Rm → R ∪ {−∞} is defined in terms of the corresponding Lagrangian.
The set of points on which the dual function takes on real values is called
the effective domain E of the dual function:
λ
  
∈ Rm+r D (λ, µ) > −∞ .

E=
µ
The restriction of D to E is a real-valued function D : E → R. 2

Title Page ◭◭ ◮◮ ◭ ◮ 60 of 95 Go Back Full Screen Close Quit


Discussion
• Recall Definition 2.10 of a concave function.
• The usefulness of the dual function stems in part from the following:
Theorem 2.4 Let f : Rn → R, g : Rn → Rm , and h : Rn → Rr . Consider
the corresponding Lagrangian defined in (2.21), the dual function
defined in (2.22), and the effective domain E of the dual function. The
effective domain E of the dual function is a convex set. The dual
function is concave on E. 2
• The convexity of the effective domain and the concavity of the dual
function on the effective domain does not depend on any property of the
objective nor of the constraint functions.

Title Page ◭◭ ◮◮ ◭ ◮ 61 of 95 Go Back Full Screen Close Quit


2.6.3 Dual problem

Theorem 2.5 Let f : Rn → R, g : Rn → Rm , and h : Rn → Rr . Let λ ∈ Rm


and µ ∈ Rr+ and suppose that x̂ ∈ {x ∈ Rn |g(x) = 0, h(x) ≤ 0}. That is, x̂
is feasible for Problem (2.20). Then:
f (x̂) ≥ D (λ, µ), (2.23)
where D : Rm × Rr → R ∪ {−∞} is the dual function defined in (2.22).
Proof By definition of D ,
D (λ, µ) = infn L (x, λ, µ),
x∈R
= infn { f (x) + λ† g(x) + µ† h(x)}, by definition of L ,
x∈R
≤ f (x̂) + λ† g(x̂) + µ† h(x̂), by definition of inf,
≤ f (x̂),
since g(x̂) = 0, h(x̂) ≤ 0, and µ ≥ 0. 2

Title Page ◭◭ ◮◮ ◭ ◮ 62 of 95 Go Back Full Screen Close Quit


Discussion
• Theorem 2.5 enables us to gauge whether we are close to a minimum of
Problem (2.20).
• For any value of λ ∈ Rm and µ ∈ Rr+ , we know that the minimum of
Problem (2.20) is no smaller than D (λ, µ), which is a lower bound for the
problem.
• We can also take the partial dual with respect to only some of the
constraints leaving the remaining constraints explicit in the definition of
the dual function.

Title Page ◭◭ ◮◮ ◭ ◮ 63 of 95 Go Back Full Screen Close Quit


Corollary 2.6 Let f : Rn → R, g : Rn → Rm , and h : Rn → Rr . Then:
inf { f (x)|g(x) = 0, h(x) ≤ 0} ≥ sup {D (λ, µ)|µ ≥ 0},
x∈Rn λ
[ ]∈Rm+r
µ

= sup {D (λ, µ)|µ ≥ 0},


[λµ]∈E
where E is the effective domain of D . Moreover, if Problem (2.20) has a
minimum then:
min { f (x)|g(x) = 0, h(x) ≤ 0} ≥ sup {D (λ, µ)|µ ≥ 0}. (2.24)
x∈Rn
[λµ]∈E
If Problem (2.20) is unbounded below then:
∀λ ∈ Rm , ∀µ ∈ Rr+, D (λ, µ) = −∞,
λ
  
∈ E µ ≥ 0 = 0./

so that E+ =
µ
If the problem sup {D (λ, µ)|µ ≥ 0} is unbounded above then
[λµ]∈Rm+r
Problem (2.20) is infeasible. 2

Title Page ◭◭ ◮◮ ◭ ◮ 64 of 95 Go Back Full Screen Close Quit


Discussion
• This result is called weak duality.
• The right-hand side of (2.24) is called the dual problem.
• If E+ = 0/ we say that the dual problem is infeasible.
• The inequalities in (2.23) and (2.24) can be strict, in which case the
difference between the left and right-hand sides is called the duality gap.
• If the left and right sides are the same, we say that there is no duality gap
or that the duality gap is zero. Evaluating the right-hand side of (2.24)
requires:
– evaluating the dependence of the infimum of the inner problem
infx∈Rn L (x, λ, µ) in the definition of D as a function of λ and µ,
– finding the supremum of the outer problem sup[λ]∈E {D (λ, µ)|µ ≥ 0}.
µ

Title Page ◭◭ ◮◮ ◭ ◮ 65 of 95 Go Back Full Screen Close Quit


Discussion, continued
• In some circumstances, the inequality in (2.24) can be replaced by
equality and the sup and inf can be replaced by max and min, so that the
right-hand side of (2.24) equals the minimum of Problem (2.20) and the
right-hand side becomes:
 
max {D (λ, µ)|µ ≥ 0} = max minn { f (x) + λ† g(x) + µ† h(x)} µ ≥ 0 ,

[λµ]∈E [λµ]∈E x∈R
(2.25)
• having an inner minimization problem embedded in an outer
maximization problem.
• The requirements for these conditions to hold depend on the convexity of
the primal problem and on other technical conditions on the functions.
• In the next section, we will consider an example where such conditions
happen to hold.
• In the dual problem, the equality and inequality constraints have been
transformed into terms in the Lagrangian, which is the objective of the
inner minimization problem.

Title Page ◭◭ ◮◮ ◭ ◮ 66 of 95 Go Back Full Screen Close Quit


2.6.4 Example
• Consider the problem minx∈R { f (x)|g(x) = 0} where f : R → R and
where g : R → R are defined by:
∀x ∈ R, f (x) = (x)2,
∀x ∈ R, g(x) = 3 − x.
• We take the dual with respect to the equality constraint 3 − x = 0.
• Since there are no inequality constraints, we will omit the argument µ of
L and of D .
• We consider the dual function D : R → R ∪ {−∞} defined by:
∀λ ∈ R, D (λ) = inf L (x, λ),
x∈R
= inf {(x)2 + λ(3 − x)},
x∈R
( )
λ
2 2
(λ)
= inf x− + 3λ − ,
x∈R 2 4
(λ)2
= 3λ − .
4

Title Page ◭◭ ◮◮ ◭ ◮ 67 of 95 Go Back Full Screen Close Quit


Example, continued
• Therefore, E = R and since D is quadratic and strictly concave, the dual
problem has a maximum and:
(λ)2
 
max{D (λ)} = max 3λ − ,
λ∈E λ∈R 4
(  )
λ
2
= max − −3 +9 ,
λ∈R 2
= 9,
• with maximizer λ⋆ = 6, which is called the Lagrange multiplier for this
problem.
• The value of the minimizer of L (•, λ⋆) is x⋆ = λ2 = 3, which is the

minimizer of the equality-constrained problem.


• We have solved the primal equality-constrained problem by solving the
dual problem.
• There is no duality gap.

Title Page ◭◭ ◮◮ ◭ ◮ 68 of 95 Go Back Full Screen Close Quit


2.6.5 Economic interpretation
• We can interpret this example in an economic context relating, for
example, to economic dispatch.
• Suppose that f is the operating cost of a generator.
• Suppose that 3 − x = 0 or, equivalently, the demand is 3 and we want to
meet the demand with production (or supply) x.
• The Lagrange multiplier is the right “price” to induce a generator trying
to maximize its operating profit to meet the demand:
Operating profit = revenue − production cost,
= λ⋆ x − f (x).
To maximize λ⋆ x − f (x) = −L (x, λ⋆ ), we can equivalently minimize
L (x, λ⋆).
• Recall that the minimum (or infimum) of L (x, λ) is D (λ).
• In this case, the value of λ that maximizes D is the one that causes a
profit-maximizing generator to make supply x = 3.
• Moreover, f (x⋆ ) = D (λ⋆) and there is no duality gap.

Title Page ◭◭ ◮◮ ◭ ◮ 69 of 95 Go Back Full Screen Close Quit


2.7 Continuous unconstrained problems
2.7.1 Optimality conditions
Theorem 2.7 Let f : Rn → R be partially differentiable with continuous
partial derivatives. If x⋆ is a local minimizer of f then ∇f (x⋆ ) = 0. 2
Theorem 2.8 Let f : Rn → R be convex and partially differentiable with
continuous partial derivatives on Rn and let x⋆ ∈ Rn . If ∇f (x⋆ ) = 0 then
f (x⋆ ) is the global minimum and x⋆ is a global minimizer of f . 2

Title Page ◭◭ ◮◮ ◭ ◮ 70 of 95 Go Back Full Screen Close Quit


2.7.2 Sensitivity
• Suppose that the objective f is parameterized by a parameter χ ∈ Rs .
That is, f : Rn × Rs → R.
• We imagine that we have solved the unconstrained minimization problem:
min f (x; χ),
x∈Rn
• for a base-case value of the parameters, say χ = 0, to find the base-case
solution x⋆ .
• We now consider the sensitivity of the base-case solution to variation of
the parameters around χ = 0.

Title Page ◭◭ ◮◮ ◭ ◮ 71 of 95 Go Back Full Screen Close Quit


Corollary 2.9 Let f : Rn × Rs → Rn be twice partially differentiable with
continuous second partial derivatives. Consider the minimization
problem:
min f (x; χ),
x∈Rn

where χ ∈ Rs is a parameter. Suppose that x⋆ is a local minimizer of this


problem for the base-case value of the parameters χ = 0. We call x = x⋆
a base-case minimizer. Define the (parameterized) Hessian
∇xx
2 f : Rn × Rs → Rn×n by:

∂2 f
∀x ∈ Rn , ∀χ ∈ Rs, ∇xx
2
f (x; χ) = (x; χ).
∂x2

Suppose that ∇xx2 f (x⋆ ; 0) is positive definite. Then, there is a local


minimizer of f (x; χ) for χ in a neighborhood of the base-case values of
the parameters χ = 0 and the local minimizer is a partially differentiable
function of χ in this neighborhood. The sensitivity of the local minimizer
x⋆ with respect to variation of the parameters χ, evaluated at the

Title Page ◭◭ ◮◮ ◭ ◮ 72 of 95 Go Back Full Screen Close Quit


base-case χ = 0, is given by:
∂x⋆ −1
2
(0) = −[∇xx f (x⋆ ; 0)] K(x⋆; 0),
∂χ
where K : Rn × Rs → Rn×s is defined by:
∂2 f
∀x ∈ Rn , ∀χ ∈ Rs , K(x; χ) = (x; χ).
∂x∂χ
The sensitivity of the corresponding local minimum f ⋆ to variation of the
parameters χ, evaluated at the base-case χ = 0, is given by:
∂f⋆ ∂f ⋆
(0) = (x ; 0).
∂χ ∂χ
If f (•; χ) is convex for χ in a neighborhood of 0 then the minimizers and
minima are global in this neighborhood.

Title Page ◭◭ ◮◮ ◭ ◮ 73 of 95 Go Back Full Screen Close Quit


Proof The sensitivity of the local minimizer follows from the implicit
function theorem. The sensitivity of the local minimum follows by
totally differentiating the value of the local minimum
f ⋆ (χ) = f (x⋆ (χ); χ) with respect to χ. In particular,
∂f⋆ d f (x⋆ (χ); χ)
(0) = (0),
∂χ dχ
∂f ⋆ ∂f ∂x⋆
= (x ; 0) + (x⋆; 0) (0),
∂χ ∂x ∂χ
on totally differentiating f (x⋆ (χ); χ) with respect to χ,
∂f ⋆
= (x ; 0),
∂χ
since the first-order necessary conditions at the base-case are
∂f ⋆
(x ; 0) = 0.
∂x
2
• The sensitivity of the local minimum is called the envelope theorem.

Title Page ◭◭ ◮◮ ◭ ◮ 74 of 95 Go Back Full Screen Close Quit


2.7.3 Example
• Consider the parameterized objective function f : R2 × R → R defined by:
∀x ∈ R2 , ∀χ ∈ R, f (x; χ) = (x1 − exp(χ))2 + (x2 − 3 exp(χ))2 + 5χ.
 
1
• For χ = 0, the base-case unconstrained minimizer is x⋆ = .
3
• By Corollary 2.9, there is a minimizer of f (•; χ) for χ in a neighborhood
of the base-case value of the parameter χ = 0 and the minimizer is a
differentiable function of χ in this neighborhood.
• The sensitivity of the minimizer x⋆ with respect to variation of the
parameter χ, evaluated at the base-case χ = 0, is given by:
∂x⋆ −1
2
(0) = −[∇xx f (x⋆ ; 0)] K(x⋆; 0),
∂χ

Title Page ◭◭ ◮◮ ◭ ◮ 75 of 95 Go Back Full Screen Close Quit


Example, continued
• where ∇xx
2 f : R2 × R → R2×2 and K : R2 × R → R2×1 are defined by:

∂2 f
∀x ∈ R 2
, ∀χ ∈ R, ∇xx
2
f (x; χ) = (x; χ),
∂x2
 
2 0
= ,
0 2
 
2 0
∇xx
2
f (x⋆ ; 0) = ,
0 2
∂2 f
∀x ∈ R2 , ∀χ ∈ R, K(x; χ) = (x; χ),
∂x∂χ
 
−2 exp(χ)
= ,
−6 exp(χ)
 
−2
K(x⋆; 0) = ,
−6
• where we observe that ∇xx
2 f (x⋆ ; 0) is positive definite.

Title Page ◭◭ ◮◮ ◭ ◮ 76 of 95 Go Back Full Screen Close Quit


Example, continued
• The sensitivity of the minimizer x⋆ to variation of the parameter χ,
evaluated at the base-case χ = 0, is:
∂x⋆ −1
2
(0) = −[∇xx f (x⋆ ; 0)] K(x⋆; 0),
∂χ
 −1  
2 0 −2
= − ,
0 2 −6
 
1
= .
3

Title Page ◭◭ ◮◮ ◭ ◮ 77 of 95 Go Back Full Screen Close Quit


Example, continued
• The sensitivity of the minimum f ⋆ to variation of the parameter χ,
evaluated at the base-case χ = 0, is given by:
∂f⋆ ∂f ⋆
(0) = (x ; 0).
∂χ ∂χ
• We have that:
∂f
(x; χ) = 2(x1 − exp(χ))(− exp(χ)) + 2(x2 − 3 exp(χ))(−3 exp(χ)) + 5,
∂χ
• and so the sensitivity is:
∂f⋆ ∂f ⋆
(0) = (x ; 0) = 5.
∂χ ∂χ

Title Page ◭◭ ◮◮ ◭ ◮ 78 of 95 Go Back Full Screen Close Quit


2.8 Optimality conditions and sensitivity for continuous constrained
problems
• We will also study the optimality conditions for continuous equality and
inequality constrained problems in the context of economic dispatch and
optimal power flow.
• This will draw from several sections of Applied Optimization:
Formulation and Algorithms for Engineering Systems, Cambridge
University Press 2006.

Title Page ◭◭ ◮◮ ◭ ◮ 79 of 95 Go Back Full Screen Close Quit


2.9 Integer optimization
• In some cases, the entries of the decision vector must be integer-valued.
• We write Z = {0, ±1, ±2, . . .} for the set of integers.
• An integer programming problem seeks the minimum and minimizer
over choices of a decision variable that lies in some subset of Zn.
• To emphasize that the variables are no longer continuous, we will use the
symbol z for decision vectors with entries that are integer-valued.

Title Page ◭◭ ◮◮ ◭ ◮ 80 of 95 Go Back Full Screen Close Quit


2.9.1 Example
• Suppose that S ⊆ Z2 is the set of points z such that z1 ∈ {0, 1} and
z2 ∈ {0, 1}.
z2
6
1 • •

Fig. 2.20. Example


0 • • - z1 feasible set S for integer
0 1 program.

Title Page ◭◭ ◮◮ ◭ ◮ 81 of 95 Go Back Full Screen Close Quit


2.9.2 Non-convexity of feasible set
• Integer programming problems generally have non-convex feasible sets.
• The example feasible set is non-convex since a line drawn between any
two points in the feasible set does not entirely lie in the set.
• There is usually a duality gap in dual formations of integer programming
problems.

2.9.3 Discussion
• Because of the non-convexity of the feasible set, iterative improvement
algorithms are usually insufficient to solve integer programming
problems.
• General-purpose algorithms for solving integer programming problems
can be extremely computationally intensive.
• Some particular integer programming problems can be solved efficiently.

Title Page ◭◭ ◮◮ ◭ ◮ 82 of 95 Go Back Full Screen Close Quit


2.9.4 Types of problems
• As with optimization problems involving continuous variables, we can
consider integer problems with feasible sets that are defined in terms of:
– equality constraints, and
– inequality constraints.
• Commercial software for integer programming is available for integer
linear programs:
minn {c† z|Az = b,Cz ≤ d},
z∈Z
• and integer quadratic programs:
 
1 † †

min x Qx + c z Az = b,Cz ≤ d .
z∈Zn 2

Title Page ◭◭ ◮◮ ◭ ◮ 83 of 95 Go Back Full Screen Close Quit


2.10 Mixed-integer optimization
• In some cases, only some of the entries of the decision vector x must be
integer-valued.
• A mixed-integer programming problem seeks the minimum and
minimizer over choices of x such that some entries of x have integer
values and some are continuous valued.

Title Page ◭◭ ◮◮ ◭ ◮ 84 of 95 Go Back Full Screen Close Quit


2.10.1 Example 
z
• Suppose that P ⊆ R2 is the set of points such that z ∈ {0, 1} and
x
2z ≤ x ≤ 4z.
x
6
4

Fig. 2.21. Example


0 • - z feasible set P for
0 1 mixed-integer program.

Title Page ◭◭ ◮◮ ◭ ◮ 85 of 95 Go Back Full Screen Close Quit


2.10.2 Discussion
• Again, because of the non-convexity of the feasible set, general purpose
algorithms are very computationally intensive.
• Commercial software for mixed-integer programming is available for
mixed-integer linear programs and mixed-integer quadratic
programs.
• As with integer programming problems, there is usually a duality gap
with mixed-integer programming problems.

Title Page ◭◭ ◮◮ ◭ ◮ 86 of 95 Go Back Full Screen Close Quit


2.10.3 Example
 of duality
gap  
z z
• Consider the problem min[xz]∈P f g = 0 , where
x x
P ⊆ R2 , f : R2 → R, and g : R2 → R are defined by:
  
z
∈ R2 z ∈ {0, 1}, 2z ≤ x ≤ 4z ,

P =
x
so that P is the earlier example feasible set,
0, if z = 0 and x = 0,

  
z (with the generator “off”),

∀x ∈ P, f =
x  4 + x, if z = 1 and 2 ≤ x ≤ 4,

(with the generator“on” and producing x),
   
z z
∀x ∈ R, g = 3 − x, so if g = 0 then demand 3 equals supply x.
x x
• Note that the generator has two variables associated with its operation:
– a “unit commitment” variable z, and
– a “production” variable x.

Title Page ◭◭ ◮◮ ◭ ◮ 87 of 95 Go Back Full Screen Close Quit


Example of duality gap, continued
• The minimizer of this
 problem is z⋆ = 1 and x⋆ = 3.
z⋆

• The minimum is f = 4 + x⋆ = 7.
x⋆

Title Page ◭◭ ◮◮ ◭ ◮ 88 of 95 Go Back Full Screen Close Quit


Example of duality gap, continued
• We consider the dual function D : R → R ∪ {−∞} with respect to the
equality constraint, defined by:
  
z
∀λ ∈ R, D (λ) = inf L ,λ ,
[x]∈P
z x
   
z
= inf f + λ(3 − x) .
[x ]
z
∈P x
 
z
• To minimize the Lagrangian over ∈ P, we will need to consider the
x
values of λ.
• First note that:
  
z 3λ, if z = 0 and x = 0,
f + λ(3 − x) =
x 3λ + 4 + (1 − λ)x, if z = 1 and 2 ≤ x ≤ 4,

3λ, if z = 0 and x = 0,
=
3λ + 4 − (λ − 1)x, if z = 1 and 2 ≤ x ≤ 4.

Title Page ◭◭ ◮◮ ◭ ◮ 89 of 95 Go Back Full Screen Close Quit


Example
  of duality
gap, continued
z z
• To minimize L ,λ = f + λ(3 − x), we must compare 3λ
x x
to values of 3λ + 4 − (λ − 1)x with 2 ≤ x ≤ 4.
• We consider various cases for λ.
λ≤1
3λ < 3λ + 4,
≤ 3λ + 4 + (1 − λ)x, for 2 ≤ x ≤ 4.
• So, the Lagrangian is minimized for z = 0, x = 0.
• D (λ) = 3λ.
1<λ<2
• Then (λ − 1)x < 4 for 2 ≤ x ≤ 4.
3λ < 3λ + 4 − (λ − 1)x, for 2 ≤ x ≤ 4.
• So, the Lagrangian is again minimized for z = 0, x = 0.
• D (λ) = 3λ.

Title Page ◭◭ ◮◮ ◭ ◮ 90 of 95 Go Back Full Screen Close Quit


Example of duality gap, continued
λ=2
• Then 3λ < 3λ + 4 − (λ − 1)x for 2 ≤ x < 4.
• Also, 3λ = 3λ + 4 − (λ − 1)x for x = 4.
• So, the Lagrangian has two minimizers:
z = 0, x = 0, and
z = 1, x = 4.
• D (λ) = 3λ.
λ>2
3λ > 3λ + 4 − (λ − 1)x, for x = 4.
• Moreover, the right-hand side decreases with increasing x, so it is
minimized over 2 ≤ x ≤ 4 by x = 4.
• So, the Lagrangian is minimized for z = 1, x = 4.
• D (λ) = 3λ + 4 − (λ − 1)4 = 8 − λ.

Title Page ◭◭ ◮◮ ◭ ◮ 91 of 95 Go Back Full Screen Close Quit


Example of duality gap, continued
• The figure shows that the maximum of the dual occurs at λ⋆ = 2 with
D (λ⋆) = 6.
• However, the corresponding value of x does not meet demand.
D (λ), x
8

Fig. 2.22. Dual func-


3
tion D (λ) (shown solid)
2 and the corresponding
value of z (shown
dotted) versus λ for
1

0
0 0.5 1 1.5 2 2.5 3 λ example mixed-integer
λ ⋆
problem.

Title Page ◭◭ ◮◮ ◭ ◮ 92 of 95 Go Back Full Screen Close Quit


2.10.4 Economic interpretation of duality gap
• In this problem there is a duality gap, since:
 ⋆ 
z
f ⋆ = 7 > 6 = D (λ⋆).
x
• No “price” for production will equate demand and supply:
– For λ < 2, a profit maximizing firm will produce nothing.
– For λ = 2, a profit maximizing firm is indifferent between producing
nothing and pricing 4 units. It prefers these alternatives to producing at
any other level.
– For λ > 2, a profit maximizing firm will want to produce 4 units,
exceeding demand.
• Whenever there is a duality gap, there are no prices on the corresponding
“dualized” constraints that will induce profit maximizing firms to satisfy
the constraints.

Title Page ◭◭ ◮◮ ◭ ◮ 93 of 95 Go Back Full Screen Close Quit


2.11 Summary
• In this chapter we have defined optimization problems.
• We illustrated particular types of problems with elementary examples.
• We defined the notion of convexity.
• We defined local and global and strict and non-strict minima and
minimizers of optimization problems.
• Continuous, integer and mixed-integer problems were defined.
• Duality and optimality conditions for continuous problems were
presented.

This chapter is based, in part, on Chapters 2 and 10 of Applied


Optimization: Formulation and Algorithms for Engineering Systems,
Cambridge University Press 2006.

Title Page ◭◭ ◮◮ ◭ ◮ 94 of 95 Go Back Full Screen Close Quit


Homework 2: Due Thursday, February 10
Consider the function f : R2 → R defined by:
∀x ∈ R2 , f (x) = (x1)2 + (x2 )2 + 2x2 − 3.
(i) Sketch the contour sets C f ( f˜) for f˜ = 0, 1, 2, 3.
(ii) Sketch on the same graph the set of points satisfying g(x) = 0
where g : R2 → R is defined by:
∀x ∈ R2 , g(x) = x1 + 2x2 − 3.
(iii) Use your sketch to find the minimum and minimizer of
min { f (x)|g(x) = 0}.
x∈R2

Title Page ◭◭ ◮◮ ◭ ◮ 95 of 95 Go Back Full Screen Close Quit

También podría gustarte