Unit Commitment,: Jdm@linux3.ece - Iastate.edu
Unit Commitment,: Jdm@linux3.ece - Iastate.edu
edu
1.0 Introduction
If one has a very good solution method to solve the UC problem (or
the SCUC problem), then the good solutions that come will save a
lot of money relative to using a not-so-good solution method.
Regardless of the solution method, however, the solutions may not
save much money if the forecast of the demand that needs to be met
contains significant error. Having a “perfect” solution for a
particular demand forecast is not very valuable if the demand
forecast is very wrong. Therefore demand forecasting is very
important for solving the UC. Systems that are expecting high wind
energy penetrations are concerned about this fact, since high wind
penetration increases demand forecast uncertainty (the demand that
the thermal units must meet is load-wind). This is why so much
attention is being paid to improving wind power forecasting. It is
also why so much attention is being paid to creating UC models and
solvers that handle uncertainty.
1
We begin these notes with a motivating example in Section 2.0, then
we provide the explicit problem statement, in words, in Section 3.0.
Section 4.0 provides the analytic problem statement. Section 5.0
provides an overview of solution methods. Section 6.0 ….
Section 7.0 describes the most important solution method – branch
and bound. Section 8.0 illustrates the method on the UC problem.
Section 9.0 provides an overview of the SCUC used by several ISOs
today.
Fig. 1
Consider that we have three units to supply the load. The unit cost
rates are expressed below.
C1( Pg1) = 5 + 0.5Pg1 + Pg21 , 0 ≤ Pg1 ≤ 5
C2 ( Pg 2 ) = 5 + Pg 2 + 0.5Pg22 , 0 ≤ Pg 2 ≤ 10
C3 ( Pg 3 ) = 5 + 3Pg 3 + 2 Pg23 , 0 ≤ Pg 3 ≤ 3
Note that the available capacity is 5+10+3=18.
2
In the economic dispatch problem, we identified the minimum cost
for each hour, under the assumption that all units were connected.
Approach 1:
Observe that this method will certainly satisfy the load. But it does
not achieve minimum cost because, for example, we could simply
run unit 1 by itself from 0 to 6 hours and not incur the automatic
$10/hr required by running units 2 and 3 with Pg2=Pg3=0.
Approach 2:
Let’s try to run only the necessary units for each load-level. But we
need to decide which units.
3
To answer this question, let’s consider that there are 7 possible
combinations of units. We will denote each combination as Sk. They
are enumerated below.
S1: G1
S2: G2
S3: G3
S4: G1, G2
S5: G1, G3
S6: G2, G3
S7: G1, G2, G3
However, we observe that unit 3 is very expensive therefore let’s
run this unit only if we must. This means we will eliminate any of
the above combinations that have G3 except the last one. Therefore
we now only have four possibilities:
S1: G1
S2: G2
S3: G1, G2
S4: G1, G2, G3
We desire to determine which combination should be chosen at each
of the various load levels.
This is easy for S1 because in this case, Pd=Pg1, and also for S2,
because in this case, Pd=Pg2. Therefore, we have
CT 1( Pd ) = 5 + 0.5Pd + Pd2 , 0 ≤ Pd ≤ 5
CT 2 ( Pd ) = 5 + Pd + 0.5Pd2 , 0 ≤ Pd ≤ 10
For S3 and S4, we have more than one generator, and so how do we
get CT3(Pd)?
4
What we will do here is to write the optimality condition for each
generator, which is
∂Ci
λ=
∂Pgi
We will also use
N
Pd = ∑ Pgi
i =1
where N=2 for S3 and N=3 for S4.
For S3:
CT 3 ( Pd ) = 5 + 0.5Pg1 + Pg21 + 5 + Pg 2 + 0.5Pg22
, (&)
= 10 + 0.5Pg1 + Pg21 + Pg 2 + 0.5Pg22
Using the optimality condition:
∂C ∂C
, λ = ∂P = ∂P
1 2
g1 g2
we can write that
0.5 + 2 Pg1 = 1 + Pg 2 ⇒ Pg 2 = 2 Pg1 − 0.5 (*)
From power balance, we have
Pd = Pg1 + Pg 2 (**)
Substitution of (*) into (**) results in
Pd = Pg1 + 2 Pg1 − 0.5 = 3Pg1 − 0.5
Solving for Pg1 results in
Pd + 0.5
Pg1 = (#)
3
Substitution of (#) into (*) results in
5
Pd + 0.5 4P − 1
Pg 2 = 2 Pg1 − 0.5 = 2 − 0.5 = d (##)
3 6
Substitution of (#) and (##) into (&) above results in
2 2
⎛ P + 0.5 ⎞ ⎛ Pd + 0.5 ⎞ ⎛ 4 Pd − 1 ⎞ ⎛ 4P − 1 ⎞
CT 3 ( Pd ) = 10 + 0.5⎜ d ⎟+⎜ ⎟ +⎜ ⎟ + 0.5⎜ d ⎟
⎝ 3 ⎠ ⎝ 3 ⎠ ⎝ 6 ⎠ ⎝ 6 ⎠
For S4:
We will not go through the detailed algebra here but just give the
result, which is
CT 4 ( Pd ) =
2
⎛ P + 1.125 ⎞ ⎛ Pd + 1.125 ⎞
15 + 0.5⎜ d ⎟+⎜ ⎟ + 0.571Pd + 0.143
⎝ 3 .5 ⎠ ⎝ 3 .5 ⎠
+ 0.5(0.571Pd + 0.143)2 + 3(0.1429Pd − 0.4643) + 2(0.1429Pd − 0.4643)2
and this relation is applicable for 0 ≤ Pd ≤ 18 .
6
Use S2 Use S3 Use S4
Fig. 2
7
S1: G1 NEVER
S2: G2 0-5
S3: G1, G2 5-13
S4: G1, G2, G3 13-18
G1,G2, G3
G1,G2
G1,G2
G1,G2
G2 G2
Fig. 3
8
The fixed startup costs (generally labor) will be denoted by Cf. The
variable startup costs are denoted by CV.
9
o t is the shutdown duration
Note from the cold reserve equation that
• t=0 implies CVc=0, meaning the unit is not allowed time to cool.
• t=∞ implies CVc=Ccf, meaning the unit becomes completely cold.
You will find in the homework problem 1 that when including start-
up costs, the peaks allow only one solution (S3) but the valleys
allow three which we designate as follows:
S2-H: This is G2 up, with G1 in hot reserve
S2-C: This is G2 up, with G1 in cold reserve
S3: This is G1, G2 up.
You can see that the problem, peaks and valleys, admits only the
above three possible states.
For the homework problem, of our three possible states, only one,
S3, is feasible during the peaks when the demand is 11, but all three
states are feasible during the valleys when the demand is only 3 or 4.
Figures 4 and 5 represents the situation.
10
Fig. 4
S3
S2-H
S2-C
P1 V1 P2 V2 P3 V3 P4
0 12 18 36 42 58 66 72
4 11 3 11 4 11 4 11
Fig. 5
11
We can also associate a value with each arc as the cost if the system
is in the state from which the arc begins. We can compute these
costs for each state and for each different load level.
I will not provide the expressions to make these computations (you
will need to do that in your homework). Rather, I will just provide
the results in terms of Fig. 6.
S2-C
P1 V1 P2 V2 P3 V3 P4
0 12 18 36 42 58 66 72
4 11 3 11 4 11 4 11
Fig. 6
Observe that the UC problem has been converted to a new
problem…
Assume that the values on the arcs are arc-lengths. Then we desire
to find the shortest path between the first and last node in the
network.
It is easy to see the shortest path in our node-arc model, but consider
a case where we have N units instead of 3.
12
Even if we limit the number of states per unit to two (on or off), then
at each loading level, there are 2N-1 possible states (nodes) to
consider, and we still have not thought about the many different
transitions (arcs). This represents the curse of dimensionality.
If there are m intervals of time for which we must find a solution,
each having 2N-1 possible states, then we will have a total number of
possible solutions equal to (2N-1)m.
Two questions:
1. How do we limit the dimensionality of the problem?
2. How do we algorithmically solve the problem of how to find
the shortest path?
Question 1:
There are two approaches:
A. Limit the number of nodes at each time interval.
B. Limit the number of possible transitions (arc) between time
intervals.
Example:
Consider 3 gens with 2 possible states (nodes): on or off.
The total number of nodes possible at any time interval is 7.
But let’s now prioritize the units using the following rule:
We always turn on unit i before unit i+1. Therefore, we now
only have 3 possible states (nodes), as follows:
S1=G1
S2=G1G2
S3=G1G2G3
In general, this rule creates all states Si=G1G2…Gi
13
The prioritization rule is typically done according to economic
criteria and security criteria.
Note also that this limits the transitions if you can quantify the
maximum possible load variation for one period, see Fig. 7.
Fig. 7
Question 2: How to algorithmically solve the “shortest path”
problem?
Several alternatives:
• Dijkstra’s algorithm
• Dial’s algorithm
• Label correcting algorithms
• All-pair algorithm
• Dynamic programming: forward and backward
Dynamic programming was used many years ago but not has fallen
out to what are called branch and bound methods, which we will
explore more fully.
14
4.0 Problem statement
1. Min Objective=UnitEnergyCost+StartupCost+ShutdownCost
+TransactionCost
+VirtualBidCost+ DemandBidCost
+Wheeling Cost
Subject to:
2. Area Constraints:
a. Demand + Net Interchange
b. Spinning and Operating Reserves
3. Zonal Constraints:
a. Spinning and Operating Reserves
4. Security Constraints
5. Unit Constraints:
a. Minimum and Maximum Generation limits
b. Reserve limits
c. Minimum Up/Down times
d. Hours up/down at start of study
e. Must run schedules
f. Pre-scheduled generation schedules
g. Ramp Rates
h. Hot, Intermediate, & Cold startup costs
i. Maximum starts per day and per week
j. Maximum Energy per day and per study length
15
a. UnitEnergyCost: This is the total costs of supply over T, based on
the supply offers made, in $/MWhr.
b. StartupCost: This is the total cost of starting units over T, based
on the startup costs
c. ShutdownCost: This is the total cost of shutting down units over
T, based on the shutdown costs.
d. TransactionCost: Transactions are bilateral agreements made
outside the market. Transaction cost for a particular transaction is
the difference between nodal prices of transaction sink and source
nodes, multiplied by the MW value of the transaction. So
TransactionCost is the total transaction costs over T.
e. VirtualBidCost: Purely financial energy bids and offers made to
arbitrage between the day ahead and real time market prices.
f. DemandBidCost: This is the total “cost” of demand over T, based
on the demand bids made, in $/MWhr.
g. WheelingCost: I do not find this defined in the PJM materials but
assume this is the transmission service cost associated with non-firm
transactions.
Revenue from transaction sales, virtual bids and demand bids are
added as negative costs so that by minimizing the objective the
profit is maximized. For Day Ahead studies, this results in a large
negative objective cost.
16
Fig. 8 [1]
Some regions within the control area, called zones, may also have
spinning and operating reserve constraints, particularly if
transmission interconnecting that region with the rest of the system
is constrained.
17
d. Hours up/down at start of study: The problem must begin at some
initial time period, and it will necessarily be the case that all of the
units will have been either up or down for some number of hours at
that initial time period. These hours need to be accounted for to
ensure no unit is switched in violation of its minimum up/down
times constraint.
e. Must run schedules: There are some units that are required to run
at certain times of the day. Such requirements are most often driven
by network security issues, e.g., a unit may be required in order to
supply the reactive needs of the network to avoid voltage instability
in case of a contingency, but other factors can be involved, e.g.,
steam supply requirements of co-generation plants.
f. Pre-scheduled generation schedules: There are some units that are
required to generate certain amounts at certain times of the day. The
simplest example of this is nuclear plants which are usually required
to generate at full load all day. Import, export, and wheel
transactions may also be modeled this way.
g. Ramp Rates: The rate at which a unit may increase or decrease
generation is limited, therefore the generation level in one period is
constrained to the generation level of the previous period plus the
generation change achievable by the ramp rate over the amount of
time in the period.
h. Hot, Intermediate, & Cold startup costs: A certain amount of
energy must be used to bring a thermal plant on-line, and that
amount of energy depends on the existing state of the unit. Possible
states are: hot, intermediate, and cold. Although it costs less to start
a hot unit, it is more expensive to maintain a unit in the hot state.
Likewise, although it costs more to start a cold unit, it is less
expensive to maintain a unit in the cold state. Whether a de-
committed unit should be maintained in the hot, intermediate, or
cold state, depends on the amount of time it will be off-line.
i. Maximum starts per day and per week: Starting a unit requires
people. Depending on the number of people and the number of units
at a plant, the number of times a particular unit may be started in a
day, and/or in a week, is usually limited.
18
j. Maximum Energy per day and per study length: The amount of
energy produced by a thermal plant over a day, or over a certain
study time T, may be less than Pmax×T, due to limitations of other
facilities in the plant besides the electric generator, e.g., the coal
processing facilities. The amount of energy produced by a reservoir
hydro plant over a time period may be similarly constrained due to
the availability of water.
19
min ∑∑ zit Fi + ∑∑ git Ci + ∑∑ yit Si + ∑∑ xit H i
t 42
1 i 43 t 4i243
1 t 42
1 i 43 t 4
1 i243
Fixed Costs Production Costs Startup Costs Shutdown Costs
(1)
subject to
power balance ∑ git = Dt = ∑ dit ∀ t, (2)
i i
20
• aij is linearized coefficient relating bus i injection to line k flow
• MxFlowk is the maximum MW flow on line k
• aki is linearized coefficient relating bus i injection to line k flow
( j)
under contingency j,
• MxFlowk is the maximum MW flow on line k under contingency j
( j)
One should note that our problem is entirely linear in the decision
variables. Therefore this problem is a linear mixed integer program,
and it can be compactly written as
T
min c x
Subject to
Ax ≤ b
We have already had some discussion about solution methods to the
above problem, in that we have illustrated priority list methods and
we have described dynamic programming and Lagrangian
Relaxation. There is one more to discuss. In summary, then, there
have four basic solution methods used in the past few years:
• Priority list methods
• Dynamic programming
• Lagrangian relaxation
• Branch and bound
The last method, branch and bound, is what the industry means
when it says “MIP.” It is useful to understand that the chosen
method can have very large financial implications. This point is
well-made in the chart [6] of Fig. 9.
21
Fig. 9
22
scheduling” and the “real time commitment and dispatch” both
utilize the SCUC.
Fig. 10
They state:
“Electricity is a commodity that cannot be effectively stored and the
energy-supplying generators have limits on how quickly they can be
started and ramped up or down. As a result, both the supply and
demand become more inelastic and the electricity market becomes
more volatile and vulnerable as it gets closer to real time [34]. To
achieve a stable margin as well as to maintain the system reliability,
a forward market is needed to provide buyers and sellers the
opportunity to lock in energy prices and quantities and the ISO to
secure adequate resources to meet predicted energy demand well in
advance of real time. Thus architecturally, many ISOs (e.g. PJM,
ISO New England, New York ISO) take a multisettlement approach
for market design….”
23
“Fig. 6 shows the timeline of the multiple-settlement systems used
in NYISO, PJM, and ISO-NE, which are typical of those used in
practice. Supply and demand bids are submitted for the DAM,
typically 12–24 h ahead of the real-time operation. Then the day-
ahead energy prices are computed and posted, 6–12 h ahead of real-
time operation….”
1
Decremental bids are similar to price-sensitive demand bids. They allow a marketer or other similar entity
without physical demand to place a bid to purchase a certain quantity of energy at a certain location if the
day-ahead price is at or below a certain price. Incremental offers are the flip side of decremental bids.
24
season, day type (weekday, weekend, holiday), and hour of the day.
Most ISOs have sophisticated load forecasting programs, some with
neural network components [36], [37], to predict the day-ahead load
to within 3%–5% accuracy and the load forecasts are posted. LSEs
with fully hedged loads through long-term bilateral contracts tend to
bid in the amount corresponding to the ISO predicted loads. Some
other LSEs may bid in loads that are different from those posted by
the ISO. In such cases, if the LSE bid load exceeds the ISO load, the
LSE bid load is taken as the load to be dispatched. Otherwise, the
ISO load will supersede the LSE bid load and the SCUC will
commit generators to supply the ISO forecasted load in a reliability
stage. Then the generation levels of the committed generators will
be allocated to supply LSE bid loads. Committing extra generators
outside the DAM will be treated as uplifts and be paid by the
LSEs….”
25
significant progress in the recent years [7]. The MILP methodology
has been applied to the SCUC formulation to solve this MOW
problem. Recent developments in the implementation of MILP-
based algorithms and careful attention to the specific problem
formulation have made it possible to meet accuracy and
performance requirements for solving such large scale problems in a
practical competitive energy market environment. In this section the
MILP-based SCUC formulation is presented in detail….”
26
commitment software is used to perform optimal resource
scheduling in both the Day-ahead market and in the subsequent
Reliability Analysis….”
“As the market was projected to more than double its original size,
PJM identified the need to develop a more robust approach for
solving the unit commitment problem. The LR algorithm was
adequate for the original market size, but as the market size
increased, PJM desired an approach that had more flexibility in
modeling transmission constraints. In addition, PJM has seen an
increasing need to model Combined-cycle plant operation more
accurately. While these enhancements present a challenge to the LR
formulation, the use of a MIP formulation provides much more
flexibility. For these reasons, PJM began discussion with its
software vendors, in late 2002, concerning the need to develop a
production grade MIP-based approach for large-scale unit
commitment problems….”
“In both problems, unit commitment accepts data that define bids
(e.g., generator constraints, generator costs, and costs for other
resources) and the physical system (e.g., load forecast, reserve
requirements, security constraints). In real time, the limited
responsiveness of units and additional physical data (e.g., state
27
estimator solution, net-interchange forecast) further constrains the
unit commitment problem.”
“This section presents results from using the CPLEX 7.1 and
CPLEX 9.0 MIP solvers on a large-scale RTO Day Ahead Unit
Commitment problem. This problem has 593 units and a 48 hour
time horizon….”
28
7.0 Solution methods for mixed integer programs
29
↑
x2
Solution is where the
3 Increasing Z highest Z-contour
touches a feasible point.
Z=10=x1+5x2
x1+ 10x2<20
1
Z=5=x1+5x2
x1 →
1 2 3
Fig. 11
30
The remaining material in this section is adapted from [11, ch 13.3].
There are two obvious approaches that come to mind for solving
IPs. One is to check every possible solution. We call this exhaustive
enumeration. Another is to solve the problem as a linear program
without integrality requirements, and then round the values we get
to the nearest integer. We call this LP-relaxation with rounding.
Let’s look at these two approaches.
Consider a BIP problem with 3 variables: x1, x2, and x3, each of
which can be 1 or 0. The possible solutions are
(0,0,0), (0,0,1), (0,1,0), (0,1,1),
(1,0,0), (1,0,1), (1,1,0), (1,1,1).
3
Thus, there are 2 =8 solutions. It would not be too hard to check
them all. But consider more typical problems with 30 variables, or
even 300.
230=1.0737×109=1,073,700,000 (over a billion possible solutions)
2300=2.037×1090
31
7.1.2 LP relaxation with rounding
This approach may in fact work with reasonable accuracy (it may
get close to the optimum) for some problems, especially if the
values of the variables are large so that rounding creates relatively
little error. (This would not be the case, however, for BIPs, as in the
case of the UC, where integer variables are either 1 or 0.)
32
Thus, either way we go, rounding up or down, we result in an
infeasible solution. The only way we can make x1 an integer is if we
also change x2. This situation is illustrated using Fig. 12 below.
Fig. 12
In Fig. 12, the feasible region is between the x-axis and the two
constraint-lines. The “corner point” of (6.5, 10) is the solution to the
relaxed IP. When x1 is rounded to 7, the solution is X in Fig. 12,
which is clearly above the feasible region. When x1 is rounded to 6,
the solution is O in Fig. 12, again, clearly above the feasible region.
33
max Z = x1 + 5 x2
s.t.
x1 + 10 x2 ≤ 20
x1 ≤ 2
x1 ≥ 0, x2 ≥ 0
x1 , x2 integers
2 ● ● ● ●
Z*=10=x1+5x2
1 ● ● ● ●
LP-relaxed,
rounded solution
Z*=7
● ● ● ●
x1 →
1 2 3
Fig. 12
In Fig. 12, the dots are the possible integer solutions, and the shaded
region is the feasible region. The LP-relaxed solution is (2, 9/5)
where Z*=11. If we rounded, then we would get (2, 1) where Z*=7.
But it is easy to see that the point (0, 2) is on the Z*=10 line.
Because (2,0) is integer and feasible, and higher than Z*=7, we see
that the rounding approach has failed us miserably.
34
7.2 Some other methods
There are two broad classes of methods to solving IPs:
• Cutting plane methods
• Tree-search methods
2 ● ● ● ●
Shrunk
feasible
region
1 ● ● ● ●
● ● ● ●
x1 →
1 2 3
Fig. 13
Another very popular cutting plane method, particularly for MIP, is
Benders decomposition [12, Sec 15.2]. To apply this method, the
variables must be separable. If they are, one can set up a Master
problem to solve for one set of variables and subproblems to solve
for the other set. Then the algorithm iterates between Master and
subproblems.
35
7.2.2 Tree-search methods
● ●
● ● ● ●
● ● ● ● ● ● ● ●
Fig. 14
The common features of tree-search algorithms are [12, App C]:
1. They are easy to understand;
2. They are easy to program on a computer;
3. The upper bound on the number of steps the algorithm needs to
find the solution is O(kn), where n is the number of decision
variables (this means running time increases exponentially with
the number of variables);
4. They lack mathematical structure.
36
one continuous-valued variable in Problem Pj is constrained to be
integer in Problem Pk.
Fig. 15
37
What if we now pose a problem P1 to be exactly like P0 except that
we will constrain x1≤1? Here it is:
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P1
x1 + x2 ≤ 5
x1 ≤ 1
x1 , x2 ≥ 0
What do you expect the value of x1 to be in the optimal solution?
Because the solution without the constraint x1≤1 wanted 1.667 of x1,
we can be sure that the solution with the constraint x1≤1 will want as
much of x1 as it can get, i.e., it will want x1=1.
38
ζ in this case) corner point to the optimal without the constraint
x1≤1.
Fig. 16
So we understand now how to constrain a continuous-valued
variable to be integer.
But here is another question for you… What if we want to solve the
following IP:
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
IP1
x1 + x2 ≤ 5
x1 , x2 ≥ 0
x1 , x2 integers.
This problem is identical to P0 except we require x1, x2 to be integer.
The question is: Is the P1 solution we obtained, which by chance is a
feasible solution to IP1, also the optimal solution to IP1?
39
To answer this question, let’s state a rather obvious criterion.
IP Optimality Criterion: A solution to an IP is optimal if the
corresponding objective value is better than the objective value
corresponding to every other feasible solution to that IP.
Answer: The part associated with x1=2. So let’s constrain x1≥2. This
results in problem P2.
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P2
x1 + x2 ≤ 5
x1 ≥ 2
x1 , x2 ≥ 0
Using CPLEX to solve P2 results in:
P2 Solution : x1 = 2.0, x2 = 2.857, ζ = 68.8286
This time, we were not so fortunate to obtain a feasible solution to
IP1, since x2 is not integer. And so the P2 solution is not feasible to
IP1, and therefore it is certainly not optimal to IP1. The situation is
illustrated in Fig. 17.
40
Fig. 17
But does the P2 solution tell us anything useful?
YES! Compare the objective function value of P2, which is 68.8286,
with the objective function value of P1, which is 65. Since we are
maximizing, the objective function value of P2 is better. But the P2
solution is not feasible. However, we can constrain x2 appropriately
so that we get a feasible solution. Whether such a feasible solution
will have better objective function value we do not know. What we
do know is, because the objective function value of P2 (68.8286) is
better than the objective function value of P1 (65), it is worthwhile to
check it. Although the objective function value of successor
problems to P2 can only get worse (lower), they might be better than
P1, and if we can find a successor (or a successor’s successor,…)
that is feasible, it might be better than our best current feasible
solution, which is P1.
41
will not get better. Therefore if a predecessor node is already not as
good as the current best feasible solution, there is no way a
successor node will be, and we might as well terminate evaluation of
successors to that predecessor node.
But in this case, the objective function value of P2 is better than that
of our current best feasible solution, so let’s solve P2 with the
additional constraint x2≤2. Call this problem P3, given below.
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P3 x1 + x2 ≤ 5
x1 ≥ 2
x2 ≤ 2
x1 , x2 ≥ 0
Using CPLEX to solve P3 results in:
P3 Solution : x1 = 2.6, x2 = 2.0, ζ = 68.2
Note that x1 has reverted back to non-integer. We could have
expected this since we forced x2 to change, requiring a new corner
point, as shown in Fig. 18.
42
Fig. 18
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P4 x1 + x2 ≤ 5
x1 ≤ 2
x2 ≤ 2
x1 , x2 ≥ 0
Using CPLEX to solve P4, we obtain:
P4 Solution : x1 = 2.0, x2 = 2.0, ζ = 58.0
This solution is displayed in Fig. 19.
43
Fig. 19
This solution is feasible! Wonderful. However, comparing the
objective value function to our “best so-far” value of 65, we see that
this value, 58, is worse. So the P4 solution is not of interest to us
since we already have one that is better.
What next?
Let’s go back to problem P3 where we had this:
P3 Solution : x1 = 2.6, x2 = 2.0, ζ = 68.2
In P4, we pushed x1 to 2. Let’s explore the space associated with
pushing x1 to 3. So we need a new problem for this, where we
require x1≥3. Let’s call this P5, given below.
44
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P5 x1 + x2 ≤ 5
x1 ≥ 3
x2 ≤ 2
x1 , x2 ≥ 0
Using CPLEX to solve it, we obtain
P5 Solution : x1 = 3.0, x2 = 1.4286, ζ = 68.1429
This solution is not integer, but it has an objective function value
better than our current best feasible solution (65), and so let’s branch
again to a successor node with x2≤1. Let’s call this P6, given below.
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P6 x1 + x2 ≤ 5
x1 ≥ 3
x2 ≤ 1
x1 , x2 ≥ 0
Using CPLEX to solve it, we obtain
P6 Solution : x1 = 3.3, x2 = 1.0, ζ = 68.1
45
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P7 x1 + x2 ≤ 5
x1 ≤ 3
x2 ≤ 1
x1 , x2 ≥ 0
Using CPLEX to solve it, we obtain
P7 Solution : x1 = 3.0, x2 = 1.0, ζ = 63.0
This solution is feasible! However, comparing the objective value
function to our “best so-far” value of 65, we see that this value, 63,
is worse. So the P7 solution is not of interest to us since we already
have one that is better.
So now what?
46
P8 Solution : x1 = 4.0, x2 = 0, ζ = 68.0
This solution is feasible! Not only that, but when we compare the
objective value function to our “best so-far” value of 65, we see that
this value, 68, is better. So the P8 solution becomes our new “best
solution.” And we will use 68 as our bound against which we will
test other solutions.
47
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
P10 x1 + x2 ≤ 5
x1 ≥ 3
x2 ≥ 2
x1 , x2 ≥ 0
Using CPLEX to solve, we learn that Problem P10 is infeasible.
48
Fig. 20 [13]
49
Bound: Continue branching only if the objective function value of
the current solution is better than the objective function value of the
best feasible solution obtained so far.
However, you should be aware that there are several other issues
related to B&B that need to be considered before implementation.
Below is a brief summary of two of these issues [14, ch. 6].
But once at P3, after evaluating it, we had a tough decision to make.
• Depth: Do we continue from P3, requiring x1≤2, for example? or
• Breadth: Do we go back to P2 to examine its other branch, x2≥3?
50
For high-dimensional IPs, it is usually the case that feasible
solutions (meaning that all integer variables are integer) are more
likely to occur deep in a tree than at nodes near the root. Finding
multiple feasible solutions early in B&B is important because it
tightens the bound (in the above example, it increases the bound),
and therefore enables termination of branching at more nodes (and
therefore decreases computation). One can see this by considering
the bound before we find a feasible solution: the bound is infinite!
(+∞ for maximization problems and -∞ for minimization problems).
Therefore the best strategy is to go deep first; then after finding
several feasible solutions, explore breadth.
This is actually a rich research question that, so far, has not been
solved generically but rather, is addressed for individual problem
types by pre-specifying an ordering of the variables that are required
to be integer. Good orderings become apparent after running the
algorithm many times for many different conditions. Sometimes,
good orderings are apparent based on some physical understanding
of the problem, e.g., perhaps the largest unit should be chosen first.
51
7.4.3 Mixed integer problems
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
IP2
x1 + x2 ≤ 5
x1 , x2 ≥ 0
x1 integer.
Recall our tree-search diagram, repeated here for convenience. You
should be able to see that the solution is obtained as soon as we
solved P1 and P2.
52
Fig. 21 [13]
The other possible MIP would be to require x2 integer only, as
follows:
max ζ = 17 x1 + 12 x2
s.t.
10 x1 + 7 x2 ≤ 40
IP3
x1 + x2 ≤ 5
x1 , x2 ≥ 0
x2 integer.
Recalling the solution to P0,
P0 Solution : x1 = 1.667, x2 = 3.333, ζ = 68.333
53
we see that we can branch by setting either x2≤3 or x2≥4, resulting in
x2≤3:
Solution : x1 = 1.9, x2 = 3.0, ζ = 68.3
x2≥4:
Solution : x1 = 1.0, x2 = 4.0, ζ = 65
The conclusion here is that we can very easily solve MIP within our
LP-relaxation branch and bound scheme by simply allowing the
non-integer variables to remain relaxed.
54
4. Used Putty to log on to pluto.
5. Typed cplex101 to call cplex.
6. Typed read mip.lp to read in problem statement.
7. Typed mipopt to call the MIP-solver. The result was as follows:
Nodes Cuts/
Node Left Objective IInf Best Integer Best Node ItCnt Gap
0 0 68.3333 2 68.3333 2
* 0+ 0 0 65.0000 68.3333 2 5.13%
* 68.0000 0 68.0000 Cuts: 3 4 0.00%
55
time we will model each generator with the ability to submit 3
offers.
g2
g1
1 2
y12 =-j10
y14 =-j10
y13 =-j10 Pd2 y23 =-j10
y34 =-j10
4 3
g4 Pd3
56
⎡0⎤ ⎡ g11t ⎤ ⎡0.50⎤
⎢0⎥ ⎢ g ⎥ ⎢0.60⎥
⎢ ⎥ ⎢ 12t ⎥ ⎢ ⎥
⎢0⎥ ⎢ g13t ⎥ ⎢0.40⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
g
⎢0⎥ ⎢ 21t ⎥ ⎢0.35⎥
⎢0⎥ ≤ ⎢ g 22t ⎥ ≤ ⎢0.60⎥, ∀t
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢0⎥ ⎢ g 23t ⎥ ⎢0.20⎥
⎢0⎥ ⎢ g ⎥ ⎢0.45⎥
⎢ ⎥ ⎢ 41t ⎥ ⎢ ⎥
⎢0⎥ ⎢ g 42t ⎥ ⎢0.50⎥
⎢0⎥ ⎢ g ⎥ ⎢0.40⎥
⎣ ⎦ ⎣ 43t ⎦ ⎣ ⎦
The UC problem is for a 24 hour period, with loading data given as
below. Figure 2, the load curve, illustrates variation of load with
time over the 24 hour period.
57
Hour, t Load, Dt (pu)
1 1.50
2 1.40
3 1.30
4 1.40
5 1.70
6 2.00
7 2.40
8 2.80
9 3.20
10 3.30
11 3.30
12 3.20
13 3.20
14 3.30
15 3.35
16 3.40
17 3.30
18 3.30
19 3.20
20 2.80
21 2.30
22 2.00
23 1.70
24 1.60
One Day Load variation
400
350
300
Load (MW)
250
200 Series1
150
100
50
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Time (hr)
58
8.1 Example – 4 hours
For this solution, we will only include startup and shutdown
constraints. In order to illustrate all data entered, we will analyze
only the first four hours. The CPLEX code to do this is given below.
minimize
50 z11 +50 z12 + 50 z13 + 50 z14
+50 z21 +50 z22 + 50 z23 +50 z24
+50 z41 +50 z42 + 50 z43 +50 z44
+1246 g111 + 1307 g121 + 1358 g131
+1129 g211 + 1211 g221 + 1282 g231
+1183 g411 + 1254 g421 + 1320 g431
+1246 g112 + 1307 g122 + 1358 g132
+1129 g212 + 1211 g222 + 1282 g232
+1183 g412 + 1254 g422 + 1320 g432
+1246 g113 + 1307 g123 + 1358 g133
+1129 g213 + 1211 g223 + 1282 g233
+1183 g413 + 1254 g423 + 1320 g433
+1246 g114 + 1307 g124 + 1358 g134
+1129 g214 + 1211 g224 + 1282 g234
+1183 g414 + 1254 g424 + 1320 g434
+100 y12 + 100 y13 +100 y14
+100 y22 + 100 y23 +100 y24
+100 y42 + 100 y43 +100 y44
+20 x12 + 20 x13 +20 x14
+20 x22 + 20 x23 + 20 x24
+20 x42 + 20 x43 +20 x44
subject to
loadhr1: g111+g121+g131+g211+g221+g231+g411+g421+g431=1.5
loadhr2: g112+g122+g132+g212+g222+g232+g412+g422+g432=1.4
loadhr3: g113+g123+g133+g213+g223+g233+g413+g423+g433=1.3
loadhr4: g114+g124+g134+g214+g224+g234+g414+g424+g434=1.4
initialu1: z11=0
initialu2: z21=1
initialu4: z41=1
starthr21u1: z12-z11-y12<=0
starthr32u1: z13-z12-y13<=0
starthr43u1: z14-z13-y14<=0
starthr21u2: z22-z21-y22<=0
starthr32u2: z23-z22-y23<=0
starthr43u2: z24-z23-y24<=0
starthr21u4: z42-z41-y42<=0
starthr32u4: z43-z42-y43<=0
starthr43u4: z44-z43-y44<=0
shuthr21u1: z12-z11+x12>=0
shuthr32u1: z13-z12+x13>=0
shuthr43u1: z14-z13+x14>=0
shuthr21u2: z22-z21+x22>=0
shuthr32u2: z23-z22+x23>=0
shuthr43u2: z24-z23+x24>=0
shuthr21u4: z42-z41+x42>=0
shuthr32u4: z43-z42+x43>=0
shuthr43u4: z44-z43+x44>=0
59
g111 - 0.5 z11<= 0
g112 - 0.5 z12<= 0
g113 - 0.5 z13<= 0
g114 - 0.5 z14<= 0
g121 - 0.6 z11<= 0
g122 - 0.6 z12<= 0
g123 - 0.6 z13<= 0
g124 - 0.6 z14<= 0
g131 - 0.4 z11<= 0
g132 - 0.4 z12<= 0
g133 - 0.4 z13<= 0
g134 - 0.4 z14<= 0
60
Bounds
0<= g111
0<= g112
0<= g113
0<= g114
0<= g121
0<= g122
0<= g123
0<= g124
0<= g131
0<= g132
0<= g133
0<= g134
0<= g211
0<= g212
0<= g213
0<= g214
0<= g221
0<= g222
0<= g223
0<= g224
0<= g231
0<= g232
0<= g233
0<= g234
0<= g411
0<= g412
0<= g413
0<= g414
0<= g421
0<= g422
0<= g423
0<= g424
0<= g431
0<= g432
0<= g433
0<= g434
Integer
z11 z12 z13 z14
z21 z22 z23 z24
z41 z42 z43 z44
y12 y13 y14
y22 y23 y24
y42 y43 y44
x12 x13 x14
x22 x23 x24
x42 x43 x44
end
61
Result: CPLEX gives an objective function value of 7020.7 $.
62
This very simple solution was obtained as a result of the fact that the
initial solution of
initialu1: z11=0
initialu2: z21=1
initialu4: z41=1
was in fact the best one for the initial loading condition, and since
the loading condition hardly changed during the first four hours,
there was no reason to change any of the units.
63
g214 0.350000
g224 0.600000
g414 0.450000
y22 1.000000
x12 1.000000
All other variables in the range 1-66 are 0.
Why was this solution more expensive?
Let’s test our theory by increasing the startup costs of unit 2 from
$100 to $10,000. The objective function value in this case is
$7281.25 (higher than the last solution). The decision variables are:
Variable Name Solution Value
z11 1.000000
z12 1.000000
z13 1.000000
z14 1.000000
z41 1.000000
z42 1.000000
z43 1.000000
z44 1.000000
g111 0.500000
g121 0.050000
g411 0.450000
g421 0.500000
g112 0.500000
g412 0.450000
g422 0.450000
64
g113 0.500000
g413 0.450000
g423 0.350000
g114 0.500000
g414 0.450000
g424 0.450000
All other variables in the range 1-66 are 0.
We observe that unit 1 was on-line the entire four hours, i.e, there
was no switching, something we expected since the start-up cost of
unit 2 was so very high.
Rather, we have posted the dataset on the web page under “UC24
Data” for the 04/16/08 date.
65
The result, objective value=$77667.3, shows that the only x and y
variables that are non-zero are y18 and x121. This means that the
changes in the unit commitment occur only for unit 1 and only at
hours 18 and 21. A pictorial representation of the unit commitment
through the 24 hour period is shown below.
One Day Load variation
400
350
300
Load (MW)
250
200
150
100
50
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Time (hr)
Unit 1
1.2
0.8
Up or down
0.6 Unit 1
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Hour
Unit 2
1.2
0.8
Up or down
0.6 Unit 2
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Hour
Unit 3
1.2
0.8
Up or down
0.6 Unit 3
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Hour
66
To perform additional investigation, the load curve was modified as
shown below (UC24a.lp). All other data remained as before. The
result, with objective function value of $, shows that the only x and
y variables that are non-zero are y18, x120, and x424. A pictorial
representation of the UC through the 24 hour period is shown below.
One day load variation
400
350
300
250
load
200
150
100
50
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
hour
Unit 1
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Unit 2
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Unit 3
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
67
In a last investigation, the load curve remained modified, and startup
costs were reduced to $10, shutdown costs reduced to $2. All other data
remained as before (UC24b.lp). The result, with objective function value
of $66,867.95, shows that the only x and y variables that are non-0 are
y18, x112, y45, x111, x120, x42, x424. A pictorial representation of the
UC through the 24 hour period is shown below.
One day load variation
400
350
300
250
load
200
150
100
50
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
hour
Unit 1
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Unit 2
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Unit 3
1.2
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
68
[1] “PJM Emergency Procedures,”
www.pjm.com/etools/downloads/edart/edart-training-pres/edart-training-
instantaneous-revserve-check.pdf.
[2] H. Pinto, F. Magnago, S. Brignone, O. Alsaç, B. Stott, “Security
Constrained Unit Commitment: Network Modeling and Solution Issues,”
Proc. of the 2006 IEEE PES Power Systems Conference and Exposition, Oct.
29 2006-Nov. 1 2006, pp. 1759 – 1766.
[3] R. Chhetri, B. Venkatesh, E. Hill, “Security Constraints Unit Commitment
for a Multi-Regional Electricity Market,” Proc. of the 2006 Large Engineering
Systems Conference on Power Engineering, July 2006, pp. 47 – 52.
[4] J. Guy, “Security Constrained Unit Commitment,” IEEE Transactions on
Power Apparatus and Systems Vol. PAS-90, Issue 3, May 1971, pp. 1385-
1390.
[5] B. Hobbs, M. Rothkopf, R. O’Neill, and H. Chao, editors, “The Next
Generation of Electric Power Unit Commitment Models,” Kluwer, 2001.
[6] M. Rothleder, presentation to the Harvard Energy Policy Group, Dec 7,
2007.
[7] J. Chow, R. De Mello, K. Cheung, “Electricity Market Design: An
Integrated Approach to Reliability Assurance,” Proceedings of the IEEE, Vol.
93, No. 11, November 2005.
[8] Q. Zhou, D. Lamb, R. Frowd, E. Ledesma, A. Papalexopoulos,
“Minimizing Market Operation Costs Using A Security-Constrained Unit
Commitment Approach,” 2005 IEEE/PES Transmission and Distribution
Conference & Exhibition: Asia and Pacific Dalian, China.
[9] A. Ott, “Experience with PJM Market Operation, System Design, and
Implementation,” IEEE Transactions on Power Systems, Vol. 18, No. 2, May
2003, pp. 528-534.
[10] D. Streiffert, R. Philbrick, and A. Ott, “A Mixed Integer Programming
Solution for Market Clearing and Reliability Analysis,” Power Engineering
Society General Meeting, 2005. IEEE 12-16 June 2005 , pp. 2724 - 2731 Vol.
3.
[11] F. Hillier and G. Lieberman, “Introduction to Operations Research,”
fourth edition, Holden-Day, 1986.
[12] T. Hu, “Integer Programming and Network Flows,” Addison-Wesley,
1970.
[13] R. Vanderbei, “Linear Programming, Foundations and Extensions,” third
edition, Springer, 2008.
69
[14] G. Nemhauser, A. Kan, and M. Todd, editors, “Handbook in Operations
Research and Management Science, Volume 1: Optimization,” North
Holland, Amsterdam, 1989.
70