In line 86 and 209 of hdf5_writer.jl, transformer flags are based off of tap ratios instead of transformer labels like so:
is_transformer = (branch["tap"] != 1.0) || (branch["shift"] != 0.0)
In Matpower, a tap ratio of 0.0 and not 1.0 is used to denote a line, so it is possible to have transformers with a tap ratio of 1.0. This leads to transformers occasionally getting mislabeled as AC lines when loading case data from a .m file.
I would suggest modifying lines 86 and 209 to check the branch label instead of tap ratios like so:
is_transformer = get(branch, "transformer", false)
In line 86 and 209 of hdf5_writer.jl, transformer flags are based off of tap ratios instead of transformer labels like so:
In Matpower, a tap ratio of 0.0 and not 1.0 is used to denote a line, so it is possible to have transformers with a tap ratio of 1.0. This leads to transformers occasionally getting mislabeled as AC lines when loading case data from a .m file.
I would suggest modifying lines 86 and 209 to check the branch label instead of tap ratios like so: