Skip to content

Commit 7d3c7a1

Browse files
KSepetancodow
andauthored
Update src/io/psse.jl
Co-authored-by: Oscar Dowson <[email protected]>
1 parent a7190d8 commit 7d3c7a1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/io/psse.jl

+9-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,15 @@ function _psse2pm_generator!(pm_data::Dict, pti_data::Dict, import_all::Bool)
211211
sub_data = Dict{String,Any}()
212212

213213
sub_data["gen_bus"] = pop!(gen, "I")
214-
sub_data["gen_status"] = _get_bus_value(sub_data["gen_bus"], "bus_type", pm_data) == 1 ? begin delete!(gen, "STAT"); 0 end : pop!(gen, "STAT") # In PSSE active generators at bus type 1 are ignored. PQ or PV control mode is controlled by "Machine Control Mode" parameter (Machine Data Record -> Wind Data -> Control Mode)
214+
if _get_bus_value(sub_data["gen_bus"], "bus_type", pm_data) == 1
215+
# In PSSE active generators at bus type 1 are ignored. PQ or PV
216+
# control mode is controlled by "Machine Control Mode" parameter
217+
# (Machine Data Record -> Wind Data -> Control Mode)
218+
delete!(gen, "STAT")
219+
sub_data["gen_status"] = 0
220+
else
221+
sub_data["gen_status"] = pop!(gen, "STAT")
222+
end
215223
sub_data["pg"] = pop!(gen, "PG")
216224
sub_data["qg"] = pop!(gen, "QG")
217225
sub_data["vg"] = pop!(gen, "VS")

0 commit comments

Comments
 (0)