|
1 | 1 | # PowerModels Data Format
|
2 | 2 |
|
3 |
| -## Network Data Dictionary |
| 3 | +## The Network Data Dictionary |
4 | 4 |
|
5 | 5 | Internally PowerModels utilizes a dictionary to store network data.
|
6 |
| -The dictionary uses strings as key values so this data structure can be serialized to JSON for algorithmic data exchange. |
| 6 | +The dictionary uses strings as key values so it can be serialized to JSON for algorithmic data exchange. |
7 | 7 | The data dictionary organization and key names are designed to be consistent with the [Matpower](http://www.pserc.cornell.edu/matpower/) file format and should be familiar to power system researchers.
|
8 | 8 |
|
9 | 9 | The network data dictionary structure is roughly as follows,
|
@@ -41,26 +41,32 @@ The network data dictionary structure is roughly as follows,
|
41 | 41 | ...
|
42 | 42 | },
|
43 | 43 | ...
|
44 |
| -], |
45 |
| -"gencost":[ |
46 |
| - { |
47 |
| - "index":<int>, |
48 |
| - "model":<int>, |
49 |
| - "startup":<float>, |
50 |
| - "shutdown":<float>, |
51 |
| - ... |
52 |
| - }, |
53 |
| - ... |
54 | 44 | ]
|
55 | 45 | }
|
56 | 46 | ```
|
57 | 47 |
|
58 |
| -For a detailed list of all possible parameters please refer to the specification document provided with [Matpower](http://www.pserc.cornell.edu/matpower/). In addition to the traditional Matpower parameters every network component in the PowerModels dictionary has an `index` parameter, which can be used to uniquely identify that network element. |
| 48 | +The following commands can be used to explore the network data dictionary generated by a given Matpower data file, |
| 49 | +``` |
| 50 | +network_data = PowerModels.parse_file("$(Pkg.dir("PowerModels"))/test/data/case14.m") |
| 51 | +display(network_data) |
| 52 | +``` |
| 53 | + |
| 54 | +For a detailed list of all possible parameters refer to the specification document provided with [Matpower](http://www.pserc.cornell.edu/matpower/). |
| 55 | + |
| 56 | +### Noteworthy Differences from Matpower Data Files |
| 57 | + |
| 58 | +The PowerModels network data dictionary differs from the Matpower format in the following ways, |
59 | 59 |
|
60 |
| -It is also important to note that although the Matpower format contains values in mixed units, during PowerModels data setup phase all of the data values are converted to per-unit and radian values. |
| 60 | +- All PowerModels components have an `index` parameter, which can be used to uniquely identify that network element. |
| 61 | +- All network parameters are in per-unit and angles are in radians. |
| 62 | +- All non-transformer branches are given nominal transformer values (i.e. a tap of 1.0 and a shift of 0). |
| 63 | +- When present, the `gencost` data is incorporated into the `gen` data, the column names remain the same. |
| 64 | +- Only quadratic active power generation cost functions are supported at this time. |
| 65 | +- Some additional derived values are added to branches, such as line admittance values (see `update_derived_values` in `src/core/data.jl` for details). |
| 66 | +- Special treatment is given to the optional `ne_branch` matrix to support the TNEP problem. |
61 | 67 |
|
62 | 68 |
|
63 |
| -## Matpower Data Files |
| 69 | +## Working with Matpower Data Files |
64 | 70 |
|
65 | 71 | The data exchange via JSON files is ideal for building algorithms, however it is hard to for humans to read and process.
|
66 | 72 | To that end PowerModels also has extensive support for parsing Matpower network files in the `.m` format.
|
@@ -135,7 +141,7 @@ becomes,
|
135 | 141 | }
|
136 | 142 | ```
|
137 | 143 |
|
138 |
| -#### Standard Matrix Extentions |
| 144 | +#### Standard Matrix Extensions |
139 | 145 | Finally, if a nonstandard matrix's name extends a current Matpower matrix name with an underscore, then its values will be merged with the original Matpower component data. Note that this feature requires that the nonstandard matrix has column names and has the same number of rows as the original matrix (similar to the `gencost` matrix in the Matpower format). For example,
|
140 | 146 | ```
|
141 | 147 | %column_names% rate_i rate_p
|
|
0 commit comments