Sienna-Platform / Sienna-Platform/PowerFlowFileParser.jl
Recommended way to retain the PSS/E circuit id (CKT) when parsing a RAW case?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1
- Forks
- 2
- Avg merge
- 22h 29m
- Merged PRs (30d)
- 10
Description
I noticed that branch names coming out of the PSS/E parser changed at some point between
5.5.0 and 5.9.1, and I would like to understand the intended usage rather than assume I am
holding it wrong.
Parsing a RAW case (source_type == "pti"), the -i_ field in a branch name used to carry
the circuit id from the record. It now appears to be a sequential per-bus-pair counter,
produced by _get_pm_branch_name_with_counter! in src/parsers/power_models_data.jl, and
applied to branch, switch, breaker and transformer source records.
I had been using the circuit number to match our branches against HIFLD transmission line
routes, since the bus pair alone does not distinguish parallel circuits. Bumping
PowerSystems broke that matching in our Eastern Interconnection, WECC and ERCOT models —
lines that had been resolving cleanly by circuit id no longer do, and the route lookup
silently falls through for a share of the network.
I assume this was deliberate. A name built directly from the circuit id will collide when a
case carries duplicate CKTs on the same bus pair, and a counter is an obvious way to
guarantee uniqueness, so I expect this fixed a real problem and that dropping the id was a
known trade rather than an oversight.
Two questions, then:
-
As far as I can tell the original id is not retained anywhere else on the component — I
could not findext["circuit_id"],ext["ckt"]orext["source_id"]being set anywhere
insrc/parsers, so it does not seem recoverable from the builtSystemafter the
fact. Is that right, or have I missed where it is kept? If it genuinely is dropped, would
you be open to preserving it on the component as data, independently of how the name is
constructed? That would keep names unique and identity recoverable at the same time,
without callers having to encode and re-parse a field inside a string. -
More practically, what would you recommend for parsing a PSS/E system when the circuit id
needs to survive? Is there a supported path I have overlooked a keyword argument,
something in the metadata reimport or is supplying a custombranch_name_formatterthe
intended approach, accepting that it puts the uniqueness problem back on the caller?
Minor, and only worth mentioning because it is what sent me to the parser source: I could not
find the branch naming convention described anywhere in the docs, so it was not obvious
whether the -i_ field was ever meant to be relied on. If it is intended as an internal
detail, saying so somewhere would be useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/parsers/power_models_data.jl at _get_pm_branch_name_with_counter! and trace how pti branch, switch, breaker and transformer records are populated. Check the component metadata, metadata reimport path and branch_name_formatter usage for retaining CKT. Done means a supported, documented way to preserve circuit IDs without sacrificing unique names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100