Skip to content

Commit

Permalink
add internal field to structs
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrypotts committed Jun 21, 2024
1 parent 33614c2 commit 0105cb6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
12 changes: 10 additions & 2 deletions src/models/generated/DemandRequirement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This file is auto-generated. Do not edit.
load_growth::Float64
name::String
power_systems_type::String
internal::InfrastructureSystemsInternal
ext::Dict
region::String
available::Bool
Expand All @@ -21,6 +22,7 @@ This file is auto-generated. Do not edit.
- `load_growth::Float64`: Annual load growth (%)
- `name::String`: The technology name
- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling
- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field
- `ext::Dict`: (default: `Dict()`) Option for providing additional data
- `region::String`: Corresponding region for peak demand
- `available::Bool`: identifies whether the technology is available
Expand All @@ -33,6 +35,8 @@ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology
name::String
"maps to a valid PowerSystems.jl for PCM modeling"
power_systems_type::String
"Internal field"
internal::InfrastructureSystemsInternal
"Option for providing additional data"
ext::Dict
"Corresponding region for peak demand"
Expand All @@ -44,8 +48,8 @@ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology
end


function DemandRequirement{T}(; load_growth, name, power_systems_type, ext=Dict(), region, available, peak_load, ) where T <: PSY.StaticInjection
DemandRequirement{T}(load_growth, name, power_systems_type, ext, region, available, peak_load, )
function DemandRequirement{T}(; load_growth, name, power_systems_type, internal=InfrastructureSystemsInternal(), ext=Dict(), region, available, peak_load, ) where T <: PSY.StaticInjection
DemandRequirement{T}(load_growth, name, power_systems_type, internal, ext, region, available, peak_load, )
end

"""Get [`DemandRequirement`](@ref) `load_growth`."""
Expand All @@ -54,6 +58,8 @@ get_load_growth(value::DemandRequirement) = value.load_growth
get_name(value::DemandRequirement) = value.name
"""Get [`DemandRequirement`](@ref) `power_systems_type`."""
get_power_systems_type(value::DemandRequirement) = value.power_systems_type
"""Get [`DemandRequirement`](@ref) `internal`."""
get_internal(value::DemandRequirement) = value.internal
"""Get [`DemandRequirement`](@ref) `ext`."""
get_ext(value::DemandRequirement) = value.ext
"""Get [`DemandRequirement`](@ref) `region`."""
Expand All @@ -69,6 +75,8 @@ set_load_growth!(value::DemandRequirement, val) = value.load_growth = val
set_name!(value::DemandRequirement, val) = value.name = val
"""Set [`DemandRequirement`](@ref) `power_systems_type`."""
set_power_systems_type!(value::DemandRequirement, val) = value.power_systems_type = val
"""Set [`DemandRequirement`](@ref) `internal`."""
set_internal!(value::DemandRequirement, val) = value.internal = val
"""Set [`DemandRequirement`](@ref) `ext`."""
set_ext!(value::DemandRequirement, val) = value.ext = val
"""Set [`DemandRequirement`](@ref) `region`."""
Expand Down
12 changes: 10 additions & 2 deletions src/models/generated/DemandsideTechnology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This file is auto-generated. Do not edit.
mutable struct DemandSideTechnology{T <: PSY.StaticInjection} <: Technology
name::String
power_systems_type::String
internal::InfrastructureSystemsInternal
ext::Dict
available::Bool
end
Expand All @@ -17,6 +18,7 @@ This file is auto-generated. Do not edit.
# Arguments
- `name::String`: The technology name
- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling
- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field
- `ext::Dict`: (default: `Dict()`) Option for providing additional data
- `available::Bool`: identifies whether the technology is available
"""
Expand All @@ -25,21 +27,25 @@ mutable struct DemandSideTechnology{T <: PSY.StaticInjection} <: Technology
name::String
"maps to a valid PowerSystems.jl for PCM modeling"
power_systems_type::String
"Internal field"
internal::InfrastructureSystemsInternal
"Option for providing additional data"
ext::Dict
"identifies whether the technology is available"
available::Bool
end


function DemandSideTechnology{T}(; name, power_systems_type, ext=Dict(), available, ) where T <: PSY.StaticInjection
DemandSideTechnology{T}(name, power_systems_type, ext, available, )
function DemandSideTechnology{T}(; name, power_systems_type, internal=InfrastructureSystemsInternal(), ext=Dict(), available, ) where T <: PSY.StaticInjection
DemandSideTechnology{T}(name, power_systems_type, internal, ext, available, )
end

"""Get [`DemandSideTechnology`](@ref) `name`."""
get_name(value::DemandSideTechnology) = value.name
"""Get [`DemandSideTechnology`](@ref) `power_systems_type`."""
get_power_systems_type(value::DemandSideTechnology) = value.power_systems_type
"""Get [`DemandSideTechnology`](@ref) `internal`."""
get_internal(value::DemandSideTechnology) = value.internal
"""Get [`DemandSideTechnology`](@ref) `ext`."""
get_ext(value::DemandSideTechnology) = value.ext
"""Get [`DemandSideTechnology`](@ref) `available`."""
Expand All @@ -49,6 +55,8 @@ get_available(value::DemandSideTechnology) = value.available
set_name!(value::DemandSideTechnology, val) = value.name = val
"""Set [`DemandSideTechnology`](@ref) `power_systems_type`."""
set_power_systems_type!(value::DemandSideTechnology, val) = value.power_systems_type = val
"""Set [`DemandSideTechnology`](@ref) `internal`."""
set_internal!(value::DemandSideTechnology, val) = value.internal = val
"""Set [`DemandSideTechnology`](@ref) `ext`."""
set_ext!(value::DemandSideTechnology, val) = value.ext = val
"""Set [`DemandSideTechnology`](@ref) `available`."""
Expand Down
12 changes: 10 additions & 2 deletions src/models/generated/StorageTechnology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This file is auto-generated. Do not edit.
storage_tech::StorageTech
power_systems_type::String
prime_mover_type::PrimeMovers
internal::InfrastructureSystemsInternal
ext::Dict
available::Bool
end
Expand All @@ -21,6 +22,7 @@ This file is auto-generated. Do not edit.
- `storage_tech::StorageTech`: Storage Technology Type
- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling
- `prime_mover_type::PrimeMovers`: Prime mover for storage
- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field
- `ext::Dict`: (default: `Dict()`) Option for providing additional data
- `available::Bool`: identifies whether the technology is available
"""
Expand All @@ -33,15 +35,17 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology
power_systems_type::String
"Prime mover for storage"
prime_mover_type::PrimeMovers
"Internal field"
internal::InfrastructureSystemsInternal
"Option for providing additional data"
ext::Dict
"identifies whether the technology is available"
available::Bool
end


