Word

advertisement
PLEXOS OVERVIEW & TUTORIAL
It is assumed you are using a Windows machine. You
should read the following to prepare yourself for
following this overview/tutorial. All reading material is
found at www.plexos.info.
 Getting Started/Concise User Guide
 Modeling Guide/Resource and Expansion Plan/LT Plan Overview
 Modeling Guide/Technical Reference/…
o Simulation Phases
o Long Term (LT) Plan
o Short Term (ST) Schedule
You may have questions about Plexos arising outside
class. Please post them to the EE 590F Discussion board
in WebCT, to have them addressed (you will be able to
see each other’s questions and corresponding answers).
1.0 High-level description
Plexos is an optimization-based simulation tool,capable of
 Production costing:
o Running optimal power flow,
o Running short-term, medium-term, or long-term unit
commitment;
 Expansion planning:
o Determining optimal size/timing of new investments,
o Valuing generation and transmission assets, including
mixed hydro-thermal systems,
o Projecting short, medium, long-term capacity
adequacy,
1
o Calculating stranded-asset cost;
o Assessing the impact of security-of-supply
constraints, and environmental constraints,
 Maintenance: Optimizing the timing and duration of
maintenance outages;
 Market assessment:
o Performing
market
benefit
analysis
for
transmission and generation assets,
o Calculating market outcomes that account for both
fixed and variable cost components,
o Calculating optimal trading strategies for a
portfolio of generation and transmission assets
including entrepreneurial interconnectors,
o Projecting pool prices under various scenarios of
load growth and new entry,
o Determining the impact of market design decisions,
and rule changes,
o As a real-time market-clearing engine,
o Analyzing generation and transmission constraints
and calculating congestion rents.
There are four different simulation options within Plexos.
 LT Plan: This performs the long-term expansion
planning function. The purpose of the LT Plan model is
to find the optimal combination of generation new
builds and retirements and transmission upgrades (and
retirements) that minimizes the net present value of the
total costs of the system over a long-term planning
2
horizon. That is, to simultaneously solve a generation
and transmission capacity expansion problem and a
dispatch problem from a central planning, long-term
perspective. Planning horizons for the LT Plan model
are user-defined and are typically expected to be in the
range of 10 to 30 years. LT Plan appropriately deals
with discounting and end-year effects. The following
types of features are supported:
o Building new generating plant
o Retiring existing generating plant
o Multi-stage projects
o Building new AC or DC transmission lines
o Retiring existing AC or DC transmission lines
o Multi-stage transmission projects
o Expanding capacity on transmission interfaces
o Taking up new physical generation contracts
o Taking up new physical load contracts
o Deterministic or stochastic optimization
 PASA/Preschedule: PASA is “projected assessment of
system adequacy.” It distributes and optimizes available
generation capacity between regions. Preschedule is a
model of discrete, distributed maintenance, and random
(forced) outage of generators and transmission lines.
PASA and Preschedule are run together.
 MT Schedule: This is a model based on load duration
curve analysis that can be run on a week-by-week or
month-by-month basis, with full representation of the
generation and transmission system.
3
 ST Schedule: This is a full trading-period level dispatch
and pricing optimization with (optional) thermal unit
commitment.
These tools can be used as stand-alone applications, but
they may also be used in an integrated way. Plexos
provides automatic integration of these tools so that
information can be fed from one tool to the next. But
there are only certain sequences in which such toolinformation-flow may take place, as shown below.
For example, the user may choose to run
 LT Plan, then PASA/Preschedule, then MT Schedule,
and then ST Schedule in sequence,
 LT Plan, then PASA/Preschedule in sequence,
 MT Schedule, then ST Schedule in sequence
The program does not allow a sequence of ST Schedule,
then LT Plan. So longer-term decisions inform shorterterm decisions, but the converse is not allowed.
4
Some key modeling capabilities within Plexos follow:
Category
Feature
Description
Generation
Unit Commitment
Mixed-integer optimization of unit on/off
decisions respecting minimum up and
down times.
Heat Rate Curves
Multi-point heat rate functions of
various forms
SCUC
Security-constrained unit commitment
i.e. Generation optimized with respect
to transmission contingencies
Technical
Constraints
Ramp limits, minimum stable levels
Reliability
Monte Carlo modelling of generator
outages
Maintenance
Optimal planning of generator
maintenance periods
Transmission
Optimal Power Flow
SCOPF
Security constrained OPF
Large-scale
Systems
Ability to model thousands of busbars
and transmission lines
DC Lines
Optimization of DC lines
Phase Shifters
Optimization of phase shifters
Reliability
Monte Carlo modelling of line outages
Interfaces and
Generic
Constraints
Support for interfaces, generic
constraints and transmission
nomograms including shadow price
reporting
Nodal Pricing
Calculation of locational marginal prices
(LMP)
LMP
Decomposition
Decomposition of LMP into congestion
and marginal loss components with
various slack bus options
Hydro
Energy Limits
Cascading
Networks
Long-term storage optimization, shortterm storage, interconnecting
waterways and junctions
Linearized DC optimal power flow (OPF)
fully cooptimized with generation dispatch
Multi-period energy limits (annual,
monthly, quarterly, weekly, daily)
5
Water Value
Curves
Multi-band water value functions for
long-term storages
Pump Storage
Genuine optimization of pump storage
resources
Ancillary Services
Cooptimization
Pricing
Consistent energy and AS pricing
outcomes
AS Classes
Spinning, regulation, and non-spinning
reserves
Emissions
Constraints
Taxes
Support for taxes on emissions
Types
Unlimited number of emission types
(including CO2, NoX, SoX)
Kyoto Protocol
Modelling of grandfather rights and their
impact on generator bidding
Complete cooptimization of ancillary
services and generation dispatch
Generation dispatch optimally reflects
emission constraints
Bid optimization using game-theoretic
models (Nash-Cournot, Bertrand), and
heuristic bid-formation algorithms for
long-term marginal cost modelling
Financial
Dynamic Generator Bidding
Market Arbitrage
Cooptimization of self-dispatch versus
external market sales for energy, and
fuels
Contracts
Resolution of financial contracts
including transmission contracts
Compatibility
Transmission
Pricing
Options for computing uplift and
constraint payments
Market Design
Wide range of market designs
supported through simulation options,
with direct support for many US,
Europe, and Australasian markets
Ability to choose between zonal and
nodal markets
You should be aware that our version of Plexos runs on
our ISU-located server and on a remote server. This is a
set-up we are using for now, in a sort-of trial mode. The
figure below illustrates this operation:
6
1. Send license information
Local
computer
2. Check license information, allow PLEXOS to run
Remote
Server
3. Send LP/MIP file
4. Outcome database and log file
The database which contains the input data is created
through Plexos as a Microsoft Access database, and this is
done on the local computer. Following database creation,
execution is performed as illustrated in the figure above:
1. Plexos, on the local computer, sends to the remote
server to request the license information.
2. The remote server, which is located at the Plexos site,
checks the license information and then extends
permission for the local Plexos program to run.
3. The local Plexos program then operates on the Access
database and creates a set of optimization code. The
optimization code is then sent across the network to the
Plexos site where it is input to a commercial grade
solver. MOSEK is used but CPLEX can also be used.
4. The commercial grade solver solves the optimization
problem and then sends the result back as an Access
database over the network to the local computer where
it can be read by the user.
7
2.0 Object-oriented design
Plexos uses an object-oriented programming design. If
you are familiar with object-oriented programming
(OOP), then you have a head start. If not, then it is OK,
but you will need to consider with a few ideas:
 Main concept: Whereas traditional programming
