Skip to content

Commit

Permalink
Merge pull request #1050 from HaleyRoss/hr/docs
Browse files Browse the repository at this point in the history
Add bus_name_formatter to documentation
  • Loading branch information
jd-lara authored Feb 12, 2024
2 parents 700e8a7 + c8a17bd commit 0014e78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/modeler_guide/parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ RAW_dir = joinpath(file_dir, "ThreeBusNetwork.raw")
DYR_dir = joinpath(file_dir, "TestGENCLS.dyr")
dyn_system = System(RAW_dir, DYR_dir, runchecks = false)
```
### Common Issues

Please note that while PSS/e does not enforce unique bus names, `PowerSystems.jl` does. To reparse bus names to comply with this requirement the `bus_name_formatter` *kwarg can be used in `System()` as shown in the example below:

```@repl raw_dyr_system
dyn_system = System(RAW_dir, DYR_dir; bus_name_formatter = x -> strip(string(x["name"])) * "-" * string(x["index"]))
```
In this example the anonymous function `x -> strip(string(x["name"])) * "-" * string(x["index"])` takes the bus name and index from PSSe and concatenates them to produce the name.

## [PowerSystems Table Data](@id table_data)

Expand Down

0 comments on commit 0014e78

Please sign in to comment.