You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PowerModels.component_table(network_data, "bus", ["vmin", "vmax"]) # component data in matrix form
@@ -124,15 +124,15 @@ Data exchange via JSON files is ideal for building algorithms, however it is har
124
124
125
125
The first of these helper functions are `make_per_unit` and `make_mixed_units`, which convert the units of the data inside a network data dictionary. The *mixed units* format follows the unit conventions from Matpower and other common power network formats where some of the values are in per unit and others are the true values. These functions can be used as follows,
PowerModels.print_summary(network_data) # default per-unit form
129
129
PowerModels.make_mixed_units(network_data)
130
130
PowerModels.print_summary(network_data) # mixed units form
131
131
```
132
132
133
133
Another useful helper function is `update_data`, which takes two network data dictionaries and updates the values in the first dictionary with the values from the second dictionary. This is particularly helpful when applying sparse updates to network data. A good example is using the solution of one computation to update the data in preparation for a second computation, like so,
134
134
```
135
-
data = PowerModels.parse_file("nesta_case3_lmbd.m")
A variety of helper functions are available for processing the topology of the network. For example, `connected_components` will compute the collections of buses that are connected by branches (i.e. the network's islands). By default PowerModels will attempt to solve all of the network components simultaneously. The `select_largest_component` function can be used to only consider the largest component in the network. Finally the `propagate_topology_status` can be used to explicitly deactivate components that are implicitly inactive due to the status of other components (e.g. deactivating branches based on the status of their connecting buses), like so,
145
145
```
146
-
data = PowerModels.parse_file("nesta_case3_lmbd.m")
146
+
data = PowerModels.parse_file("case3.m")
147
147
PowerModels.propagate_topology_status(data)
148
148
opf_result = run_ac_opf(data, IpoptSolver())
149
149
```
@@ -294,5 +294,5 @@ PowerModels also has support for parsing PTI network files in the `.raw` format
294
294
In addition to parsing the standard parameters required by PowerModels for calculations, PowerModels also supports parsing additional data fields that are defined by the PSS(R)E specification, but not used by PowerModels directly. This can be achieved via the `import_all` optional keyword argument in `parse_file` when loading a `.raw` file, e.g.
Copy file name to clipboardexpand all lines: docs/src/quickguide.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,32 @@
1
1
# Quick Start Guide
2
2
3
-
Once PowerModels is installed, Ipopt is installed, and a network data file (e.g. `"nesta_case3_lmbd.m"` or `"nesta_case3_lmbd.raw"`) has been acquired, an AC Optimal Power Flow can be executed with,
3
+
Once PowerModels is installed, Ipopt is installed, and a network data file (e.g. `"case3.m"` or `"case3.raw"`) has been acquired, an AC Optimal Power Flow can be executed with,
4
4
5
5
```julia
6
6
using PowerModels
7
7
using Ipopt
8
8
9
-
run_ac_opf("nesta_case3_lmbd.m", IpoptSolver())
9
+
run_ac_opf("case3.m", IpoptSolver())
10
10
```
11
11
12
12
Similarly, a DC Optimal Power Flow can be executed with
13
13
14
14
```julia
15
-
run_dc_opf("nesta_case3_lmbd.m", IpoptSolver())
15
+
run_dc_opf("case3.m", IpoptSolver())
16
16
```
17
17
18
18
PTI `.raw` files in the PSS(R)E v33 specification can be run similarly, e.g. in the case of an AC Optimal Power Flow
19
19
20
20
```julia
21
-
run_ac_opf("nesta_case3_lmbd.raw", IpoptSolver())
21
+
run_ac_opf("case3.raw", IpoptSolver())
22
22
```
23
23
24
24
## Getting Results
25
25
26
26
The run commands in PowerModels return detailed results data in the form of a dictionary. Results dictionaries from either Matpower `.m` or PTI `.raw` files will be identical in format. This dictionary can be saved for further processing as follows,
27
27
28
28
```julia
29
-
result =run_ac_opf("nesta_case3_lmbd.m", IpoptSolver())
29
+
result =run_ac_opf("case3.m", IpoptSolver())
30
30
```
31
31
32
32
For example, the algorithm's runtime and final objective value can be accessed with,
@@ -52,20 +52,20 @@ The function "run_ac_opf" and "run_dc_opf" are shorthands for a more general for
where "ACPPowerModel" indicates an AC formulation in polar coordinates. This more generic `run_opf()` allows one to solve an OPF problem with any power network formulation implemented in PowerModels. For example, an SOC Optimal Power Flow can be run with,
Network data parsed from PTI `.raw` files supports data extensions, i.e. data fields that are within the PSS(R)E specification, but not used by PowerModels for calculation. This can be achieve by
This network data can be modified in the same way as the previous Matpower `.m` file example. For additional details about the network data, see the [PowerModels Network Data Format](@ref) section.
@@ -102,7 +102,7 @@ loss_dc = Dict(name => data["pt"]+data["pf"] for (name, data) in result["soluti
102
102
The following example demonstrates how to break a `run_opf` call into seperate model building and solving steps. This allows inspection of the JuMP model created by PowerModels for the AC-OPF problem,
0 commit comments