focuses on procedures or instructions, OOP focuses on
classes and objects. OOP is a programming language
model organized around objects rather than actions and
data rather than logic.
 Class: A set of rules and definitions that specify how
objects of that class behave and what data can be
defined on those objects. A class encapsulates data and
operations that belong together, and it controls the
visibility of both data and operations. Class behavior
specifies what collections objects are allowed to belong
to, what collections they must belong to, and how those
objects interact with other objects of the same and other
types. The class Dog would consist of traits shared by
all dogs, such as breed and fur color (characteristics),
and the ability to bark and sit (behaviors). Examples of
Plexos classes include System, Company, Region,
Zone, Node, Line, Transformer, Contingency, Fuel,
Emission, Generator, and Data File.
 Object: A particular instance of a class. The class Dog
defines all possible dogs by listing the characteristics
and behaviors they can have; the object Lassie is one
8
particular dog, with particular versions of the
characteristics. A Dog has fur; Lassie has brown-andwhite fur. We may speak of a “class of an object.”
 File (object model): A file is a Microsoft Database
(.mdb) that describes a single System object, which
generally represents the power system being studied.
This is the root object to which all other objects belong.
 Collection: The System has a set of collections, one for
each class of object. All other objects belong primarily
to these System collections e.g. Companies, Generators,
Fuels, Storages, etc. For example,
o To define a generator, one adds a new Generator
object to the System's Generators collection. To
represent ownership of a generator by a company,
one adds the Generator object to the Generators
collection of the Company object that owns it.
So classes are also collections. But whereas an object
can exist in only 1 class, it may belong to several
collections and it may have several collections. For
example,
o Generator G injects at node N: Generator object G
belongs to Node N Generators collection;
o Generator G uses fuel F: Fuel object F belongs to
Generator G Fuels collection, and so Generator
object G has a Fuel collection.
9
o Transmission line A-B flows between nodes A and B:
Both Node objects A and B belong to the Nodes
collection of Line A-B.
In the figure below, the object “3node” in class “region”
(left-hand pane) has collections Reference Node,
Exporting lines, etc. (right-hand pane).
 Memberships (relationships): Membership shows the
relationship between objects. For example, a Company
may own a set of Generators, and each such
relationship is stored as a membership between a
Company and a Generator object. After a certain object
is created, we need to define its membership.
Memberships always involve two objects: a parent
object and a child object. For example, if we want to
show node A (object A) is inside region B (object B),
10
we need to edit the membership of either object so that
the parent object is B and the child object is A.
 Properties: Properties are used to store the physical
values associated with an object. For example, the
properties of an object “lines” include reactance,
resistance, max flow, min flow, etc.
3.0 Step-by-step example of building case
1. Remote login to Plexos machine:
a. Go to your machine’s “Start” menu and click on
“All
programs,”
“Accessories,”
“Communications,” and then “Remote Desktop
Connection.” Some computers are configured so
that the “Remote Desktop Connection” is directly
under the “Accessories” menu.
b. A
dialog
box
will
appear.
Type
plexos.ece.iastate.edu beside “computer” and click
on “connect.”
c. A login box will appear. Use below account name
and password that you will be given.
Last Name
Ali
Gu
Ibanez
Kline
Kline
Lambert
Li
Li
McCabe
Mejia
First
Name
Kamran
Yang
Eduardo
Daniel
Jared
Ed
Juan
Hongyan
Joseph
Diego
11
Username
pl01
pl02
pl03
pl04
pl05
pl06
pl07
pl08
pl09
pl10
Parham
Persinger
Pham
Quinn
Reid
Sun
VanDelinder
Vijayan
Coakley
Odo
Cronier
Jamasen
Thomas
Hieu
Patrick
Krysten
Wei
Mike
Pradip
Troy
Ejiofor
Micheal
pl11
pl12
pl13
pl14
pl15
pl16
pl17
pl18
pl19
pl20
pl21
2. Start Plexos: Click on the icon titled “PLEXOS 5.0.” A
security warning might pop up, if so, click on “Open.”
3. Create a new file: Click “File” from menu and “New.”
Provide a name. I will assume in what follows that the
new name given is “sam.” Plexos will create an Access
database called “sam.mdb.” Once sam is created,
Plexos will show you a window called “Settings for
sam.mdb.” Here, you need to decide whether you will
be using metric or imperial units. We will use imperial,
and so you will need to click on “Imperial” at the
bottom of this window. Then close out of this window
by clicking the “X” at the top right-hand-corner.
4. Observe:
12
5
2
4
1
3
The numbers 1-5 above refer to
1. The Main Tree
This tree shows you all the Objects in the database organized into Collections shown as folders. This
tree is your primary means of navigating the data in the system. The other interface elements
respond to your selections in this tree.
2. The Membership Tree
Shows the relationships (called Memberships) between objects. The contents of this tree change
according to your selection in the Main Tree.
3. The Properties Tree:
Lists the properties available for the type of objects selected in the Main Tree.
4. The Data Grid
There are three tabs for the grid (Objects, Memberships, Properties). Each presents a standard
Access datasheet where you can edit/add/delete data. You can also use the standard Access filtering
and sorting commands to organize the data presented.
5. The Menu Bar
Provides the action commands for PLEXOS such as Execute to begin execution of a simulation.
Now we are going to create the following power system.
13
2
~
L2-3
Max flow 1000
Max flow back 1000
L1-2
Max flow 1000
Max flow back 1000
Gen_11
600MW
$15.00/MWh
Hydro
500MW
8GWh/day
L1-3
Max flow 1000
Max flow back 1000
3
1
Gen_3
200MW
$85/MWh
Gen_12
300MW
$35/MWh
We will do seven types of operations:
 Set configuration
 Create objects (regions, nodes, lines, generators)
 Add objects to collections
 Set properties
 Set memberships
 Execute
 Examine solution
