Ee/Econ 458 Introduction To Linear Programming: J. Mccalley
Ee/Econ 458 Introduction To Linear Programming: J. Mccalley
1
Security Constrained Economic Dispatch*
SUBJECT TO constraints on
Gen resource & demand response resource
Demand response resource
External asynchronous constraints
Stored energy reserve constraints
Energy transaction constraints
OPF constraints
Reliability constraints
- System reserves
- transmission
- watchlist transmission flowgates
- contingencies
5
Linear Program – A Convex Program
min f ( x) min f ( x)
Problem P: s.t. h( x ) c subject to
Feasible set
g ( x)b xS
Ignore
inequality. Form F ( x, ) 3 x1 x2 ( x1 x2 16)
Lagrangian:
Apply first-order F 3 0 3
x1
conditions: F
1 0 1 What happened?
x 2
F
x1 x2 16 0
7
Example 1
max f ( x) 3 x1 x2
s.t. x1 x2 16
( x1 x2 4) 0
0 9
Example 1
0 0 1 1 x1 3 x1 6
max f ( x) 3 x1 x2 0 0 1 1 x2 1 x 10
2
s.t. x1 x2 16 1
1 0 0 16
2
0 4
1 1 0
1
x1 x2 4
The feasible region associated
with the inequality constraint
is below the dotted line
The feasible region for the
problem is below the dotted
line and on the thick one
(the equality constraint).
The feasible region for the
problem includes everything
on the thick line to the right of
10
the intersection point (red
Example
0 0 1 1 x1 3 x1 6
max f ( x) 3 x1 x2 0 0 1 1 x2 1 x 10
2
s.t. x1 x2 16 1
1 0 0 16
2
0 4
1 1 0
1
x1 x2 4
Minimize the objective:
Choose solution that has
smallest value of f(x) but is in
the feasible region.
Choose lowest contour
touching the feasible (red) line.
This is shown by the dashed
line at the end of its animation.
Graphical analysis reveals the
solution is: x1=6, x2=10 (red dot) f ( x) 3 x1 x2 3(6) 10 28
11
Example 1
max f ( x) 3 x1 x2 Definition: Any constraint
comprising the feasible region
s.t. x1 x2 16 boundary is an active constraint.
x1 x2 4
12
Example 2
Resource allocation: Optimize an objective through allocating
resources to activities subject to constraints on resources.
Three people work 8 hours/day (480 min) making materials X and Y.
Their company makes $5 profit per unit X, $8 profit per unit Y. The
times required for each person’s contribution towards making a unit are
below.
Note: A unit of material requires contributions from all three people,
i.e., no individual may make either material on their own.
Person
Material 1 2 3
40 x 30 y 480 (person 1)
24 x 32 y 480 (person 2)
20 x 24 y 480 (person 3)
x0
y0
f ( x, y ) 5 x 8 y
f 5x
f 5x 8 y y
8
The contour f=60 passes
through the point (12,0).
The contour f=120 passes
through the point (0,15).
Is it possible for any point to
be better than the red one?
No. All other points on the f=120 contour occur above the feasible
region; all other contours touching the feasible region are below 120.
Optimal solution is again at a point where 2 active constraints intersect.
16
Example 3
Same constraints but slightly different objective.
max f ( x, y ) 9 x 8 y
Subject to
40 x 30 y 480 (person 1)
24 x 32 y 480 (person 2)
20 x 24 y 480 (person 3)
x0
y0
Which of the points is optimal?
The blue one is optimal since there must be a contour between
f=120 and f=130 that just touches it, and any contour with higher
f will not touch the feasible region.
Optimal solution is again at a point where 2 active constraints intersect.
17
Example 4
Same constraints but slightly different objective.
max f ( x, y ) 15 x 8 y
Subject to
40 x 30 y 480 (person 1)
24 x 32 y 480 (person 2)
20 x 24 y 480 (person 3)
x0
y0
Which of the points is optimal?
The yellow one is optimal since there must the contour f=180 just
touches it, and any contour with higher f will not touch the
feasible region.
Optimal solution is again at a point where 2 active constraints intersect.
18
Conclusion
The optimal solution was
always at a point where
two active constraints
intersect (corner points).
This always happens in
an LP.
The solution to an LP,
if one exists, is always
at a corner point.
Solution strategy: Search the corner points!
19
A consideration
How many corner points
does our problem have?
(0,0), (12,0),
(1.7143, 13.7143), (0,15)
But what about (0,16),
(0,20), (20,0), and (24,0)
and the two more outside
the plot?
The first set are feasible
corner points. Revised solution
strategy: Search the
The second set are
feasible corner points!
infeasible corner points. 20
Why is our revision important?
Assuming none of our
constraints are parallel,
the number of corner
points is obtained as a
combination of 5 distinct
things (constraints) taken
2 at a time. In our case:
5 5! 5 * 4 * 3 * 2 *1
2 2!(5 2)! (2 * 1)(3 * 2 *1) 10
5
4 2
2 6
2
100
90
3
2 7 80
2
70
60
50
8
2 40
2
30
9
20
1 10
2 5 10
22
An approach
5
4 2
2 6
2
100
90
3
2 7 80
2
70
60
50
8
2 40
2
30
9
20
1 10
2 5 10
23
An approach
1. Pick a corner point at random.
2. Move to an adjacent corner point that is better.
a. If there are two that are better, move to the one that is best.
b. If there are no better adjacent corner points, the current
corner point is the solution to the problem.