function StorageTechnology{T}(; name, storage_tech, power_systems_type, prime_mover_type, ext=Dict(), available, ) where T <: PSY.Storage
StorageTechnology{T}(name, storage_tech, power_systems_type, prime_mover_type, ext, available, )
function StorageTechnology{T}(; name, storage_tech, power_systems_type, prime_mover_type, internal=InfrastructureSystemsInternal(), ext=Dict(), available, ) where T <: PSY.Storage
StorageTechnology{T}(name, storage_tech, power_systems_type, prime_mover_type, internal, ext, available, )
end

"""Get [`StorageTechnology`](@ref) `name`."""
Expand All @@ -52,6 +56,8 @@ get_storage_tech(value::StorageTechnology) = value.storage_tech
get_power_systems_type(value::StorageTechnology) = value.power_systems_type
"""Get [`StorageTechnology`](@ref) `prime_mover_type`."""
get_prime_mover_type(value::StorageTechnology) = value.prime_mover_type
"""Get [`StorageTechnology`](@ref) `internal`."""
get_internal(value::StorageTechnology) = value.internal
"""Get [`StorageTechnology`](@ref) `ext`."""
get_ext(value::StorageTechnology) = value.ext
"""Get [`StorageTechnology`](@ref) `available`."""
Expand All @@ -65,6 +71,8 @@ set_storage_tech!(value::StorageTechnology, val) = value.storage_tech = val
set_power_systems_type!(value::StorageTechnology, val) = value.power_systems_type = val
"""Set [`StorageTechnology`](@ref) `prime_mover_type`."""
set_prime_mover_type!(value::StorageTechnology, val) = value.prime_mover_type = val
"""Set [`StorageTechnology`](@ref) `internal`."""
set_internal!(value::StorageTechnology, val) = value.internal = val
"""Set [`StorageTechnology`](@ref) `ext`."""
set_ext!(value::StorageTechnology, val) = value.ext = val
"""Set [`StorageTechnology`](@ref) `available`."""
Expand Down
12 changes: 10 additions & 2 deletions src/models/generated/SupplyTechnology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This file is auto-generated. Do not edit.
initial_capacity::Float64
fuel::ThermalFuels
power_systems_type::String
internal::InfrastructureSystemsInternal
variable_cost::IS.FunctionData
ext::Dict
balancing_topology::String
Expand All @@ -37,6 +38,7 @@ This file is auto-generated. Do not edit.
- `initial_capacity::Float64`: Pre-existing capacity for a technology
- `fuel::ThermalFuels`: (default: `OTHER`) Fuel type according to IEA
- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling
- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field
- `variable_cost::IS.FunctionData`: Variable O&M costs for a technology
- `ext::Dict`: (default: `Dict()`) Option for providing additional data
- `balancing_topology::String`: Set of balancing nodes
Expand Down Expand Up @@ -65,6 +67,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology
fuel::ThermalFuels
"maps to a valid PowerSystems.jl for PCM modeling"
power_systems_type::String
"Internal field"
internal::InfrastructureSystemsInternal
"Variable O&M costs for a technology"
variable_cost::IS.FunctionData
"Option for providing additional data"
Expand All @@ -80,8 +84,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology
end


