From 839fa7269ed376e630724fd7ad5820253b8935e0 Mon Sep 17 00:00:00 2001 From: KSepetanc Date: Fri, 1 Nov 2024 17:01:49 +0100 Subject: [PATCH] Fix PSSE raw import for gen_status at load buses --- src/io/psse.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/psse.jl b/src/io/psse.jl index 356de551..2626d1de 100644 --- a/src/io/psse.jl +++ b/src/io/psse.jl @@ -211,7 +211,7 @@ function _psse2pm_generator!(pm_data::Dict, pti_data::Dict, import_all::Bool) sub_data = Dict{String,Any}() sub_data["gen_bus"] = pop!(gen, "I") - sub_data["gen_status"] = pop!(gen, "STAT") + 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) sub_data["pg"] = pop!(gen, "PG") sub_data["qg"] = pop!(gen, "QG") sub_data["vg"] = pop!(gen, "VS")