Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/descriptors/power_system_structs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5084,6 +5084,15 @@
},
"validation_action": "warn"
},
{
"name": "reactive_power_limits",
"comment": "Minimum and maximum reactive power limits. Set to `Nothing` if not applicable",
"null_value": "nothing",
"data_type": "Union{Nothing, MinMax}",
"needs_conversion": true,
"conversion_unit": ":mva",
"default": "nothing"
},
{
"name": "dc_current",
"comment": "DC current (A) on the converter",
Expand Down
17 changes: 13 additions & 4 deletions src/models/generated/InterconnectingConverter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This file is auto-generated. Do not edit.
rating::Float64
active_power_limits::MinMax
base_power::Float64
reactive_power_limits::Union{Nothing, MinMax}
dc_current::Float64
max_dc_current::Float64
loss_function::Union{LinearCurve, QuadraticCurve}
Expand All @@ -34,6 +35,7 @@ Interconnecting Power Converter (IPC) for transforming power from an ACBus to a
- `rating::Float64`: Maximum output power rating of the converter (MVA), validation range: `(0, nothing)`
- `active_power_limits::MinMax`: Minimum and maximum stable active power levels (MW)
- `base_power::Float64`: Base power of the converter in MVA, validation range: `(0.0001, nothing)`
- `reactive_power_limits::Union{Nothing, MinMax}`: (default: `nothing`) Minimum and maximum reactive power limits. Set to `Nothing` if not applicable
- `dc_current::Float64`: (default: `0.0`) DC current (A) on the converter
- `max_dc_current::Float64`: (default: `1e8`) Maximum stable dc current limits (A)
- `loss_function::Union{LinearCurve, QuadraticCurve}`: (default: `LinearCurve(0.0)`) Linear or quadratic loss function with respect to the converter current
Expand All @@ -59,6 +61,8 @@ mutable struct InterconnectingConverter <: StaticInjection
active_power_limits::MinMax
"Base power of the converter in MVA"
base_power::Float64
"Minimum and maximum reactive power limits. Set to `Nothing` if not applicable"
reactive_power_limits::Union{Nothing, MinMax}
"DC current (A) on the converter"
dc_current::Float64
"Maximum stable dc current limits (A)"
Expand All @@ -75,12 +79,12 @@ mutable struct InterconnectingConverter <: StaticInjection
internal::InfrastructureSystemsInternal
end

function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, dc_current=0.0, max_dc_current=1e8, loss_function=LinearCurve(0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, dc_current, max_dc_current, loss_function, services, dynamic_injector, ext, InfrastructureSystemsInternal(), )
function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, reactive_power_limits=nothing, dc_current=0.0, max_dc_current=1e8, loss_function=LinearCurve(0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, reactive_power_limits, dc_current, max_dc_current, loss_function, services, dynamic_injector, ext, InfrastructureSystemsInternal(), )
end

function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, dc_current=0.0, max_dc_current=1e8, loss_function=LinearCurve(0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, dc_current, max_dc_current, loss_function, services, dynamic_injector, ext, internal, )
function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, reactive_power_limits=nothing, dc_current=0.0, max_dc_current=1e8, loss_function=LinearCurve(0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, reactive_power_limits, dc_current, max_dc_current, loss_function, services, dynamic_injector, ext, internal, )
end

# Constructor for demo purposes; non-functional.
Expand All @@ -94,6 +98,7 @@ function InterconnectingConverter(::Nothing)
rating=0.0,
active_power_limits=(min=0.0, max=0.0),
base_power=100,
reactive_power_limits=nothing,
dc_current=0.0,
max_dc_current=0.0,
loss_function=LinearCurve(0.0),
Expand All @@ -119,6 +124,8 @@ get_rating(value::InterconnectingConverter) = get_value(value, Val(:rating), Val
get_active_power_limits(value::InterconnectingConverter) = get_value(value, Val(:active_power_limits), Val(:mva))
"""Get [`InterconnectingConverter`](@ref) `base_power`."""
get_base_power(value::InterconnectingConverter) = value.base_power
"""Get [`InterconnectingConverter`](@ref) `reactive_power_limits`."""
get_reactive_power_limits(value::InterconnectingConverter) = get_value(value, Val(:reactive_power_limits), Val(:mva))
"""Get [`InterconnectingConverter`](@ref) `dc_current`."""
get_dc_current(value::InterconnectingConverter) = value.dc_current
"""Get [`InterconnectingConverter`](@ref) `max_dc_current`."""
Expand Down Expand Up @@ -148,6 +155,8 @@ set_rating!(value::InterconnectingConverter, val) = value.rating = set_value(val
set_active_power_limits!(value::InterconnectingConverter, val) = value.active_power_limits = set_value(value, Val(:active_power_limits), val, Val(:mva))
"""Set [`InterconnectingConverter`](@ref) `base_power`."""
set_base_power!(value::InterconnectingConverter, val) = value.base_power = val
"""Set [`InterconnectingConverter`](@ref) `reactive_power_limits`."""
set_reactive_power_limits!(value::InterconnectingConverter, val) = value.reactive_power_limits = set_value(value, Val(:reactive_power_limits), val, Val(:mva))
"""Set [`InterconnectingConverter`](@ref) `dc_current`."""
set_dc_current!(value::InterconnectingConverter, val) = value.dc_current = val
"""Set [`InterconnectingConverter`](@ref) `max_dc_current`."""
Expand Down
Loading