Skip to content

Commit

Permalink
get delays as a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bossart committed Jan 5, 2024
1 parent 87f2d4a commit f336ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/base/device_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ get_delays(::PSY.DynamicInjection) = nothing
get_delays(
dynamic_injector::PSY.DynamicGenerator{M, S, A, PSY.DEGOV, P},
) where {M <: PSY.Machine, S <: PSY.Shaft, A <: PSY.AVR, P <: PSY.PSS} =
PSY.get_Td(PSY.get_prime_mover(dynamic_injector))
[PSY.get_Td(PSY.get_prime_mover(dynamic_injector))]

"""
Wraps DynamicInjection devices from PowerSystems to handle changes in controls and connection
Expand Down
4 changes: 3 additions & 1 deletion src/base/simulation_inputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ function get_system_delays(sys::PSY.System)
delays = []
for injector in get_injectors_with_dynamics(sys)
device_delays = get_delays(PSY.get_dynamic_injector(injector))
!isnothing(device_delays) && push!(delays, device_delays)
if !isnothing(device_delays)
delays = vcat(delays, device_delays)
end
end
return delays
end
Expand Down

0 comments on commit f336ece

Please sign in to comment.