Skip to content

Commit

Permalink
Merge pull request #1130 from NREL-Sienna/jd/fixes_area_balancing_models
Browse files Browse the repository at this point in the history
Jd/fixes area balancing models
  • Loading branch information
jd-lara committed Sep 9, 2024
2 parents 5b79ebb + 53fc090 commit f7e83f4
Show file tree
Hide file tree
Showing 19 changed files with 349 additions and 184 deletions.
9 changes: 9 additions & 0 deletions src/core/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ struct TimeSeriesAttributes{T <: PSY.TimeSeriesData} <: ParameterAttributes
name::String
multiplier_id::Base.RefValue{Int}
component_name_to_ts_uuid::Dict{String, String}
subsystem::Base.RefValue{String}
end

function TimeSeriesAttributes(
Expand All @@ -18,6 +19,7 @@ function TimeSeriesAttributes(
name,
Base.RefValue{Int}(multiplier_id),
component_name_to_ts_uuid,
Base.RefValue{String}(""),
)
end

Expand All @@ -29,6 +31,13 @@ function set_time_series_multiplier_id!(attr::TimeSeriesAttributes, val::Int)
return
end

get_subsystem(attr::TimeSeriesAttributes) = attr.subsystem[]
function set_subsystem!(attr::TimeSeriesAttributes, val::String)
attr.subsystem[] = val
return
end
set_subsystem!(::TimeSeriesAttributes, ::Nothing) = nothing

function add_component_name!(attr::TimeSeriesAttributes, name::String, uuid::String)
if haskey(attr.component_name_to_ts_uuid, name)
throw(ArgumentError("$name is already stored"))
Expand Down
Loading

0 comments on commit f7e83f4

Please sign in to comment.