From 7f24d95dc802931885353a54fc39e185a50ac9f4 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 25 Sep 2024 11:32:12 -0600 Subject: [PATCH 01/17] add fields for initial state of charge and discrete investment decisons --- src/models/generated/DemandRequirement.jl | 6 +-- src/models/generated/StorageTechnology.jl | 50 +++++++++++++++++------ src/models/generated/SupplyTechnology.jl | 12 +++++- src/models/generated/includes.jl | 8 ++++ 4 files changed, 58 insertions(+), 18 deletions(-) diff --git a/src/models/generated/DemandRequirement.jl b/src/models/generated/DemandRequirement.jl index 7b52fcf..ec7f6d0 100644 --- a/src/models/generated/DemandRequirement.jl +++ b/src/models/generated/DemandRequirement.jl @@ -7,7 +7,7 @@ This file is auto-generated. Do not edit. """ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology name::String - zone::Int64 + zone::Union{Nothing, Zone} power_systems_type::String internal::InfrastructureSystemsInternal ext::Dict @@ -19,7 +19,7 @@ This file is auto-generated. Do not edit. # Arguments - `name::String`: The technology name -- `zone::Int64`: Zone Number +- `zone::Union{Nothing, Zone}`: 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 @@ -30,7 +30,7 @@ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology "The technology name" name::String "Zone Number" - zone::Int64 + zone::Union{Nothing, Zone} "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Internal field" diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 4ba669b..8c9c9bc 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -8,7 +8,7 @@ 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 + zone::Union{Nothing, Zone} prime_mover_type::PrimeMovers existing_cap_energy::Float64 rsv_cost::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,8 +31,10 @@ This file is auto-generated. Do not edit. om_costs_power::PSY.OperationalCost balancing_topology::String min_cap_energy::Float64 - ext::Dict + initial_state_of_charge::Float64 eff_up::Float64 + unit_size_energy::Float64 + ext::Dict reg_cost::Float64 min_duration::Float64 max_cap_energy::Float64 @@ -43,7 +46,7 @@ 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 +- `zone::Union{Nothing, Zone}`: 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) - `rsv_cost::Float64`: (default: `0.0`) Cost of providing upwards spinning or contingency reserves @@ -53,6 +56,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,8 +69,10 @@ 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 +- `initial_state_of_charge::Float64`: (default: `0.0`) State of charge for storage technology in the first timepoint (MWh). - `eff_up::Float64`: (default: `1.0`) Efficiency of charging storage +- `unit_size_energy::Float64`: (default: `0.0`) Used for discrete investment decisions. Size of each unit being built (MW) +- `ext::Dict`: (default: `Dict()`) Option for providing additional 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 @@ -78,7 +84,7 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology "Fixed and variable O&M costs for a technology" om_costs_energy::PSY.OperationalCost "Zone number" - zone::Int64 + zone::Union{Nothing, Zone} "Prime mover for generator" prime_mover_type::PrimeMovers "Pre-existing energy capacity for a technology (MWh)" @@ -97,6 +103,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 +129,14 @@ 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 + "State of charge for storage technology in the first timepoint (MWh)." + initial_state_of_charge::Float64 "Efficiency of charging storage" eff_up::Float64 + "Used for discrete investment decisions. Size of each unit being built (MW)" + unit_size_energy::Float64 + "Option for providing additional data" + ext::Dict "Cost of providing regulation reserves " reg_cost::Float64 "Minimum required durection for a storage technology" @@ -136,8 +148,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology 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(), 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, 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, initial_state_of_charge=0.0, eff_up=1.0, unit_size_energy=0.0, ext=Dict(), 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, 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, initial_state_of_charge, eff_up, unit_size_energy, ext, reg_cost, min_duration, max_cap_energy, reg_max, ) end """Get [`StorageTechnology`](@ref) `base_power`.""" @@ -164,6 +176,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 +202,14 @@ 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) `initial_state_of_charge`.""" +get_initial_state_of_charge(value::StorageTechnology) = value.initial_state_of_charge """Get [`StorageTechnology`](@ref) `eff_up`.""" get_eff_up(value::StorageTechnology) = value.eff_up +"""Get [`StorageTechnology`](@ref) `unit_size_energy`.""" +get_unit_size_energy(value::StorageTechnology) = value.unit_size_energy +"""Get [`StorageTechnology`](@ref) `ext`.""" +get_ext(value::StorageTechnology) = value.ext """Get [`StorageTechnology`](@ref) `reg_cost`.""" get_reg_cost(value::StorageTechnology) = value.reg_cost """Get [`StorageTechnology`](@ref) `min_duration`.""" @@ -225,6 +243,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 +269,14 @@ 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) `initial_state_of_charge`.""" +set_initial_state_of_charge!(value::StorageTechnology, val) = value.initial_state_of_charge = val """Set [`StorageTechnology`](@ref) `eff_up`.""" set_eff_up!(value::StorageTechnology, val) = value.eff_up = val +"""Set [`StorageTechnology`](@ref) `unit_size_energy`.""" +set_unit_size_energy!(value::StorageTechnology, val) = value.unit_size_energy = val +"""Set [`StorageTechnology`](@ref) `ext`.""" +set_ext!(value::StorageTechnology, val) = value.ext = val """Set [`StorageTechnology`](@ref) `reg_cost`.""" set_reg_cost!(value::StorageTechnology, val) = value.reg_cost = val """Set [`StorageTechnology`](@ref) `min_duration`.""" diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index 4330078..4e2c093 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -36,6 +36,7 @@ This file is auto-generated. Do not edit. maximum_capacity::Float64 cluster::Int64 ramp_up_percentage::Float64 + unit_size::Float64 reg_cost::Float64 min_generation_percentage::Float64 start_cost_per_mw::Float64 @@ -76,6 +77,7 @@ This file is auto-generated. Do not edit. - `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 +- `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). @@ -143,6 +145,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology cluster::Int64 "Maximum increase in output between operation periods. Fraction of total capacity" ramp_up_percentage::Float64 + "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" @@ -156,8 +160,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology 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, 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, unit_size=0.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, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, up_time, ) end """Get [`SupplyTechnology`](@ref) `base_power`.""" @@ -220,6 +224,8 @@ get_maximum_capacity(value::SupplyTechnology) = value.maximum_capacity 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) `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`.""" @@ -291,6 +297,8 @@ set_maximum_capacity!(value::SupplyTechnology, val) = value.maximum_capacity = v 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) `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`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index 820bec6..d4637c1 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -51,6 +51,7 @@ 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_line_loss export get_losses export get_max_cap_energy @@ -95,6 +96,9 @@ 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 @@ -138,6 +142,7 @@ 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_line_loss! export set_losses! export set_max_cap_energy! @@ -182,6 +187,9 @@ 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! From f4912de1ace67094d368a2512e77165e86b0aa31 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 16 Oct 2024 10:46:33 -0600 Subject: [PATCH 02/17] add three separate structs for TransportTechnology --- src/generate_structs.jl | 2 +- src/models/generated/ACTransportTechnology.jl | 159 ++++++++++++++++++ src/models/generated/DemandRequirement.jl | 6 +- .../generated/ExistingTransportTechnology.jl | 159 ++++++++++++++++++ .../generated/HVDCTransportTechnology.jl | 159 ++++++++++++++++++ src/models/generated/StorageTechnology.jl | 6 +- src/models/generated/SupplyTechnology.jl | 6 +- src/models/generated/TransportTechnology.jl | 159 ------------------ src/models/generated/includes.jl | 4 +- 9 files changed, 490 insertions(+), 170 deletions(-) create mode 100644 src/models/generated/ACTransportTechnology.jl create mode 100644 src/models/generated/ExistingTransportTechnology.jl create mode 100644 src/models/generated/HVDCTransportTechnology.jl delete mode 100644 src/models/generated/TransportTechnology.jl 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..84af753 --- /dev/null +++ b/src/models/generated/ACTransportTechnology.jl @@ -0,0 +1,159 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct ACTransportTechnology{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 ACTransportTechnology{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 ACTransportTechnology{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 + ACTransportTechnology{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 [`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) `capital_recovery_factor`.""" +get_capital_recovery_factor(value::ACTransportTechnology) = value.capital_recovery_factor +"""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) `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) `existing_line_capacity`.""" +get_existing_line_capacity(value::ACTransportTechnology) = value.existing_line_capacity +"""Get [`ACTransportTechnology`](@ref) `wacc`.""" +get_wacc(value::ACTransportTechnology) = value.wacc +"""Get [`ACTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::ACTransportTechnology) = value.line_loss + +"""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) `capital_recovery_factor`.""" +set_capital_recovery_factor!(value::ACTransportTechnology, val) = value.capital_recovery_factor = 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) `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) `existing_line_capacity`.""" +set_existing_line_capacity!(value::ACTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`ACTransportTechnology`](@ref) `wacc`.""" +set_wacc!(value::ACTransportTechnology, val) = value.wacc = val +"""Set [`ACTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::ACTransportTechnology, val) = value.line_loss = val diff --git a/src/models/generated/DemandRequirement.jl b/src/models/generated/DemandRequirement.jl index ec7f6d0..a2022e9 100644 --- a/src/models/generated/DemandRequirement.jl +++ b/src/models/generated/DemandRequirement.jl @@ -7,7 +7,7 @@ This file is auto-generated. Do not edit. """ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology name::String - zone::Union{Nothing, Zone} + zone::Union{Nothing, Int64, Zone} power_systems_type::String internal::InfrastructureSystemsInternal ext::Dict @@ -19,7 +19,7 @@ This file is auto-generated. Do not edit. # Arguments - `name::String`: The technology name -- `zone::Union{Nothing, Zone}`: Zone Number +- `zone::Union{Nothing, Int64, Zone}`: 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 @@ -30,7 +30,7 @@ mutable struct DemandRequirement{T <: PSY.StaticInjection} <: Technology "The technology name" name::String "Zone Number" - zone::Union{Nothing, Zone} + zone::Union{Nothing, Int64, Zone} "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Internal field" diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl new file mode 100644 index 0000000..3eaae42 --- /dev/null +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -0,0 +1,159 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct ExistingTransportTechnology{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 ExistingTransportTechnology{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 ExistingTransportTechnology{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 + ExistingTransportTechnology{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 [`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) `capital_recovery_factor`.""" +get_capital_recovery_factor(value::ExistingTransportTechnology) = value.capital_recovery_factor +"""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) `existing_line_capacity`.""" +get_existing_line_capacity(value::ExistingTransportTechnology) = value.existing_line_capacity +"""Get [`ExistingTransportTechnology`](@ref) `wacc`.""" +get_wacc(value::ExistingTransportTechnology) = value.wacc +"""Get [`ExistingTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::ExistingTransportTechnology) = value.line_loss + +"""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) `capital_recovery_factor`.""" +set_capital_recovery_factor!(value::ExistingTransportTechnology, val) = value.capital_recovery_factor = 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) `existing_line_capacity`.""" +set_existing_line_capacity!(value::ExistingTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`ExistingTransportTechnology`](@ref) `wacc`.""" +set_wacc!(value::ExistingTransportTechnology, val) = value.wacc = val +"""Set [`ExistingTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::ExistingTransportTechnology, val) = value.line_loss = val diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl new file mode 100644 index 0000000..014769e --- /dev/null +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -0,0 +1,159 @@ +#= +This file is auto-generated. Do not edit. +=# + +#! format: off + +""" + mutable struct HVDCTransportTechnology{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 HVDCTransportTechnology{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 HVDCTransportTechnology{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 + HVDCTransportTechnology{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 [`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) `capital_recovery_factor`.""" +get_capital_recovery_factor(value::HVDCTransportTechnology) = value.capital_recovery_factor +"""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) `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) `existing_line_capacity`.""" +get_existing_line_capacity(value::HVDCTransportTechnology) = value.existing_line_capacity +"""Get [`HVDCTransportTechnology`](@ref) `wacc`.""" +get_wacc(value::HVDCTransportTechnology) = value.wacc +"""Get [`HVDCTransportTechnology`](@ref) `line_loss`.""" +get_line_loss(value::HVDCTransportTechnology) = value.line_loss + +"""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) `capital_recovery_factor`.""" +set_capital_recovery_factor!(value::HVDCTransportTechnology, val) = value.capital_recovery_factor = 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) `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) `existing_line_capacity`.""" +set_existing_line_capacity!(value::HVDCTransportTechnology, val) = value.existing_line_capacity = val +"""Set [`HVDCTransportTechnology`](@ref) `wacc`.""" +set_wacc!(value::HVDCTransportTechnology, val) = value.wacc = val +"""Set [`HVDCTransportTechnology`](@ref) `line_loss`.""" +set_line_loss!(value::HVDCTransportTechnology, val) = value.line_loss = val diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 8c9c9bc..821217e 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -8,7 +8,7 @@ This file is auto-generated. Do not edit. mutable struct StorageTechnology{T <: PSY.Storage} <: Technology base_power::Float64 om_costs_energy::PSY.OperationalCost - zone::Union{Nothing, Zone} + zone::Union{Nothing, Int64, Zone} prime_mover_type::PrimeMovers existing_cap_energy::Float64 rsv_cost::Float64 @@ -46,7 +46,7 @@ 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::Union{Nothing, Zone}`: Zone number +- `zone::Union{Nothing, Int64, Zone}`: 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) - `rsv_cost::Float64`: (default: `0.0`) Cost of providing upwards spinning or contingency reserves @@ -84,7 +84,7 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology "Fixed and variable O&M costs for a technology" om_costs_energy::PSY.OperationalCost "Zone number" - zone::Union{Nothing, Zone} + zone::Union{Nothing, Int64, Zone} "Prime mover for generator" prime_mover_type::PrimeMovers "Pre-existing energy capacity for a technology (MWh)" diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index 4e2c093..d0f5b8c 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -8,7 +8,7 @@ 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} + zone::Union{Nothing, Int64, Zone} prime_mover_type::PrimeMovers minimum_required_capacity::Float64 cofire_level_min::Union{Nothing, Dict{ThermalFuels, Float64}} @@ -49,7 +49,7 @@ 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 +- `zone::Union{Nothing, Int64, Zone}`: (default: `nothing`) Zone where tech operates in - `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 @@ -90,7 +90,7 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology "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} + zone::Union{Nothing, Int64, Zone} "Prime mover for generator" prime_mover_type::PrimeMovers "Minimum required capacity for a technology" 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 d4637c1..48b4d72 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") From 71951f47bc9129033246fffa9b9714bc96d666e9 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 16 Oct 2024 12:13:39 -0600 Subject: [PATCH 03/17] replace zone type with region --- src/models/generated/ACTransportTechnology.jl | 12 ++--- src/models/generated/CarbonCaps.jl | 10 ++-- src/models/generated/DemandRequirement.jl | 20 +++---- .../generated/ExistingTransportTechnology.jl | 12 ++--- .../generated/HVDCTransportTechnology.jl | 12 ++--- src/models/generated/StorageTechnology.jl | 52 +++++++++---------- src/models/generated/SupplyTechnology.jl | 36 ++++++------- src/models/generated/includes.jl | 4 +- 8 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index 84af753..21472d5 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -7,11 +7,11 @@ This file is auto-generated. Do not edit. """ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology capital_cost::PSY.ValueCurve - start_region::Int64 + start_region::Region available::Bool name::String capital_recovery_factor::Int64 - end_region::Int64 + end_region::Region power_systems_type::String angle_limit::Float64 internal::InfrastructureSystemsInternal @@ -29,11 +29,11 @@ This file is auto-generated. Do not edit. # Arguments - `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. -- `start_region::Int64`: Start region for transport technology +- `start_region::Region`: 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 +- `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 @@ -50,7 +50,7 @@ mutable struct ACTransportTechnology{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 + start_region::Region "identifies whether the technology is available" available::Bool "Name" @@ -58,7 +58,7 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology "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 + end_region::Region "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Votlage angle limit (radians)" 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 a2022e9..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::Union{Nothing, Int64, Zone} 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::Union{Nothing, Int64, Zone}`: 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::Union{Nothing, Int64, Zone} "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 index 3eaae42..9a32cb7 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -7,11 +7,11 @@ This file is auto-generated. Do not edit. """ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology capital_cost::PSY.ValueCurve - start_region::Int64 + start_region::Region available::Bool name::String capital_recovery_factor::Int64 - end_region::Int64 + end_region::Region power_systems_type::String angle_limit::Float64 internal::InfrastructureSystemsInternal @@ -29,11 +29,11 @@ This file is auto-generated. Do not edit. # Arguments - `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. -- `start_region::Int64`: Start region for transport technology +- `start_region::Region`: 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 +- `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 @@ -50,7 +50,7 @@ mutable struct ExistingTransportTechnology{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 + start_region::Region "identifies whether the technology is available" available::Bool "Name" @@ -58,7 +58,7 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology "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 + end_region::Region "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Votlage angle limit (radians)" diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl index 014769e..8972d23 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -7,11 +7,11 @@ This file is auto-generated. Do not edit. """ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology capital_cost::PSY.ValueCurve - start_region::Int64 + start_region::Region available::Bool name::String capital_recovery_factor::Int64 - end_region::Int64 + end_region::Region power_systems_type::String angle_limit::Float64 internal::InfrastructureSystemsInternal @@ -29,11 +29,11 @@ This file is auto-generated. Do not edit. # Arguments - `capital_cost::PSY.ValueCurve`: Cost of adding new capacity to the inter-regional transmission line. -- `start_region::Int64`: Start region for transport technology +- `start_region::Region`: 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 +- `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 @@ -50,7 +50,7 @@ mutable struct HVDCTransportTechnology{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 + start_region::Region "identifies whether the technology is available" available::Bool "Name" @@ -58,7 +58,7 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology "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 + end_region::Region "maps to a valid PowerSystems.jl for PCM modeling" power_systems_type::String "Votlage angle limit (radians)" diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 821217e..9cf5a1f 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -8,9 +8,8 @@ This file is auto-generated. Do not edit. mutable struct StorageTechnology{T <: PSY.Storage} <: Technology base_power::Float64 om_costs_energy::PSY.OperationalCost - zone::Union{Nothing, Int64, Zone} - prime_mover_type::PrimeMovers existing_cap_energy::Float64 + prime_mover_type::PrimeMovers rsv_cost::Float64 available::Bool existing_cap_power::Float64 @@ -31,9 +30,10 @@ This file is auto-generated. Do not edit. om_costs_power::PSY.OperationalCost balancing_topology::String min_cap_energy::Float64 + region::Union{Nothing, Region} initial_state_of_charge::Float64 - eff_up::Float64 unit_size_energy::Float64 + eff_up::Float64 ext::Dict reg_cost::Float64 min_duration::Float64 @@ -46,9 +46,8 @@ 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::Union{Nothing, Int64, Zone}`: 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 - `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) @@ -69,9 +68,10 @@ 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 +- `region::Union{Nothing, Region}`: Region - `initial_state_of_charge::Float64`: (default: `0.0`) State of charge for storage technology in the first timepoint (MWh). -- `eff_up::Float64`: (default: `1.0`) Efficiency of charging storage - `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 - `ext::Dict`: (default: `Dict()`) Option for providing additional 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 @@ -83,12 +83,10 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology base_power::Float64 "Fixed and variable O&M costs for a technology" om_costs_energy::PSY.OperationalCost - "Zone number" - zone::Union{Nothing, Int64, Zone} - "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 "Cost of providing upwards spinning or contingency reserves" rsv_cost::Float64 "identifies whether the technology is available" @@ -129,12 +127,14 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology balancing_topology::String "Minimum required energy capacity for a storage technology" min_cap_energy::Float64 + "Region" + region::Union{Nothing, Region} "State of charge for storage technology in the first timepoint (MWh)." initial_state_of_charge::Float64 - "Efficiency of charging storage" - eff_up::Float64 "Used for discrete investment decisions. Size of each unit being built (MW)" unit_size_energy::Float64 + "Efficiency of charging storage" + eff_up::Float64 "Option for providing additional data" ext::Dict "Cost of providing regulation reserves " @@ -148,20 +148,18 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology 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, 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, initial_state_of_charge=0.0, eff_up=1.0, unit_size_energy=0.0, ext=Dict(), 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, 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, initial_state_of_charge, eff_up, unit_size_energy, ext, 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, 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, initial_state_of_charge=0.0, unit_size_energy=0.0, eff_up=1.0, ext=Dict(), 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, existing_cap_energy, prime_mover_type, 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, ext, reg_cost, min_duration, max_cap_energy, reg_max, ) 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) `rsv_cost`.""" get_rsv_cost(value::StorageTechnology) = value.rsv_cost """Get [`StorageTechnology`](@ref) `available`.""" @@ -202,12 +200,14 @@ 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) `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) `eff_up`.""" -get_eff_up(value::StorageTechnology) = value.eff_up """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) `ext`.""" get_ext(value::StorageTechnology) = value.ext """Get [`StorageTechnology`](@ref) `reg_cost`.""" @@ -223,12 +223,10 @@ get_reg_max(value::StorageTechnology) = value.reg_max 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) `rsv_cost`.""" set_rsv_cost!(value::StorageTechnology, val) = value.rsv_cost = val """Set [`StorageTechnology`](@ref) `available`.""" @@ -269,12 +267,14 @@ 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) `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) `eff_up`.""" -set_eff_up!(value::StorageTechnology, val) = value.eff_up = 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) `ext`.""" set_ext!(value::StorageTechnology, val) = value.ext = val """Set [`StorageTechnology`](@ref) `reg_cost`.""" diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index d0f5b8c..b28416e 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -8,12 +8,11 @@ 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, Int64, 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 rsv_cost::Float64 cofire_start_max::Union{Nothing, Dict{ThermalFuels, Float64}} gen_ID::Int64 @@ -33,6 +32,7 @@ This file is auto-generated. Do not edit. internal::InfrastructureSystemsInternal ext::Dict balancing_topology::String + region::Union{Nothing, Region} maximum_capacity::Float64 cluster::Int64 ramp_up_percentage::Float64 @@ -49,12 +49,11 @@ 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, Int64, 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 - `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 @@ -74,6 +73,7 @@ This file is auto-generated. Do not edit. - `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field - `ext::Dict`: (default: `Dict()`) Option for providing additional data - `balancing_topology::String`: Set of balancing nodes +- `region::Union{Nothing, 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 @@ -89,8 +89,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, Int64, 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" @@ -99,8 +99,6 @@ 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 "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" @@ -139,6 +137,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology ext::Dict "Set of balancing nodes" balancing_topology::String + "Zone where tech operates in" + region::Union{Nothing, 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." @@ -160,16 +160,16 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology 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, unit_size=0.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, unit_size, 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), 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, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, outage_factor, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, 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, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, 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`.""" @@ -178,8 +178,6 @@ 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) `rsv_cost`.""" get_rsv_cost(value::SupplyTechnology) = value.rsv_cost """Get [`SupplyTechnology`](@ref) `cofire_start_max`.""" @@ -218,6 +216,8 @@ get_internal(value::SupplyTechnology) = value.internal get_ext(value::SupplyTechnology) = value.ext """Get [`SupplyTechnology`](@ref) `balancing_topology`.""" get_balancing_topology(value::SupplyTechnology) = value.balancing_topology +"""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`.""" @@ -241,8 +241,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`.""" @@ -251,8 +251,6 @@ 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) `rsv_cost`.""" set_rsv_cost!(value::SupplyTechnology, val) = value.rsv_cost = val """Set [`SupplyTechnology`](@ref) `cofire_start_max`.""" @@ -291,6 +289,8 @@ set_internal!(value::SupplyTechnology, val) = value.internal = val set_ext!(value::SupplyTechnology, val) = value.ext = val """Set [`SupplyTechnology`](@ref) `balancing_topology`.""" set_balancing_topology!(value::SupplyTechnology, val) = value.balancing_topology = 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`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index 48b4d72..dd784fb 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -85,6 +85,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 @@ -106,7 +107,6 @@ 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! @@ -176,6 +176,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! @@ -197,4 +198,3 @@ export set_var_cost_per_mwh! export set_voll! export set_voltage! export set_wacc! -export set_zone! From 0f08f38b6fd968930451fa01165ceadecfb3f05d Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 16 Oct 2024 19:08:50 -0600 Subject: [PATCH 04/17] add default to region --- src/models/generated/StorageTechnology.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 9cf5a1f..9879c90 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -68,7 +68,7 @@ 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 -- `region::Union{Nothing, Region}`: Region +- `region::Union{Nothing, 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 @@ -148,7 +148,7 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology end -function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), existing_cap_energy=0.0, prime_mover_type=PrimeMovers.OT, 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, initial_state_of_charge=0.0, unit_size_energy=0.0, eff_up=1.0, ext=Dict(), reg_cost=0.0, min_duration=0.0, max_cap_energy=1e8, reg_max=0.0, ) where T <: PSY.Storage +function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), existing_cap_energy=0.0, prime_mover_type=PrimeMovers.OT, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, 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, ext, reg_cost, min_duration, max_cap_energy, reg_max, ) end From 39c545cfd58a26aa6ae581c3e3c5cfdc02f3cd2a Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Thu, 17 Oct 2024 12:24:10 -0600 Subject: [PATCH 05/17] add get_regions --- src/PowerSystemsInvestmentsPortfolios.jl | 1 + src/portfolio.jl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/PowerSystemsInvestmentsPortfolios.jl b/src/PowerSystemsInvestmentsPortfolios.jl index f718841..fbff4e8 100644 --- a/src/PowerSystemsInvestmentsPortfolios.jl +++ b/src/PowerSystemsInvestmentsPortfolios.jl @@ -59,6 +59,7 @@ export MinimumCapacityRequirements export Region export Zone +export get_regions export get_technologies export get_technology export get_requirements diff --git a/src/portfolio.jl b/src/portfolio.jl index 42e930c..bed49c8 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -191,6 +191,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. From 430feb79126c6fc37590a5ec6f19b2abdc9f09d4 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Sat, 19 Oct 2024 12:21:42 -0600 Subject: [PATCH 06/17] add TransportTechnologies to exports --- src/PowerSystemsInvestmentsPortfolios.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PowerSystemsInvestmentsPortfolios.jl b/src/PowerSystemsInvestmentsPortfolios.jl index fbff4e8..7f3c1d1 100644 --- a/src/PowerSystemsInvestmentsPortfolios.jl +++ b/src/PowerSystemsInvestmentsPortfolios.jl @@ -44,7 +44,9 @@ export Portfolio export Technology export Requirements export SupplyTechnology -export TransportTechnology +export ACTransportTechnology +export HVDCTransportTechnology +export ExistingTransportTechnology export StorageTechnology export DemandRequirement export DemandsideTechnology From acdc4f77f06db3b70c84ddc31bb7de5add160335 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Sat, 19 Oct 2024 12:48:28 -0600 Subject: [PATCH 07/17] base_power --- src/models/generated/ACTransportTechnology.jl | 12 ++++++++++-- src/models/generated/ExistingTransportTechnology.jl | 12 ++++++++++-- src/models/generated/HVDCTransportTechnology.jl | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index 21472d5..276f3f0 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -6,6 +6,7 @@ This file is auto-generated. Do not edit. """ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 capital_cost::PSY.ValueCurve start_region::Region available::Bool @@ -28,6 +29,7 @@ This file is auto-generated. Do not edit. # 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 @@ -47,6 +49,8 @@ This file is auto-generated. Do not edit. - `line_loss::Float64`: Transmission loss for each transport technology (%) """ 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" @@ -84,10 +88,12 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology end -function ACTransportTechnology{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 - ACTransportTechnology{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, ) +function ACTransportTechnology{T}(; base_power, 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 + ACTransportTechnology{T}(base_power, 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 [`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`.""" @@ -123,6 +129,8 @@ get_wacc(value::ACTransportTechnology) = value.wacc """Get [`ACTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::ACTransportTechnology) = value.line_loss +"""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`.""" diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl index 9a32cb7..1582f9b 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -6,6 +6,7 @@ This file is auto-generated. Do not edit. """ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 capital_cost::PSY.ValueCurve start_region::Region available::Bool @@ -28,6 +29,7 @@ This file is auto-generated. Do not edit. # 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 @@ -47,6 +49,8 @@ This file is auto-generated. Do not edit. - `line_loss::Float64`: Transmission loss for each transport technology (%) """ 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" @@ -84,10 +88,12 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology end -function ExistingTransportTechnology{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 - ExistingTransportTechnology{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, ) +function ExistingTransportTechnology{T}(; base_power, 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 + ExistingTransportTechnology{T}(base_power, 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 [`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`.""" @@ -123,6 +129,8 @@ get_wacc(value::ExistingTransportTechnology) = value.wacc """Get [`ExistingTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::ExistingTransportTechnology) = value.line_loss +"""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`.""" diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl index 8972d23..a994d5d 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -6,6 +6,7 @@ This file is auto-generated. Do not edit. """ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology + base_power::Float64 capital_cost::PSY.ValueCurve start_region::Region available::Bool @@ -28,6 +29,7 @@ This file is auto-generated. Do not edit. # 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 @@ -47,6 +49,8 @@ This file is auto-generated. Do not edit. - `line_loss::Float64`: Transmission loss for each transport technology (%) """ 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" @@ -84,10 +88,12 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology end -function HVDCTransportTechnology{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 - HVDCTransportTechnology{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, ) +function HVDCTransportTechnology{T}(; base_power, 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 + HVDCTransportTechnology{T}(base_power, 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 [`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`.""" @@ -123,6 +129,8 @@ get_wacc(value::HVDCTransportTechnology) = value.wacc """Get [`HVDCTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::HVDCTransportTechnology) = value.line_loss +"""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`.""" From 62af45b0aafbf31d5b6b5a48498d8ada9a662594 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Mon, 28 Oct 2024 13:28:23 -0600 Subject: [PATCH 08/17] change gen_id to id --- src/models/generated/SupplyTechnology.jl | 36 ++++++++++++------------ src/models/generated/includes.jl | 2 -- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index b28416e..081d42c 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -15,12 +15,12 @@ This file is auto-generated. Do not edit. capital_costs::PSY.ValueCurve 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 @@ -56,12 +56,12 @@ This file is auto-generated. Do not edit. - `capital_costs::PSY.ValueCurve`: (default: `LinearCurve(0.0)`) Capital costs for investing in a technology. - `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) @@ -103,18 +103,18 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology 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" @@ -160,8 +160,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology end -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), 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, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, outage_factor, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, 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, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, 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), 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(), ext=Dict(), balancing_topology, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, outage_factor, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, 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, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, up_time, ) end """Get [`SupplyTechnology`](@ref) `base_power`.""" @@ -182,18 +182,18 @@ get_capital_costs(value::SupplyTechnology) = value.capital_costs 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`.""" @@ -255,18 +255,18 @@ set_capital_costs!(value::SupplyTechnology, val) = value.capital_costs = val 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`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index dd784fb..738c4c7 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -49,7 +49,6 @@ 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 @@ -140,7 +139,6 @@ 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! From fb8c47ca10f2e1b945f42aac94d0f7307e076c20 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Mon, 28 Oct 2024 13:31:55 -0600 Subject: [PATCH 09/17] update exports --- src/PowerSystemsInvestmentsPortfolios.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PowerSystemsInvestmentsPortfolios.jl b/src/PowerSystemsInvestmentsPortfolios.jl index 7f3c1d1..e263d46 100644 --- a/src/PowerSystemsInvestmentsPortfolios.jl +++ b/src/PowerSystemsInvestmentsPortfolios.jl @@ -53,14 +53,17 @@ 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 From 8d0cf7f4d1c24c183e38651a438d49dec5f7a63d Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Tue, 19 Nov 2024 11:17:12 -0700 Subject: [PATCH 10/17] add cluster to storage --- src/models/generated/StorageTechnology.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 9879c90..8643714 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -34,6 +34,7 @@ This file is auto-generated. Do not edit. initial_state_of_charge::Float64 unit_size_energy::Float64 eff_up::Float64 + cluster::Int64 ext::Dict reg_cost::Float64 min_duration::Float64 @@ -72,6 +73,7 @@ This file is auto-generated. Do not edit. - `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. - `ext::Dict`: (default: `Dict()`) Option for providing additional 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 @@ -135,6 +137,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology 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 "Option for providing additional data" ext::Dict "Cost of providing regulation reserves " @@ -148,8 +152,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology end -function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), existing_cap_energy=0.0, prime_mover_type=PrimeMovers.OT, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, 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, ext, 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, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, 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, ext, reg_cost, min_duration, max_cap_energy, reg_max, ) end """Get [`StorageTechnology`](@ref) `base_power`.""" @@ -208,6 +212,8 @@ get_initial_state_of_charge(value::StorageTechnology) = value.initial_state_of_c 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) `ext`.""" get_ext(value::StorageTechnology) = value.ext """Get [`StorageTechnology`](@ref) `reg_cost`.""" @@ -275,6 +281,8 @@ set_initial_state_of_charge!(value::StorageTechnology, val) = value.initial_stat 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) `ext`.""" set_ext!(value::StorageTechnology, val) = value.ext = val """Set [`StorageTechnology`](@ref) `reg_cost`.""" From 6bdd3e731095637c34a95edd18e0dc8328ddca46 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 20 Nov 2024 13:33:31 -0700 Subject: [PATCH 11/17] add crf and lifetime for supply and storage --- src/models/generated/ACTransportTechnology.jl | 4 +-- .../generated/ExistingTransportTechnology.jl | 4 +-- .../generated/HVDCTransportTechnology.jl | 4 +-- src/models/generated/StorageTechnology.jl | 26 +++++++++++++++---- src/models/generated/SupplyTechnology.jl | 26 +++++++++++++++---- src/models/generated/includes.jl | 2 ++ 6 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index 276f3f0..80ef3a1 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -34,7 +34,7 @@ This file is auto-generated. Do not edit. - `start_region::Region`: 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. +- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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) @@ -88,7 +88,7 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology end -function ACTransportTechnology{T}(; base_power, 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 +function ACTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 ACTransportTechnology{T}(base_power, 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 diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl index 1582f9b..af2f4da 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -34,7 +34,7 @@ This file is auto-generated. Do not edit. - `start_region::Region`: 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. +- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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) @@ -88,7 +88,7 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology end -function ExistingTransportTechnology{T}(; base_power, 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 +function ExistingTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 ExistingTransportTechnology{T}(base_power, 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 diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl index a994d5d..7d84f98 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -34,7 +34,7 @@ This file is auto-generated. Do not edit. - `start_region::Region`: 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. +- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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) @@ -88,7 +88,7 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology end -function HVDCTransportTechnology{T}(; base_power, 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 +function HVDCTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 HVDCTransportTechnology{T}(base_power, 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 diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 8643714..6e07c0d 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -10,6 +10,7 @@ This file is auto-generated. Do not edit. om_costs_energy::PSY.OperationalCost existing_cap_energy::Float64 prime_mover_type::PrimeMovers + lifetime::Int rsv_cost::Float64 available::Bool existing_cap_power::Float64 @@ -18,6 +19,7 @@ This file is auto-generated. Do not edit. capital_costs_power::PSY.ValueCurve max_duration::Float64 unit_size_power::Float64 + capital_recovery_factor::Int64 id::Int64 min_cap_power::Float64 capital_costs_energy::PSY.ValueCurve @@ -30,7 +32,7 @@ This file is auto-generated. Do not edit. om_costs_power::PSY.OperationalCost balancing_topology::String min_cap_energy::Float64 - region::Union{Nothing, Region} + region::Union{Nothing, Region, Vector{Region}} initial_state_of_charge::Float64 unit_size_energy::Float64 eff_up::Float64 @@ -49,6 +51,7 @@ This file is auto-generated. Do not edit. - `om_costs_energy::PSY.OperationalCost`: (default: `StorageCost()`) Fixed and variable O&M costs for a technology - `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) @@ -57,6 +60,7 @@ This file is auto-generated. Do not edit. - `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) +- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. - `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. @@ -69,7 +73,7 @@ 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 -- `region::Union{Nothing, Region}`: (default: `nothing`) Region +- `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 @@ -89,6 +93,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology 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" @@ -105,6 +111,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology max_duration::Float64 "Used for discrete investment decisions. Size of each unit being built (MW)" unit_size_power::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." + capital_recovery_factor::Int64 "ID for individual generator" id::Int64 "Minimum required power capacity for a storage technology" @@ -130,7 +138,7 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology "Minimum required energy capacity for a storage technology" min_cap_energy::Float64 "Region" - region::Union{Nothing, 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)" @@ -152,8 +160,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology end -function StorageTechnology{T}(; base_power, om_costs_energy=StorageCost(), existing_cap_energy=0.0, prime_mover_type=PrimeMovers.OT, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, 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, ext, 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, capital_recovery_factor=30, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, lifetime, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, unit_size_power, capital_recovery_factor, 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, ext, reg_cost, min_duration, max_cap_energy, reg_max, ) end """Get [`StorageTechnology`](@ref) `base_power`.""" @@ -164,6 +172,8 @@ get_om_costs_energy(value::StorageTechnology) = value.om_costs_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`.""" @@ -180,6 +190,8 @@ get_capital_costs_power(value::StorageTechnology) = value.capital_costs_power 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) `capital_recovery_factor`.""" +get_capital_recovery_factor(value::StorageTechnology) = value.capital_recovery_factor """Get [`StorageTechnology`](@ref) `id`.""" get_id(value::StorageTechnology) = value.id """Get [`StorageTechnology`](@ref) `min_cap_power`.""" @@ -233,6 +245,8 @@ set_om_costs_energy!(value::StorageTechnology, val) = value.om_costs_energy = va 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`.""" @@ -249,6 +263,8 @@ set_capital_costs_power!(value::StorageTechnology, val) = value.capital_costs_po 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) `capital_recovery_factor`.""" +set_capital_recovery_factor!(value::StorageTechnology, val) = value.capital_recovery_factor = val """Set [`StorageTechnology`](@ref) `id`.""" set_id!(value::StorageTechnology, val) = value.id = val """Set [`StorageTechnology`](@ref) `min_cap_power`.""" diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index 081d42c..caaf325 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -13,6 +13,7 @@ This file is auto-generated. Do not edit. minimum_required_capacity::Float64 cofire_level_min::Union{Nothing, Dict{ThermalFuels, Float64}} capital_costs::PSY.ValueCurve + lifetime::Int rsv_cost::Float64 cofire_start_max::Union{Nothing, Dict{ThermalFuels, Float64}} available::Bool @@ -20,6 +21,7 @@ This file is auto-generated. Do not edit. cofire_start_min::Union{Nothing, Dict{ThermalFuels, Float64}} name::String ramp_dn_percentage::Float64 + capital_recovery_factor::Int64 id::Int64 down_time::Float64 initial_capacity::Float64 @@ -32,7 +34,7 @@ This file is auto-generated. Do not edit. internal::InfrastructureSystemsInternal ext::Dict balancing_topology::String - region::Union{Nothing, Region} + region::Union{Nothing, Region, Vector{Region}} maximum_capacity::Float64 cluster::Int64 ramp_up_percentage::Float64 @@ -54,6 +56,7 @@ This file is auto-generated. Do not edit. - `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. +- `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 - `available::Bool`: (default: `True`) identifies whether the technology is available @@ -61,6 +64,7 @@ This file is auto-generated. Do not edit. - `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 +- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. - `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 @@ -73,7 +77,7 @@ This file is auto-generated. Do not edit. - `internal::InfrastructureSystemsInternal`: (default: `InfrastructureSystemsInternal()`) Internal field - `ext::Dict`: (default: `Dict()`) Option for providing additional data - `balancing_topology::String`: Set of balancing nodes -- `region::Union{Nothing, Region}`: (default: `nothing`) Zone where tech operates in +- `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 @@ -99,6 +103,8 @@ 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 + "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" @@ -113,6 +119,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology name::String "Maximum decrease in output between operation periods. Fraction of total capacity" ramp_dn_percentage::Float64 + "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." + capital_recovery_factor::Int64 "ID for individual generator" id::Int64 "Minimum amount of time a resource has to remain in the shutdown state." @@ -138,7 +146,7 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology "Set of balancing nodes" balancing_topology::String "Zone where tech operates in" - region::Union{Nothing, Region} + 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." @@ -160,8 +168,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology end -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), 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(), ext=Dict(), balancing_topology, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, outage_factor, prime_mover_type, minimum_required_capacity, cofire_level_min, capital_costs, 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, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, 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, capital_recovery_factor=30, 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(), ext=Dict(), balancing_topology, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, 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, capital_recovery_factor, id, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, up_time, ) end """Get [`SupplyTechnology`](@ref) `base_power`.""" @@ -178,6 +186,8 @@ 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) `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`.""" @@ -192,6 +202,8 @@ get_cofire_start_min(value::SupplyTechnology) = value.cofire_start_min 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) `capital_recovery_factor`.""" +get_capital_recovery_factor(value::SupplyTechnology) = value.capital_recovery_factor """Get [`SupplyTechnology`](@ref) `id`.""" get_id(value::SupplyTechnology) = value.id """Get [`SupplyTechnology`](@ref) `down_time`.""" @@ -251,6 +263,8 @@ 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) `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`.""" @@ -265,6 +279,8 @@ set_cofire_start_min!(value::SupplyTechnology, val) = value.cofire_start_min = v 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) `capital_recovery_factor`.""" +set_capital_recovery_factor!(value::SupplyTechnology, val) = value.capital_recovery_factor = val """Set [`SupplyTechnology`](@ref) `id`.""" set_id!(value::SupplyTechnology, val) = value.id = val """Set [`SupplyTechnology`](@ref) `down_time`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index 738c4c7..d7a20fa 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -53,6 +53,7 @@ export get_heat_rate_mmbtu_per_mwh export get_id export get_initial_capacity export get_initial_state_of_charge +export get_lifetime export get_line_loss export get_losses export get_max_cap_energy @@ -143,6 +144,7 @@ export set_heat_rate_mmbtu_per_mwh! export set_id! export set_initial_capacity! export set_initial_state_of_charge! +export set_lifetime! export set_line_loss! export set_losses! export set_max_cap_energy! From 5eb0acd0fcf12eb7f208a141bc2c2142252bc91f Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 20 Nov 2024 15:10:15 -0700 Subject: [PATCH 12/17] add base_year --- src/models/generated/ACTransportTechnology.jl | 12 ++++++++++-- src/models/generated/ExistingTransportTechnology.jl | 12 ++++++++++-- src/models/generated/HVDCTransportTechnology.jl | 12 ++++++++++-- src/models/generated/StorageTechnology.jl | 12 ++++++++++-- src/models/generated/SupplyTechnology.jl | 12 ++++++++++-- src/models/generated/includes.jl | 2 ++ src/portfolio.jl | 1 + 7 files changed, 53 insertions(+), 10 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index 80ef3a1..2a94273 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -21,6 +21,7 @@ This file is auto-generated. Do not edit. voltage::Float64 network_id::Int64 maximum_new_capacity::Float64 + base_year::Int existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 @@ -44,6 +45,7 @@ This file is auto-generated. Do not edit. - `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) - `wacc::Float64`: (default: `0`) Weighted average cost of capital - `line_loss::Float64`: Transmission loss for each transport technology (%) @@ -79,6 +81,8 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology 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 "Weighted average cost of capital" @@ -88,8 +92,8 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology end -function ACTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 - ACTransportTechnology{T}(base_power, 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, ) +function ACTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device + ACTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) end """Get [`ACTransportTechnology`](@ref) `base_power`.""" @@ -122,6 +126,8 @@ get_voltage(value::ACTransportTechnology) = value.voltage 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) `wacc`.""" @@ -159,6 +165,8 @@ set_voltage!(value::ACTransportTechnology, val) = value.voltage = val 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) `wacc`.""" diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl index af2f4da..bbfcd30 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -21,6 +21,7 @@ This file is auto-generated. Do not edit. voltage::Float64 network_id::Int64 maximum_new_capacity::Float64 + base_year::Int existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 @@ -44,6 +45,7 @@ This file is auto-generated. Do not edit. - `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) - `wacc::Float64`: (default: `0`) Weighted average cost of capital - `line_loss::Float64`: Transmission loss for each transport technology (%) @@ -79,6 +81,8 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology 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 "Weighted average cost of capital" @@ -88,8 +92,8 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology end -function ExistingTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 - ExistingTransportTechnology{T}(base_power, 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, ) +function ExistingTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device + ExistingTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) end """Get [`ExistingTransportTechnology`](@ref) `base_power`.""" @@ -122,6 +126,8 @@ get_voltage(value::ExistingTransportTechnology) = value.voltage 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) `wacc`.""" @@ -159,6 +165,8 @@ set_voltage!(value::ExistingTransportTechnology, val) = value.voltage = val 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) `wacc`.""" diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl index 7d84f98..b3a9a88 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -21,6 +21,7 @@ This file is auto-generated. Do not edit. voltage::Float64 network_id::Int64 maximum_new_capacity::Float64 + base_year::Int existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 @@ -44,6 +45,7 @@ This file is auto-generated. Do not edit. - `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) - `wacc::Float64`: (default: `0`) Weighted average cost of capital - `line_loss::Float64`: Transmission loss for each transport technology (%) @@ -79,6 +81,8 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology 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 "Weighted average cost of capital" @@ -88,8 +92,8 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology end -function HVDCTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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 - HVDCTransportTechnology{T}(base_power, 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, ) +function HVDCTransportTechnology{T}(; base_power, capital_cost, start_region, available, name, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device + HVDCTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) end """Get [`HVDCTransportTechnology`](@ref) `base_power`.""" @@ -122,6 +126,8 @@ get_voltage(value::HVDCTransportTechnology) = value.voltage 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) `wacc`.""" @@ -159,6 +165,8 @@ set_voltage!(value::HVDCTransportTechnology, val) = value.voltage = val 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) `wacc`.""" diff --git a/src/models/generated/StorageTechnology.jl b/src/models/generated/StorageTechnology.jl index 6e07c0d..fba3379 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -38,6 +38,7 @@ This file is auto-generated. Do not edit. eff_up::Float64 cluster::Int64 ext::Dict + base_year::Int reg_cost::Float64 min_duration::Float64 max_cap_energy::Float64 @@ -79,6 +80,7 @@ This file is auto-generated. Do not edit. - `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. - `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 @@ -149,6 +151,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology cluster::Int64 "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" @@ -160,8 +164,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology end -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, capital_recovery_factor=30, 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, ext=Dict(), 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, existing_cap_energy, prime_mover_type, lifetime, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, unit_size_power, capital_recovery_factor, 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, ext, 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, capital_recovery_factor=30, 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, ext=Dict(), base_year=2020, 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, existing_cap_energy, prime_mover_type, lifetime, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, unit_size_power, capital_recovery_factor, 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, ext, base_year, reg_cost, min_duration, max_cap_energy, reg_max, ) end """Get [`StorageTechnology`](@ref) `base_power`.""" @@ -228,6 +232,8 @@ get_eff_up(value::StorageTechnology) = value.eff_up get_cluster(value::StorageTechnology) = value.cluster """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`.""" @@ -301,6 +307,8 @@ set_eff_up!(value::StorageTechnology, val) = value.eff_up = val set_cluster!(value::StorageTechnology, val) = value.cluster = 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`.""" diff --git a/src/models/generated/SupplyTechnology.jl b/src/models/generated/SupplyTechnology.jl index caaf325..4a0a707 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -38,6 +38,7 @@ This file is auto-generated. Do not edit. maximum_capacity::Float64 cluster::Int64 ramp_up_percentage::Float64 + base_year::Int unit_size::Float64 reg_cost::Float64 min_generation_percentage::Float64 @@ -81,6 +82,7 @@ This file is auto-generated. Do not edit. - `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 @@ -153,6 +155,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology 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 " @@ -168,8 +172,8 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology end -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, capital_recovery_factor=30, 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(), ext=Dict(), balancing_topology, region=nothing, maximum_capacity=Inf, cluster=1, ramp_up_percentage=100.0, unit_size=0.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, 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, capital_recovery_factor, id, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, unit_size, 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, capital_recovery_factor=30, 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(), ext=Dict(), balancing_topology, 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, 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, capital_recovery_factor, id, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, base_year, unit_size, reg_cost, min_generation_percentage, start_cost_per_mw, reg_max, up_time, ) end """Get [`SupplyTechnology`](@ref) `base_power`.""" @@ -236,6 +240,8 @@ get_maximum_capacity(value::SupplyTechnology) = value.maximum_capacity 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`.""" @@ -313,6 +319,8 @@ set_maximum_capacity!(value::SupplyTechnology, val) = value.maximum_capacity = v 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`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index d7a20fa..924c582 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -20,6 +20,7 @@ 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 @@ -111,6 +112,7 @@ 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! diff --git a/src/portfolio.jl b/src/portfolio.jl index bed49c8..fea69c6 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -21,6 +21,7 @@ end mutable struct Portfolio <: IS.InfrastructureSystemsType aggregation::Type{<:Union{PSY.ACBus, PSY.AggregationTopology}} discount_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 From e8d2d9b05faecd666d9f4d2e86b7b77b7720a6e4 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 20 Nov 2024 15:17:33 -0700 Subject: [PATCH 13/17] fix base_year --- src/portfolio.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/portfolio.jl b/src/portfolio.jl index fea69c6..4549c97 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -33,6 +33,7 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType function Portfolio( aggregation, discount_rate::Float64, + base_year::Int, data, investment_schedule::Dict, #units_settings::IS.SystemUnitsSettings, @@ -57,6 +58,7 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType return new( aggregation, discount_rate, + base_year, data, investment_schedule, #units_settings, @@ -125,6 +127,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. """ From c80c60e40b47de511314fe562b3de47875d1048b Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 20 Nov 2024 15:26:39 -0700 Subject: [PATCH 14/17] add inflation rate and fix base year --- src/portfolio.jl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/portfolio.jl b/src/portfolio.jl index 4549c97..0e6ef7c 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -21,6 +21,7 @@ end mutable struct Portfolio <: IS.InfrastructureSystemsType aggregation::Type{<:Union{PSY.ACBus, PSY.AggregationTopology}} discount_rate::Float64 + inflation_rate::Float base_year::Int data::IS.SystemData # Inputs to the model investment_schedule::Dict # Investment decisions container i.e., model outputs. Container TBD @@ -33,6 +34,7 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType function Portfolio( aggregation, discount_rate::Float64, + inflation_rate::Float64, base_year::Int, data, investment_schedule::Dict, @@ -58,6 +60,7 @@ mutable struct Portfolio <: IS.InfrastructureSystemsType return new( aggregation, discount_rate, + inflation_rate, base_year, data, investment_schedule, @@ -82,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(), @@ -96,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(), From ebdf2b7233202d7242ee19bd3dc702c68bf40ad9 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 20 Nov 2024 15:33:30 -0700 Subject: [PATCH 15/17] float to float64 --- src/portfolio.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/portfolio.jl b/src/portfolio.jl index 0e6ef7c..b205e7b 100644 --- a/src/portfolio.jl +++ b/src/portfolio.jl @@ -21,7 +21,7 @@ end mutable struct Portfolio <: IS.InfrastructureSystemsType aggregation::Type{<:Union{PSY.ACBus, PSY.AggregationTopology}} discount_rate::Float64 - inflation_rate::Float + 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 From ef411cf9feed734b58a223511a9cb19a538098f7 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Thu, 21 Nov 2024 10:22:58 -0700 Subject: [PATCH 16/17] add interest_rate --- src/models/generated/ACTransportTechnology.jl | 28 +++++++----- .../generated/ExistingTransportTechnology.jl | 20 ++++----- .../generated/HVDCTransportTechnology.jl | 28 +++++++----- src/models/generated/StorageTechnology.jl | 28 +++++++----- src/models/generated/SupplyTechnology.jl | 44 +++++++++++-------- src/models/generated/includes.jl | 6 ++- 6 files changed, 94 insertions(+), 60 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index 2a94273..c42ce28 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -11,11 +11,11 @@ This file is auto-generated. Do not edit. start_region::Region available::Bool name::String - capital_recovery_factor::Int64 end_region::Region power_systems_type::String angle_limit::Float64 internal::InfrastructureSystemsInternal + interest_rate::Float64 ext::Dict resistance::Float64 voltage::Float64 @@ -25,6 +25,7 @@ This file is auto-generated. Do not edit. existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 + capital_recovery_period::Int64 end @@ -35,11 +36,11 @@ This file is auto-generated. Do not edit. - `start_region::Region`: Start region for transport technology - `available::Bool`: identifies whether the technology is available - `name::String`: Name -- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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 @@ -49,6 +50,7 @@ This file is auto-generated. Do not edit. - `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 (%) +- `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" @@ -61,8 +63,6 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology 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::Region "maps to a valid PowerSystems.jl for PCM modeling" @@ -71,6 +71,8 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology 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" @@ -89,11 +91,13 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology wacc::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, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device - ACTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) +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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) end """Get [`ACTransportTechnology`](@ref) `base_power`.""" @@ -106,8 +110,6 @@ get_start_region(value::ACTransportTechnology) = value.start_region get_available(value::ACTransportTechnology) = value.available """Get [`ACTransportTechnology`](@ref) `name`.""" get_name(value::ACTransportTechnology) = value.name -"""Get [`ACTransportTechnology`](@ref) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::ACTransportTechnology) = value.capital_recovery_factor """Get [`ACTransportTechnology`](@ref) `end_region`.""" get_end_region(value::ACTransportTechnology) = value.end_region """Get [`ACTransportTechnology`](@ref) `power_systems_type`.""" @@ -116,6 +118,8 @@ get_power_systems_type(value::ACTransportTechnology) = value.power_systems_type 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`.""" @@ -134,6 +138,8 @@ get_existing_line_capacity(value::ACTransportTechnology) = value.existing_line_c get_wacc(value::ACTransportTechnology) = value.wacc """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 @@ -145,8 +151,6 @@ set_start_region!(value::ACTransportTechnology, val) = value.start_region = val set_available!(value::ACTransportTechnology, val) = value.available = val """Set [`ACTransportTechnology`](@ref) `name`.""" set_name!(value::ACTransportTechnology, val) = value.name = val -"""Set [`ACTransportTechnology`](@ref) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::ACTransportTechnology, val) = value.capital_recovery_factor = val """Set [`ACTransportTechnology`](@ref) `end_region`.""" set_end_region!(value::ACTransportTechnology, val) = value.end_region = val """Set [`ACTransportTechnology`](@ref) `power_systems_type`.""" @@ -155,6 +159,8 @@ set_power_systems_type!(value::ACTransportTechnology, val) = value.power_systems 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`.""" @@ -173,3 +179,5 @@ set_existing_line_capacity!(value::ACTransportTechnology, val) = value.existing_ set_wacc!(value::ACTransportTechnology, val) = value.wacc = 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/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl index bbfcd30..7879291 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -11,7 +11,6 @@ This file is auto-generated. Do not edit. start_region::Region available::Bool name::String - capital_recovery_factor::Int64 end_region::Region power_systems_type::String angle_limit::Float64 @@ -25,6 +24,7 @@ This file is auto-generated. Do not edit. existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 + capital_recovery_period::Int64 end @@ -35,7 +35,6 @@ This file is auto-generated. Do not edit. - `start_region::Region`: Start region for transport technology - `available::Bool`: identifies whether the technology is available - `name::String`: Name -- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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) @@ -49,6 +48,7 @@ This file is auto-generated. Do not edit. - `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 (%) +- `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" @@ -61,8 +61,6 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology 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::Region "maps to a valid PowerSystems.jl for PCM modeling" @@ -89,11 +87,13 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology wacc::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, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device - ExistingTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) +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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) end """Get [`ExistingTransportTechnology`](@ref) `base_power`.""" @@ -106,8 +106,6 @@ get_start_region(value::ExistingTransportTechnology) = value.start_region get_available(value::ExistingTransportTechnology) = value.available """Get [`ExistingTransportTechnology`](@ref) `name`.""" get_name(value::ExistingTransportTechnology) = value.name -"""Get [`ExistingTransportTechnology`](@ref) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::ExistingTransportTechnology) = value.capital_recovery_factor """Get [`ExistingTransportTechnology`](@ref) `end_region`.""" get_end_region(value::ExistingTransportTechnology) = value.end_region """Get [`ExistingTransportTechnology`](@ref) `power_systems_type`.""" @@ -134,6 +132,8 @@ get_existing_line_capacity(value::ExistingTransportTechnology) = value.existing_ get_wacc(value::ExistingTransportTechnology) = value.wacc """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 @@ -145,8 +145,6 @@ set_start_region!(value::ExistingTransportTechnology, val) = value.start_region set_available!(value::ExistingTransportTechnology, val) = value.available = val """Set [`ExistingTransportTechnology`](@ref) `name`.""" set_name!(value::ExistingTransportTechnology, val) = value.name = val -"""Set [`ExistingTransportTechnology`](@ref) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::ExistingTransportTechnology, val) = value.capital_recovery_factor = val """Set [`ExistingTransportTechnology`](@ref) `end_region`.""" set_end_region!(value::ExistingTransportTechnology, val) = value.end_region = val """Set [`ExistingTransportTechnology`](@ref) `power_systems_type`.""" @@ -173,3 +171,5 @@ set_existing_line_capacity!(value::ExistingTransportTechnology, val) = value.exi set_wacc!(value::ExistingTransportTechnology, val) = value.wacc = 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 index b3a9a88..69c8014 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -11,11 +11,11 @@ This file is auto-generated. Do not edit. start_region::Region available::Bool name::String - capital_recovery_factor::Int64 end_region::Region power_systems_type::String angle_limit::Float64 internal::InfrastructureSystemsInternal + interest_rate::Float64 ext::Dict resistance::Float64 voltage::Float64 @@ -25,6 +25,7 @@ This file is auto-generated. Do not edit. existing_line_capacity::Float64 wacc::Float64 line_loss::Float64 + capital_recovery_period::Int64 end @@ -35,11 +36,11 @@ This file is auto-generated. Do not edit. - `start_region::Region`: Start region for transport technology - `available::Bool`: identifies whether the technology is available - `name::String`: Name -- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion. - `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 @@ -49,6 +50,7 @@ This file is auto-generated. Do not edit. - `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 (%) +- `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" @@ -61,8 +63,6 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology 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::Region "maps to a valid PowerSystems.jl for PCM modeling" @@ -71,6 +71,8 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology 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" @@ -89,11 +91,13 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology wacc::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, capital_recovery_factor=30, 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, wacc=0, line_loss, ) where T <: PSY.Device - HVDCTransportTechnology{T}(base_power, 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, base_year, existing_line_capacity, wacc, line_loss, ) +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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) end """Get [`HVDCTransportTechnology`](@ref) `base_power`.""" @@ -106,8 +110,6 @@ get_start_region(value::HVDCTransportTechnology) = value.start_region get_available(value::HVDCTransportTechnology) = value.available """Get [`HVDCTransportTechnology`](@ref) `name`.""" get_name(value::HVDCTransportTechnology) = value.name -"""Get [`HVDCTransportTechnology`](@ref) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::HVDCTransportTechnology) = value.capital_recovery_factor """Get [`HVDCTransportTechnology`](@ref) `end_region`.""" get_end_region(value::HVDCTransportTechnology) = value.end_region """Get [`HVDCTransportTechnology`](@ref) `power_systems_type`.""" @@ -116,6 +118,8 @@ get_power_systems_type(value::HVDCTransportTechnology) = value.power_systems_typ 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`.""" @@ -134,6 +138,8 @@ get_existing_line_capacity(value::HVDCTransportTechnology) = value.existing_line get_wacc(value::HVDCTransportTechnology) = value.wacc """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 @@ -145,8 +151,6 @@ set_start_region!(value::HVDCTransportTechnology, val) = value.start_region = va set_available!(value::HVDCTransportTechnology, val) = value.available = val """Set [`HVDCTransportTechnology`](@ref) `name`.""" set_name!(value::HVDCTransportTechnology, val) = value.name = val -"""Set [`HVDCTransportTechnology`](@ref) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::HVDCTransportTechnology, val) = value.capital_recovery_factor = val """Set [`HVDCTransportTechnology`](@ref) `end_region`.""" set_end_region!(value::HVDCTransportTechnology, val) = value.end_region = val """Set [`HVDCTransportTechnology`](@ref) `power_systems_type`.""" @@ -155,6 +159,8 @@ set_power_systems_type!(value::HVDCTransportTechnology, val) = value.power_syste 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`.""" @@ -173,3 +179,5 @@ set_existing_line_capacity!(value::HVDCTransportTechnology, val) = value.existin set_wacc!(value::HVDCTransportTechnology, val) = value.wacc = 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 fba3379..458fd9c 100644 --- a/src/models/generated/StorageTechnology.jl +++ b/src/models/generated/StorageTechnology.jl @@ -19,7 +19,6 @@ This file is auto-generated. Do not edit. capital_costs_power::PSY.ValueCurve max_duration::Float64 unit_size_power::Float64 - capital_recovery_factor::Int64 id::Int64 min_cap_power::Float64 capital_costs_energy::PSY.ValueCurve @@ -37,12 +36,14 @@ This file is auto-generated. Do not edit. 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 @@ -61,7 +62,6 @@ This file is auto-generated. Do not edit. - `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) -- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. - `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. @@ -79,12 +79,14 @@ This file is auto-generated. Do not edit. - `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" @@ -113,8 +115,6 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology max_duration::Float64 "Used for discrete investment decisions. Size of each unit being built (MW)" unit_size_power::Float64 - "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." - capital_recovery_factor::Int64 "ID for individual generator" id::Int64 "Minimum required power capacity for a storage technology" @@ -149,6 +149,8 @@ mutable struct StorageTechnology{T <: PSY.Storage} <: Technology 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" @@ -161,11 +163,13 @@ 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(), 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, capital_recovery_factor=30, 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, ext=Dict(), base_year=2020, 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, existing_cap_energy, prime_mover_type, lifetime, rsv_cost, available, existing_cap_power, name, storage_tech, capital_costs_power, max_duration, unit_size_power, capital_recovery_factor, 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, ext, base_year, 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`.""" @@ -194,8 +198,6 @@ get_capital_costs_power(value::StorageTechnology) = value.capital_costs_power 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) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::StorageTechnology) = value.capital_recovery_factor """Get [`StorageTechnology`](@ref) `id`.""" get_id(value::StorageTechnology) = value.id """Get [`StorageTechnology`](@ref) `min_cap_power`.""" @@ -230,6 +232,8 @@ get_unit_size_energy(value::StorageTechnology) = value.unit_size_energy 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`.""" @@ -242,6 +246,8 @@ 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 @@ -269,8 +275,6 @@ set_capital_costs_power!(value::StorageTechnology, val) = value.capital_costs_po 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) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::StorageTechnology, val) = value.capital_recovery_factor = val """Set [`StorageTechnology`](@ref) `id`.""" set_id!(value::StorageTechnology, val) = value.id = val """Set [`StorageTechnology`](@ref) `min_cap_power`.""" @@ -305,6 +309,8 @@ set_unit_size_energy!(value::StorageTechnology, val) = value.unit_size_energy = 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`.""" @@ -317,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 4a0a707..1ddac94 100644 --- a/src/models/generated/SupplyTechnology.jl +++ b/src/models/generated/SupplyTechnology.jl @@ -21,7 +21,6 @@ This file is auto-generated. Do not edit. cofire_start_min::Union{Nothing, Dict{ThermalFuels, Float64}} name::String ramp_dn_percentage::Float64 - capital_recovery_factor::Int64 id::Int64 down_time::Float64 initial_capacity::Float64 @@ -32,8 +31,9 @@ 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 @@ -44,6 +44,7 @@ This file is auto-generated. Do not edit. min_generation_percentage::Float64 start_cost_per_mw::Float64 reg_max::Float64 + capital_recovery_period::Int64 up_time::Float64 end @@ -65,7 +66,6 @@ This file is auto-generated. Do not edit. - `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 -- `capital_recovery_factor::Int64`: (default: `30`) Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs. - `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 @@ -76,8 +76,9 @@ 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. @@ -88,6 +89,7 @@ This file is auto-generated. Do not edit. - `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 @@ -121,8 +123,6 @@ mutable struct SupplyTechnology{T <: PSY.Generator} <: Technology name::String "Maximum decrease in output between operation periods. Fraction of total capacity" ramp_dn_percentage::Float64 - "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs." - capital_recovery_factor::Int64 "ID for individual generator" id::Int64 "Minimum amount of time a resource has to remain in the shutdown state." @@ -143,10 +143,12 @@ 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" @@ -167,13 +169,15 @@ 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, 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, capital_recovery_factor=30, 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(), ext=Dict(), balancing_topology, 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, 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, capital_recovery_factor, id, down_time, initial_capacity, start_fuel_mmbtu_per_mw, operation_costs, rsv_max, fuel, power_systems_type, cofire_level_max, internal, ext, balancing_topology, region, maximum_capacity, cluster, ramp_up_percentage, base_year, unit_size, 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`.""" @@ -206,8 +210,6 @@ get_cofire_start_min(value::SupplyTechnology) = value.cofire_start_min 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) `capital_recovery_factor`.""" -get_capital_recovery_factor(value::SupplyTechnology) = value.capital_recovery_factor """Get [`SupplyTechnology`](@ref) `id`.""" get_id(value::SupplyTechnology) = value.id """Get [`SupplyTechnology`](@ref) `down_time`.""" @@ -228,10 +230,12 @@ 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`.""" @@ -252,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 @@ -285,8 +291,6 @@ set_cofire_start_min!(value::SupplyTechnology, val) = value.cofire_start_min = v 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) `capital_recovery_factor`.""" -set_capital_recovery_factor!(value::SupplyTechnology, val) = value.capital_recovery_factor = val """Set [`SupplyTechnology`](@ref) `id`.""" set_id!(value::SupplyTechnology, val) = value.id = val """Set [`SupplyTechnology`](@ref) `down_time`.""" @@ -307,10 +311,12 @@ 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`.""" @@ -331,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/includes.jl b/src/models/generated/includes.jl index 924c582..b79da33 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -25,7 +25,7 @@ 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 @@ -54,6 +54,7 @@ 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 @@ -117,7 +118,7 @@ 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! @@ -146,6 +147,7 @@ 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! From db01f2970493d43cd6a9ea015ae6d47431292c83 Mon Sep 17 00:00:00 2001 From: Jerry Potts Date: Wed, 18 Dec 2024 09:08:07 -0700 Subject: [PATCH 17/17] remove wacc --- src/models/generated/ACTransportTechnology.jl | 12 ++---------- src/models/generated/ExistingTransportTechnology.jl | 12 ++---------- src/models/generated/HVDCTransportTechnology.jl | 12 ++---------- src/models/generated/includes.jl | 2 -- 4 files changed, 6 insertions(+), 32 deletions(-) diff --git a/src/models/generated/ACTransportTechnology.jl b/src/models/generated/ACTransportTechnology.jl index c42ce28..937c63c 100644 --- a/src/models/generated/ACTransportTechnology.jl +++ b/src/models/generated/ACTransportTechnology.jl @@ -23,7 +23,6 @@ This file is auto-generated. Do not edit. maximum_new_capacity::Float64 base_year::Int existing_line_capacity::Float64 - wacc::Float64 line_loss::Float64 capital_recovery_period::Int64 end @@ -48,7 +47,6 @@ This file is auto-generated. Do not edit. - `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) -- `wacc::Float64`: (default: `0`) Weighted average cost of capital - `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. """ @@ -87,8 +85,6 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology base_year::Int "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 "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." @@ -96,8 +92,8 @@ mutable struct ACTransportTechnology{T <: PSY.Device} <: Technology 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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) +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`.""" @@ -134,8 +130,6 @@ get_maximum_new_capacity(value::ACTransportTechnology) = value.maximum_new_capac 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) `wacc`.""" -get_wacc(value::ACTransportTechnology) = value.wacc """Get [`ACTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::ACTransportTechnology) = value.line_loss """Get [`ACTransportTechnology`](@ref) `capital_recovery_period`.""" @@ -175,8 +169,6 @@ set_maximum_new_capacity!(value::ACTransportTechnology, val) = value.maximum_new 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) `wacc`.""" -set_wacc!(value::ACTransportTechnology, val) = value.wacc = val """Set [`ACTransportTechnology`](@ref) `line_loss`.""" set_line_loss!(value::ACTransportTechnology, val) = value.line_loss = val """Set [`ACTransportTechnology`](@ref) `capital_recovery_period`.""" diff --git a/src/models/generated/ExistingTransportTechnology.jl b/src/models/generated/ExistingTransportTechnology.jl index 7879291..6b89865 100644 --- a/src/models/generated/ExistingTransportTechnology.jl +++ b/src/models/generated/ExistingTransportTechnology.jl @@ -22,7 +22,6 @@ This file is auto-generated. Do not edit. maximum_new_capacity::Float64 base_year::Int existing_line_capacity::Float64 - wacc::Float64 line_loss::Float64 capital_recovery_period::Int64 end @@ -46,7 +45,6 @@ This file is auto-generated. Do not edit. - `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) -- `wacc::Float64`: (default: `0`) Weighted average cost of capital - `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. """ @@ -83,8 +81,6 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology base_year::Int "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 "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." @@ -92,8 +88,8 @@ mutable struct ExistingTransportTechnology{T <: PSY.Device} <: Technology 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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) +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`.""" @@ -128,8 +124,6 @@ get_maximum_new_capacity(value::ExistingTransportTechnology) = value.maximum_new 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) `wacc`.""" -get_wacc(value::ExistingTransportTechnology) = value.wacc """Get [`ExistingTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::ExistingTransportTechnology) = value.line_loss """Get [`ExistingTransportTechnology`](@ref) `capital_recovery_period`.""" @@ -167,8 +161,6 @@ set_maximum_new_capacity!(value::ExistingTransportTechnology, val) = value.maxim 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) `wacc`.""" -set_wacc!(value::ExistingTransportTechnology, val) = value.wacc = val """Set [`ExistingTransportTechnology`](@ref) `line_loss`.""" set_line_loss!(value::ExistingTransportTechnology, val) = value.line_loss = val """Set [`ExistingTransportTechnology`](@ref) `capital_recovery_period`.""" diff --git a/src/models/generated/HVDCTransportTechnology.jl b/src/models/generated/HVDCTransportTechnology.jl index 69c8014..fe98e3b 100644 --- a/src/models/generated/HVDCTransportTechnology.jl +++ b/src/models/generated/HVDCTransportTechnology.jl @@ -23,7 +23,6 @@ This file is auto-generated. Do not edit. maximum_new_capacity::Float64 base_year::Int existing_line_capacity::Float64 - wacc::Float64 line_loss::Float64 capital_recovery_period::Int64 end @@ -48,7 +47,6 @@ This file is auto-generated. Do not edit. - `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) -- `wacc::Float64`: (default: `0`) Weighted average cost of capital - `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. """ @@ -87,8 +85,6 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology base_year::Int "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 "Capital recovery period (in years) used for determining overnight capital costs from annualized investment costs for network transmission line expansion." @@ -96,8 +92,8 @@ mutable struct HVDCTransportTechnology{T <: PSY.Device} <: Technology 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, wacc=0, 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, wacc, line_loss, capital_recovery_period, ) +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`.""" @@ -134,8 +130,6 @@ get_maximum_new_capacity(value::HVDCTransportTechnology) = value.maximum_new_cap 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) `wacc`.""" -get_wacc(value::HVDCTransportTechnology) = value.wacc """Get [`HVDCTransportTechnology`](@ref) `line_loss`.""" get_line_loss(value::HVDCTransportTechnology) = value.line_loss """Get [`HVDCTransportTechnology`](@ref) `capital_recovery_period`.""" @@ -175,8 +169,6 @@ set_maximum_new_capacity!(value::HVDCTransportTechnology, val) = value.maximum_n 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) `wacc`.""" -set_wacc!(value::HVDCTransportTechnology, val) = value.wacc = val """Set [`HVDCTransportTechnology`](@ref) `line_loss`.""" set_line_loss!(value::HVDCTransportTechnology, val) = value.line_loss = val """Set [`HVDCTransportTechnology`](@ref) `capital_recovery_period`.""" diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index b79da33..e32f925 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -108,7 +108,6 @@ export get_up_time export get_var_cost_per_mwh export get_voll export get_voltage -export get_wacc export set_angle_limit! export set_available! export set_balancing_topology! @@ -201,4 +200,3 @@ export set_up_time! export set_var_cost_per_mwh! export set_voll! export set_voltage! -export set_wacc!