Skip to content

Commit

Permalink
added exts for renewable tech
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrypotts committed May 30, 2024
1 parent d2a5f53 commit 0aa8a77
Showing 1 changed file with 74 additions and 14 deletions.
88 changes: 74 additions & 14 deletions scripts/portfolio_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const IS = InfrastructureSystems
const PSY = PowerSystems
const PSIP = PowerSystemsInvestmentsPortfolios

data = PSY._create_system_data_from_kwargs()
#data = PSY._create_system_data_from_kwargs()

#bus = ACBus(nothing)
#discount_rate = 0.07
Expand All @@ -29,7 +29,9 @@ t_th = SupplyTechnology{ThermalStandard}(
)

t_th_ext = t_th.ext
t_th_ext["capital_cost"] = 50.0
t_th_ext["capital_cost"] = [50.0, 125.0]
t_th_ext["operations_cost"] = [5.0, 2.5]
t_th_ext["variable_cost"] = [1.0, 1.0]
t_th_ext["investment_periods"] = [2030, 2040]
# one option is to repeat these for each investment
t_th_ext["operational_periods"] = [1, 2, 3]
Expand All @@ -38,8 +40,12 @@ t_th_ext["operational_periods_2"] = [
4, 5, 6 # second investment period
]
t_th_ext["investment_operational_periods_map"] = Dict(
2030 => [1, 2, 3],
2040 => [4, 5, 6],
1 => 2030,
2 => 2030,
3 => 2030,
4 => 2040,
5 => 2040,
6 => 2040,
)
t_th_ext["initial_capacity"] = 200.0 # Data in MW
t_th_ext["maximum_capacity"] = 10000.0
Expand All @@ -56,9 +62,30 @@ t_th_exp = SupplyTechnology{ThermalStandard}(
)

t_th_exp_ext = t_th_exp.ext
t_th_exp_ext["capital_cost"] = 150.0
t_th_exp_ext["capital_cost"] = [150.0, 100.0]
t_th_exp_ext["operations_cost"] = [15.0, 10.0]
t_th_exp_ext["variable_cost"] = [1.0, 1.0]
t_th_exp_ext["investment_periods"] = [2030, 2040]
# one option is to repeat these for each investment
t_th_exp_ext["operational_periods"] = [1, 2, 3]
t_th_exp_ext["operational_periods_2"] = [
1, 2, 3, # first investment period
4, 5, 6 # second investment period
]
t_th_exp_ext["investment_operational_periods_map"] = Dict(
1 => 2030,
2 => 2030,
3 => 2030,
4 => 2040,
5 => 2040,
6 => 2040,
)
t_th_exp_ext["initial_capacity"] = 200.0 # Data in MW
t_th_exp_ext["maximum_capacity"] = 10000.0
t_th_exp_ext["minimum_required_capacity"] = [0.0, 0.0]


# Initial Capacity
# Renewable Technology

t_re = SupplyTechnology{RenewableDispatch}(
name="renewable_tech",
Expand All @@ -71,21 +98,54 @@ t_re = SupplyTechnology{RenewableDispatch}(
)

t_re_ext = t_re.ext
t_re_ext["capital_cost"] = 100.0
t_re_ext["variable_capacity_factor"] = [0.8, 0.6, 0.3]
t_re_ext["capital_cost"] = [100.0, 75.0]
t_re_ext["operations_cost"] = [10.0, 6.5]
t_re_ext["variable_cost"] = [0, 0]
t_re_ext["variable_capacity_factor"] = [0.8, 0.6, 0.3, 0.5, 0.9, 0.4]
t_re_ext["investment_periods"] = [2030, 2040]
# one option is to repeat these for each investment
t_re_ext["operational_periods"] = [1, 2, 3]
t_re_ext["operational_periods_2"] = [
1, 2, 3, # first investment period
4, 5, 6 # second investment period
]
t_re_ext["investment_operational_periods_map"] = Dict(
1 => 2030,
2 => 2030,
3 => 2030,
4 => 2040,
5 => 2040,
6 => 2040,
)
t_re_ext["initial_capacity"] = 200.0 # Data in MW
t_re_ext["maximum_capacity"] = 10000.0
t_re_ext["minimum_required_capacity"] = [0.0, 0.0]


# Demand side technologies
d_1 = DemandSideTechnology{ElectricLoad}(
name="demand",
available=true,
capital_cost
)


PSIP.add_technology!(p, t_th)
PSIP.add_technology!(p, t_re)
PSIP.add_technology!(p, t_th_exp)


IS.serialize(t)
IS.serialize(t_th)
IS.serialize(t_re)
IS.serialize(t_th_exp)
IS.serialize(p)

get_technologies(x -> (!get_available(x)), SupplyTechnology{ThermalStandard}, p)
#get_technologies(x -> (!get_available(x)), SupplyTechnology{ThermalStandard}, p)

get_technologies(SupplyTechnology{ThermalStandard}, p)
PSIP.remove_technology!(SupplyTechnology{ThermalStandard}, p, "thermal_tech")
#get_technologies(SupplyTechnology{ThermalStandard}, p)
#PSIP.remove_technology!(SupplyTechnology{ThermalStandard}, p, "thermal_tech")

get_available(t)
IS.deserialize(p)
#get_available(t_th)
#get_available(t_re)
#get_available(t_th_exp)
#IS.deserialize(p)

0 comments on commit 0aa8a77

Please sign in to comment.