Skip to content

Commit

Permalink
Merge pull request #1270 from NREL-Sienna/gks/fix-1164-for-source
Browse files Browse the repository at this point in the history
Address issue 1164 for `Source` by adding `needs_conversion`
  • Loading branch information
jd-lara authored Jan 31, 2025
2 parents 438a0a7 + 073e1d8 commit 44d3325
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/descriptors/power_system_structs.json
Original file line number Diff line number Diff line change
Expand Up @@ -16993,13 +16993,15 @@
"name": "active_power",
"comment": "Initial active power set point of the unit in MW. For power flow, this is the steady state operating point of the system. For production cost modeling, this may or may not be used as the initial starting point for the solver, depending on the solver used",
"null_value": "0.0",
"data_type": "Float64"
"data_type": "Float64",
"needs_conversion": true
},
{
"name": "reactive_power",
"comment": "Initial reactive power set point of the unit (MVAR)",
"null_value": "0.0",
"data_type": "Float64"
"data_type": "Float64",
"needs_conversion": true
},
{
"name": "R_th",
Expand Down
8 changes: 4 additions & 4 deletions src/models/generated/Source.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ get_available(value::Source) = value.available
"""Get [`Source`](@ref) `bus`."""
get_bus(value::Source) = value.bus
"""Get [`Source`](@ref) `active_power`."""
get_active_power(value::Source) = value.active_power
get_active_power(value::Source) = get_value(value, value.active_power)
"""Get [`Source`](@ref) `reactive_power`."""
get_reactive_power(value::Source) = value.reactive_power
get_reactive_power(value::Source) = get_value(value, value.reactive_power)
"""Get [`Source`](@ref) `R_th`."""
get_R_th(value::Source) = value.R_th
"""Get [`Source`](@ref) `X_th`."""
Expand All @@ -134,9 +134,9 @@ set_available!(value::Source, val) = value.available = val
"""Set [`Source`](@ref) `bus`."""
set_bus!(value::Source, val) = value.bus = val
"""Set [`Source`](@ref) `active_power`."""
set_active_power!(value::Source, val) = value.active_power = val
set_active_power!(value::Source, val) = value.active_power = set_value(value, val)
"""Set [`Source`](@ref) `reactive_power`."""
set_reactive_power!(value::Source, val) = value.reactive_power = val
set_reactive_power!(value::Source, val) = value.reactive_power = set_value(value, val)
"""Set [`Source`](@ref) `R_th`."""
set_R_th!(value::Source, val) = value.R_th = val
"""Set [`Source`](@ref) `X_th`."""
Expand Down

0 comments on commit 44d3325

Please sign in to comment.