function SupplyTechnology{T}(; base_power, prime_mover_type=OT, capital_cost, minimum_required_capacity, gen_ID, available, name, initial_capacity, fuel=OTHER, power_systems_type, variable_cost, ext=Dict(), balancing_topology, operations_cost, maximum_capacity, capacity_factor, ) where T <: PSY.Generator
SupplyTechnology{T}(base_power, prime_mover_type, capital_cost, minimum_required_capacity, gen_ID, available, name, initial_capacity, fuel, power_systems_type, variable_cost, ext, balancing_topology, operations_cost, maximum_capacity, capacity_factor, )
function SupplyTechnology{T}(; base_power, prime_mover_type=OT, capital_cost, minimum_required_capacity, gen_ID, available, name, initial_capacity, fuel=OTHER, power_systems_type, internal=InfrastructureSystemsInternal(), variable_cost, ext=Dict(), balancing_topology, operations_cost, maximum_capacity, capacity_factor, ) where T <: PSY.Generator
SupplyTechnology{T}(base_power, prime_mover_type, capital_cost, minimum_required_capacity, gen_ID, available, name, initial_capacity, fuel, power_systems_type, internal, variable_cost, ext, balancing_topology, operations_cost, maximum_capacity, capacity_factor, )
end

"""Get [`SupplyTechnology`](@ref) `base_power`."""
Expand All @@ -104,6 +108,8 @@ get_initial_capacity(value::SupplyTechnology) = value.initial_capacity
get_fuel(value::SupplyTechnology) = value.fuel
"""Get [`SupplyTechnology`](@ref) `power_systems_type`."""
get_power_systems_type(value::SupplyTechnology) = value.power_systems_type
"""Get [`SupplyTechnology`](@ref) `internal`."""
get_internal(value::SupplyTechnology) = value.internal
"""Get [`SupplyTechnology`](@ref) `variable_cost`."""
get_variable_cost(value::SupplyTechnology) = value.variable_cost
"""Get [`SupplyTechnology`](@ref) `ext`."""
Expand Down Expand Up @@ -137,6 +143,8 @@ set_initial_capacity!(value::SupplyTechnology, val) = value.initial_capacity = v
set_fuel!(value::SupplyTechnology, val) = value.fuel = val
"""Set [`SupplyTechnology`](@ref) `power_systems_type`."""
set_power_systems_type!(value::SupplyTechnology, val) = value.power_systems_type = val
"""Set [`SupplyTechnology`](@ref) `internal`."""
set_internal!(value::SupplyTechnology, val) = value.internal = val
"""Set [`SupplyTechnology`](@ref) `variable_cost`."""
set_variable_cost!(value::SupplyTechnology, val) = value.variable_cost = val
"""Set [`SupplyTechnology`](@ref) `ext`."""
Expand Down
12 changes: 10 additions & 2 deletions src/models/generated/TransportTechnology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This file is auto-generated. Do not edit.
mutable struct TransportTechnology{T <: PSY.Device} <: Technology
name::String
power_systems_type::String
internal::InfrastructureSystemsInternal
ext::Dict
available::Bool
end
Expand All @@ -17,6 +18,7 @@ This file is auto-generated. Do not edit.
# Arguments
- `name::String`: The technology name
- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling
- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field
- `ext::Dict`: (default: `Dict()`) Option for providing additional data
- `available::Bool`: identifies whether the technology is available
"""
Expand All @@ -25,21 +27,25 @@ mutable struct TransportTechnology{T <: PSY.Device} <: Technology
name::String
"maps to a valid PowerSystems.jl for PCM modeling"
power_systems_type::String
"Internal field"
internal::InfrastructureSystemsInternal
"Option for providing additional data"
ext::Dict
"identifies whether the technology is available"
available::Bool
end


function TransportTechnology{T}(; name, power_systems_type, ext=Dict(), available, ) where T <: PSY.Device
TransportTechnology{T}(name, power_systems_type, ext, available, )
function TransportTechnology{T}(; name, power_systems_type, internal=InfrastructureSystemsInternal(), ext=Dict(), available, ) where T <: PSY.Device
TransportTechnology{T}(name, power_systems_type, internal, ext, available, )
end

"""Get [`TransportTechnology`](@ref) `name`."""
get_name(value::TransportTechnology) = value.name
"""Get [`TransportTechnology`](@ref) `power_systems_type`."""
get_power_systems_type(value::TransportTechnology) = value.power_systems_type
"""Get [`TransportTechnology`](@ref) `internal`."""
get_internal(value::TransportTechnology) = value.internal
"""Get [`TransportTechnology`](@ref) `ext`."""
get_ext(value::TransportTechnology) = value.ext
"""Get [`TransportTechnology`](@ref) `available`."""
Expand All @@ -49,6 +55,8 @@ get_available(value::TransportTechnology) = value.available
set_name!(value::TransportTechnology, val) = value.name = val
"""Set [`TransportTechnology`](@ref) `power_systems_type`."""
set_power_systems_type!(value::TransportTechnology, val) = value.power_systems_type = val
"""Set [`TransportTechnology`](@ref) `internal`."""
set_internal!(value::TransportTechnology, val) = value.internal = val
"""Set [`TransportTechnology`](@ref) `ext`."""
set_ext!(value::TransportTechnology, val) = value.ext = val
"""Set [`TransportTechnology`](@ref) `available`."""
Expand Down

0 comments on commit 0105cb6

Please sign in to comment.