Is your feature request related to a problem? Please describe.
I'd like to use this package to run simulations of the 37-bus synthetic grid provided by Texas A&M, available for download here: https://electricgrids.engr.tamu.edu/hawaii40/. I am using the .raw and .dyr files provided in this dataset. I am preprocessing the .dyr file with the following sed command because REGCA1 generators don't seem to be supported by PowerSystems (see Sienna-Platform/PowerSystems.jl#1257):
sed -i s/REGCA1/REECB1/g Hawaii40_20231026.dyr
I run the following code:
using PowerSystems
using PowerSimulationsDynamics
rawfile = "Hawaii40_20231026.RAW"
dyrfile = "Hawaii40_20231026.dyr"
sys = System(rawfile, dyrfile)
sim = Simulation(ResidualModel, sys, pwd(), (0.0, 30.0), initialize_simulation = false, PowerSimulationsDynamics.Perturbation[])
And get an error:
┌ Error: ResidualModel failed to build
│ exception =
│ MethodError: no method matching mdl_tg_ode!(::SubArray{ForwardDiff.Dual{ForwardDiff.Tag{PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerS
│ The function `mdl_tg_ode!` exists, but no method is defined for this combination of argument types.
│
│ Closest candidates are:
│ mdl_tg_ode!(::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::Union{Float64, ForwardDiff.Dual}, ::PowerSi
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/models/generator_models/tg_models.jl:655
│ mdl_tg_ode!(::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::Union{Float64, ForwardDiff.Dual}, ::PowerSi
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/models/generator_models/tg_models.jl:559
│ mdl_tg_ode!(::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::AbstractArray{<:Union{Float64, ForwardDiff.Dual}}, ::Union{Float64, ForwardDiff.Dual}, ::PowerSi
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/models/generator_models/tg_models.jl:472
│ ...
│
│ Stacktrace:
│ [1] device!(device_states::SubArray{ForwardDiff.Dual{ForwardDiff.Tag{PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerSimulationsDynamic
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/models/device.jl:45
│ [2] system_residual!(out::Vector{ForwardDiff.Dual{ForwardDiff.Tag{PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerSimulationsDynamics.J
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/models/system.jl:86
│ [3] SystemModel
│ @ ~/.julia/dev/PowerSimulationsDynamics/src/models/system.jl:51 [inlined]
│ [4] #74
│ @ ~/.julia/dev/PowerSimulationsDynamics/src/base/jacobian.jl:135 [inlined]
│ [5] chunk_mode_jacobian!(result::Matrix{Float64}, f!::PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerSimulationsDynamics.JacobianCache
│ @ ForwardDiff ~/.julia/packages/ForwardDiff/UBbGT/src/jacobian.jl:187
│ [6] jacobian!
│ @ ~/.julia/packages/ForwardDiff/UBbGT/src/jacobian.jl:84 [inlined]
│ [7] jacobian!
│ @ ~/.julia/packages/ForwardDiff/UBbGT/src/jacobian.jl:79 [inlined]
│ [8] (::PowerSimulationsDynamics.var"#75#77"{ForwardDiff.JacobianConfig{ForwardDiff.Tag{PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, Power
ardDiff.Dual{ForwardDiff.Tag{typeof(PowerSimulationsDynamics.system_residual!), Float64}, Float64, 12}}}, Int64}, Float64}, Float64, 12}}}}, PowerSimulationsDynamics.var"#74#76"{PowerSimulationsDynamics.SystemModel{Residual
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/base/jacobian.jl:139
│ [9] PowerSimulationsDynamics.JacobianFunctionWrapper(m!::PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerSimulationsDynamics.JacobianCache{typeof(PowerSimulationsDynamics.s
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/base/jacobian.jl:148
│ [10] PowerSimulationsDynamics.JacobianFunctionWrapper(m!::PowerSimulationsDynamics.SystemModel{ResidualModel, PowerSimulationsDynamics.NoDelays, PowerSimulationsDynamics.JacobianCache{typeof(PowerSimulationsDynamics.s
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/base/jacobian.jl:128
│ [11] _get_jacobian(sim::Simulation{ResidualModel})
│ @ PowerSimulationsDynamics ~/.julia/dev/PowerSimulationsDynamics/src/base/simulation.jl:282
...
It looks like the problem may be that PowerSystems.GeneralGovModel is not supported by PSID?
Describe the solution you'd like
I would like to be able to simulate (something resembling) this dataset. If there is some workaround I can use (e.g., another dataset modification), I would be happy to know about that as well.
Unfortunately, I am not an expert in power system dynamics and do not know what properties of the data files are causing GeneralGovModel to be used instead of one of the supported models. I assume the governor models are chosen based on the generator types in the .dyr file, and that this error is due to a disconnect between the generator models supported by PowerSystems and the turbine-governor models supported by PSID.
Is your feature request related to a problem? Please describe.
I'd like to use this package to run simulations of the 37-bus synthetic grid provided by Texas A&M, available for download here: https://electricgrids.engr.tamu.edu/hawaii40/. I am using the .raw and .dyr files provided in this dataset. I am preprocessing the .dyr file with the following sed command because REGCA1 generators don't seem to be supported by PowerSystems (see Sienna-Platform/PowerSystems.jl#1257):
I run the following code:
And get an error:
It looks like the problem may be that
PowerSystems.GeneralGovModelis not supported by PSID?Describe the solution you'd like
I would like to be able to simulate (something resembling) this dataset. If there is some workaround I can use (e.g., another dataset modification), I would be happy to know about that as well.
Unfortunately, I am not an expert in power system dynamics and do not know what properties of the data files are causing
GeneralGovModelto be used instead of one of the supported models. I assume the governor models are chosen based on the generator types in the .dyr file, and that this error is due to a disconnect between the generator models supported by PowerSystems and the turbine-governor models supported by PSID.