5. Set configuration: Click on “Configuration” in the
menu bar.
a. Click on the word “Node” under the “Network”
category in the left-hand-side “Classes” area of the
screen. On the right-hand-side “Properties” area of
14
the screen, click in the empty box beside “Is slack
bus.”
b. Click on the word “Generator” under the “Supply
and Demand” category in the left-hand-side
“Classes” area of the screen. On the right-handside “Properties” area of the screen, click on the
folder “Outages.” Then under this folder, click in
the boxes labeled “Forced outage rate,” “Outage
rating,” and “Mean time to repair.”
c. Click on the word “Data File” under the “Data”
category in the left-hand-side “Classes” area of the
screen. On the right-hand-side “Properties” area of
the screen, click in the box labeled “Attributes,” so
that the following get activated: “Enabled,”
“Growth Period,” “Method,” “Relative growth at
min,” and “Decimal places.”
d. Click on “OK” at the bottom right-hand-corner of
the screen. A message will pop up indicating that
“The changes you have made will cause the
database to be closed and reopened. Press OK to
close and reopen the database now.” Then press
OK. The database will close and reopen.
6. Create a region: Right click on “Region” (from main
tree) and select “New Region.”
15
A dialog box will appear, where you will need to
provide your new region with a name. I will assume in
what follows the new region name given is “3node.”
Click “Next,” and you will see a warning of “There is
no object in this control.” Click “OK,” and a “3node”
Properties window will appear. Close out of this
window.
7. Create node 1: Right click on “Nodes” from main tree
and select “New node.”
A dialog box will appear, where you will need to
provide your new node with a name. I will assume in
what follows the new node name given is “1” Click
“Next,” and you will see a warning of “There is no
object in this control.” Click “OK,” and a “1”
16
Properties window will appear. Close out of this
window.
8. Create node 2: Repeat step 7 except name the new
node “2”
9. Create node 3: Repeat step 7 except name the new
node “3”
10. Create Lines: Right click on “Lines” from main tree
and select “New line.” A dialog box will appear, where
you will need to provide your new line with a name.
Name your new line “L12” Click “Next,” and you will
see a warning of “There is no object in this control.”
Click “OK,” and a “L12” Properties window will
appear. Close out of this window. Repeat this process to
create lines L13 and L23.
11. Create generators: Right click on “Generators” from
main tree and select “New generator.” A dialog box will
appear, where you will need to provide your new
generator with a name. Name your new generator
“Gen_11”. Click “Next,” and you will see a warning of
“There is no object in this control.” Click “OK,” and a
“Gen_11” Properties window will appear. Close out of
this window. Repeat this process to create generators
Gen_12 and Gen_3.
12. Add nodes 1, 2, 3 to node collection of region:
a. Left click on “Regions” in main tree.
b. Left click on “Nodes” in membership tree.
c. Left click in first row of “Node” column in data
grid. When you do this, you will see a drop-down
17
menu appear on the right-side of the cell. Left-click
on it, and select “1”.
d. Left click in the first row of the “Region” column
in data grid. When you do this, you will see a dropdown menu appear on the right-side of the cell.
Left click on it, and select “3node”.
e. Repeat steps c and d except use row 2, selecting
“2” and “3node” for the node and region columns,
respectively.
f. Repeat steps c and d except use row 3, selecting
“3” and “3node” for the node and region columns,
respectively.
The screen should appear as below.
13. Add node 3 to collection of region reference node:
a. Left click on “Regions” in main tree.
b. Left click on “Reference node” in membership
tree.
c. Left click in first row of “Region” column in data
grid. When you do this, you will see a drop-down
menu appear on the right-side of the cell. Left-click
on it, and select “3node”.
18
d. Left click in the first row of the “Node” column in
data grid. When you do this, you will see a dropdown menu appear on the right-side of the cell.
Left click on it, and select “3”.
The screen should appear as below.
14. Add node 1 to line L12’s from node collection:
a. Left click on “Lines” in the main tree.
b. Left click on “Node From” in the membership tree.
c. Left click in first row of “Line” column in data
grid. When you do this, you will see a drop-down
menu appear on the right-side of the cell. Left-click
on it, and select “L12”.
d. Left click in the first row of the “Node” column in
data grid. When you do this, you will see a dropdown menu appear on the right-side of the cell.
Left-click on it, and select “1”.
15. Add node 2 to line L23’s from node collection:
Repeat steps 14-c and d, except select L23 in step 14-c
and select “2” in step 14-d.
19
16. Add node 1 to line L13’s from node collection:
Repeat steps 14-c and d, except select L13 in step 14-c
and select “1” in step 14-d. The screen should appear as
below.
17. Add node 2 to line L12’s to node collection:
a. Left click on “Lines” in the main tree.
b. Left click on “Node To” in the membership tree.
c. Left click in first row of “Line” column in data
grid. When you do this, you will see a drop-down
menu appear on the right-side of the cell. Left-click
on it, and select “L12”.
d. Left click in the first row of the “Node” column in
data grid. When you do this, you will see a dropdown menu appear on the right-side of the cell.
Left-click on it, and select “2”.
18. Add node 3 to line L23’s to node collection: Repeat
steps 17-c and d, except select L23 in step 17-c and
select “3” in step 17-d.
20
19. Add node 3 to line L13’s to node collection: Repeat
steps 17-c and d, except select L13 in step 17-c and
select “3” in step 17-d.
After steps 17, 18 and 19, the screen should appears as
below.
20. Set node properties:
a. Left-click on “Nodes” in the main tree. You will
see “Properties” of the nodes in the data grid. Click
in the node 3 row under the “Is slack bus” column.
When you do this, you will see a drop-down menu
appear on the right-side of the cell. Left-click on it,
and select “Yes”. You have now identified bus 3 as
the system slack bus.
b. Click in the node 1 row under the “Node
participation factor” column in the data grid. Type
0. Repeat for the node 2 row. Repeat for the node 3
row except type 1. This indicates that all system
load will be modeled at node 3.
21
After performing step 20, the screen will appear as
below:
21. Set line properties: Left-click on “Lines” in the main
tree. You will see “Properties” of the lines in the data
grid. For all three lines, set Max Flow=1000 MW, Min
Flow=0, R=0, and X=0.001.
22. Set generator properties: Left-click on “Generators”
in the main tree. You will see “Properties” of the
generators in the data grid. Enter the following data.
f_Attributes
Generator Units
Max
Capacity
(MW)
Fuel Price
($/MMBTU)
Heat Rate
(BTU/kWh)
VOM
Charge
($/MWh)
Forced
Min Stable
Outage Rate
Level (MW)
(%)
Outage
Rating
(MW)
Mean Time
to Repair
(hrs)
Gen_11
1
700
2
10000
0
0
5
0
100
Gen_12
1
400
7
9000
0
0
2
0
80
Gen_3
1
200
7
1200
0
0
1
0
40
22
It is of interest that the outage date provided above
enables one to compute MTTF via
MTTR
MTTR
FOR =
→ MTTF =
− MTTR
MTTF + MTTR
FOR
For example, Gen_11 would have MTTF of
100
MTTF =
− 100 = 1900hrs
0.05
from which we can also obtain transition rates λ ,µ from
1
1
𝜆=
=
= 0.00052632/ℎ𝑟
𝑀𝑇𝑇𝐹 1900ℎ𝑟𝑠
1
1
𝜇=
=
= 0.01/ℎ𝑟
𝑀𝑇𝑇𝑅 100ℎ𝑟𝑠
23. Set generator memberships: After entering all
above data under “Properties,” click on the
“Memberships” tag at the top of the data grid.
a. Click in the “Collection” column of the first row.
When you do this, you will see a drop-down menu
appear on the right-side of the cell. Left-click on it,
and select “Generator.Nodes”.
b. Click in the second column called “Generator” and
select “Gen_11”.
c. Click in the third column called “Node” and select
“1”.
Repeat the above steps to identify Gen_12 with node
1. Repeat again to identify Gen_3 with node 3.
23
24. Create or obtain a load data file: To create a load
data file, use Excel and create a .csv file having the
following format:
Year
Month
Day
1
2
3
4
…
24
2008
8
8
1105
1086
1088
1090
…
1134
2008
8
9
1100
1080
1085
1095
…
1136
The load data, in MW, is specified one 24 hour day per
row. It is possible to model as many days as desired.
25. Create a data file object: Right click on “Data
Files” (from main tree) and select “New Data File.”
A dialog box will appear, and you will need to provide
your new datafile with a name. It should be the full path
name of the load data file you created in previous step.
24
In my case, it is “load”. Click “Next,” and a Properties
window will appear. Close out of this window.
26. Set data file properties: Left click on “Data Files” in
the main tree to edit the properties in the data grid. You
may need to click on the “Properties” tag in the upper
section of the datagrid.
a. In the lower section of the datagrid, click in the
first row under the “Property” column and select
“Filename” in the drop-down menu.
b. In the first row under “Filename” column, enter the
full path filename of the load file.
27. Set load properties: Left click on “Regions” in the
main tree to edit the properties in the data grid. You
may need to click on the “Properties” tag in the upper
section of the datagrid.
a. In the lower section of the datagrid, click in the first
row under the “Region” column. A drop-down menu
will appear in the right of the cell. Click it and select
your region (should only be one, called “3node”).
25
b. In the lower section of datagrid, click in first row
under “Property” column. A drop-down menu will
appear in the right of cell. Click it and select “load”.
c. In the lower section of the datagrid, click in first row
under “Data File” column. A drop-down menu will
appear in the right of the cell. Click it, select your
load file (should only be 1, in my case, it is “load”).
28. Set Planning horizon: Left click “Simulation” at the
top of main tree, and then click on “Horizon” to set the
planning horizon. An object named “default” will show
up. Double-click “default” to edit its properties. In the
lower part of the panel, set 24 steps of 1 hour in one day
so that the model will run hour by hour.
26
29. End case construction: You have completed
constructing the case. If you click on “System” at the
top of the main tree, and then click on the “Objects” tab
at the top of the data grid, it should appear as below.
30. Save: You should have a good, working Plexos case
at this point, but you may have made some errors. Save
the case from “File” on the menu bar.
31. Execute: Execution at this point will result in a socalled “ST Schedule” solution, which is the default
solution method for the software. The “ST” is for
“Short-term.” Essentially, the program runs a unit
commitment over the time period. One may go to the
wiki pages at www.plexos.info/wiki/ and search on “ST
Schedule” to learn more about this solution method.
27
This
will
lead
to
the
page
at
www.plexos.info/wiki/index.php?n=Main.STSchedule,
where you can read the following information (yellow
shading is added to highlight some statements).
Short Term (ST) Schedule
Main Trail Page | Class Reference | ST Schedule Class
Description:
Detail:
ST Schedule simulation phase
1. ST Schedule
ST Schedule is mixed-integer programming (MIP) based chronological optimization.
It can emulate the dispatch and pricing of real market-clearing engines, but it
provides a wealth of additional functionality to deal with:
unit commitment;
constraint modeling;
financial/portfolio optimization; and
Monte Carlo simulation.
Emulation of real market-clearing engines involves clearing generator offers against
forecast load accounting for transmission and other constraints to produce a
dispatch and pricing outcome. ST Schedule can do this but PLEXOS extends this
basic functionality by allowing you to specify fundamental data such as generator
start costs and constraints, heat-rate curves, fuel costs, etc. as well as or in addition
to market data such as generator offers, and the dynamic formulation engine in the
AMMO software at the heart of PLEXOS tailors the representation of each
simulation element, such as a generator, at runtime and on a case-by-case basis.
This allows you to seamlessly mix market data with fundamental data as desired –
relying on PLEXOS to compute the appropriate market representation at runtime,
and maximize simulation efficiency.
2. ST Schedule Chronology
ST Schedule provides two methods for modeling the chronology:
Full Chronology
Every trading period inside the ST Schedule horizon is modeled explicitly.
28
Typical Week
One week is modeled each per month in the horizon and results are applied
to the other weeks.
2.1. Full Chronology
In this mode, ST Schedule runs every trading period and maintains chronological
consistency across the horizon. For example it can model generator start ups and
shutdowns and track the status of units across time. The Horizon options allow you
to select either the whole or only a subset of the planning horizon for execution with
ST Schedule.
When selecting the planning horizon, the step type is chosen from years, months,
weeks, or days. But the ST Schedule Step Type must be either weeks, days, hours,
or minutes. The reason for this is related to the way in which PLEXOS sets up and
solves the ST Schedule problem. At runtime PLEXOS:
dynamically constructs a mathematical programming problem to represent the
first step of the ST Schedule; and then
as each step is evaluated, the same problem is simply modified to represent the
next step, and so on until the required horizon has been evaluated.
The length of each ST step is controlled by the ST Schedule At a Time property. In
general the longer each step of the ST Schedule is, the greater the execution time
will be for each of those steps, but there is some overhead is switching from one
step to the next. You should experiment with these settings to find the best
combination for their models.
Note further, that the outcome of the simulation can be influenced by the size of the
ST step when there are significant intertemporal aspects. This is because the state
of the system, e.g. generator unit commitment, is recorded and carried over from
one step to the next, but each step does not look-ahead to the next. Hence unless
the model has no intertemporal elements, e.g. when performing a pure marketclearing emulation, it is recommended that the ST be run in steps of no less than
one day at a time.
29
To further improve the optimization of unit commitment decisions you can configure
ST Schedule to use a look-ahead period ahead of each step. This allows the step
size of ST Schedule to be kept small (e.g. a day at a time) but sufficient look-ahead
maintained for unit commitment decisions.
2.2. Typical Week
When ST Schedule is run in typical week mode, the horizon options are simplified.
The simulation will always run across the whole planning horizon, and the only
option to chose is the size of each step of the ST Schedule i.e. how many trading
periods should be ‘solved’ at once. Typically, large models should be run in daily or
evenly hourly steps, smaller models can run in weekly steps.
Running in this mode reduces the amount of simulation work for ST Schedule by
more than a factor of four, but PASA and MT Schedule are still run in exactly the
same manner.
Note that solution data for the typical week is written into the solution database, and
the PLEXOS interface will explode those data out so that a full chronology can be
viewed. This means that the size of the solution database is also reduced when ST
Schedule is run in this mode. Summary data (daily, weekly, monthly, annual) are all
calculated based on the mapping of typical weeks to trading periods i.e. the daily
data for a day that was not part of a typical week, is taken from the day of the same
type in the typical week that was run. Thus, summary data are complete, but may
not match input data such as total energy, and peak demand.
The selection of week inside the month is controlled by the option Typical Week.
The beginning day of week is set by the Week Beginning option. When set to
automatic, the week begins on the same day of week as the first day of the planning
horizon.
Execution is performed by clicking on the “Execute”
button in the main menu. A “Select Models and/or
Projects for Execution” window will pop up. Click on
“OK” in the bottom right-hand corner of this window.
Plexos will run, generating the solver code which it sends
30
to a remote server as input to a solver, the remote server
will send the solution back which Plexos will store in an
Access database. This sequence will be logged to a black
screen that you will see as the execution continues. This
sequence will also be logged in a tex file in a subdirectory
within the directory where the input database resides. This
log file will appear on the screen as below.
and in the log file as below.
Started Model "Base" -->
---------------------------------------------------------------------------Element
Records
---------------------------------------------------------------------------Objects...................................................................16
Memberships...............................................................31
Properties................................................................44
---------------------------------------------------------------------------Total.....................................................................91
---------------------------------------------------------------------------- Using Metric Units
Primary Compilation Started:
Primary Compilation Completed. Time: 0:00:01.287
31
Model Initialization Started -->
- Random Number Seed = 1719307187 (enter this number to repeat this sequence).
- Discount Rate = 0.00 %
Secondary Compilation Started:
Secondary Compilation Completed. Time: 0:00:02.560
Horizon is 1 day in duration.
Requesting licenses:
- MOSEK 5.0.0.93
- PLEXOS 5.100 R01
- PLEXOS Version 5
- MOSEK Base Product
- PLEXOS Support for MOSEK
- Machine Name:
PLEXOS
- Physical Memory: 3.93 GB
- CPU Type:
Intel(R) Core(TM)2 CPU
6600 @ 2.40GHz
- CPU Count:
2
Licenses received.
In-Memory Cache Setup Started
---------------------------------------------------------------------------File
Periods Bands Total Time
per Day
Records (sec.)
---------------------------------------------------------------------------load.csv
24
1
24 0.05
---------------------------------------------------------------------------In-Memory Cache Setup. Time: 0:00:00.499:
- 0 reallocations
- 10000.00 kB
- 0.00 % efficiency
<-- Model Initialized. Time: 0:00:05.429
Preschedule -->
Preschedule step 1 of 1: Tuesday, January 01, 2002 - Tuesday, January 01, 2002 -->
<-- Preschedule step 1 of 1. Time: 0:00:00.051
---------------------------------------------------------------------------Minimization Objective Function:
Linear:.......................................
0.0000000000e+000
---------------------------------------------------------------------------Component
Time (sec.)
Contrib. (%)
---------------------------------------------------------------------------Setup..................................... 0:00:00.157
64.88 %
Modify.................................... 0:00:00.000
0.00 %
Solution.................................. 0:00:00.000
0.00 %
Write..................................... 0:00:00.000
0.00 %
Other..................................... 0:00:00.085
35.12 %
---------------------------------------------------------------------------Peak Memory...............................
44.22 MB
Current Memory............................
43.40 MB
---------------------------------------------------------------------------Preschedule Completed. Time: 0:00:00.243
<-- Preschedule
32
ST Schedule -->
---------------------------------------------------------------------------OPF Element
Count
---------------------------------------------------------------------------Slack Bus................................................................"3"
Nodes (busbars)............................................................3
Nodes in Service...........................................................3
Load Points................................................................1
Generation Injection Points................................................2
Total Injection Points.....................................................3
Lines (branches)...........................................................3
Lines in Service...........................................................3
AC Lines...................................................................3
Flow Limits >= 0 kV........................................................3
Flows Modeled >= 0 kV......................................................3
DC Lines...................................................................0
Phase Shifters.............................................................0
Phase Shifters in Service..................................................0
Generators.................................................................3
Generators in Service......................................................3
Unique AC Paths............................................................3
Modeled AC Paths...........................................................3
Required PTDF..............................................................9
Finished 3 Projections. Stored 6 PTDFs out of 9. Time: 0:00:00.062
Automatic zonal compression of shift factors:= 0.00%
Started ST Schedule Step 1 of 1: Jan 1, 2002 12:00:00 AM - Jan 1, 2002 11:59:00 PM
---------------------------------------------------------------------------Task Size:
Columns (variables).....................................
192
Integers................................................
0
Rows (constraints)......................................
144
Non-zero coefficients...................................
432
Memory (MB estimated)...................................
32.90
---------------------------------------------------------------------------Completed ST Schedule Step 1 of 1. Time: 0:00:01.116
-----------------------------------------------------------------------------------------------Regional Summary:
-----------------------------------------------------------------------------------------------Region/Area Demand Generation Net Export Gen. Cost Load Cost USE/Dump Price
(GWh)
(GWh)
(GWh) ($Mln's) ($Mln's)
(MWh)
-----------------------------------------------------------------------------------------------3node
29.41
29.41
0.00 868.52 294.13 354.07 $10,000.00
------------------------------------------------------------------------------------------------
ST Schedule Completed. Time: 0:00:01.707
<-- ST Schedule
---------------------------------------------------------------------------Minimization Objective Function:
33
Linear Relaxation:............................
9.0392566099e+008
Cost of Integerization:.......................
0.0000000000e+000
Relative Cost of Integerization:..............
0.00 %
---------------------------------------------------------------------------Component
Time (sec.)
Contrib. (%)
---------------------------------------------------------------------------Setup..................................... 0:00:00.762
44.65 %
Modify.................................... 0:00:00.028
1.69 %
MOSEK 5.0.0.93:........................... 0:00:00.001
0.11 %
---------------------------------------------------------------------------- Dual Simplex........................... 0:00:00.001
100.00 %
---------------------------------------------------------------------------Solution.................................. 0:00:00.233
13.69 %
Write..................................... 0:00:00.468
27.42 %
Other..................................... 0:00:00.212
12.44 %
---------------------------------------------------------------------------Peak Memory...............................
61.37 MB
Current Memory............................
60.76 MB
---------------------------------------------------------------------------Summary Solution Cached. Time: 0:00:00.006
<-- Model "Base" Completed. Time: 0:00:09.340
32. Explore solution
To explore the solution obtained following execution, we
select “open” from the “File” menu on the menu bar. The
default solution database is “Model Base solution” and is
in the same folder as that of the system input database
(sam.mdb). Plexos can illustrate the solution by either
table or graph. There are two buttons in the middle to
enable user selection regarding this issue. Click
“Show/Hide legend” on the upper right-hand side to
show/hide the legend and refresh chart.
34
The system load level can be observed by itself as below:
35
The generation level of the three units may also be
observed:
36
This result may be assessed in comparison to the
generator input data, repeated below for convenience.
f_Attributes
Generator Units
Max
Capacity
(MW)
Fuel Price
($/MMBTU)
Heat Rate
(BTU/kWh)
VOM
Charge
($/MWh)
Forced
Min Stable
Outage Rate
Level (MW)
(%)
Outage
Rating
(MW)
Mean Time
to Repair
(hrs)
Gen_11
1
700
2
10000
0
0
5
0
100
Gen_12
1
400
7
9000
0
0
2
0
80
Gen_3
1
200
7
12000
0
0
1
0
40
Note the circled data – we got bad results and so divided
it all by 1000 which makes units of MBTU/MWhr.
37
And the price may be observed.
38
4. LT Plan Formulation Description
The Plexos description of the LT Plan model formulation
is below.
LT Plan Formulation
The capacity expansion problem is formulated in PLEXOS as a Mixed-Integer Linear
Program (MILP or MIP for short).
To illustrate the very core of this formulation, we develop the following simplified
formulation.
NOTE: The following description is illustrative only, and shows only the core of the
LT Plan MIP formulation.
Definitions
Let us define the following variables:
Variable
Description
Type
GenBuildg y
Number of generating units built in year yfor Generator g
integer
GenRetireg y Number of generating units retired in year yfor Generator g integer
CapShorty
Capacity shortfall in year y
GenLoadg t
Dispatch level of generating unit gin period t
continuous
USEt
Unserved energy in dispatch period t
continuous
We also define the following parameters:
Element
Description
Unit
D
Discount rate
Lt
Number of hours in dispatch period t
hours
BuildCostg
Build cost for generator g
$
RetireCostg
Cost of retirement for generator g
$
Pmax
Maximum generating capacity of generator g
MW
39
Unitsg
Existing number of generating units g
PeakLoady
Maximum power demand in year y
MW
ReserveMarginy Margin required over maximum power demand in year y MW
CapShortPrice
Capacity shortage price
$/MW
VoLL
Value of lost load
$/MWh
SRMCg
Marginal cost of generation g
$/MWh
Demandt
Power demand in dispatch period t
MW
Optimization problem
The optimization problem is then as follows:
Minimize sum of net present value of build, retirement and generation costs
Minimize
y
BuildCostg GenBuildg y+RetireCostg GenRetireg y
+ (1+D)y
t y
g
SRMCg Lt GenLoadg t +VoLL USEt
subject to
Capacity is sufficient to meet peak load plus required margin
Pgmax Unitsg + y GenBuildg y−GenRetireg
PeakLoady+ReserveMarginy y
g
y
Pgmax+CapShorty
Energy demand is met
gGenLoadg t
+USEt=Demandt
t
Dispatch is feasible
GenLoadg t Pgmax Unitsg+
i yGenBuildg y
gt
Converting Build Cost into an annual charge
The Generator.Build Cost property represents the (per kW) overnight cost of building
a new unit, i.e the all-in capital cost as per commissioning date. This input is
transformed into an annualized charge suitable for the LT Plan problem formulation
as follows:
Annual Charge =
BuildCost Pmax WACC 1−1 ((1+WACC)EconomicLife)
The cost coefficient in the objective function (i.e. BuildCostg) is then computed as
the sum of the discounted annual charges, starting from that given year until the end
40
of the economic life of the unit. The discount rate used will be a system discount
rate, whereas the WACC will be project-specific.
End-year Treatment
It is important in the LT Plan formulation that the model does not inappropriately
consider the end of the planning horizon to also be the 'end of time'. In the above
basic formulation we have implicitly assumed that LT Plan has an infinite horizon. In
practice, the model will have a finite horizon such as 20 or 30 years. We therefore
have to take account of so-called end year effects.
Without some method for dealing with end-year effects, the model will in the last
years of the horizon only build generators with low build costs (even if their marginal
generation costs are high). This is because the average cost of generation between
build year and the end of the planning horizon - including build costs - will be lower
for such generators.
We therefore assume that the last year of the horizon is repeated an infinite number
of times. The objective function is expanded by the cost of the years after the final
horizon year, which equals the sum of the present values of generation costs.
Solution approach
Problem Size Reduction
The capacity expansion 'sub-problem' uses annual build/retire decisions. Thus the
number of these elements in the formulation is relatively small. No problem size
reduction is required to these elements. However, if all decisions are integer (as
controlled by the Optimality option), then the problem can become very hard to
solve. You can reduce the number of integers by selectively turning off integer
optimization at the Generator level using the Generator . Expansion Optimality
property.
LT Plan (by default) spans the whole simulation planning horizon in a single
optimization 'step'. For realistically-sized power systems and long planning horizons
this may lead to extremely big problems in the production cost sub-problem. To
make this problem tractable, two problem size reduction techniques can be used:
1. The production cost subproblem's chronology is reduced using the load
duration curve (LDC) methodology (as in MT Schedule).
41
2. The optimization can be split into multiple steps using the At a Time option.
LT Plan always uses a LDC approach. The controls for the level of detail in this
method are Step Type, and Blocks.
Solution method
The key LT Plan variables (whether to build or retire generators, or build/retire lines)
are integer. As a result a mixed-integer solver is required to obtain an integer
optimal build/retirement solution.
PLEXOS also allows LT Plan to be solved using a Linear Relaxation. This has the
advantage of faster execution, as well as the ability to report the shadow price of
capacity. For longer terms (>20yr) analysis, a Linear Relaxation may be sufficient.
However the Linear solution is not suitable for passing through to MT/ST, as these
require integer units.
=======================
Generation Expansion
- Defining a Generation Project
- Timing Constraints
- Generation Cost
- Firm Capacity
- Forced Outages and Maintenance
- Hydro Model
- Retirements
- Planned Retirements
- Economic Retirements
- Plant Staging
- Mututally Exclusive Projects Constraint
- Project Staging Constraint
Defining a Generation Project
To correctly define a generation expansion candidate you must define all of the
following:
42
Max Capacity in MW
Max Units Built
Build Cost which in $/kW
Economic Life in years
WACC which is the discount rate applied to the project's costs
This is in addition to the properties that define the production cost of the generator,
such as Heat Rate, Fuel Price and VO&M Charge.
Here is an example:
Property
Max Capacity
Max Units Built
Build Cost
Value
Unit
300
MW
1
-
175
$/kW
Economic Life
30
years
WACC
12
%
You may optionally define the Technical Life if the project's life is limited.
If some units already exist at the power station, or are scheduled to come into
service at known times, you can defined Units as well. These 'incubent' units are
then in addition to those that might be added from the Max Units Built
Where a project starts and finishes within the horizon, the entire build cost is
incurred within the horizon (in the year of the build), otherwise an annuity is
computed, and the last year assumed to continue in perpetuity. The properties
Economic Life and WACC are used to compute this annuity. To change this
behaviour adjust the property End Effects Method.
Timing Constraints
The earliest possible start date of a project is set using the Project Start Date
property. The number of units that can be built is set by the property Max Units Built,
and this can vary across time to vary the total number of units built in aggregate.
The property Max Units Built in Year limits the number of units built in any particular
year.
43
Any number of units (up to the Max Units Built) can be forced into service using the
Min Units Built. You can also force a minimum number of units to be built in a
particular year using the Min Units Built in Year property.
More complex timing constraints are possible, including linking the build/retire
decisions of different generators by using generic Constraints, the section Plant
Staging.
Generation Cost
The production cost model of LT Plan is identical to that of MT Schedule, and thus is
fully featured including fuels, emissions, and ancillary services modeling.
Firm Capacity
If your model includes constraints on capacity reserves (generation capacity over
and above peak load), you may need to account for the firm capacity of generators,
which can be different to the 'raw' installed capacity e.g. for wind plant. This is
controlled by the Generator property Firm Capacity.
Forced Outages and Maintenance
Generation capacity in LT Plan Capacity Sub-problem is derated by the forced
outage rate. Capacity in the Production Cost Sub-problem is derated by the
maintenance rate. For example, if a 100 MW plant has an average maintenance rate
of 7.5%, and forced outage rate of 2%, then the LT Plan production cost model will
assume:
a maximum dispatchable value of 92.5 MW (for meeting energy); and
the capacity constraints will use a capacity of 98 MW
There are two options for how forced outages are accounted for in the Production
Cost Sub-problem:
1. By a simple derating of capacity (the default)
2. By convolving generator outage states into the load duration curve, using the
Effective Load Approach (ELA).
Hydro Model
44
LT Plan includes the same hydro storage optimization as MT Schedule. Thus it is
possible to model any number of storages, waterways, junctions, headponds etc, in
cascading networks. Storage can be optimized over the long term, with hydro
balance occuring each LDC (e.g. monthly).
Inflow uncertainty can be directly accounted for using Stochastic Optimization.
Retirements
Retirements can be either economic, planned, or part of a logical sequence of
project stages.
Planned Retirements
If the unit's retirement is planned and the retirement date is known, then the Units
property is all that is needed, as in the following example:
Property
Value
Unit
Units
1
-
Units
0
-
Date From
1/01/2016
In this example the generator is in service from the start of the planning horizon (no
date given for Units = 1), and goes out of service on January 1, 2016.
LT Plan however is able to optimize the timing of retirements.
Economic Retirements
The set up for economic unit retirement is similar to that for building units, except
that the retirement cost is not annualized, thus you need only define:
Max Units Retired
Retirement Cost which in $000
The retirement cost is optional in this case, so the following data are valid:
Property
Value
Unit
Units
1
-
Max Units Retired
1
-
Date From
1/01/2012
45
Note how a date can be applied to the Max Units Retired so that LT Plan does not
retire the unit before that time.
Plant Staging
Often a "project" consists of multiple stages and there is a defined staging order and
unique performance parameters for each stage. This is modeled in LT Plan using
one Generator object per stage, and with the setting of appropriate build and retire
inputs, and finally with generic constraints to link the stages.
Consider the following example.
A combined cycle plant can be built in one of two ways:
1. First as a open-cycle plant of low efficiency with a later upgrade to higherefficiency combined cycle; or
2. As a combined cycle plant in one 'stage'
Assume also that the open-cycle stage can be built "immediately" whereas the
combined-cycle can only be in service at or after 1/01/2012.
Firstly we create generator objects to represent the two stages (GT and CCGT), and
a generator to represent the option to build the CCGT in one step.
Generator
Property
Value
CCGT_stage1
Units
CCGT_stage1
Max Capacity
75
MW
CCGT_stage1
Heat Rate
11
GJ/MWh
CCGT_stage1
Max Units Built
1
-
CCGT_stage1
Max Units Retired
1
-
CCGT_stage1
Build Cost
CCGT_stage1
CCGT_stage1
0
Unit
Date From
-
110
$/kW
Economic Life
30
years
WACC
12
%
1/01/2009
46
Generator
Property
Value
CCGT_stage2
Units
CCGT_stage2
Max Capacity
325
MW
CCGT_stage2
Heat Rate
7.5
GJ/MWh
CCGT_stage2
Max Units Built
CCGT_stage2
Build Cost
CCGT_stage2
CCGT_stage2
0
1
Unit
-
-
120
$/kW
Economic Life
30
years
WACC
12
%
Value
Generator
Property
CCGT
Units
CCGT
Max Capacity
325
MW
CCGT
Heat Rate
7.5
GJ/MWh
CCGT
Max Units Built
CCGT
Build Cost
CCGT
CCGT
0
1
Date From
Unit
1/01/2012
Date From
-
-
210
$/kW
Economic Life
30
years
WACC
12
%
1/01/2011
Note that the heat rate is allowed to change over time, as is the build cost and any
other parameter, however for this example we assume static data. Note also that the
"CCGT_stage1" generator must allow retirement by setting the Max Units Retired
property. This is so that it can be superceded by the stage 2 plant.
We now link the stages with generic constraints to ensure that:
"CCGT_stage2" is built only if "CCGT_stage1" is built first
"CCGT_stage1" 'retires' when "CCGT_stage2" is built
"CCGT_stage2" and "CCGT" are mutually exclusive
Mututally Exclusive Projects Constraint
To make two projects, i and j, mutually exclusive we need to create a constraint in
the formulation like this:
47
t
GenBuildi t +
t
GenBuildj t
1
In this equation t indexes the time periods (years in LT Plan).
Here we create the Constraint object "CCGT_mutually_exclusive", then add the
Generators "CCGT_stage1" and "CCGT" to the Constraint.Generators collection.
We then define the following data:
Membership
Property
CCGT_mutually_exclusive
Sense
CCGT_mutually_exclusive
RHS
CCGT_mutually_exclusive.Generators.CCGT_stage1
CCGT_mutually_exclusive.Generators.CCGT
Value
Unit
<=
-
1
-
Units Built
Coefficient
1.0
-
Units Built
Coefficient
1.0
-
Date
From
Project Staging Constraint
To make sure that the "stage 1" and "stage 2" projects follow each other in
sequence we need to create an equation like this:
GenBuildi t−GenRetirej
t
0
t
Here we create the Constraint object "CCGT_staging", then add the Generators
"CCGT_stage1" and "CCGT_stage2" to the Constraint.Generators collection. We
then define the following data:
Membership
Property
CCGT_staging
Sense
CCGT_staging
RHS
CCGT_staging.Generators.CCGT_stage1
Units Retired in Year Coefficient
CCGT_staging.Generators.CCGT_stage2
Units Built in Year Coefficient
Value
Unit
<=
-
0
-
-1.0
-
1.0
-
Date From
Note the use of Units Built in Year Coefficient and Units Retired in Year Coefficient,
which creates constraints for each year, rather than summing across all years as in
the mututally exclusive projects case above.
48
=========================
Transmission Expansion
- Building Transmission Lines
- Expanding Interfaces
Building Transmission Lines
Transmission line expansion, retirement and multi-stage projects in LT Plan works in
much the same way as Generation Expansion with the following restriction:
The Transmission option OPF Method must be set to "Variable Shift Factor
OPF". This is because the dynamic addition/deletion of lines from the system
is supported only by that OPF method. Note that this procludes transmission
expansion from being used on very large transmission systems over long time
periods (though snapshot studies of large systems are possible).
Expanding Interfaces
Expansion of existing transmission interfaces is a feature available to both OPF
methods in PLEXOS (i.e. it can be done on any sized system). Expansion is done in
continuous units of megawatts, thus the only data required are:
Expansion Cost in $MM/MW
Max Expansion in MW
WACC which is the discount rate applied to the expansion costs
5. HW Assignment
Your HW assignment is due Friday, Nov 7. This HW is a
“warm-up” to the project I will ask you to perform.
49
1. Go through the above steps to perform construction
of the case, then execute the ST Schedule, and
observe the solution. You should get exactly what is
shown above. There is no need to turn anything in for
this step. I am simply asking you to do it in order to
become familiar with the software.
2. I have loaded the final case I obtained onto the course
website. You may use it to begin work on this step (if
you did #1 correct above, this will be a duplicate
copy to what you developed). Go through the below
steps to perform a LT Plan study. Report your
solution in terms of what units were added and how
much it cost.
a. Build a new model “LTP” by copying previous model
“Base.” So the content of “LTP” is identical to “Base.” We
name it “LTP”
50
b. Build a new object “LTP setttings” which belongs to “LT
Plan” class.
We can set the properties for the long term planning
model.
51
C. Add “LTP setting” into model “LTP.”
52
d. Build .csv file that contains 20-year load level. Then
build a new load file object in the same way as before.
Then build a scenario and add the data file to the
scenario by setting its property.
Add the new scenario “LTP scenario” to the model “LTP”.
e. Add possible new generators that we are going to build
in the planning horizon. Add them to the region “3node.”
Edit their properties.
53
f. Build a new object in the “Horizon” class. Set the
horizon to be 7305 steps of I day to run a 20-year long
term planning.
54
g. Execute and explore solution.
55
Download