PowerSystems.jl icon indicating copy to clipboard operation
PowerSystems.jl copied to clipboard

Parsing matpower: splitting the shunt value on transformers

Open luke-kiernan opened this issue 6 months ago • 3 comments

matpower always splits the shunt: in the caseformat file, there's a single BR_B entry for each branch, which then is interpreted as b/2 at each end of the branch. When parsing vanilla AC lines, we match this behavior and store a pair (from = b/2, to = b/2). However, for various types of transformers, we only have a single number, primary_shunt. Currently, we set primary_shunt = d["b_fr"], using the b/2 on the "from" bus and ignoring the b/2 on the "to" bus. Is this the correct behavior? Should be instead add the two?

Some care is required here: simply setting primary_shunt = d["b_fr"] + d["b_to"] would change the behavior when parsing other file types too! The parsing happens in 2 steps, input file to power models dictionary and then power models dictionary to component structs. It's that second step we're losing the b/2 on the "to" bus.

luke-kiernan avatar Jun 10 '25 17:06 luke-kiernan

should we just change shunts to be a FromTo tuple, similar to what lines do?

rodrigomha avatar Jun 10 '25 20:06 rodrigomha

not really. This is a very Matpower thing to do.

jd-lara avatar Jun 13 '25 15:06 jd-lara

Okay. Could someone mark this as "wontfix" then? I haven't been added to this repo so I can't do so myself.

luke-kiernan avatar Jun 16 '25 15:06 luke-kiernan