Unit Commitment Using Mixed-Integer Linear Programming

advertisement
Introduction to Mixed Integer
Linear Programming
LP formulation of Economic Dispatch
C1
C1 = a1 + c1x1
1
2
3
L
Minimize CT = a1 + a2 + a3 +
c1 x1 + c2 x2 + c3 x3
Subject to: x1 + x2 + x3 = L
a1
C2
MIN
3
P
•
•
•
•
£ x3 £ P
MAX
3
Objective function is linear
All constraints are linear
All variables are real
Problem can be solved using
standard linear programming
© 2011 D. Kirschen & the University of Washington
x1
C2 = a2 + c2 x2
P1MIN £ x1 £ P1MAX
P2MIN £ x2 £ P2MAX
P1MAX
P1MIN
a2
C3
P2MAX
P2MIN
x2
C3 = a3 + c3 x3
a3
P3MIN
P3MAX
x3
1
Can we use LP for unit commitment?
C1
x1 = 0 or P1MIN £ x1 £ P2MAX
a1
x2 = 0 or P2MIN £ x2 £ P2MAX
C2
P1MAX
P1MIN
x1
x3 = 0 or P3MIN £ x3 £ P3MAX
a2
The variables no longer have
a contiguous domain
(Non-convex set)
Standard linear programming
is no longer applicable
© 2011 D. Kirschen & the University of Washington
C3
P2MAX
P2MIN
x2
a3
P3MIN
P3MAX
x3
2
Mixed Integer Linear Programming (MILP)
• Some decision variables are integers
– Special case: binary variables {0,1}
• Other variables are real
• Objective function and constraints are linear
© 2011 D. Kirschen & the University of Washington
3
Example
Except for the fact that the variables are integer, this looks
very much like a linear programming problem.
© 2011 D. Kirschen & the University of Washington
4
Example
x2
8
4x1 + 2x2 = 15
6
4
2
x1 + 2x2 = 8
x1 + x2 = 5
0
2
© 2011 D. Kirschen & the University of Washington
4
6
8
x1
5
LP relaxation
x2
Let us relax the constraint that the
variables must be integer.
8
4x1 + 2x2 = 15
The problem is then a regular LP
6
4
Solution of the relaxed LP
x1 = 2.5; x2 = 2.5; Objective = 12.5
2
x1 + 2x2 = 8
x1 + x2 = 5
0
2
© 2011 D. Kirschen & the University of Washington
4
Objective: 3x1 + 2x2
6
8
x1
6
LP relaxation
x2
8
4x1 + 2x2 = 15
6
The solution of the relaxed problem
is always better than the solution of
original problem!
(Lower objective for minimization
problem, higher for maximization)
4
Solution of the relaxed LP
x1 = 2.5; x2 = 2.5; Objective = 12.5
2
x1 + 2x2 = 8
x1 + x2 = 5
0
2
© 2011 D. Kirschen & the University of Washington
4
6
8
x1
7
Solution of the integer problem
x2
8
4x1 + 2x2 = 15
6
4
Solution of the relaxed LP
x1 = 2.5; x2 = 2.5; Objective = 12.5
2
x1 + 2x2 = 8
x1 + x2 = 5
0
2
© 2011 D. Kirschen & the University of Washington
4
6
8
x1
8
Solution of the integer problem
x2
8
4x1 + 2x2 = 15
Solution of the original problem
x1 = 2; x2 = 3; Objective = 12.0
6
4
Solution of the relaxed LP
x1 = 2.5; x2 = 2.5; Objective = 12.5
2
x1 + 2x2 = 8
x1 + x2 = 5
0
2
© 2011 D. Kirschen & the University of Washington
4
6
8
x1
9
Naïve rounding off
x2
x1
IP solution
LP solution
The optimal integer solution can be far away from the LP solution
“Far away” can be difficult to find when there are many dimensions
© 2011 D. Kirschen & the University of Washington
10
Finding the integer solution
• Large number of integer variables
• Vast number of possible integer solutions
• Need a systematic procedure to search this
solution space
• Fix the variables to the nearest integer one at
a time
• “Branch and Bound” algorithm
© 2011 D. Kirschen & the University of Washington
11
Another example
Relaxed LP solution: (1.75, 0.75)
© 2011 D. Kirschen & the University of Washington
12
Branch on x1
Problem 0
x1 ³ 0; x2 ³ 0
x1 £ 1
Problem 1
© 2011 D. Kirschen & the University of Washington
x1 ³ 0 ; x2 ³ 0
x1 ³ 2
Problem 2
13
Branch on x1
Problem 1
Solution of
Problem 1
© 2011 D. Kirschen & the University of Washington
Problem 2
Solution of Problem 2
14
Search Tree: first layer
Solution of Problem 1:
• x1 integer
• x2 real
• Not a feasible solution yet
• Can still branch on x2
© 2011 D. Kirschen & the University of Washington
Solution of Problem 2:
• x1 & x2 integer
• Feasible solution of
the original problem
• Bound on the optimum
• Best solution so far
15
Branch on x2
Problem 1
x1 £ 1; x2 ³ 0
x1 ³ 0; x2 ³ 0
x1 £ 1; x2 £ 1
Problem 3
© 2011 D. Kirschen & the University of Washington
x1 ³ 0; x2 ³ 0
x1 £ 1; x2 ³ 2
Problem 4
16
Search Tree: second layer
No solution
No integer solution yet
© 2011 D. Kirschen & the University of Washington
17
Branch and Bound: what next?
Optimal solution
Can’t go any
further
in this
No solution
direction
© 2011 D. Kirschen & the University of Washington
Solution of relaxed
problem 4 is
bounded by solution
of problem 2. No
point in going further
18
Comments on Branch and Bound
• Search tree gets very big if there are more
than a few integer or binary variables
• Even with the bounds provided by the relaxed
solutions, exploring the tree usually takes a
ridiculous amount of time
• Clever mathematicians have developed
techniques to identify “cuts”
– Constraints based on the structure of the problem
that eliminate part of the search tree
– “Branch and Cut” algorithm
© 2011 D. Kirschen & the University of Washington
19
Duality Gap
• Finding the optimal solution for a large
problem can take too much time even with
branch and cut
• Best solution of relaxed problem provides a
bound on the solution
• Duality gap: Difference between best solutions
of relaxed problem and actual problem
• Stop searching the tree if duality gap is
sufficiently small
© 2011 D. Kirschen & the University of Washington
20
Download