diff --git a/src/PowerSystemsInvestmentsPortfolios.jl b/src/PowerSystemsInvestmentsPortfolios.jl index f718841..e263d46 100644 --- a/src/PowerSystemsInvestmentsPortfolios.jl +++ b/src/PowerSystemsInvestmentsPortfolios.jl @@ -44,21 +44,27 @@ export Portfolio export Technology export Requirements export SupplyTechnology -export TransportTechnology +export ACTransportTechnology +export HVDCTransportTechnology +export ExistingTransportTechnology export StorageTechnology export DemandRequirement export DemandsideTechnology export FlexibleDemandTechnology export Electrolyzers export CurtailableDemandSideTechnology -export RetireableCapacity -export RetrofitCapacity +export RetirementPotential +export AggregateRetirementPotential +export RetrofitPotential +export AggregateRetrofitPotential export ExistingCapacity export CarbonCaps export MinimumCapacityRequirements export Region export Zone +export get_name +export get_regions export get_technologies export get_technology export get_requirements diff --git a/src/generate_structs.jl b/src/generate_structs.jl index 30f2c48..6a881e4 100644 --- a/src/generate_structs.jl +++ b/src/generate_structs.jl @@ -11,7 +11,7 @@ function generate_invest_structs(directory, data::JSONSchema.Schema; print_resul unique_accessor_functions = Set{String}() unique_setter_functions = Set{String}() - for (struct_name, input) in data.data["\$defs"] + for (struct_name, input) in data.data["components"]["schemas"] properties = input["properties"] item = Dict{String, Any}() item["has_internal"] = false diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl new file mode 100644 index 0000000..937c63c --- /dev/null +++ b/src/models/generated/ACTransportTechnology.jl @@ -0,0 +1,175 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 + capital_cost::PSY.ValueCurve + start_region::Region + available::Bool + name::String + end_region::Region + power_systems_type::String + angle_limit::Float64 + internal::InfrastructureSystemsInternal + interest_rate::Float64 + ext::Dict + resistance::Float64 + voltage::Float64 + network_id::Int64 + maximum_new_capacity::Float64 + base_year::Int + existing_line_capacity::Float64 + line_loss::Float64 + capital_recovery_period::Int64 + end + + + +# Arguments +- `base_power::Float64`: Base power +- `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. +- `start_region::Region`: Start region for transport technology +- `available::Bool`: identifies whether the technology is available +- `name::String`: Name +- `end_region::Region`: End region for transport technology +- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling +- `angle_limit::Float64`: (default: `0.0`) Votlage angle limit (radians) +- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field +- `interest_rate::Float64`: (default: `0.07`) Interest rate for technology +- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `resistance::Float64`: (default: `0.0`) Technology resistance in Ohms +- `voltage::Float64`: (default: `0.0`) Technology resistance in Ohms +- `network_id::Int64`: Numerical Index +- `maximum_new_capacity::Float64`: Maximum capacity that can be added to transmission line (MW) +- `base_year::Int`: (default: `2020`) Reference year for technology data +- `existing_line_capacity::Float64`: Existing capacity of transport technology (MW) +- `line_loss::Float64`: Transmission loss for each transport technology (%) +- `capital_recovery_period::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. +""" +mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology + "Base power" + base_power::Float64 + "Cost of adding new capacity to the inter-regional transmission line." + capital_cost::PSY.ValueCurve + "Start region for transport technology" + start_region::Region + "identifies whether the technology is available" + available::Bool + "Name" + name::String + "End region for transport technology" + end_region::Region + "maps to a valid PowerSystems.jl for PCM modeling" + power_systems_type::String + "Votlage angle limit (radians)" + angle_limit::Float64 + "Internal field" + internal::InfrastructureSystemsInternal + "Interest rate for technology" + interest_rate::Float64 + "Option for providing additional data" + ext::Dict + "Technology resistance in Ohms" + resistance::Float64 + "Technology resistance in Ohms" + voltage::Float64 + "Numerical Index" + network_id::Int64 + "Maximum capacity that can be added to transmission line (MW)" + maximum_new_capacity::Float64 + "Reference year for technology data" + base_year::Int + "Existing capacity of transport technology (MW)" + existing_line_capacity::Float64 + "Transmission loss for each transport technology (%)" + line_loss::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." + capital_recovery_period::Int64 +end + + +function ACTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit=0.0, internal=InfrastructureSystemsInternal(), interest_rate=0.07, ext=Dict(), resistance=0.0, voltage=0.0, network_id, maximum_new_capacity, base_year=2020, existing_line_capacity, line_loss, capital_recovery_period=30, ) where T <: PSY.Device + ACTransportTechnology{T}(base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit, internal, interest_rate, ext, resistance, voltage, network_id, maximum_new_capacity, base_year, existing_line_capacity, line_loss, capital_recovery_period, ) +end + +"""Get [`ACTransportTechnology`](@ref) `base_power`.""" +get_base_power(value::ACTransportTechnology) = value.base_power +"""Get [`ACTransportTechnology`](@ref) `capital_cost`.""" +get_capital_cost(value::ACTransportTechnology) = value.capital_cost +"""Get [`ACTransportTechnology`](@ref) `start_region`.""" +get_start_region(value::ACTransportTechnology) = value.start_region +"""Get [`ACTransportTechnology`](@ref) `available`.""" +get_available(value::ACTransportTechnology) = value.available +"""Get [`ACTransportTechnology`](@ref) `name`.""" +get_name(value::ACTransportTechnology) = value.name +"""Get [`ACTransportTechnology`](@ref) `end_region`.""" +get_end_region(value::ACTransportTechnology) = value.end_region +"""Get [`ACTransportTechnology`](@ref) `power_systems_type`.""" +get_power_systems_type(value::ACTransportTechnology) = value.power_systems_type +"""Get [`ACTransportTechnology`](@ref) `angle_limit`.""" +get_angle_limit(value::ACTransportTechnology) = value.angle_limit +"""Get [`ACTransportTechnology`](@ref) `internal`.""" +get_internal(value::ACTransportTechnology) = value.internal +"""Get [`ACTransportTechnology`](@ref) `interest_rate`.""" +get_interest_rate(value::ACTransportTechnology) = value.interest_rate +"""Get [`ACTransportTechnology`](@ref) `ext`.""" +get_ext(value::ACTransportTechnology) = value.ext +"""Get [`ACTransportTechnology`](@ref) `resistance`.""" +get_resistance(value::ACTransportTechnology) = value.resistance +"""Get [`ACTransportTechnology`](@ref) `voltage`.""" +get_voltage(value::ACTransportTechnology) = value.voltage +"""Get [`ACTransportTechnology`](@ref) `network_id`.""" +get_network_id(value::ACTransportTechnology) = value.network_id +"""Get [`ACTransportTechnology`](@ref) `maximum_new_capacity`.""" +get_maximum_new_capacity(value::ACTransportTechnology) = value.maximum_new_capacity +"""Get [`ACTransportTechnology`](@ref) `base_year`.""" +get_base_year(value::ACTransportTechnology) = value.base_year +"""Get [`ACTransportTechnology`](@ref) `existing_line_capacity`.""" +get_existing_line_capacity(value::ACTransportTechnology) = value.existing_line_capacity +"""Get [`ACTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::ACTransportTechnology) = value.line_loss +"""Get [`ACTransportTechnology`](@ref) `capital_recovery_period`.""" +get_capital_recovery_period(value::ACTransportTechnology) = value.capital_recovery_period + +"""Set [`ACTransportTechnology`](@ref) `base_power`.""" +set_base_power!(value::ACTransportTechnology, val) = value.base_power = val +"""Set [`ACTransportTechnology`](@ref) `capital_cost`.""" +set_capital_cost!(value::ACTransportTechnology, val) = value.capital_cost = val +"""Set [`ACTransportTechnology`](@ref) `start_region`.""" +set_start_region!(value::ACTransportTechnology, val) = value.start_region = val +"""Set [`ACTransportTechnology`](@ref) `available`.""" +set_available!(value::ACTransportTechnology, val) = value.available = val +"""Set [`ACTransportTechnology`](@ref) `name`.""" +set_name!(value::ACTransportTechnology, val) = value.name = val +"""Set [`ACTransportTechnology`](@ref) `end_region`.""" +set_end_region!(value::ACTransportTechnology, val) = value.end_region = val +"""Set [`ACTransportTechnology`](@ref) `power_systems_type`.""" +set_power_systems_type!(value::ACTransportTechnology, val) = value.power_systems_type = val +"""Set [`ACTransportTechnology`](@ref) `angle_limit`.""" +set_angle_limit!(value::ACTransportTechnology, val) = value.angle_limit = val +"""Set [`ACTransportTechnology`](@ref) `internal`.""" +set_internal!(value::ACTransportTechnology, val) = value.internal = val +"""Set [`ACTransportTechnology`](@ref) `interest_rate`.""" +set_interest_rate!(value::ACTransportTechnology, val) = value.interest_rate = val +"""Set [`ACTransportTechnology`](@ref) `ext`.""" +set_ext!(value::ACTransportTechnology, val) = value.ext = val +"""Set [`ACTransportTechnology`](@ref) `resistance`.""" +set_resistance!(value::ACTransportTechnology, val) = value.resistance = val +"""Set [`ACTransportTechnology`](@ref) `voltage`.""" +set_voltage!(value::ACTransportTechnology, val) = value.voltage = val +"""Set [`ACTransportTechnology`](@ref) `network_id`.""" +set_network_id!(value::ACTransportTechnology, val) = value.network_id = val +"""Set [`ACTransportTechnology`](@ref) `maximum_new_capacity`.""" +set_maximum_new_capacity!(value::ACTransportTechnology, val) = value.maximum_new_capacity = val +"""Set [`ACTransportTechnology`](@ref) `base_year`.""" +set_base_year!(value::ACTransportTechnology, val) = value.base_year = val +"""Set [`ACTransportTechnology`](@ref) `existing_line_capacity`.""" +set_existing_line_capacity!(value::ACTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`ACTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::ACTransportTechnology, val) = value.line_loss = val +"""Set [`ACTransportTechnology`](@ref) `capital_recovery_period`.""" +set_capital_recovery_period!(value::ACTransportTechnology, val) = value.capital_recovery_period = val diff --git a/src/models/generated/CarbonCaps.jl b/src/models/generated/CarbonCaps.jl index a4a1cb3..825763f 100644 --- a/src/models/generated/CarbonCaps.jl +++ b/src/models/generated/CarbonCaps.jl @@ -9,7 +9,7 @@ This file is auto-generated. Do not edit. name::String power_systems_type::String pricecap::Float64 - eligible_zones::Vector{Int64} + eligible_zones::Vector{Region} internal::InfrastructureSystemsInternal co_2_max_tons_mwh::Float64 ext::Dict @@ -23,7 +23,7 @@ This file is auto-generated. Do not edit. - `name::String`: The technology name - `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling - `pricecap::Float64`: (default: `Inf`) pricecap value for carbon caps -- `eligible_zones::Vector{Int64}`: (default: `Vector{Int64}()`) List of zones that contribute to the carbon cap constraint. +- `eligible_zones::Vector{Region}`: (default: `Vector{Region}()`) List of regions that contribute to the carbon cap constraint. - `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field - `co_2_max_tons_mwh::Float64`: (default: `1`) Emission limit in terms of rate (tCO@/MWh) - `ext::Dict`: (default: `Dict()`) Option for providing additional data @@ -37,8 +37,8 @@ mutable struct CarbonCaps <: Requirements power_systems_type::String "pricecap value for carbon caps" pricecap::Float64 - "List of zones that contribute to the carbon cap constraint." - eligible_zones::Vector{Int64} + "List of regions that contribute to the carbon cap constraint." + eligible_zones::Vector{Region} "Internal field" internal::InfrastructureSystemsInternal "Emission limit in terms of rate (tCO@/MWh)" @@ -52,7 +52,7 @@ mutable struct CarbonCaps <: Requirements end -function CarbonCaps(; name, power_systems_type, pricecap=Inf, eligible_zones=Vector{Int64}(), internal=InfrastructureSystemsInternal(), co_2_max_tons_mwh=1, ext=Dict(), co_2_max_mtons=Vector{Int64}(), available, ) +function CarbonCaps(; name, power_systems_type, pricecap=Inf, eligible_zones=Vector{Region}(), internal=InfrastructureSystemsInternal(), co_2_max_tons_mwh=1, ext=Dict(), co_2_max_mtons=Vector{Int64}(), available, ) CarbonCaps(name, power_systems_type, pricecap, eligible_zones, internal, co_2_max_tons_mwh, ext, co_2_max_mtons, available, ) end diff --git a/src/models/generated/DemandRequirement.jl b/src/models/generated/DemandRequirement.jl index 7b52fcf..f835ddd 100644 --- a/src/models/generated/DemandRequirement.jl +++ b/src/models/generated/DemandRequirement.jl @@ -7,11 +7,11 @@ This file is auto-generated. Do not edit. """ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology name::String - zone::Int64 power_systems_type::String internal::InfrastructureSystemsInternal ext::Dict demand_mw::Float64 + region::Union{Nothing, Region} available::Bool end @@ -19,18 +19,16 @@ This file is auto-generated. Do not edit. # Arguments - `name::String`: The technology name -- `zone::Int64`: Zone Number - `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 - `demand_mw::Float64`: (default: `0.0`) Demand profile in MW +- `region::Union{Nothing, Region}`: Region - `available::Bool`: (default: `true`) identifies whether the technology is available """ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology "The technology name" name::String - "Zone Number" - zone::Int64 "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Internal field" @@ -39,19 +37,19 @@ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology ext::Dict "Demand profile in MW" demand_mw::Float64 + "Region" + region::Union{Nothing, Region} "identifies whether the technology is available" available::Bool end -function DemandRequirement{T}(; name, zone, power_systems_type, internal=InfrastructureSystemsInternal(), ext=Dict(), demand_mw=0.0, available=true, ) where T <: PSY.StaticInjection - DemandRequirement{T}(name, zone, power_systems_type, internal, ext, demand_mw, available, ) +function DemandRequirement{T}(; name, power_systems_type, internal=InfrastructureSystemsInternal(), ext=Dict(), demand_mw=0.0, region, available=true, ) where T <: PSY.StaticInjection + DemandRequirement{T}(name, power_systems_type, internal, ext, demand_mw, region, available, ) end """Get [`DemandRequirement`](@ref) `name`.""" get_name(value::DemandRequirement) = value.name -"""Get [`DemandRequirement`](@ref) `zone`.""" -get_zone(value::DemandRequirement) = value.zone """Get [`DemandRequirement`](@ref) `power_systems_type`.""" get_power_systems_type(value::DemandRequirement) = value.power_systems_type """Get [`DemandRequirement`](@ref) `internal`.""" @@ -60,13 +58,13 @@ get_internal(value::DemandRequirement) = value.internal get_ext(value::DemandRequirement) = value.ext """Get [`DemandRequirement`](@ref) `demand_mw`.""" get_demand_mw(value::DemandRequirement) = value.demand_mw +"""Get [`DemandRequirement`](@ref) `region`.""" +get_region(value::DemandRequirement) = value.region """Get [`DemandRequirement`](@ref) `available`.""" get_available(value::DemandRequirement) = value.available """Set [`DemandRequirement`](@ref) `name`.""" set_name!(value::DemandRequirement, val) = value.name = val -"""Set [`DemandRequirement`](@ref) `zone`.""" -set_zone!(value::DemandRequirement, val) = value.zone = val """Set [`DemandRequirement`](@ref) `power_systems_type`.""" set_power_systems_type!(value::DemandRequirement, val) = value.power_systems_type = val """Set [`DemandRequirement`](@ref) `internal`.""" @@ -75,5 +73,7 @@ set_internal!(value::DemandRequirement, val) = value.internal = val set_ext!(value::DemandRequirement, val) = value.ext = val """Set [`DemandRequirement`](@ref) `demand_mw`.""" set_demand_mw!(value::DemandRequirement, val) = value.demand_mw = val +"""Set [`DemandRequirement`](@ref) `region`.""" +set_region!(value::DemandRequirement, val) = value.region = val """Set [`DemandRequirement`](@ref) `available`.""" set_available!(value::DemandRequirement, val) = value.available = val diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl new file mode 100644 index 0000000..6b89865 --- /dev/null +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -0,0 +1,167 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 + capital_cost::PSY.ValueCurve + start_region::Region + available::Bool + name::String + end_region::Region + power_systems_type::String + angle_limit::Float64 + internal::InfrastructureSystemsInternal + ext::Dict + resistance::Float64 + voltage::Float64 + network_id::Int64 + maximum_new_capacity::Float64 + base_year::Int + existing_line_capacity::Float64 + line_loss::Float64 + capital_recovery_period::Int64 + end + + + +# Arguments +- `base_power::Float64`: Base power +- `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. +- `start_region::Region`: Start region for transport technology +- `available::Bool`: identifies whether the technology is available +- `name::String`: Name +- `end_region::Region`: End region for transport technology +- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling +- `angle_limit::Float64`: (default: `0.0`) Votlage angle limit (radians) +- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field +- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `resistance::Float64`: (default: `0.0`) Technology resistance in Ohms +- `voltage::Float64`: (default: `0.0`) Technology resistance in Ohms +- `network_id::Int64`: Numerical Index +- `maximum_new_capacity::Float64`: Maximum capacity that can be added to transmission line (MW) +- `base_year::Int`: (default: `2020`) Reference year for technology data +- `existing_line_capacity::Float64`: Existing capacity of transport technology (MW) +- `line_loss::Float64`: Transmission loss for each transport technology (%) +- `capital_recovery_period::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. +""" +mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology + "Base power" + base_power::Float64 + "Cost of adding new capacity to the inter-regional transmission line." + capital_cost::PSY.ValueCurve + "Start region for transport technology" + start_region::Region + "identifies whether the technology is available" + available::Bool + "Name" + name::String + "End region for transport technology" + end_region::Region + "maps to a valid PowerSystems.jl for PCM modeling" + power_systems_type::String + "Votlage angle limit (radians)" + angle_limit::Float64 + "Internal field" + internal::InfrastructureSystemsInternal + "Option for providing additional data" + ext::Dict + "Technology resistance in Ohms" + resistance::Float64 + "Technology resistance in Ohms" + voltage::Float64 + "Numerical Index" + network_id::Int64 + "Maximum capacity that can be added to transmission line (MW)" + maximum_new_capacity::Float64 + "Reference year for technology data" + base_year::Int + "Existing capacity of transport technology (MW)" + existing_line_capacity::Float64 + "Transmission loss for each transport technology (%)" + line_loss::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." + capital_recovery_period::Int64 +end + + +function ExistingTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit=0.0, internal=InfrastructureSystemsInternal(), ext=Dict(), resistance=0.0, voltage=0.0, network_id, maximum_new_capacity, base_year=2020, existing_line_capacity, line_loss, capital_recovery_period=30, ) where T <: PSY.Device + ExistingTransportTechnology{T}(base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit, internal, ext, resistance, voltage, network_id, maximum_new_capacity, base_year, existing_line_capacity, line_loss, capital_recovery_period, ) +end + +"""Get [`ExistingTransportTechnology`](@ref) `base_power`.""" +get_base_power(value::ExistingTransportTechnology) = value.base_power +"""Get [`ExistingTransportTechnology`](@ref) `capital_cost`.""" +get_capital_cost(value::ExistingTransportTechnology) = value.capital_cost +"""Get [`ExistingTransportTechnology`](@ref) `start_region`.""" +get_start_region(value::ExistingTransportTechnology) = value.start_region +"""Get [`ExistingTransportTechnology`](@ref) `available`.""" +get_available(value::ExistingTransportTechnology) = value.available +"""Get [`ExistingTransportTechnology`](@ref) `name`.""" +get_name(value::ExistingTransportTechnology) = value.name +"""Get [`ExistingTransportTechnology`](@ref) `end_region`.""" +get_end_region(value::ExistingTransportTechnology) = value.end_region +"""Get [`ExistingTransportTechnology`](@ref) `power_systems_type`.""" +get_power_systems_type(value::ExistingTransportTechnology) = value.power_systems_type +"""Get [`ExistingTransportTechnology`](@ref) `angle_limit`.""" +get_angle_limit(value::ExistingTransportTechnology) = value.angle_limit +"""Get [`ExistingTransportTechnology`](@ref) `internal`.""" +get_internal(value::ExistingTransportTechnology) = value.internal +"""Get [`ExistingTransportTechnology`](@ref) `ext`.""" +get_ext(value::ExistingTransportTechnology) = value.ext +"""Get [`ExistingTransportTechnology`](@ref) `resistance`.""" +get_resistance(value::ExistingTransportTechnology) = value.resistance +"""Get [`ExistingTransportTechnology`](@ref) `voltage`.""" +get_voltage(value::ExistingTransportTechnology) = value.voltage +"""Get [`ExistingTransportTechnology`](@ref) `network_id`.""" +get_network_id(value::ExistingTransportTechnology) = value.network_id +"""Get [`ExistingTransportTechnology`](@ref) `maximum_new_capacity`.""" +get_maximum_new_capacity(value::ExistingTransportTechnology) = value.maximum_new_capacity +"""Get [`ExistingTransportTechnology`](@ref) `base_year`.""" +get_base_year(value::ExistingTransportTechnology) = value.base_year +"""Get [`ExistingTransportTechnology`](@ref) `existing_line_capacity`.""" +get_existing_line_capacity(value::ExistingTransportTechnology) = value.existing_line_capacity +"""Get [`ExistingTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::ExistingTransportTechnology) = value.line_loss +"""Get [`ExistingTransportTechnology`](@ref) `capital_recovery_period`.""" +get_capital_recovery_period(value::ExistingTransportTechnology) = value.capital_recovery_period + +"""Set [`ExistingTransportTechnology`](@ref) `base_power`.""" +set_base_power!(value::ExistingTransportTechnology, val) = value.base_power = val +"""Set [`ExistingTransportTechnology`](@ref) `capital_cost`.""" +set_capital_cost!(value::ExistingTransportTechnology, val) = value.capital_cost = val +"""Set [`ExistingTransportTechnology`](@ref) `start_region`.""" +set_start_region!(value::ExistingTransportTechnology, val) = value.start_region = val +"""Set [`ExistingTransportTechnology`](@ref) `available`.""" +set_available!(value::ExistingTransportTechnology, val) = value.available = val +"""Set [`ExistingTransportTechnology`](@ref) `name`.""" +set_name!(value::ExistingTransportTechnology, val) = value.name = val +"""Set [`ExistingTransportTechnology`](@ref) `end_region`.""" +set_end_region!(value::ExistingTransportTechnology, val) = value.end_region = val +"""Set [`ExistingTransportTechnology`](@ref) `power_systems_type`.""" +set_power_systems_type!(value::ExistingTransportTechnology, val) = value.power_systems_type = val +"""Set [`ExistingTransportTechnology`](@ref) `angle_limit`.""" +set_angle_limit!(value::ExistingTransportTechnology, val) = value.angle_limit = val +"""Set [`ExistingTransportTechnology`](@ref) `internal`.""" +set_internal!(value::ExistingTransportTechnology, val) = value.internal = val +"""Set [`ExistingTransportTechnology`](@ref) `ext`.""" +set_ext!(value::ExistingTransportTechnology, val) = value.ext = val +"""Set [`ExistingTransportTechnology`](@ref) `resistance`.""" +set_resistance!(value::ExistingTransportTechnology, val) = value.resistance = val +"""Set [`ExistingTransportTechnology`](@ref) `voltage`.""" +set_voltage!(value::ExistingTransportTechnology, val) = value.voltage = val +"""Set [`ExistingTransportTechnology`](@ref) `network_id`.""" +set_network_id!(value::ExistingTransportTechnology, val) = value.network_id = val +"""Set [`ExistingTransportTechnology`](@ref) `maximum_new_capacity`.""" +set_maximum_new_capacity!(value::ExistingTransportTechnology, val) = value.maximum_new_capacity = val +"""Set [`ExistingTransportTechnology`](@ref) `base_year`.""" +set_base_year!(value::ExistingTransportTechnology, val) = value.base_year = val +"""Set [`ExistingTransportTechnology`](@ref) `existing_line_capacity`.""" +set_existing_line_capacity!(value::ExistingTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`ExistingTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::ExistingTransportTechnology, val) = value.line_loss = val +"""Set [`ExistingTransportTechnology`](@ref) `capital_recovery_period`.""" +set_capital_recovery_period!(value::ExistingTransportTechnology, val) = value.capital_recovery_period = val diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl new file mode 100644 index 0000000..fe98e3b --- /dev/null +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -0,0 +1,175 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 + capital_cost::PSY.ValueCurve + start_region::Region + available::Bool + name::String + end_region::Region + power_systems_type::String + angle_limit::Float64 + internal::InfrastructureSystemsInternal + interest_rate::Float64 + ext::Dict + resistance::Float64 + voltage::Float64 + network_id::Int64 + maximum_new_capacity::Float64 + base_year::Int + existing_line_capacity::Float64 + line_loss::Float64 + capital_recovery_period::Int64 + end + + + +# Arguments +- `base_power::Float64`: Base power +- `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. +- `start_region::Region`: Start region for transport technology +- `available::Bool`: identifies whether the technology is available +- `name::String`: Name +- `end_region::Region`: End region for transport technology +- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling +- `angle_limit::Float64`: (default: `0.0`) Votlage angle limit (radians) +- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field +- `interest_rate::Float64`: (default: `0.07`) Interest rate for technology +- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `resistance::Float64`: (default: `0.0`) Technology resistance in Ohms +- `voltage::Float64`: (default: `0.0`) Technology resistance in Ohms +- `network_id::Int64`: Numerical Index +- `maximum_new_capacity::Float64`: Maximum capacity that can be added to transmission line (MW) +- `base_year::Int`: (default: `2020`) Reference year for technology data +- `existing_line_capacity::Float64`: Existing capacity of transport technology (MW) +- `line_loss::Float64`: Transmission loss for each transport technology (%) +- `capital_recovery_period::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. +""" +mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology + "Base power" + base_power::Float64 + "Cost of adding new capacity to the inter-regional transmission line." + capital_cost::PSY.ValueCurve + "Start region for transport technology" + start_region::Region + "identifies whether the technology is available" + available::Bool + "Name" + name::String + "End region for transport technology" + end_region::Region + "maps to a valid PowerSystems.jl for PCM modeling" + power_systems_type::String + "Votlage angle limit (radians)" + angle_limit::Float64 + "Internal field" + internal::InfrastructureSystemsInternal + "Interest rate for technology" + interest_rate::Float64 + "Option for providing additional data" + ext::Dict + "Technology resistance in Ohms" + resistance::Float64 + "Technology resistance in Ohms" + voltage::Float64 + "Numerical Index" + network_id::Int64 + "Maximum capacity that can be added to transmission line (MW)" + maximum_new_capacity::Float64 + "Reference year for technology data" + base_year::Int + "Existing capacity of transport technology (MW)" + existing_line_capacity::Float64 + "Transmission loss for each transport technology (%)" + line_loss::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." + capital_recovery_period::Int64 +end + + +function HVDCTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit=0.0, internal=InfrastructureSystemsInternal(), interest_rate=0.07, ext=Dict(), resistance=0.0, voltage=0.0, network_id, maximum_new_capacity, base_year=2020, existing_line_capacity, line_loss, capital_recovery_period=30, ) where T <: PSY.Device + HVDCTransportTechnology{T}(base_power, capital_cost, start_region, available, name, end_region, power_systems_type, angle_limit, internal, interest_rate, ext, resistance, voltage, network_id, maximum_new_capacity, base_year, existing_line_capacity, line_loss, capital_recovery_period, ) +end + +"""Get [`HVDCTransportTechnology`](@ref) `base_power`.""" +get_base_power(value::HVDCTransportTechnology) = value.base_power +"""Get [`HVDCTransportTechnology`](@ref) `capital_cost`.""" +get_capital_cost(value::HVDCTransportTechnology) = value.capital_cost +"""Get [`HVDCTransportTechnology`](@ref) `start_region`.""" +get_start_region(value::HVDCTransportTechnology) = value.start_region +"""Get [`HVDCTransportTechnology`](@ref) `available`.""" +get_available(value::HVDCTransportTechnology) = value.available +"""Get [`HVDCTransportTechnology`](@ref) `name`.""" +get_name(value::HVDCTransportTechnology) = value.name +"""Get [`HVDCTransportTechnology`](@ref) `end_region`.""" +get_end_region(value::HVDCTransportTechnology) = value.end_region +"""Get [`HVDCTransportTechnology`](@ref) `power_systems_type`.""" +get_power_systems_type(value::HVDCTransportTechnology) = value.power_systems_type +"""Get [`HVDCTransportTechnology`](@ref) `angle_limit`.""" +get_angle_limit(value::HVDCTransportTechnology) = value.angle_limit +"""Get [`HVDCTransportTechnology`](@ref) `internal`.""" +get_internal(value::HVDCTransportTechnology) = value.internal +"""Get [`HVDCTransportTechnology`](@ref) `interest_rate`.""" +get_interest_rate(value::HVDCTransportTechnology) = value.interest_rate +"""Get [`HVDCTransportTechnology`](@ref) `ext`.""" +get_ext(value::HVDCTransportTechnology) = value.ext +"""Get [`HVDCTransportTechnology`](@ref) `resistance`.""" +get_resistance(value::HVDCTransportTechnology) = value.resistance +"""Get [`HVDCTransportTechnology`](@ref) `voltage`.""" +get_voltage(value::HVDCTransportTechnology) = value.voltage +"""Get [`HVDCTransportTechnology`](@ref) `network_id`.""" +get_network_id(value::HVDCTransportTechnology) = value.network_id +"""Get [`HVDCTransportTechnology`](@ref) `maximum_new_capacity`.""" +get_maximum_new_capacity(value::HVDCTransportTechnology) = value.maximum_new_capacity +"""Get [`HVDCTransportTechnology`](@ref) `base_year`.""" +get_base_year(value::HVDCTransportTechnology) = value.base_year +"""Get [`HVDCTransportTechnology`](@ref) `existing_line_capacity`.""" +get_existing_line_capacity(value::HVDCTransportTechnology) = value.existing_line_capacity +"""Get [`HVDCTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::HVDCTransportTechnology) = value.line_loss +"""Get [`HVDCTransportTechnology`](@ref) `capital_recovery_period`.""" +get_capital_recovery_period(value::HVDCTransportTechnology) = value.capital_recovery_period + +"""Set [`HVDCTransportTechnology`](@ref) `base_power`.""" +set_base_power!(value::HVDCTransportTechnology, val) = value.base_power = val +"""Set [`HVDCTransportTechnology`](@ref) `capital_cost`.""" +set_capital_cost!(value::HVDCTransportTechnology, val) = value.capital_cost = val +"""Set [`HVDCTransportTechnology`](@ref) `start_region`.""" +set_start_region!(value::HVDCTransportTechnology, val) = value.start_region = val +"""Set [`HVDCTransportTechnology`](@ref) `available`.""" +set_available!(value::HVDCTransportTechnology, val) = value.available = val +"""Set [`HVDCTransportTechnology`](@ref) `name`.""" +set_name!(value::HVDCTransportTechnology, val) = value.name = val +"""Set [`HVDCTransportTechnology`](@ref) `end_region`.""" +set_end_region!(value::HVDCTransportTechnology, val) = value.end_region = val +"""Set [`HVDCTransportTechnology`](@ref) `power_systems_type`.""" +set_power_systems_type!(value::HVDCTransportTechnology, val) = value.power_systems_type = val +"""Set [`HVDCTransportTechnology`](@ref) `angle_limit`.""" +set_angle_limit!(value::HVDCTransportTechnology, val) = value.angle_limit = val +"""Set [`HVDCTransportTechnology`](@ref) `internal`.""" +set_internal!(value::HVDCTransportTechnology, val) = value.internal = val +"""Set [`HVDCTransportTechnology`](@ref) `interest_rate`.""" +set_interest_rate!(value::HVDCTransportTechnology, val) = value.interest_rate = val +"""Set [`HVDCTransportTechnology`](@ref) `ext`.""" +set_ext!(value::HVDCTransportTechnology, val) = value.ext = val +"""Set [`HVDCTransportTechnology`](@ref) `resistance`.""" +set_resistance!(value::HVDCTransportTechnology, val) = value.resistance = val +"""Set [`HVDCTransportTechnology`](@ref) `voltage`.""" +set_voltage!(value::HVDCTransportTechnology, val) = value.voltage = val +"""Set [`HVDCTransportTechnology`](@ref) `network_id`.""" +set_network_id!(value::HVDCTransportTechnology, val) = value.network_id = val +"""Set [`HVDCTransportTechnology`](@ref) `maximum_new_capacity`.""" +set_maximum_new_capacity!(value::HVDCTransportTechnology, val) = value.maximum_new_capacity = val +"""Set [`HVDCTransportTechnology`](@ref) `base_year`.""" +set_base_year!(value::HVDCTransportTechnology, val) = value.base_year = val +"""Set [`HVDCTransportTechnology`](@ref) `existing_line_capacity`.""" +set_existing_line_capacity!(value::HVDCTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`HVDCTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::HVDCTransportTechnology, val) = value.line_loss = val +"""Set [`HVDCTransportTechnology`](@ref) `capital_recovery_period`.""" +set_capital_recovery_period!(value::HVDCTransportTechnology, val) = value.capital_recovery_period = val diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 4ba669b..458fd9c 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -8,9 +8,9 @@ This file is auto-generated. Do not edit. mutable struct StorageTechnology{T <: PSY.Storage} <: Technology base_power::Float64 om_costs_energy::PSY.OperationalCost - zone::Int64 - prime_mover_type::PrimeMovers existing_cap_energy::Float64 + prime_mover_type::PrimeMovers + lifetime::Int rsv_cost::Float64 available::Bool existing_cap_power::Float64 @@ -18,6 +18,7 @@ This file is auto-generated. Do not edit. storage_tech::StorageTech capital_costs_power::PSY.ValueCurve max_duration::Float64 + unit_size_power::Float64 id::Int64 min_cap_power::Float64 capital_costs_energy::PSY.ValueCurve @@ -30,12 +31,19 @@ This file is auto-generated. Do not edit. om_costs_power::PSY.OperationalCost balancing_topology::String min_cap_energy::Float64 - ext::Dict + region::Union{Nothing, Region, Vector{Region}} + initial_state_of_charge::Float64 + unit_size_energy::Float64 eff_up::Float64 + cluster::Int64 + interest_rate::Float64 + ext::Dict + base_year::Int reg_cost::Float64 min_duration::Float64 max_cap_energy::Float64 reg_max::Float64 + capital_recovery_period::Int64 end @@ -43,9 +51,9 @@ This file is auto-generated. Do not edit. # Arguments - `base_power::Float64`: Base power - `om_costs_energy::PSY.OperationalCost`: (default: `StorageCost()`) Fixed and variable O&M costs for a technology -- `zone::Int64`: Zone number -- `prime_mover_type::PrimeMovers`: (default: `PrimeMovers.OT`) Prime mover for generator - `existing_cap_energy::Float64`: (default: `0.0`) Pre-existing energy capacity for a technology (MWh) +- `prime_mover_type::PrimeMovers`: (default: `PrimeMovers.OT`) Prime mover for generator +- `lifetime::Int`: (default: `100`) Maximum number of years a technology can be active once installed - `rsv_cost::Float64`: (default: `0.0`) Cost of providing upwards spinning or contingency reserves - `available::Bool`: identifies whether the technology is available - `existing_cap_power::Float64`: (default: `0.0`) Pre-existing power capacity for a technology (MW) @@ -53,6 +61,7 @@ This file is auto-generated. Do not edit. - `storage_tech::StorageTech`: Storage Technology Type - `capital_costs_power::PSY.ValueCurve`: (default: `LinearCurve(0.0)`) Capital costs for investing in a technology. - `max_duration::Float64`: (default: `1000.0`) Maximum allowable durection for a storage technology +- `unit_size_power::Float64`: (default: `0.0`) Used for discrete investment decisions. Size of each unit being built (MW) - `id::Int64`: ID for individual generator - `min_cap_power::Float64`: (default: `0.0`) Minimum required power capacity for a storage technology - `capital_costs_energy::PSY.ValueCurve`: (default: `LinearCurve(0.0)`) Capital costs for investing in a technology. @@ -65,24 +74,31 @@ This file is auto-generated. Do not edit. - `om_costs_power::PSY.OperationalCost`: (default: `StorageCost()`) Fixed and variable O&M costs for a technology - `balancing_topology::String`: Set of balancing nodes - `min_cap_energy::Float64`: (default: `0.0`) Minimum required energy capacity for a storage technology -- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `region::Union{Nothing, Region, Vector{Region}}`: (default: `nothing`) Region +- `initial_state_of_charge::Float64`: (default: `0.0`) State of charge for storage technology in the first timepoint (MWh). +- `unit_size_energy::Float64`: (default: `0.0`) Used for discrete investment decisions. Size of each unit being built (MW) - `eff_up::Float64`: (default: `1.0`) Efficiency of charging storage +- `cluster::Int64`: (default: `1`) Number of the cluster when representing multiple clusters of a given technology in a given region. +- `interest_rate::Float64`: (default: `0.07`) Interest rate for technology +- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `base_year::Int`: (default: `2020`) Reference year for technology data - `reg_cost::Float64`: (default: `0.0`) Cost of providing regulation reserves - `min_duration::Float64`: (default: `0.0`) Minimum required durection for a storage technology - `max_cap_energy::Float64`: (default: `1e8`) Maximum allowable installed energy capacity for a storage technology - `reg_max::Float64`: (default: `0.0`) Fraction of nameplate capacity that can committed to provided regulation reserves +- `capital_recovery_period::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. """ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology "Base power" base_power::Float64 "Fixed and variable O&M costs for a technology" om_costs_energy::PSY.OperationalCost - "Zone number" - zone::Int64 - "Prime mover for generator" - prime_mover_type::PrimeMovers "Pre-existing energy capacity for a technology (MWh)" existing_cap_energy::Float64 + "Prime mover for generator" + prime_mover_type::PrimeMovers + "Maximum number of years a technology can be active once installed" + lifetime::Int "Cost of providing upwards spinning or contingency reserves" rsv_cost::Float64 "identifies whether the technology is available" @@ -97,6 +113,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology capital_costs_power::PSY.ValueCurve "Maximum allowable durection for a storage technology" max_duration::Float64 + "Used for discrete investment decisions. Size of each unit being built (MW)" + unit_size_power::Float64 "ID for individual generator" id::Int64 "Minimum required power capacity for a storage technology" @@ -121,10 +139,22 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology balancing_topology::String "Minimum required energy capacity for a storage technology" min_cap_energy::Float64 - "Option for providing additional data" - ext::Dict + "Region" + region::Union{Nothing, Region, Vector{Region}} + "State of charge for storage technology in the first timepoint (MWh)." + initial_state_of_charge::Float64 + "Used for discrete investment decisions. Size of each unit being built (MW)" + unit_size_energy::Float64 "Efficiency of charging storage" eff_up::Float64 + "Number of the cluster when representing multiple clusters of a given technology in a given region." + cluster::Int64 + "Interest rate for technology" + interest_rate::Float64 + "Option for providing additional data" + ext::Dict + "Reference year for technology data" + base_year::Int "Cost of providing regulation reserves " reg_cost::Float64 "Minimum required durection for a storage technology" @@ -133,23 +163,25 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology max_cap_energy::Float64 "Fraction of nameplate capacity that can committed to provided regulation reserves" reg_max::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." + capital_recovery_period::Int64 end -function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), zone, prime_mover_type=PrimeMovers.OT, existing_cap_energy=0.0, rsv_cost=0.0, available, existing_cap_power=0.0, name, storage_tech, capital_costs_power=LinearCurve(0.0), max_duration=1000.0, id, min_cap_power=0.0, capital_costs_energy=LinearCurve(0.0), losses=1.0, eff_down=1.0, rsv_max=0.0, max_cap_power=1e8, power_systems_type, internal=InfrastructureSystemsInternal(), om_costs_power=StorageCost(), balancing_topology, min_cap_energy=0.0, ext=Dict(), eff_up=1.0, reg_cost=0.0, min_duration=0.0, max_cap_energy=1e8, reg_max=0.0, ) where T <: PSY.Storage - StorageTechnology{T}(base_power, om_costs_energy, zone, prime_mover_type, existing_cap_energy, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, id, min_cap_power, capital_costs_energy, losses, eff_down, rsv_max, max_cap_power, power_systems_type, internal, om_costs_power, balancing_topology, min_cap_energy, ext, eff_up, reg_cost, min_duration, max_cap_energy, reg_max, ) +function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), existing_cap_energy=0.0, prime_mover_type=PrimeMovers.OT, lifetime=100, rsv_cost=0.0, available, existing_cap_power=0.0, name, storage_tech, capital_costs_power=LinearCurve(0.0), max_duration=1000.0, unit_size_power=0.0, id, min_cap_power=0.0, capital_costs_energy=LinearCurve(0.0), losses=1.0, eff_down=1.0, rsv_max=0.0, max_cap_power=1e8, power_systems_type, internal=InfrastructureSystemsInternal(), om_costs_power=StorageCost(), balancing_topology, min_cap_energy=0.0, region=nothing, initial_state_of_charge=0.0, unit_size_energy=0.0, eff_up=1.0, cluster=1, interest_rate=0.07, ext=Dict(), base_year=2020, reg_cost=0.0, min_duration=0.0, max_cap_energy=1e8, reg_max=0.0, capital_recovery_period=30, ) where T <: PSY.Storage + StorageTechnology{T}(base_power, om_costs_energy, existing_cap_energy, prime_mover_type, lifetime, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, unit_size_power, id, min_cap_power, capital_costs_energy, losses, eff_down, rsv_max, max_cap_power, power_systems_type, internal, om_costs_power, balancing_topology, min_cap_energy, region, initial_state_of_charge, unit_size_energy, eff_up, cluster, interest_rate, ext, base_year, reg_cost, min_duration, max_cap_energy, reg_max, capital_recovery_period, ) end """Get [`StorageTechnology`](@ref) `base_power`.""" get_base_power(value::StorageTechnology) = value.base_power """Get [`StorageTechnology`](@ref) `om_costs_energy`.""" get_om_costs_energy(value::StorageTechnology) = value.om_costs_energy -"""Get [`StorageTechnology`](@ref) `zone`.""" -get_zone(value::StorageTechnology) = value.zone -"""Get [`StorageTechnology`](@ref) `prime_mover_type`.""" -get_prime_mover_type(value::StorageTechnology) = value.prime_mover_type """Get [`StorageTechnology`](@ref) `existing_cap_energy`.""" get_existing_cap_energy(value::StorageTechnology) = value.existing_cap_energy +"""Get [`StorageTechnology`](@ref) `prime_mover_type`.""" +get_prime_mover_type(value::StorageTechnology) = value.prime_mover_type +"""Get [`StorageTechnology`](@ref) `lifetime`.""" +get_lifetime(value::StorageTechnology) = value.lifetime """Get [`StorageTechnology`](@ref) `rsv_cost`.""" get_rsv_cost(value::StorageTechnology) = value.rsv_cost """Get [`StorageTechnology`](@ref) `available`.""" @@ -164,6 +196,8 @@ get_storage_tech(value::StorageTechnology) = value.storage_tech get_capital_costs_power(value::StorageTechnology) = value.capital_costs_power """Get [`StorageTechnology`](@ref) `max_duration`.""" get_max_duration(value::StorageTechnology) = value.max_duration +"""Get [`StorageTechnology`](@ref) `unit_size_power`.""" +get_unit_size_power(value::StorageTechnology) = value.unit_size_power """Get [`StorageTechnology`](@ref) `id`.""" get_id(value::StorageTechnology) = value.id """Get [`StorageTechnology`](@ref) `min_cap_power`.""" @@ -188,10 +222,22 @@ get_om_costs_power(value::StorageTechnology) = value.om_costs_power get_balancing_topology(value::StorageTechnology) = value.balancing_topology """Get [`StorageTechnology`](@ref) `min_cap_energy`.""" get_min_cap_energy(value::StorageTechnology) = value.min_cap_energy -"""Get [`StorageTechnology`](@ref) `ext`.""" -get_ext(value::StorageTechnology) = value.ext +"""Get [`StorageTechnology`](@ref) `region`.""" +get_region(value::StorageTechnology) = value.region +"""Get [`StorageTechnology`](@ref) `initial_state_of_charge`.""" +get_initial_state_of_charge(value::StorageTechnology) = value.initial_state_of_charge +"""Get [`StorageTechnology`](@ref) `unit_size_energy`.""" +get_unit_size_energy(value::StorageTechnology) = value.unit_size_energy """Get [`StorageTechnology`](@ref) `eff_up`.""" get_eff_up(value::StorageTechnology) = value.eff_up +"""Get [`StorageTechnology`](@ref) `cluster`.""" +get_cluster(value::StorageTechnology) = value.cluster +"""Get [`StorageTechnology`](@ref) `interest_rate`.""" +get_interest_rate(value::StorageTechnology) = value.interest_rate +"""Get [`StorageTechnology`](@ref) `ext`.""" +get_ext(value::StorageTechnology) = value.ext +"""Get [`StorageTechnology`](@ref) `base_year`.""" +get_base_year(value::StorageTechnology) = value.base_year """Get [`StorageTechnology`](@ref) `reg_cost`.""" get_reg_cost(value::StorageTechnology) = value.reg_cost """Get [`StorageTechnology`](@ref) `min_duration`.""" @@ -200,17 +246,19 @@ get_min_duration(value::StorageTechnology) = value.min_duration get_max_cap_energy(value::StorageTechnology) = value.max_cap_energy """Get [`StorageTechnology`](@ref) `reg_max`.""" get_reg_max(value::StorageTechnology) = value.reg_max +"""Get [`StorageTechnology`](@ref) `capital_recovery_period`.""" +get_capital_recovery_period(value::StorageTechnology) = value.capital_recovery_period """Set [`StorageTechnology`](@ref) `base_power`.""" set_base_power!(value::StorageTechnology, val) = value.base_power = val """Set [`StorageTechnology`](@ref) `om_costs_energy`.""" set_om_costs_energy!(value::StorageTechnology, val) = value.om_costs_energy = val -"""Set [`StorageTechnology`](@ref) `zone`.""" -set_zone!(value::StorageTechnology, val) = value.zone = val -"""Set [`StorageTechnology`](@ref) `prime_mover_type`.""" -set_prime_mover_type!(value::StorageTechnology, val) = value.prime_mover_type = val """Set [`StorageTechnology`](@ref) `existing_cap_energy`.""" set_existing_cap_energy!(value::StorageTechnology, val) = value.existing_cap_energy = val +"""Set [`StorageTechnology`](@ref) `prime_mover_type`.""" +set_prime_mover_type!(value::StorageTechnology, val) = value.prime_mover_type = val +"""Set [`StorageTechnology`](@ref) `lifetime`.""" +set_lifetime!(value::StorageTechnology, val) = value.lifetime = val """Set [`StorageTechnology`](@ref) `rsv_cost`.""" set_rsv_cost!(value::StorageTechnology, val) = value.rsv_cost = val """Set [`StorageTechnology`](@ref) `available`.""" @@ -225,6 +273,8 @@ set_storage_tech!(value::StorageTechnology, val) = value.storage_tech = val set_capital_costs_power!(value::StorageTechnology, val) = value.capital_costs_power = val """Set [`StorageTechnology`](@ref) `max_duration`.""" set_max_duration!(value::StorageTechnology, val) = value.max_duration = val +"""Set [`StorageTechnology`](@ref) `unit_size_power`.""" +set_unit_size_power!(value::StorageTechnology, val) = value.unit_size_power = val """Set [`StorageTechnology`](@ref) `id`.""" set_id!(value::StorageTechnology, val) = value.id = val """Set [`StorageTechnology`](@ref) `min_cap_power`.""" @@ -249,10 +299,22 @@ set_om_costs_power!(value::StorageTechnology, val) = value.om_costs_power = val set_balancing_topology!(value::StorageTechnology, val) = value.balancing_topology = val """Set [`StorageTechnology`](@ref) `min_cap_energy`.""" set_min_cap_energy!(value::StorageTechnology, val) = value.min_cap_energy = val -"""Set [`StorageTechnology`](@ref) `ext`.""" -set_ext!(value::StorageTechnology, val) = value.ext = val +"""Set [`StorageTechnology`](@ref) `region`.""" +set_region!(value::StorageTechnology, val) = value.region = val +"""Set [`StorageTechnology`](@ref) `initial_state_of_charge`.""" +set_initial_state_of_charge!(value::StorageTechnology, val) = value.initial_state_of_charge = val +"""Set [`StorageTechnology`](@ref) `unit_size_energy`.""" +set_unit_size_energy!(value::StorageTechnology, val) = value.unit_size_energy = val """Set [`StorageTechnology`](@ref) `eff_up`.""" set_eff_up!(value::StorageTechnology, val) = value.eff_up = val +"""Set [`StorageTechnology`](@ref) `cluster`.""" +set_cluster!(value::StorageTechnology, val) = value.cluster = val +"""Set [`StorageTechnology`](@ref) `interest_rate`.""" +set_interest_rate!(value::StorageTechnology, val) = value.interest_rate = val +"""Set [`StorageTechnology`](@ref) `ext`.""" +set_ext!(value::StorageTechnology, val) = value.ext = val +"""Set [`StorageTechnology`](@ref) `base_year`.""" +set_base_year!(value::StorageTechnology, val) = value.base_year = val """Set [`StorageTechnology`](@ref) `reg_cost`.""" set_reg_cost!(value::StorageTechnology, val) = value.reg_cost = val """Set [`StorageTechnology`](@ref) `min_duration`.""" @@ -261,3 +323,5 @@ set_min_duration!(value::StorageTechnology, val) = value.min_duration = val set_max_cap_energy!(value::StorageTechnology, val) = value.max_cap_energy = val """Set [`StorageTechnology`](@ref) `reg_max`.""" set_reg_max!(value::StorageTechnology, val) = value.reg_max = val +"""Set [`StorageTechnology`](@ref) `capital_recovery_period`.""" +set_capital_recovery_period!(value::StorageTechnology, val) = value.capital_recovery_period = val diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index 4330078..1ddac94 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -8,20 +8,20 @@ This file is auto-generated. Do not edit. mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology base_power::Float64 heat_rate_mmbtu_per_mwh::Union{Float64, PSY.ValueCurve, Dict{ThermalFuels, PSY.ValueCurve}} - zone::Union{Nothing, Zone} + outage_factor::Float64 prime_mover_type::PrimeMovers minimum_required_capacity::Float64 cofire_level_min::Union{Nothing, Dict{ThermalFuels, Float64}} capital_costs::PSY.ValueCurve - outage_factor::Float64 + lifetime::Int rsv_cost::Float64 cofire_start_max::Union{Nothing, Dict{ThermalFuels, Float64}} - gen_ID::Int64 available::Bool co2::Union{Float64, Dict{String, Float64}, Dict{ThermalFuels, Float64}} - name::String cofire_start_min::Union{Nothing, Dict{ThermalFuels, Float64}} + name::String ramp_dn_percentage::Float64 + id::Int64 down_time::Float64 initial_capacity::Float64 start_fuel_mmbtu_per_mw::Float64 @@ -31,15 +31,20 @@ This file is auto-generated. Do not edit. power_systems_type::String cofire_level_max::Union{Nothing, Dict{ThermalFuels, Float64}} internal::InfrastructureSystemsInternal - ext::Dict + interest_rate::Float64 balancing_topology::String + ext::Dict + region::Union{Nothing, Region, Vector{Region}} maximum_capacity::Float64 cluster::Int64 ramp_up_percentage::Float64 + base_year::Int + unit_size::Float64 reg_cost::Float64 min_generation_percentage::Float64 start_cost_per_mw::Float64 reg_max::Float64 + capital_recovery_period::Int64 up_time::Float64 end @@ -48,20 +53,20 @@ This file is auto-generated. Do not edit. # Arguments - `base_power::Float64`: Base power - `heat_rate_mmbtu_per_mwh::Union{Float64, PSY.ValueCurve, Dict{ThermalFuels, PSY.ValueCurve}}`: (default: `0.0`) Heat rate of generator, MMBTU/MWh -- `zone::Union{Nothing, Zone}`: (default: `nothing`) Zone where tech operates in +- `outage_factor::Float64`: (default: `1.0`) Derating factor to account for planned or forced outages of a technology - `prime_mover_type::PrimeMovers`: (default: `PrimeMovers.OT`) Prime mover for generator - `minimum_required_capacity::Float64`: (default: `0.0`) Minimum required capacity for a technology - `cofire_level_min::Union{Nothing, Dict{ThermalFuels, Float64}}`: (default: `nothing`) Minimum blending level of each fuel during normal generation process for multi-fuel generator - `capital_costs::PSY.ValueCurve`: (default: `LinearCurve(0.0)`) Capital costs for investing in a technology. -- `outage_factor::Float64`: (default: `1.0`) Derating factor to account for planned or forced outages of a technology +- `lifetime::Int`: (default: `100`) Maximum number of years a technology can be active once installed - `rsv_cost::Float64`: (default: `0.0`) Cost of providing upwards spinning or contingency reserves - `cofire_start_max::Union{Nothing, Dict{ThermalFuels, Float64}}`: (default: `nothing`) Maximum blending level of each fuel during start-up process for multi-fuel generator -- `gen_ID::Int64`: ID for individual generator - `available::Bool`: (default: `True`) identifies whether the technology is available - `co2::Union{Float64, Dict{String, Float64}, Dict{ThermalFuels, Float64}}`: (default: `0.0`) Carbon Intensity of fuel -- `name::String`: The technology name - `cofire_start_min::Union{Nothing, Dict{ThermalFuels, Float64}}`: (default: `nothing`) Minimum blending level of each fuel during start-up process for multi-fuel generator +- `name::String`: The technology name - `ramp_dn_percentage::Float64`: (default: `100.0`) Maximum decrease in output between operation periods. Fraction of total capacity +- `id::Int64`: ID for individual generator - `down_time::Float64`: (default: `0.0`) Minimum amount of time a resource has to remain in the shutdown state. - `initial_capacity::Float64`: (default: `0.0`) Pre-existing capacity for a technology - `start_fuel_mmbtu_per_mw::Float64`: (default: `0.0`) Startup fuel use per MW of nameplate capacity of each generator (MMBtu/MW per start) @@ -71,15 +76,20 @@ This file is auto-generated. Do not edit. - `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling - `cofire_level_max::Union{Nothing, Dict{ThermalFuels, Float64}}`: (default: `nothing`) Maximum blending level of each fuel during normal generation process for multi-fuel generator - `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field -- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `interest_rate::Float64`: (default: `0.07`) Interest rate for technology - `balancing_topology::String`: Set of balancing nodes +- `ext::Dict`: (default: `Dict()`) Option for providing additional data +- `region::Union{Nothing, Region, Vector{Region}}`: (default: `nothing`) Zone where tech operates in - `maximum_capacity::Float64`: (default: `Inf`) Maximum allowable installed capacity for a technology - `cluster::Int64`: (default: `1`) Number of the cluster when representing multiple clusters of a given technology in a given region. - `ramp_up_percentage::Float64`: (default: `100.0`) Maximum increase in output between operation periods. Fraction of total capacity +- `base_year::Int`: (default: `2020`) Reference year for technology data +- `unit_size::Float64`: (default: `0.0`) Used for discrete investment decisions. Size of each unit being built (MW) - `reg_cost::Float64`: (default: `0.0`) Cost of providing regulation reserves - `min_generation_percentage::Float64`: (default: `0.0`) Minimum generation as a fraction of total capacity - `start_cost_per_mw::Float64`: (default: `0.0`) Cost per MW of nameplate capacity to start a generator (/MW per start). - `reg_max::Float64`: (default: `0.0`) Fraction of nameplate capacity that can committed to provided regulation reserves +- `capital_recovery_period::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. - `up_time::Float64`: (default: `0.0`) Minimum amount of time a resource has to stay in the committed state. """ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology @@ -87,8 +97,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology base_power::Float64 "Heat rate of generator, MMBTU/MWh" heat_rate_mmbtu_per_mwh::Union{Float64, PSY.ValueCurve, Dict{ThermalFuels, PSY.ValueCurve}} - "Zone where tech operates in" - zone::Union{Nothing, Zone} + "Derating factor to account for planned or forced outages of a technology" + outage_factor::Float64 "Prime mover for generator" prime_mover_type::PrimeMovers "Minimum required capacity for a technology" @@ -97,24 +107,24 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology cofire_level_min::Union{Nothing, Dict{ThermalFuels, Float64}} "Capital costs for investing in a technology." capital_costs::PSY.ValueCurve - "Derating factor to account for planned or forced outages of a technology" - outage_factor::Float64 + "Maximum number of years a technology can be active once installed" + lifetime::Int "Cost of providing upwards spinning or contingency reserves" rsv_cost::Float64 "Maximum blending level of each fuel during start-up process for multi-fuel generator" cofire_start_max::Union{Nothing, Dict{ThermalFuels, Float64}} - "ID for individual generator" - gen_ID::Int64 "identifies whether the technology is available" available::Bool "Carbon Intensity of fuel" co2::Union{Float64, Dict{String, Float64}, Dict{ThermalFuels, Float64}} - "The technology name" - name::String "Minimum blending level of each fuel during start-up process for multi-fuel generator" cofire_start_min::Union{Nothing, Dict{ThermalFuels, Float64}} + "The technology name" + name::String "Maximum decrease in output between operation periods. Fraction of total capacity" ramp_dn_percentage::Float64 + "ID for individual generator" + id::Int64 "Minimum amount of time a resource has to remain in the shutdown state." down_time::Float64 "Pre-existing capacity for a technology" @@ -133,16 +143,24 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology cofire_level_max::Union{Nothing, Dict{ThermalFuels, Float64}} "Internal field" internal::InfrastructureSystemsInternal - "Option for providing additional data" - ext::Dict + "Interest rate for technology" + interest_rate::Float64 "Set of balancing nodes" balancing_topology::String + "Option for providing additional data" + ext::Dict + "Zone where tech operates in" + region::Union{Nothing, Region, Vector{Region}} "Maximum allowable installed capacity for a technology" maximum_capacity::Float64 "Number of the cluster when representing multiple clusters of a given technology in a given region." cluster::Int64 "Maximum increase in output between operation periods. Fraction of total capacity" ramp_up_percentage::Float64 + "Reference year for technology data" + base_year::Int + "Used for discrete investment decisions. Size of each unit being built (MW)" + unit_size::Float64 "Cost of providing regulation reserves " reg_cost::Float64 "Minimum generation as a fraction of total capacity" @@ -151,21 +169,23 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology start_cost_per_mw::Float64 "Fraction of nameplate capacity that can committed to provided regulation reserves" reg_max::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." + capital_recovery_period::Int64 "Minimum amount of time a resource has to stay in the committed state." up_time::Float64 end -function SupplyTechnology{T}(; base_power, heat_rate_mmbtu_per_mwh=0.0, zone=nothing, prime_mover_type=PrimeMovers.OT, minimum_required_capacity=0.0, cofire_level_min=nothing, capital_costs=LinearCurve(0.0), outage_factor=1.0, rsv_cost=0.0, cofire_start_max=nothing, gen_ID, available=True, co2=0.0, name, cofire_start_min=nothing, ramp_dn_percentage=100.0, down_time=0.0, initial_capacity=0.0, start_fuel_mmbtu_per_mw=0.0, operation_costs=ThermalGenerationCost(), rsv_max=0.0, fuel=ThermalFuels.OTHER, power_systems_type, cofire_level_max=nothing, internal=InfrastructureSystemsInternal(), ext=Dict(), balancing_topology, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, reg_cost=0.0, min_generation_percentage=0.0, start_cost_per_mw=0.0, reg_max=0.0, up_time=0.0, ) where T <: PSY.Generator - SupplyTechnology{T}(base_power, heat_rate_mmbtu_per_mwh, zone, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, outage_factor, rsv_cost, cofire_start_max, gen_ID, available, co2, name, cofire_start_min, ramp_dn_percentage, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, ext, balancing_topology, maximum_capacity, cluster, ramp_up_percentage, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, up_time, ) +function SupplyTechnology{T}(; base_power, heat_rate_mmbtu_per_mwh=0.0, outage_factor=1.0, prime_mover_type=PrimeMovers.OT, minimum_required_capacity=0.0, cofire_level_min=nothing, capital_costs=LinearCurve(0.0), lifetime=100, rsv_cost=0.0, cofire_start_max=nothing, available=True, co2=0.0, cofire_start_min=nothing, name, ramp_dn_percentage=100.0, id, down_time=0.0, initial_capacity=0.0, start_fuel_mmbtu_per_mw=0.0, operation_costs=ThermalGenerationCost(), rsv_max=0.0, fuel=ThermalFuels.OTHER, power_systems_type, cofire_level_max=nothing, internal=InfrastructureSystemsInternal(), interest_rate=0.07, balancing_topology, ext=Dict(), region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, base_year=2020, unit_size=0.0, reg_cost=0.0, min_generation_percentage=0.0, start_cost_per_mw=0.0, reg_max=0.0, capital_recovery_period=30, up_time=0.0, ) where T <: PSY.Generator + SupplyTechnology{T}(base_power, heat_rate_mmbtu_per_mwh, outage_factor, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, lifetime, rsv_cost, cofire_start_max, available, co2, cofire_start_min, name, ramp_dn_percentage, id, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, interest_rate, balancing_topology, ext, region, maximum_capacity, cluster, ramp_up_percentage, base_year, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, capital_recovery_period, up_time, ) end """Get [`SupplyTechnology`](@ref) `base_power`.""" get_base_power(value::SupplyTechnology) = value.base_power """Get [`SupplyTechnology`](@ref) `heat_rate_mmbtu_per_mwh`.""" get_heat_rate_mmbtu_per_mwh(value::SupplyTechnology) = value.heat_rate_mmbtu_per_mwh -"""Get [`SupplyTechnology`](@ref) `zone`.""" -get_zone(value::SupplyTechnology) = value.zone +"""Get [`SupplyTechnology`](@ref) `outage_factor`.""" +get_outage_factor(value::SupplyTechnology) = value.outage_factor """Get [`SupplyTechnology`](@ref) `prime_mover_type`.""" get_prime_mover_type(value::SupplyTechnology) = value.prime_mover_type """Get [`SupplyTechnology`](@ref) `minimum_required_capacity`.""" @@ -174,24 +194,24 @@ get_minimum_required_capacity(value::SupplyTechnology) = value.minimum_required_ get_cofire_level_min(value::SupplyTechnology) = value.cofire_level_min """Get [`SupplyTechnology`](@ref) `capital_costs`.""" get_capital_costs(value::SupplyTechnology) = value.capital_costs -"""Get [`SupplyTechnology`](@ref) `outage_factor`.""" -get_outage_factor(value::SupplyTechnology) = value.outage_factor +"""Get [`SupplyTechnology`](@ref) `lifetime`.""" +get_lifetime(value::SupplyTechnology) = value.lifetime """Get [`SupplyTechnology`](@ref) `rsv_cost`.""" get_rsv_cost(value::SupplyTechnology) = value.rsv_cost """Get [`SupplyTechnology`](@ref) `cofire_start_max`.""" get_cofire_start_max(value::SupplyTechnology) = value.cofire_start_max -"""Get [`SupplyTechnology`](@ref) `gen_ID`.""" -get_gen_ID(value::SupplyTechnology) = value.gen_ID """Get [`SupplyTechnology`](@ref) `available`.""" get_available(value::SupplyTechnology) = value.available """Get [`SupplyTechnology`](@ref) `co2`.""" get_co2(value::SupplyTechnology) = value.co2 -"""Get [`SupplyTechnology`](@ref) `name`.""" -get_name(value::SupplyTechnology) = value.name """Get [`SupplyTechnology`](@ref) `cofire_start_min`.""" get_cofire_start_min(value::SupplyTechnology) = value.cofire_start_min +"""Get [`SupplyTechnology`](@ref) `name`.""" +get_name(value::SupplyTechnology) = value.name """Get [`SupplyTechnology`](@ref) `ramp_dn_percentage`.""" get_ramp_dn_percentage(value::SupplyTechnology) = value.ramp_dn_percentage +"""Get [`SupplyTechnology`](@ref) `id`.""" +get_id(value::SupplyTechnology) = value.id """Get [`SupplyTechnology`](@ref) `down_time`.""" get_down_time(value::SupplyTechnology) = value.down_time """Get [`SupplyTechnology`](@ref) `initial_capacity`.""" @@ -210,16 +230,24 @@ get_power_systems_type(value::SupplyTechnology) = value.power_systems_type get_cofire_level_max(value::SupplyTechnology) = value.cofire_level_max """Get [`SupplyTechnology`](@ref) `internal`.""" get_internal(value::SupplyTechnology) = value.internal -"""Get [`SupplyTechnology`](@ref) `ext`.""" -get_ext(value::SupplyTechnology) = value.ext +"""Get [`SupplyTechnology`](@ref) `interest_rate`.""" +get_interest_rate(value::SupplyTechnology) = value.interest_rate """Get [`SupplyTechnology`](@ref) `balancing_topology`.""" get_balancing_topology(value::SupplyTechnology) = value.balancing_topology +"""Get [`SupplyTechnology`](@ref) `ext`.""" +get_ext(value::SupplyTechnology) = value.ext +"""Get [`SupplyTechnology`](@ref) `region`.""" +get_region(value::SupplyTechnology) = value.region """Get [`SupplyTechnology`](@ref) `maximum_capacity`.""" get_maximum_capacity(value::SupplyTechnology) = value.maximum_capacity """Get [`SupplyTechnology`](@ref) `cluster`.""" get_cluster(value::SupplyTechnology) = value.cluster """Get [`SupplyTechnology`](@ref) `ramp_up_percentage`.""" get_ramp_up_percentage(value::SupplyTechnology) = value.ramp_up_percentage +"""Get [`SupplyTechnology`](@ref) `base_year`.""" +get_base_year(value::SupplyTechnology) = value.base_year +"""Get [`SupplyTechnology`](@ref) `unit_size`.""" +get_unit_size(value::SupplyTechnology) = value.unit_size """Get [`SupplyTechnology`](@ref) `reg_cost`.""" get_reg_cost(value::SupplyTechnology) = value.reg_cost """Get [`SupplyTechnology`](@ref) `min_generation_percentage`.""" @@ -228,6 +256,8 @@ get_min_generation_percentage(value::SupplyTechnology) = value.min_generation_pe get_start_cost_per_mw(value::SupplyTechnology) = value.start_cost_per_mw """Get [`SupplyTechnology`](@ref) `reg_max`.""" get_reg_max(value::SupplyTechnology) = value.reg_max +"""Get [`SupplyTechnology`](@ref) `capital_recovery_period`.""" +get_capital_recovery_period(value::SupplyTechnology) = value.capital_recovery_period """Get [`SupplyTechnology`](@ref) `up_time`.""" get_up_time(value::SupplyTechnology) = value.up_time @@ -235,8 +265,8 @@ get_up_time(value::SupplyTechnology) = value.up_time set_base_power!(value::SupplyTechnology, val) = value.base_power = val """Set [`SupplyTechnology`](@ref) `heat_rate_mmbtu_per_mwh`.""" set_heat_rate_mmbtu_per_mwh!(value::SupplyTechnology, val) = value.heat_rate_mmbtu_per_mwh = val -"""Set [`SupplyTechnology`](@ref) `zone`.""" -set_zone!(value::SupplyTechnology, val) = value.zone = val +"""Set [`SupplyTechnology`](@ref) `outage_factor`.""" +set_outage_factor!(value::SupplyTechnology, val) = value.outage_factor = val """Set [`SupplyTechnology`](@ref) `prime_mover_type`.""" set_prime_mover_type!(value::SupplyTechnology, val) = value.prime_mover_type = val """Set [`SupplyTechnology`](@ref) `minimum_required_capacity`.""" @@ -245,24 +275,24 @@ set_minimum_required_capacity!(value::SupplyTechnology, val) = value.minimum_req set_cofire_level_min!(value::SupplyTechnology, val) = value.cofire_level_min = val """Set [`SupplyTechnology`](@ref) `capital_costs`.""" set_capital_costs!(value::SupplyTechnology, val) = value.capital_costs = val -"""Set [`SupplyTechnology`](@ref) `outage_factor`.""" -set_outage_factor!(value::SupplyTechnology, val) = value.outage_factor = val +"""Set [`SupplyTechnology`](@ref) `lifetime`.""" +set_lifetime!(value::SupplyTechnology, val) = value.lifetime = val """Set [`SupplyTechnology`](@ref) `rsv_cost`.""" set_rsv_cost!(value::SupplyTechnology, val) = value.rsv_cost = val """Set [`SupplyTechnology`](@ref) `cofire_start_max`.""" set_cofire_start_max!(value::SupplyTechnology, val) = value.cofire_start_max = val -"""Set [`SupplyTechnology`](@ref) `gen_ID`.""" -set_gen_ID!(value::SupplyTechnology, val) = value.gen_ID = val """Set [`SupplyTechnology`](@ref) `available`.""" set_available!(value::SupplyTechnology, val) = value.available = val """Set [`SupplyTechnology`](@ref) `co2`.""" set_co2!(value::SupplyTechnology, val) = value.co2 = val -"""Set [`SupplyTechnology`](@ref) `name`.""" -set_name!(value::SupplyTechnology, val) = value.name = val """Set [`SupplyTechnology`](@ref) `cofire_start_min`.""" set_cofire_start_min!(value::SupplyTechnology, val) = value.cofire_start_min = val +"""Set [`SupplyTechnology`](@ref) `name`.""" +set_name!(value::SupplyTechnology, val) = value.name = val """Set [`SupplyTechnology`](@ref) `ramp_dn_percentage`.""" set_ramp_dn_percentage!(value::SupplyTechnology, val) = value.ramp_dn_percentage = val +"""Set [`SupplyTechnology`](@ref) `id`.""" +set_id!(value::SupplyTechnology, val) = value.id = val """Set [`SupplyTechnology`](@ref) `down_time`.""" set_down_time!(value::SupplyTechnology, val) = value.down_time = val """Set [`SupplyTechnology`](@ref) `initial_capacity`.""" @@ -281,16 +311,24 @@ set_power_systems_type!(value::SupplyTechnology, val) = value.power_systems_type set_cofire_level_max!(value::SupplyTechnology, val) = value.cofire_level_max = val """Set [`SupplyTechnology`](@ref) `internal`.""" set_internal!(value::SupplyTechnology, val) = value.internal = val -"""Set [`SupplyTechnology`](@ref) `ext`.""" -set_ext!(value::SupplyTechnology, val) = value.ext = val +"""Set [`SupplyTechnology`](@ref) `interest_rate`.""" +set_interest_rate!(value::SupplyTechnology, val) = value.interest_rate = val """Set [`SupplyTechnology`](@ref) `balancing_topology`.""" set_balancing_topology!(value::SupplyTechnology, val) = value.balancing_topology = val +"""Set [`SupplyTechnology`](@ref) `ext`.""" +set_ext!(value::SupplyTechnology, val) = value.ext = val +"""Set [`SupplyTechnology`](@ref) `region`.""" +set_region!(value::SupplyTechnology, val) = value.region = val """Set [`SupplyTechnology`](@ref) `maximum_capacity`.""" set_maximum_capacity!(value::SupplyTechnology, val) = value.maximum_capacity = val """Set [`SupplyTechnology`](@ref) `cluster`.""" set_cluster!(value::SupplyTechnology, val) = value.cluster = val """Set [`SupplyTechnology`](@ref) `ramp_up_percentage`.""" set_ramp_up_percentage!(value::SupplyTechnology, val) = value.ramp_up_percentage = val +"""Set [`SupplyTechnology`](@ref) `base_year`.""" +set_base_year!(value::SupplyTechnology, val) = value.base_year = val +"""Set [`SupplyTechnology`](@ref) `unit_size`.""" +set_unit_size!(value::SupplyTechnology, val) = value.unit_size = val """Set [`SupplyTechnology`](@ref) `reg_cost`.""" set_reg_cost!(value::SupplyTechnology, val) = value.reg_cost = val """Set [`SupplyTechnology`](@ref) `min_generation_percentage`.""" @@ -299,5 +337,7 @@ set_min_generation_percentage!(value::SupplyTechnology, val) = value.min_generat set_start_cost_per_mw!(value::SupplyTechnology, val) = value.start_cost_per_mw = val """Set [`SupplyTechnology`](@ref) `reg_max`.""" set_reg_max!(value::SupplyTechnology, val) = value.reg_max = val +"""Set [`SupplyTechnology`](@ref) `capital_recovery_period`.""" +set_capital_recovery_period!(value::SupplyTechnology, val) = value.capital_recovery_period = val """Set [`SupplyTechnology`](@ref) `up_time`.""" set_up_time!(value::SupplyTechnology, val) = value.up_time = val diff --git a/src/models/generated/TransportTechnology.jl b/src/models/generated/TransportTechnology.jl deleted file mode 100644 index 2aa9784..0000000 --- a/src/models/generated/TransportTechnology.jl +++ /dev/null @@ -1,159 +0,0 @@ -#= -This file is auto-generated. Do not edit. -=# - -#! format: off - -""" - mutable struct TransportTechnology{T <: PSY.Device} <: Technology - capital_cost::PSY.ValueCurve - start_region::Int64 - available::Bool - name::String - capital_recovery_factor::Int64 - end_region::Int64 - power_systems_type::String - angle_limit::Float64 - internal::InfrastructureSystemsInternal - ext::Dict - resistance::Float64 - voltage::Float64 - network_id::Int64 - maximum_new_capacity::Float64 - existing_line_capacity::Float64 - wacc::Float64 - line_loss::Float64 - end - - - -# Arguments -- `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. -- `start_region::Int64`: Start region for transport technology -- `available::Bool`: identifies whether the technology is available -- `name::String`: Name -- `capital_recovery_factor::Int64`: (default: `0`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. -- `end_region::Int64`: End region for transport technology -- `power_systems_type::String`: maps to a valid PowerSystems.jl for PCM modeling -- `angle_limit::Float64`: (default: `0.0`) Votlage angle limit (radians) -- `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field -- `ext::Dict`: (default: `Dict()`) Option for providing additional data -- `resistance::Float64`: (default: `0.0`) Technology resistance in Ohms -- `voltage::Float64`: (default: `0.0`) Technology resistance in Ohms -- `network_id::Int64`: Numerical Index -- `maximum_new_capacity::Float64`: Maximum capacity that can be added to transmission line (MW) -- `existing_line_capacity::Float64`: Existing capacity of transport technology (MW) -- `wacc::Float64`: (default: `0`) Weighted average cost of capital -- `line_loss::Float64`: Transmission loss for each transport technology (%) -""" -mutable struct TransportTechnology{T <: PSY.Device} <: Technology - "Cost of adding new capacity to the inter-regional transmission line." - capital_cost::PSY.ValueCurve - "Start region for transport technology" - start_region::Int64 - "identifies whether the technology is available" - available::Bool - "Name" - name::String - "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." - capital_recovery_factor::Int64 - "End region for transport technology" - end_region::Int64 - "maps to a valid PowerSystems.jl for PCM modeling" - power_systems_type::String - "Votlage angle limit (radians)" - angle_limit::Float64 - "Internal field" - internal::InfrastructureSystemsInternal - "Option for providing additional data" - ext::Dict - "Technology resistance in Ohms" - resistance::Float64 - "Technology resistance in Ohms" - voltage::Float64 - "Numerical Index" - network_id::Int64 - "Maximum capacity that can be added to transmission line (MW)" - maximum_new_capacity::Float64 - "Existing capacity of transport technology (MW)" - existing_line_capacity::Float64 - "Weighted average cost of capital" - wacc::Float64 - "Transmission loss for each transport technology (%)" - line_loss::Float64 -end - - -function TransportTechnology{T}(; capital_cost, start_region, available, name, capital_recovery_factor=0, end_region, power_systems_type, angle_limit=0.0, internal=InfrastructureSystemsInternal(), ext=Dict(), resistance=0.0, voltage=0.0, network_id, maximum_new_capacity, existing_line_capacity, wacc=0, line_loss, ) where T <: PSY.Device - TransportTechnology{T}(capital_cost, start_region, available, name, capital_recovery_factor, end_region, power_systems_type, angle_limit, internal, ext, resistance, voltage, network_id, maximum_new_capacity, existing_line_capacity, wacc, line_loss, ) -end - -"""Get [`TransportTechnology`](@ref) `capital_cost`.""" -get_capital_cost(value::TransportTechnology) = value.capital_cost -"""Get [`TransportTechnology`](@ref) `start_region`.""" -get_start_region(value::TransportTechnology) = value.start_region -"""Get [`TransportTechnology`](@ref) `available`.""" -get_available(value::TransportTechnology) = value.available -"""Get [`TransportTechnology`](@ref) `name`.""" -get_name(value::TransportTechnology) = value.name -"""Get [`TransportTechnology`](@ref) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::TransportTechnology) = value.capital_recovery_factor -"""Get [`TransportTechnology`](@ref) `end_region`.""" -get_end_region(value::TransportTechnology) = value.end_region -"""Get [`TransportTechnology`](@ref) `power_systems_type`.""" -get_power_systems_type(value::TransportTechnology) = value.power_systems_type -"""Get [`TransportTechnology`](@ref) `angle_limit`.""" -get_angle_limit(value::TransportTechnology) = value.angle_limit -"""Get [`TransportTechnology`](@ref) `internal`.""" -get_internal(value::TransportTechnology) = value.internal -"""Get [`TransportTechnology`](@ref) `ext`.""" -get_ext(value::TransportTechnology) = value.ext -"""Get [`TransportTechnology`](@ref) `resistance`.""" -get_resistance(value::TransportTechnology) = value.resistance -"""Get [`TransportTechnology`](@ref) `voltage`.""" -get_voltage(value::TransportTechnology) = value.voltage -"""Get [`TransportTechnology`](@ref) `network_id`.""" -get_network_id(value::TransportTechnology) = value.network_id -"""Get [`TransportTechnology`](@ref) `maximum_new_capacity`.""" -get_maximum_new_capacity(value::TransportTechnology) = value.maximum_new_capacity -"""Get [`TransportTechnology`](@ref) `existing_line_capacity`.""" -get_existing_line_capacity(value::TransportTechnology) = value.existing_line_capacity -"""Get [`TransportTechnology`](@ref) `wacc`.""" -get_wacc(value::TransportTechnology) = value.wacc -"""Get [`TransportTechnology`](@ref) `line_loss`.""" -get_line_loss(value::TransportTechnology) = value.line_loss - -"""Set [`TransportTechnology`](@ref) `capital_cost`.""" -set_capital_cost!(value::TransportTechnology, val) = value.capital_cost = val -"""Set [`TransportTechnology`](@ref) `start_region`.""" -set_start_region!(value::TransportTechnology, val) = value.start_region = val -"""Set [`TransportTechnology`](@ref) `available`.""" -set_available!(value::TransportTechnology, val) = value.available = val -"""Set [`TransportTechnology`](@ref) `name`.""" -set_name!(value::TransportTechnology, val) = value.name = val -"""Set [`TransportTechnology`](@ref) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::TransportTechnology, val) = value.capital_recovery_factor = val -"""Set [`TransportTechnology`](@ref) `end_region`.""" -set_end_region!(value::TransportTechnology, val) = value.end_region = val -"""Set [`TransportTechnology`](@ref) `power_systems_type`.""" -set_power_systems_type!(value::TransportTechnology, val) = value.power_systems_type = val -"""Set [`TransportTechnology`](@ref) `angle_limit`.""" -set_angle_limit!(value::TransportTechnology, val) = value.angle_limit = 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) `resistance`.""" -set_resistance!(value::TransportTechnology, val) = value.resistance = val -"""Set [`TransportTechnology`](@ref) `voltage`.""" -set_voltage!(value::TransportTechnology, val) = value.voltage = val -"""Set [`TransportTechnology`](@ref) `network_id`.""" -set_network_id!(value::TransportTechnology, val) = value.network_id = val -"""Set [`TransportTechnology`](@ref) `maximum_new_capacity`.""" -set_maximum_new_capacity!(value::TransportTechnology, val) = value.maximum_new_capacity = val -"""Set [`TransportTechnology`](@ref) `existing_line_capacity`.""" -set_existing_line_capacity!(value::TransportTechnology, val) = value.existing_line_capacity = val -"""Set [`TransportTechnology`](@ref) `wacc`.""" -set_wacc!(value::TransportTechnology, val) = value.wacc = val -"""Set [`TransportTechnology`](@ref) `line_loss`.""" -set_line_loss!(value::TransportTechnology, val) = value.line_loss = val diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index 820bec6..e32f925 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -4,12 +4,14 @@ include("SupplyTechnology.jl") include("DemandRequirement.jl") include("RetirementPotential.jl") include("ExistingCapacity.jl") +include("ACTransportTechnology.jl") include("AggregateRetrofitPotential.jl") include("DemandSideTechnology.jl") include("AggregateRetirementPotential.jl") +include("ExistingTransportTechnology.jl") +include("HVDCTransportTechnology.jl") include("StorageTechnology.jl") include("CarbonCaps.jl") -include("TransportTechnology.jl") include("RetrofitPotential.jl") include("CurtailableDemandSideTechnology.jl") include("FlexibleDemandTechnology.jl") @@ -18,11 +20,12 @@ export get_angle_limit export get_available export get_balancing_topology export get_base_power +export get_base_year export get_capital_cost export get_capital_costs export get_capital_costs_energy export get_capital_costs_power -export get_capital_recovery_factor +export get_capital_recovery_period export get_cluster export get_co2 export get_co_2_max_mtons @@ -47,10 +50,12 @@ export get_existing_capacity export get_existing_line_capacity export get_ext export get_fuel -export get_gen_ID export get_heat_rate_mmbtu_per_mwh export get_id export get_initial_capacity +export get_initial_state_of_charge +export get_interest_rate +export get_lifetime export get_line_loss export get_losses export get_max_cap_energy @@ -82,6 +87,7 @@ export get_ramp_dn_percentage export get_ramp_up_percentage export get_reg_cost export get_reg_max +export get_region export get_resistance export get_retirement_potential export get_retrofit_fraction @@ -95,21 +101,23 @@ export get_start_fuel_mmbtu_per_mw export get_start_region export get_storage_tech export get_technology_efficiency +export get_unit_size +export get_unit_size_energy +export get_unit_size_power export get_up_time export get_var_cost_per_mwh export get_voll export get_voltage -export get_wacc -export get_zone export set_angle_limit! export set_available! export set_balancing_topology! export set_base_power! +export set_base_year! export set_capital_cost! export set_capital_costs! export set_capital_costs_energy! export set_capital_costs_power! -export set_capital_recovery_factor! +export set_capital_recovery_period! export set_cluster! export set_co2! export set_co_2_max_mtons! @@ -134,10 +142,12 @@ export set_existing_capacity! export set_existing_line_capacity! export set_ext! export set_fuel! -export set_gen_ID! export set_heat_rate_mmbtu_per_mwh! export set_id! export set_initial_capacity! +export set_initial_state_of_charge! +export set_interest_rate! +export set_lifetime! export set_line_loss! export set_losses! export set_max_cap_energy! @@ -169,6 +179,7 @@ export set_ramp_dn_percentage! export set_ramp_up_percentage! export set_reg_cost! export set_reg_max! +export set_region! export set_resistance! export set_retirement_potential! export set_retrofit_fraction! @@ -182,9 +193,10 @@ export set_start_fuel_mmbtu_per_mw! export set_start_region! export set_storage_tech! export set_technology_efficiency! +export set_unit_size! +export set_unit_size_energy! +export set_unit_size_power! export set_up_time! export set_var_cost_per_mwh! export set_voll! export set_voltage! -export set_wacc! -export set_zone! diff --git a/src/portfolio.jl b/src/portfolio.jl index 42e930c..b205e7b 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -21,6 +21,8 @@ end mutable struct Portfolio <: IS.InfrastructureSystemsType aggregation::Type{<:Union{PSY.ACBus, PSY.AggregationTopology}} discount_rate::Float64 + inflation_rate::Float64 + base_year::Int data::IS.SystemData # Inputs to the model investment_schedule::Dict # Investment decisions container i.e., model outputs. Container TBD #units_settings::IS.SystemUnitsSettings @@ -32,6 +34,8 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType function Portfolio( aggregation, discount_rate::Float64, + inflation_rate::Float64, + base_year::Int, data, investment_schedule::Dict, #units_settings::IS.SystemUnitsSettings, @@ -56,6 +60,8 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType return new( aggregation, discount_rate, + inflation_rate, + base_year, data, investment_schedule, #units_settings, @@ -79,11 +85,13 @@ end """ Construct an empty `Portfolio`. Useful for building a Portfolio from scratch. """ -function Portfolio(discount_rate; kwargs...) +function Portfolio(discount_rate, inflation_rate, base_year; kwargs...) data = PSY._create_system_data_from_kwargs(; kwargs...) return Portfolio( DEFAULT_AGGREGATION, discount_rate, + inflation_rate, + base_year, data, Dict(), IS.InfrastructureSystemsInternal(), @@ -93,11 +101,13 @@ end """ Construct an empty `Portfolio` specifying aggregation. Useful for building a Portfolio from scratch. """ -function Portfolio(aggregation, discount_rate; kwargs...) +function Portfolio(aggregation, discount_rate, inflation_rate, base_year; kwargs...) data = _create_system_data_from_kwargs(; kwargs...) return Portfolio( aggregation, discount_rate, + inflation_rate, + base_year, data, Dict(), IS.InfrastructureSystemsInternal(), @@ -124,6 +134,16 @@ Get the name of the portfolio. """ get_name(val::Portfolio) = val.metadata.name +""" +Set the base year of the portfolio. +""" +set_base_year!(val::Portfolio, year::Int) = val.base_year = year + +""" +Get the base year of the portfolio. +""" +get_base_year(val::Portfolio) = val.base_year + """ Set the description of the portfolio. """ @@ -191,6 +211,10 @@ function add_region!( return end +function get_regions(::Type{T}, portfolio::Portfolio;) where {T <: Region} + return IS.get_components(T, portfolio.data) +end + """ Add many technologies to the portfolio at once.