0% found this document useful (0 votes)
37 views25 pages

Ee/Econ 458 Introduction To Linear Programming: J. Mccalley

1) The problem aims to maximize profits from producing materials X and Y using 3 people's time as a constrained resource. 2) It can be formulated as a linear program with objectives of profit per unit for each material and constraints of each person's time limit. 3) Solving the linear program reveals the optimal solution is to produce only material X up to 12 units for a maximum profit of $60.

Uploaded by

karen dejo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views25 pages

Ee/Econ 458 Introduction To Linear Programming: J. Mccalley

1) The problem aims to maximize profits from producing materials X and Y using 3 people's time as a constrained resource. 2) It can be formulated as a linear program with objectives of profit per unit for each material and constraints of each person's time limit. 3) Solving the linear program reveals the optimal solution is to produce only material X up to 12 units for a maximum profit of $60.

Uploaded by

karen dejo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

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

*From Chapter 6 of the MISO Energy &


Operating Reserve Markets, Business
Practices Manual, BPM-002-r10, JUN-29-
2011. 2
Security Constrained Economic Dispatch
This problem may be simplified to the following
GIVEN:
•A number of gens make price-quantity offers to sell
•A number of LSEs make price-quantity bids to buy
MAXIMIZE social surplus U(P)-C(P), where
U(P) is the composite utility (value) function for consumers,
C(P) is the composite cost function for suppliers, and
P is real power injection vector of network nodes (+ for gen, - for
load).
SUBJECT TO constraints:
- Pmin<P<Pmax
- Sum of generation = sum of demand
- Flows on each circuit <= maximum flow for circuit
The SCED algorithm uses a Linear
Programming (LP) solver, and so we will study
LP to understand this optimization method. 3
Some preliminaries
1. Maximization of a function is equivalent to minimization
of the negated function,
 maximize f(x) is the same as minimize (-f(x))

2. An inequality constraint may be equivalently written as


g(x)>b or -g(x)<-b
And so any of the following problems are equivalent:
min  f ( x) max   f ( x)
s.t. h( x )  c s.t. h( x )  c
g ( x ) b g ( x ) b

min  f ( x) max   f ( x)


s.t. h( x )  c s.t. h( x )  c
 g ( x)  b  g ( x)  b 4
Linear Program – Standard Form
min  f ( x)
Problem P: s.t. h( x )  c
g ( x)b
Requirements:
f(x) is a linear function in x, i.e., a1x1+a2x2+…+anx3
All equalities hj(x)=cj are linear functions in x.
All inequalities gk(x)=bk are linear functions in x.

 Then Problem P is a linear program.

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 xS

Recall: If f(x) is a convex function, and if S is a convex set, then the


above problem is a convex programming problem.
f(x) is linear, therefore a convex function.
If S is formed by inequalities, it is polyhedral, therefore convex.
One linear equality reduces feasible set
S to the line.
S
More than one reduces feasible set S to
their intersections.
S is convex in both cases.
 A linear program is a convex programming problem.
 If we find a locally optimal solution, it will be globally
6
optimal.
Example 1
max f ( x)  3 x1  x2
s.t. x1  x2  16
 x1  x2  4

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

We can push f(x) as far


negative as we like and
there will always be an
intersection point with
the equality constraint.
This problem is unbounded.
This can happen with linear
programs.
But what about the inequality constraints? 8
Example 1
max f ( x)  3 x1  x2
s.t. x1  x2  16 Observe g(x)<b
implies to add
 x1  x2  4 this term.

Form Lagrangian: F ( x,  )  3x1  x2   ( x1  x2  16)   ( x1  x2  4)


F
 3    0
x1
F
1     0
x2
F
 x1  x2  16  0
KKT Conditions 
F
  x1  x2  4  0


 ( 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

Observation: The solution


occurred at a point where two
active constraints intersect.

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

X 40 min 24 min 20 min


Y 30 min 32 min 24 min
Objective: Maximize profits
Resource: Time of each person
Activities: Producing materials X and Y. 13
Example 2
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.
  Person
Material 1 2 3

X 40 min 24 min 20 min


Y 30 min 32 min Produce only X
24 min
max f ( x, y )  5 x  8 y 40 x  480  x  12
Subject to 24 x  480  x  20
40 x  30 y  480 (person 1) 20 x  480  x  24
f ( x, y )  5 x  8 y  5(12)  8(0)  60
24 x  32 y  480 (person 2)
Produce only Y
20 x  24 y  480 (person 3) 30 y  480  y  16
x0 32 y  480  y  15
24 y  480  y  20
y0
f ( x, y )  5 x  8 y  5(0)  8(15)  120
14
Example 2
Conclusion: Producing only Y is better than producing only X,
and if we have only these two options, we will produce only Y.
max f ( x, y )  5 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)
x0
y0

Where on the plot are the


solutions we just found?

Can we increase profits beyond $120 by producing some of each?


15
Example 2
Plot the contours of increasing objective function.

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)
x0
y0
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)
x0
y0
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
 
 

With 40 constraints, Some problems have


there would be 780 millions of
corner points to check. constraints!
21
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

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.

Optimality (stopping) condition: If a corner point feasible solution is


equal to or better than all its adjacent corner point feasible solutions,
then it is equal to or better than all other corner point feasible
solutions, i.e., it is optimal.
Main ideas of proof:
1.If objective function monotonically increases (decreases) in some direction within the
decision-vector space, then each adjacent corner point will become progressively better in the
direction of objective function increase (decrease) such that the last corner point must have two
adjacent corner points that are worse.
2.The monotonicity of objective function increase (decrease) is guaranteed by its linearity.
24
High-Level Version of Simplex Method
1. Initialization: Start at a corner point solution.
2. Iterative step: Move to a better adjacent corner point
feasible solution.
3. Optimality test: Determine if the current feasible
corner point is optimal using our optimality test (if
none of its adjacent feasible corner points are better,
then the current feasible corner point is optimal).
a. If the current feasible corner point is optimal, the
solution has been found, and the method
terminates.
b. If the current feasible corner point is not optimal,
then go to 2.
25

You might also like