Skip to content

Commit

Permalink
add setter methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomha committed Apr 4, 2024
1 parent 6645451 commit 825c74c
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/technologies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
abstract type to represent technolgies available for investment.
Required fields for a technology Type
- name
- available
- power_systems_type
- time_series_container
- supplemental_attributes_container
- internal
- name
- available
- power_systems_type
- time_series_container
- supplemental_attributes_container
- internal
"""
abstract type Technology <: IS.InfrastructureSystemsComponent end

Expand All @@ -17,4 +18,13 @@ get_power_systems_type(val::Technology) = val.power_systems_type
get_internal(val::Technology) = val.internal
get_ext(val::Technology) = get_ext(get_internal(val))
get_time_series_container(val::Technology) = val.time_series_container
get_supplemental_attributes_container(val::Technology) = val.supplemental_attributes_container
get_supplemental_attributes_container(val::Technology) =
val.supplemental_attributes_container

set_name!(val::Technology, v::AbstractString) = val.name = v
set_available!(val::Technology, v::Bool) = val.available = v
# set_power_systems_type!(...)
set_internal!(val::Technology, v::IS.InfrastructureSystemsInternal) = val.internal = v
set_ext!(val::Technology, v::Dict{String, Any}) = val.ext = v
# set_time_series_container!(...)
# set_supplemental_attributes_container(...)

0 comments on commit 825c74c

Please sign in to comment.