diff --git a/src/load_inputs/load_multistage_data.jl b/src/load_inputs/load_multistage_data.jl index 8c7b22ae51..edd5021839 100644 --- a/src/load_inputs/load_multistage_data.jl +++ b/src/load_inputs/load_multistage_data.jl @@ -1,9 +1,12 @@ -function load_multistage_dataframe(filepath::AbstractString) +function load_multistage_dataframe(filepath::AbstractString, scale_factor::Float64) if !isfile(filepath) error("Multistage data file not found at $filepath") end multistage_in = load_dataframe(filepath) + # rename columns lowercase for internal consistency + rename!(multistage_in, lowercase.(names(multistage_in))) + scale_multistage_data!(multistage_in, scale_factor) validate_multistage_data!(multistage_in) @@ -12,11 +15,28 @@ end function validate_multistage_data!(multistage_df::DataFrame) # cols that the user must provide - required_cols = ("Lifetime","Capital_Recovery_Period") + required_cols = ("lifetime","capital_recovery_period") # check that all required columns are present for col in required_cols if col ∉ names(multistage_df) error("Multistage data file is missing column $col") end end +end + +function scale_multistage_data!(multistage_in::DataFrame, scale_factor::Float64) + columns_to_scale = [:min_retired_cap_mw, # to GW + :min_retired_charge_cap_mw, # to GW + :min_retired_energy_cap_mw, # to GW + + :min_retired_cap_inverter_mw, + :min_retired_cap_solar_mw, + :min_retired_cap_wind_mw, + :min_retired_cap_charge_dc_mw, + :min_retired_cap_charge_ac_mw, + :min_retired_cap_discharge_dc_mw, + :min_retired_cap_discharge_ac_mw, + ] + scale_columns!(multistage_in, columns_to_scale, scale_factor) + return nothing end \ No newline at end of file diff --git a/src/load_inputs/load_resources_data.jl b/src/load_inputs/load_resources_data.jl index 8e283c765d..57bfebd697 100644 --- a/src/load_inputs/load_resources_data.jl +++ b/src/load_inputs/load_resources_data.jl @@ -657,13 +657,15 @@ Reads module dataframes, loops over files and adds columns as new attributes to - `resources_path::AbstractString`: The path to the resources folder. """ function add_modules_to_resources!(resources::Vector{<:AbstractResource}, setup::Dict, resources_path::AbstractString) + scale_factor = setup["ParameterScale"] == 1 ? ModelScalingFactor : 1.0 + modules = Vector{DataFrame}() ## Load all modules and add them to the list of modules to be added to resources # Add multistage if multistage is activated if setup["MultiStage"] == 1 filename = joinpath(resources_path, "Resource_multistage_data.csv") - multistage_in = load_multistage_dataframe(filename) + multistage_in = load_multistage_dataframe(filename, scale_factor) push!(modules, multistage_in) @info "Multistage data successfully read." end diff --git a/src/model/resources/resources.jl b/src/model/resources/resources.jl index e6dabe179e..aed64a9f94 100644 --- a/src/model/resources/resources.jl +++ b/src/model/resources/resources.jl @@ -867,9 +867,9 @@ for attr in (:min_retired_cap_inverter_mw, :min_retired_cap_charge_dc_mw, :min_retired_cap_discharge_ac_mw, :min_retired_cap_charge_ac_mw,) - @eval @interface $attr default_zero VreStorage + @eval @interface $attr default_zero cum_attr = Symbol("cum_"*String(attr)) - @eval @interface $cum_attr default_zero VreStorage + @eval @interface $cum_attr default_zero end ## policies diff --git a/test/multi_stage/cum_min_ret/inputs_p1/resources/Resource_multistage_data.csv b/test/multi_stage/cum_min_ret/inputs_p1/resources/Resource_multistage_data.csv new file mode 100644 index 0000000000..746d495897 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/resources/Resource_multistage_data.csv @@ -0,0 +1,14 @@ +Resource,WACC,Capital_Recovery_Period,capital_recovery_period_dc,tech_wacc_dc,capital_recovery_period_solar,tech_wacc_solar,capital_recovery_period_wind,tech_wacc_wind,capital_recovery_period_discharge_dc,tech_wacc_discharge_dc,capital_recovery_period_charge_dc,tech_wacc_charge_dc,capital_recovery_period_discharge_ac,tech_wacc_discharge_ac,capital_recovery_period_charge_ac,tech_wacc_charge_ac,Lifetime,Min_Retired_Cap_MW,Min_Retired_Energy_Cap_MW,Min_Retired_Charge_Cap_MW,Min_Retired_Cap_Inverter_MW,Min_Retired_Cap_Solar_MW,Min_Retired_Cap_Wind_MW,Min_Retired_Cap_Charge_DC_MW,Min_Retired_Cap_Charge_AC_MW,Min_Retired_Cap_Discharge_DC_MW,Min_Retired_Cap_Discharge_AC_MW +natural_gas_combined_cycle,0.039,20,30,0.139,40,0.239,50,0.339,60,0.439,70,0.539,80,0.639,90,0.739,20,30,0,0,0,0,0,0,0,0,0 +solar_pv,0.017,20,30,0.117,40,0.217,50,0.317,60,0.417,70,0.517,80,0.617,90,0.717,20,40,0,0,0,0,0,0,0,0,0 +onshore_wind,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,10,0,0,0,0,0,0,0,0,0 +battery_sym,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,5,15,0,0,0,0,0,0,0,0 +battery_asym,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,6,16,26,0,0,0,0,0,0,0 +landbasedwind_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,7,0,0,0,0,10,0,0,0,0 +utilitypv_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,8,0,0,27,20,0,0,0,0,0 +storage_sym_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,9,17,0,0,0,0,0,0,0,0 +storage_asym_ac_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,10,18,0,0,0,0,0,0,0,33 +storage_asym_dc_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,11,19,0,28,0,0,0,0,32,0 +storage_sym_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,12,20,0,0,0,0,0,0,0,0 +storage_asym_ac_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,13,21,0,0,0,0,0,31,0,0 +storage_asym_dc_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,14,22,0,29,0,0,30,0,0,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p1/resources/Storage.csv b/test/multi_stage/cum_min_ret/inputs_p1/resources/Storage.csv new file mode 100644 index 0000000000..727788b728 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/resources/Storage.csv @@ -0,0 +1,3 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Max_Cap_MW,Max_Cap_MWh,Min_Cap_MW,Min_Cap_MWh,Inv_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWyr,Fixed_OM_Cost_per_MWhyr,Fixed_OM_Cost_Charge_per_MWyr,Var_OM_Cost_per_MWh,Var_OM_Cost_per_MWh_In,Self_disch,Eff_Up,Eff_Down,Min_Duration,Max_Duration,Resource_Type,region,cluster +battery_sym,1,1,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 +battery_asym,1,2,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p1/resources/Thermal.csv b/test/multi_stage/cum_min_ret/inputs_p1/resources/Thermal.csv new file mode 100644 index 0000000000..865619f951 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/resources/Thermal.csv @@ -0,0 +1,2 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,Fuel,Cap_Size,Start_Cost_per_MW,Start_Fuel_MMBTU_per_MW,Up_Time,Down_Time,Ramp_Up_Percentage,Ramp_Dn_Percentage,Min_Power,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,MGA,Resource_Type,region,cluster +natural_gas_combined_cycle,1,1,0,1,10000,-1,0,65400,10287,3.55,7.43,NG,250,91,2,6,6,0.64,0.64,0.468,0.25,0.5,0,0,1,natural_gas_fired_combined_cycle,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre.csv b/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre.csv new file mode 100644 index 0000000000..b6f20427d5 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre.csv @@ -0,0 +1,3 @@ +Resource,Zone,Num_VRE_Bins,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,MGA,Resource_Type,region,cluster +solar_pv,1,1,1,1,500,-1,0,85300,18760,0,9.13,1,solar_photovoltaic,NE,1 +onshore_wind,1,1,1,1,1000,-1,0,97200,43205,0.1,9.12,1,onshore_wind_turbine,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre_stor.csv b/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre_stor.csv new file mode 100644 index 0000000000..dce1b2d7e2 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/resources/Vre_stor.csv @@ -0,0 +1,9 @@ +Resource,Zone,SOLAR,WIND,STOR_DC_DISCHARGE,STOR_DC_CHARGE,STOR_AC_DISCHARGE,STOR_AC_CHARGE,LDS_VRE_STOR,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Existing_Cap_Inverter_MW,Existing_Cap_Solar_MW,Existing_Cap_Wind_MW,Existing_Cap_Discharge_DC_MW,Existing_Cap_Charge_DC_MW,Existing_Cap_Discharge_AC_MW,Existing_Cap_Charge_AC_MW,Min_Cap_MW,Min_Cap_MWh,Min_Cap_Inverter_MW,Min_Cap_Solar_MW,Min_Cap_Wind_MW,Min_Cap_Discharge_DC_MW,Min_Cap_Charge_DC_MW,Min_Cap_Discharge_AC_MW,Min_Cap_Charge_AC_MW,Max_Cap_MW,Max_Cap_MWh,Max_Cap_Inverter_MW,Max_Cap_Solar_MW,Max_Cap_Wind_MW,Max_Cap_Discharge_DC_MW,Max_Cap_Charge_DC_MW,Max_Cap_Discharge_AC_MW,Max_Cap_Charge_AC_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWhyr,Var_OM_Cost_per_MWh,Inv_Cost_Inverter_per_MWyr,Inv_Cost_Solar_per_MWyr,Inv_Cost_Wind_per_MWyr,Inv_Cost_Discharge_DC_per_MWyr,Inv_Cost_Charge_DC_per_MWyr,Inv_Cost_Discharge_AC_per_MWyr,Inv_Cost_Charge_AC_per_MWyr,Fixed_OM_Inverter_Cost_per_MWyr,Fixed_OM_Solar_Cost_per_MWyr,Fixed_OM_Wind_Cost_per_MWyr,Fixed_OM_Cost_Discharge_DC_per_MWyr,Fixed_OM_Cost_Charge_DC_per_MWyr,Fixed_OM_Cost_Discharge_AC_per_MWyr,Fixed_OM_Cost_Charge_AC_per_MWyr,Var_OM_Cost_per_MWh_Solar,Var_OM_Cost_per_MWh_Wind,Var_OM_Cost_per_MWh_Discharge_DC,Var_OM_Cost_per_MWh_Charge_DC,Var_OM_Cost_per_MWh_Discharge_AC,Var_OM_Cost_per_MWh_Charge_AC,EtaInverter,Inverter_Ratio_Wind,Inverter_Ratio_Solar,Power_to_Energy_DC,Power_to_Energy_AC,Self_Disch,Eff_Up_DC,Eff_Down_DC,Eff_Up_AC,Eff_Down_AC,region,cluster +landbasedwind_class1_moderate,1,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,117315.5,-1,-1,-1,-1,14198,0,0,0,0.15,7522,0,56816,0,0,0,0,1875,0,36613,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +utilitypv_class1_moderate,1,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,1351663.04,-1,-1,-1,-1,-1,8863,0,0,0,0.15,7522,22706,0,0,0,0,0,1875,12550,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_discharge,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7522,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_discharge,1,0,0,0,0,2,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_discharge,1,0,0,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_charge,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_charge,1,0,0,0,0,0,2,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_charge,1,0,0,0,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p1/system/Demand_data.csv b/test/multi_stage/cum_min_ret/inputs_p1/system/Demand_data.csv new file mode 100644 index 0000000000..473c675be1 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p1/system/Demand_data.csv @@ -0,0 +1,121 @@ +Voll,Demand_Segment,Cost_of_Demand_Curtailment_per_MW,Max_Demand_Curtailment,Rep_Periods,Timesteps_per_Rep_Period,Sub_Weights,Time_Index,Demand_MW_z1 +50000,1,1,1,5,24,24.0,1,11122.0 +,,,,,,3672.0,2,10655.0 +,,,,,,5016.0,3,10441.0 +,,,,,,24.0,4,10365.0 +,,,,,,24.0,5,10639.0 +,,,,,,,6,11577.0 +,,,,,,,7,13349.0 +,,,,,,,8,14550.0 +,,,,,,,9,14922.0 +,,,,,,,10,15165.0 +,,,,,,,11,15328.0 +,,,,,,,12,15380.0 +,,,,,,,13,15275.0 +,,,,,,,14,15154.0 +,,,,,,,15,14953.0 +,,,,,,,16,14885.0 +,,,,,,,17,15340.0 +,,,,,,,18,16003.0 +,,,,,,,19,15767.0 +,,,,,,,20,15236.0 +,,,,,,,21,14663.0 +,,,,,,,22,13889.0 +,,,,,,,23,12855.0 +,,,,,,,24,11809.0 +,,,,,,,25,9702.0 +,,,,,,,26,9229.0 +,,,,,,,27,9004.0 +,,,,,,,28,8951.0 +,,,,,,,29,9188.0 +,,,,,,,30,10087.0 +,,,,,,,31,11929.0 +,,,,,,,32,13166.0 +,,,,,,,33,13504.0 +,,,,,,,34,13632.0 +,,,,,,,35,13724.0 +,,,,,,,36,13742.0 +,,,,,,,37,13665.0 +,,,,,,,38,13641.0 +,,,,,,,39,13501.0 +,,,,,,,40,13366.0 +,,,,,,,41,13376.0 +,,,,,,,42,13524.0 +,,,,,,,43,13736.0 +,,,,,,,44,14401.0 +,,,,,,,45,14006.0 +,,,,,,,46,13006.0 +,,,,,,,47,11658.0 +,,,,,,,48,10416.0 +,,,,,,,49,10219.0 +,,,,,,,50,9671.0 +,,,,,,,51,9383.0 +,,,,,,,52,9269.0 +,,,,,,,53,9483.0 +,,,,,,,54,10103.0 +,,,,,,,55,11573.0 +,,,,,,,56,13059.0 +,,,,,,,57,13905.0 +,,,,,,,58,14430.0 +,,,,,,,59,14873.0 +,,,,,,,60,15179.0 +,,,,,,,61,15323.0 +,,,,,,,62,15515.0 +,,,,,,,63,15537.0 +,,,,,,,64,15481.0 +,,,,,,,65,15485.0 +,,,,,,,66,15440.0 +,,,,,,,67,15208.0 +,,,,,,,68,15028.0 +,,,,,,,69,15221.0 +,,,,,,,70,14913.0 +,,,,,,,71,13573.0 +,,,,,,,72,12159.0 +,,,,,,,73,14935.0 +,,,,,,,74,14062.0 +,,,,,,,75,13498.0 +,,,,,,,76,13146.0 +,,,,,,,77,13178.0 +,,,,,,,78,13712.0 +,,,,,,,79,15192.0 +,,,,,,,80,17114.0 +,,,,,,,81,18656.0 +,,,,,,,82,20020.0 +,,,,,,,83,21201.0 +,,,,,,,84,22009.0 +,,,,,,,85,22567.0 +,,,,,,,86,23070.0 +,,,,,,,87,23388.0 +,,,,,,,88,23629.0 +,,,,,,,89,23770.0 +,,,,,,,90,23575.0 +,,,,,,,91,23034.0 +,,,,,,,92,22325.0 +,,,,,,,93,21921.0 +,,,,,,,94,21122.0 +,,,,,,,95,19311.0 +,,,,,,,96,17514.0 +,,,,,,,97,11232.0 +,,,,,,,98,10825.0 +,,,,,,,99,10632.0 +,,,,,,,100,10622.0 +,,,,,,,101,10948.0 +,,,,,,,102,11984.0 +,,,,,,,103,13879.0 +,,,,,,,104,14890.0 +,,,,,,,105,15134.0 +,,,,,,,106,15241.0 +,,,,,,,107,15360.0 +,,,,,,,108,15407.0 +,,,,,,,109,15385.0 +,,,,,,,110,15372.0 +,,,,,,,111,15285.0 +,,,,,,,112,15482.0 +,,,,,,,113,16544.0 +,,,,,,,114,17247.0 +,,,,,,,115,17114.0 +,,,,,,,116,16657.0 +,,,,,,,117,15936.0 +,,,,,,,118,14783.0 +,,,,,,,119,13342.0 +,,,,,,,120,12052.0 diff --git a/test/multi_stage/cum_min_ret/inputs_p2/resources/Resource_multistage_data.csv b/test/multi_stage/cum_min_ret/inputs_p2/resources/Resource_multistage_data.csv new file mode 100644 index 0000000000..2f45040f7c --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/resources/Resource_multistage_data.csv @@ -0,0 +1,14 @@ +Resource,WACC,Capital_Recovery_Period,capital_recovery_period_dc,tech_wacc_dc,capital_recovery_period_solar,tech_wacc_solar,capital_recovery_period_wind,tech_wacc_wind,capital_recovery_period_discharge_dc,tech_wacc_discharge_dc,capital_recovery_period_charge_dc,tech_wacc_charge_dc,capital_recovery_period_discharge_ac,tech_wacc_discharge_ac,capital_recovery_period_charge_ac,tech_wacc_charge_ac,Lifetime,Min_Retired_Cap_MW,Min_Retired_Energy_Cap_MW,Min_Retired_Charge_Cap_MW,Min_Retired_Cap_Inverter_MW,Min_Retired_Cap_Solar_MW,Min_Retired_Cap_Wind_MW,Min_Retired_Cap_Charge_DC_MW,Min_Retired_Cap_Charge_AC_MW,Min_Retired_Cap_Discharge_DC_MW,Min_Retired_Cap_Discharge_AC_MW +natural_gas_combined_cycle,0.039,20,30,0.139,40,0.239,50,0.339,60,0.439,70,0.539,80,0.639,90,0.739,20,31,0,0,0,0,0,0,0,0,0 +solar_pv,0.017,20,30,0.117,40,0.217,50,0.317,60,0.417,70,0.517,80,0.617,90,0.717,20,41,0,0,0,0,0,0,0,0,0 +onshore_wind,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,11,0,0,0,0,0,0,0,0,0 +battery_sym,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,6,16,0,0,0,0,0,0,0,0 +battery_asym,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,7,17,27,0,0,0,0,0,0,0 +landbasedwind_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,8,0,0,0,0,11,0,0,0,0 +utilitypv_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,9,0,0,28,21,0,0,0,0,0 +storage_sym_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,10,18,0,0,0,0,0,0,0,0 +storage_asym_ac_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,11,19,0,0,0,0,0,0,0,34 +storage_asym_dc_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,12,20,0,29,0,0,0,0,33,0 +storage_sym_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,13,21,0,0,0,0,0,0,0,0 +storage_asym_ac_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,14,22,0,0,0,0,0,32,0,0 +storage_asym_dc_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,15,23,0,30,0,0,31,0,0,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p2/resources/Storage.csv b/test/multi_stage/cum_min_ret/inputs_p2/resources/Storage.csv new file mode 100644 index 0000000000..727788b728 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/resources/Storage.csv @@ -0,0 +1,3 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Max_Cap_MW,Max_Cap_MWh,Min_Cap_MW,Min_Cap_MWh,Inv_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWyr,Fixed_OM_Cost_per_MWhyr,Fixed_OM_Cost_Charge_per_MWyr,Var_OM_Cost_per_MWh,Var_OM_Cost_per_MWh_In,Self_disch,Eff_Up,Eff_Down,Min_Duration,Max_Duration,Resource_Type,region,cluster +battery_sym,1,1,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 +battery_asym,1,2,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p2/resources/Thermal.csv b/test/multi_stage/cum_min_ret/inputs_p2/resources/Thermal.csv new file mode 100644 index 0000000000..865619f951 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/resources/Thermal.csv @@ -0,0 +1,2 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,Fuel,Cap_Size,Start_Cost_per_MW,Start_Fuel_MMBTU_per_MW,Up_Time,Down_Time,Ramp_Up_Percentage,Ramp_Dn_Percentage,Min_Power,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,MGA,Resource_Type,region,cluster +natural_gas_combined_cycle,1,1,0,1,10000,-1,0,65400,10287,3.55,7.43,NG,250,91,2,6,6,0.64,0.64,0.468,0.25,0.5,0,0,1,natural_gas_fired_combined_cycle,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre.csv b/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre.csv new file mode 100644 index 0000000000..b6f20427d5 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre.csv @@ -0,0 +1,3 @@ +Resource,Zone,Num_VRE_Bins,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,MGA,Resource_Type,region,cluster +solar_pv,1,1,1,1,500,-1,0,85300,18760,0,9.13,1,solar_photovoltaic,NE,1 +onshore_wind,1,1,1,1,1000,-1,0,97200,43205,0.1,9.12,1,onshore_wind_turbine,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre_stor.csv b/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre_stor.csv new file mode 100644 index 0000000000..dce1b2d7e2 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/resources/Vre_stor.csv @@ -0,0 +1,9 @@ +Resource,Zone,SOLAR,WIND,STOR_DC_DISCHARGE,STOR_DC_CHARGE,STOR_AC_DISCHARGE,STOR_AC_CHARGE,LDS_VRE_STOR,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Existing_Cap_Inverter_MW,Existing_Cap_Solar_MW,Existing_Cap_Wind_MW,Existing_Cap_Discharge_DC_MW,Existing_Cap_Charge_DC_MW,Existing_Cap_Discharge_AC_MW,Existing_Cap_Charge_AC_MW,Min_Cap_MW,Min_Cap_MWh,Min_Cap_Inverter_MW,Min_Cap_Solar_MW,Min_Cap_Wind_MW,Min_Cap_Discharge_DC_MW,Min_Cap_Charge_DC_MW,Min_Cap_Discharge_AC_MW,Min_Cap_Charge_AC_MW,Max_Cap_MW,Max_Cap_MWh,Max_Cap_Inverter_MW,Max_Cap_Solar_MW,Max_Cap_Wind_MW,Max_Cap_Discharge_DC_MW,Max_Cap_Charge_DC_MW,Max_Cap_Discharge_AC_MW,Max_Cap_Charge_AC_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWhyr,Var_OM_Cost_per_MWh,Inv_Cost_Inverter_per_MWyr,Inv_Cost_Solar_per_MWyr,Inv_Cost_Wind_per_MWyr,Inv_Cost_Discharge_DC_per_MWyr,Inv_Cost_Charge_DC_per_MWyr,Inv_Cost_Discharge_AC_per_MWyr,Inv_Cost_Charge_AC_per_MWyr,Fixed_OM_Inverter_Cost_per_MWyr,Fixed_OM_Solar_Cost_per_MWyr,Fixed_OM_Wind_Cost_per_MWyr,Fixed_OM_Cost_Discharge_DC_per_MWyr,Fixed_OM_Cost_Charge_DC_per_MWyr,Fixed_OM_Cost_Discharge_AC_per_MWyr,Fixed_OM_Cost_Charge_AC_per_MWyr,Var_OM_Cost_per_MWh_Solar,Var_OM_Cost_per_MWh_Wind,Var_OM_Cost_per_MWh_Discharge_DC,Var_OM_Cost_per_MWh_Charge_DC,Var_OM_Cost_per_MWh_Discharge_AC,Var_OM_Cost_per_MWh_Charge_AC,EtaInverter,Inverter_Ratio_Wind,Inverter_Ratio_Solar,Power_to_Energy_DC,Power_to_Energy_AC,Self_Disch,Eff_Up_DC,Eff_Down_DC,Eff_Up_AC,Eff_Down_AC,region,cluster +landbasedwind_class1_moderate,1,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,117315.5,-1,-1,-1,-1,14198,0,0,0,0.15,7522,0,56816,0,0,0,0,1875,0,36613,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +utilitypv_class1_moderate,1,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,1351663.04,-1,-1,-1,-1,-1,8863,0,0,0,0.15,7522,22706,0,0,0,0,0,1875,12550,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_discharge,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7522,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_discharge,1,0,0,0,0,2,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_discharge,1,0,0,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_charge,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_charge,1,0,0,0,0,0,2,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_charge,1,0,0,0,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p2/system/Demand_data.csv b/test/multi_stage/cum_min_ret/inputs_p2/system/Demand_data.csv new file mode 100644 index 0000000000..473c675be1 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p2/system/Demand_data.csv @@ -0,0 +1,121 @@ +Voll,Demand_Segment,Cost_of_Demand_Curtailment_per_MW,Max_Demand_Curtailment,Rep_Periods,Timesteps_per_Rep_Period,Sub_Weights,Time_Index,Demand_MW_z1 +50000,1,1,1,5,24,24.0,1,11122.0 +,,,,,,3672.0,2,10655.0 +,,,,,,5016.0,3,10441.0 +,,,,,,24.0,4,10365.0 +,,,,,,24.0,5,10639.0 +,,,,,,,6,11577.0 +,,,,,,,7,13349.0 +,,,,,,,8,14550.0 +,,,,,,,9,14922.0 +,,,,,,,10,15165.0 +,,,,,,,11,15328.0 +,,,,,,,12,15380.0 +,,,,,,,13,15275.0 +,,,,,,,14,15154.0 +,,,,,,,15,14953.0 +,,,,,,,16,14885.0 +,,,,,,,17,15340.0 +,,,,,,,18,16003.0 +,,,,,,,19,15767.0 +,,,,,,,20,15236.0 +,,,,,,,21,14663.0 +,,,,,,,22,13889.0 +,,,,,,,23,12855.0 +,,,,,,,24,11809.0 +,,,,,,,25,9702.0 +,,,,,,,26,9229.0 +,,,,,,,27,9004.0 +,,,,,,,28,8951.0 +,,,,,,,29,9188.0 +,,,,,,,30,10087.0 +,,,,,,,31,11929.0 +,,,,,,,32,13166.0 +,,,,,,,33,13504.0 +,,,,,,,34,13632.0 +,,,,,,,35,13724.0 +,,,,,,,36,13742.0 +,,,,,,,37,13665.0 +,,,,,,,38,13641.0 +,,,,,,,39,13501.0 +,,,,,,,40,13366.0 +,,,,,,,41,13376.0 +,,,,,,,42,13524.0 +,,,,,,,43,13736.0 +,,,,,,,44,14401.0 +,,,,,,,45,14006.0 +,,,,,,,46,13006.0 +,,,,,,,47,11658.0 +,,,,,,,48,10416.0 +,,,,,,,49,10219.0 +,,,,,,,50,9671.0 +,,,,,,,51,9383.0 +,,,,,,,52,9269.0 +,,,,,,,53,9483.0 +,,,,,,,54,10103.0 +,,,,,,,55,11573.0 +,,,,,,,56,13059.0 +,,,,,,,57,13905.0 +,,,,,,,58,14430.0 +,,,,,,,59,14873.0 +,,,,,,,60,15179.0 +,,,,,,,61,15323.0 +,,,,,,,62,15515.0 +,,,,,,,63,15537.0 +,,,,,,,64,15481.0 +,,,,,,,65,15485.0 +,,,,,,,66,15440.0 +,,,,,,,67,15208.0 +,,,,,,,68,15028.0 +,,,,,,,69,15221.0 +,,,,,,,70,14913.0 +,,,,,,,71,13573.0 +,,,,,,,72,12159.0 +,,,,,,,73,14935.0 +,,,,,,,74,14062.0 +,,,,,,,75,13498.0 +,,,,,,,76,13146.0 +,,,,,,,77,13178.0 +,,,,,,,78,13712.0 +,,,,,,,79,15192.0 +,,,,,,,80,17114.0 +,,,,,,,81,18656.0 +,,,,,,,82,20020.0 +,,,,,,,83,21201.0 +,,,,,,,84,22009.0 +,,,,,,,85,22567.0 +,,,,,,,86,23070.0 +,,,,,,,87,23388.0 +,,,,,,,88,23629.0 +,,,,,,,89,23770.0 +,,,,,,,90,23575.0 +,,,,,,,91,23034.0 +,,,,,,,92,22325.0 +,,,,,,,93,21921.0 +,,,,,,,94,21122.0 +,,,,,,,95,19311.0 +,,,,,,,96,17514.0 +,,,,,,,97,11232.0 +,,,,,,,98,10825.0 +,,,,,,,99,10632.0 +,,,,,,,100,10622.0 +,,,,,,,101,10948.0 +,,,,,,,102,11984.0 +,,,,,,,103,13879.0 +,,,,,,,104,14890.0 +,,,,,,,105,15134.0 +,,,,,,,106,15241.0 +,,,,,,,107,15360.0 +,,,,,,,108,15407.0 +,,,,,,,109,15385.0 +,,,,,,,110,15372.0 +,,,,,,,111,15285.0 +,,,,,,,112,15482.0 +,,,,,,,113,16544.0 +,,,,,,,114,17247.0 +,,,,,,,115,17114.0 +,,,,,,,116,16657.0 +,,,,,,,117,15936.0 +,,,,,,,118,14783.0 +,,,,,,,119,13342.0 +,,,,,,,120,12052.0 diff --git a/test/multi_stage/cum_min_ret/inputs_p3/resources/Resource_multistage_data.csv b/test/multi_stage/cum_min_ret/inputs_p3/resources/Resource_multistage_data.csv new file mode 100644 index 0000000000..e55d1ced97 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/resources/Resource_multistage_data.csv @@ -0,0 +1,14 @@ +Resource,WACC,Capital_Recovery_Period,capital_recovery_period_dc,tech_wacc_dc,capital_recovery_period_solar,tech_wacc_solar,capital_recovery_period_wind,tech_wacc_wind,capital_recovery_period_discharge_dc,tech_wacc_discharge_dc,capital_recovery_period_charge_dc,tech_wacc_charge_dc,capital_recovery_period_discharge_ac,tech_wacc_discharge_ac,capital_recovery_period_charge_ac,tech_wacc_charge_ac,Lifetime,Min_Retired_Cap_MW,Min_Retired_Energy_Cap_MW,Min_Retired_Charge_Cap_MW,Min_Retired_Cap_Inverter_MW,Min_Retired_Cap_Solar_MW,Min_Retired_Cap_Wind_MW,Min_Retired_Cap_Charge_DC_MW,Min_Retired_Cap_Charge_AC_MW,Min_Retired_Cap_Discharge_DC_MW,Min_Retired_Cap_Discharge_AC_MW +natural_gas_combined_cycle,0.039,20,30,0.139,40,0.239,50,0.339,60,0.439,70,0.539,80,0.639,90,0.739,20,32,0,0,0,0,0,0,0,0,0 +solar_pv,0.017,20,30,0.117,40,0.217,50,0.317,60,0.417,70,0.517,80,0.617,90,0.717,20,42,0,0,0,0,0,0,0,0,0 +onshore_wind,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,12,0,0,0,0,0,0,0,0,0 +battery_sym,0.024,20,30,0.124,40,0.224,50,0.324,60,0.424,70,0.524,80,0.624,90,0.724,20,7,17,0,0,0,0,0,0,0,0 +battery_asym,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,8,18,28,0,0,0,0,0,0,0 +landbasedwind_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,9,0,0,0,0,12,0,0,0,0 +utilitypv_class1_moderate,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,10,0,0,29,22,0,0,0,0,0 +storage_sym_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,11,19,0,0,0,0,0,0,0,0 +storage_asym_ac_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,12,20,0,0,0,0,0,0,0,35 +storage_asym_dc_discharge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,13,21,0,30,0,0,0,0,34,0 +storage_sym_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,14,22,0,0,0,0,0,0,0,0 +storage_asym_ac_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,15,23,0,0,0,0,0,33,0,0 +storage_asym_dc_charge,0.027,20,30,0.127,40,0.227,50,0.327,60,0.427,70,0.527,80,0.627,90,0.727,20,16,24,0,31,0,0,32,0,0,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p3/resources/Storage.csv b/test/multi_stage/cum_min_ret/inputs_p3/resources/Storage.csv new file mode 100644 index 0000000000..727788b728 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/resources/Storage.csv @@ -0,0 +1,3 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Max_Cap_MW,Max_Cap_MWh,Min_Cap_MW,Min_Cap_MWh,Inv_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWyr,Fixed_OM_Cost_per_MWhyr,Fixed_OM_Cost_Charge_per_MWyr,Var_OM_Cost_per_MWh,Var_OM_Cost_per_MWh_In,Self_disch,Eff_Up,Eff_Down,Min_Duration,Max_Duration,Resource_Type,region,cluster +battery_sym,1,1,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 +battery_asym,1,2,1,1,0,0,-1,-1,0,0,19584,22494,4895,5622,5622,0.15,0.15,0,0.92,0.92,1,10,battery_mid,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p3/resources/Thermal.csv b/test/multi_stage/cum_min_ret/inputs_p3/resources/Thermal.csv new file mode 100644 index 0000000000..865619f951 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/resources/Thermal.csv @@ -0,0 +1,2 @@ +Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,Fuel,Cap_Size,Start_Cost_per_MW,Start_Fuel_MMBTU_per_MW,Up_Time,Down_Time,Ramp_Up_Percentage,Ramp_Dn_Percentage,Min_Power,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,MGA,Resource_Type,region,cluster +natural_gas_combined_cycle,1,1,0,1,10000,-1,0,65400,10287,3.55,7.43,NG,250,91,2,6,6,0.64,0.64,0.468,0.25,0.5,0,0,1,natural_gas_fired_combined_cycle,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre.csv b/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre.csv new file mode 100644 index 0000000000..b6f20427d5 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre.csv @@ -0,0 +1,3 @@ +Resource,Zone,Num_VRE_Bins,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,MGA,Resource_Type,region,cluster +solar_pv,1,1,1,1,500,-1,0,85300,18760,0,9.13,1,solar_photovoltaic,NE,1 +onshore_wind,1,1,1,1,1000,-1,0,97200,43205,0.1,9.12,1,onshore_wind_turbine,NE,1 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre_stor.csv b/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre_stor.csv new file mode 100644 index 0000000000..dce1b2d7e2 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/resources/Vre_stor.csv @@ -0,0 +1,9 @@ +Resource,Zone,SOLAR,WIND,STOR_DC_DISCHARGE,STOR_DC_CHARGE,STOR_AC_DISCHARGE,STOR_AC_CHARGE,LDS_VRE_STOR,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Existing_Cap_Inverter_MW,Existing_Cap_Solar_MW,Existing_Cap_Wind_MW,Existing_Cap_Discharge_DC_MW,Existing_Cap_Charge_DC_MW,Existing_Cap_Discharge_AC_MW,Existing_Cap_Charge_AC_MW,Min_Cap_MW,Min_Cap_MWh,Min_Cap_Inverter_MW,Min_Cap_Solar_MW,Min_Cap_Wind_MW,Min_Cap_Discharge_DC_MW,Min_Cap_Charge_DC_MW,Min_Cap_Discharge_AC_MW,Min_Cap_Charge_AC_MW,Max_Cap_MW,Max_Cap_MWh,Max_Cap_Inverter_MW,Max_Cap_Solar_MW,Max_Cap_Wind_MW,Max_Cap_Discharge_DC_MW,Max_Cap_Charge_DC_MW,Max_Cap_Discharge_AC_MW,Max_Cap_Charge_AC_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWhyr,Var_OM_Cost_per_MWh,Inv_Cost_Inverter_per_MWyr,Inv_Cost_Solar_per_MWyr,Inv_Cost_Wind_per_MWyr,Inv_Cost_Discharge_DC_per_MWyr,Inv_Cost_Charge_DC_per_MWyr,Inv_Cost_Discharge_AC_per_MWyr,Inv_Cost_Charge_AC_per_MWyr,Fixed_OM_Inverter_Cost_per_MWyr,Fixed_OM_Solar_Cost_per_MWyr,Fixed_OM_Wind_Cost_per_MWyr,Fixed_OM_Cost_Discharge_DC_per_MWyr,Fixed_OM_Cost_Charge_DC_per_MWyr,Fixed_OM_Cost_Discharge_AC_per_MWyr,Fixed_OM_Cost_Charge_AC_per_MWyr,Var_OM_Cost_per_MWh_Solar,Var_OM_Cost_per_MWh_Wind,Var_OM_Cost_per_MWh_Discharge_DC,Var_OM_Cost_per_MWh_Charge_DC,Var_OM_Cost_per_MWh_Discharge_AC,Var_OM_Cost_per_MWh_Charge_AC,EtaInverter,Inverter_Ratio_Wind,Inverter_Ratio_Solar,Power_to_Energy_DC,Power_to_Energy_AC,Self_Disch,Eff_Up_DC,Eff_Down_DC,Eff_Up_AC,Eff_Down_AC,region,cluster +landbasedwind_class1_moderate,1,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,117315.5,-1,-1,-1,-1,14198,0,0,0,0.15,7522,0,56816,0,0,0,0,1875,0,36613,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +utilitypv_class1_moderate,1,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,1351663.04,-1,-1,-1,-1,-1,8863,0,0,0,0.15,7522,22706,0,0,0,0,0,1875,12550,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_discharge,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7522,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_discharge,1,0,0,0,0,2,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_discharge,1,0,0,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7303,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_sym_charge,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_ac_charge,1,0,0,0,0,0,2,1,1,1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 +storage_asym_dc_charge,1,0,0,0,2,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0.15,7609,0,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0.15,0.15,0,0,0.967,-1,-1,0.005,0.005,0,0.65,0.65,0.65,0.65,NE,0 \ No newline at end of file diff --git a/test/multi_stage/cum_min_ret/inputs_p3/system/Demand_data.csv b/test/multi_stage/cum_min_ret/inputs_p3/system/Demand_data.csv new file mode 100644 index 0000000000..473c675be1 --- /dev/null +++ b/test/multi_stage/cum_min_ret/inputs_p3/system/Demand_data.csv @@ -0,0 +1,121 @@ +Voll,Demand_Segment,Cost_of_Demand_Curtailment_per_MW,Max_Demand_Curtailment,Rep_Periods,Timesteps_per_Rep_Period,Sub_Weights,Time_Index,Demand_MW_z1 +50000,1,1,1,5,24,24.0,1,11122.0 +,,,,,,3672.0,2,10655.0 +,,,,,,5016.0,3,10441.0 +,,,,,,24.0,4,10365.0 +,,,,,,24.0,5,10639.0 +,,,,,,,6,11577.0 +,,,,,,,7,13349.0 +,,,,,,,8,14550.0 +,,,,,,,9,14922.0 +,,,,,,,10,15165.0 +,,,,,,,11,15328.0 +,,,,,,,12,15380.0 +,,,,,,,13,15275.0 +,,,,,,,14,15154.0 +,,,,,,,15,14953.0 +,,,,,,,16,14885.0 +,,,,,,,17,15340.0 +,,,,,,,18,16003.0 +,,,,,,,19,15767.0 +,,,,,,,20,15236.0 +,,,,,,,21,14663.0 +,,,,,,,22,13889.0 +,,,,,,,23,12855.0 +,,,,,,,24,11809.0 +,,,,,,,25,9702.0 +,,,,,,,26,9229.0 +,,,,,,,27,9004.0 +,,,,,,,28,8951.0 +,,,,,,,29,9188.0 +,,,,,,,30,10087.0 +,,,,,,,31,11929.0 +,,,,,,,32,13166.0 +,,,,,,,33,13504.0 +,,,,,,,34,13632.0 +,,,,,,,35,13724.0 +,,,,,,,36,13742.0 +,,,,,,,37,13665.0 +,,,,,,,38,13641.0 +,,,,,,,39,13501.0 +,,,,,,,40,13366.0 +,,,,,,,41,13376.0 +,,,,,,,42,13524.0 +,,,,,,,43,13736.0 +,,,,,,,44,14401.0 +,,,,,,,45,14006.0 +,,,,,,,46,13006.0 +,,,,,,,47,11658.0 +,,,,,,,48,10416.0 +,,,,,,,49,10219.0 +,,,,,,,50,9671.0 +,,,,,,,51,9383.0 +,,,,,,,52,9269.0 +,,,,,,,53,9483.0 +,,,,,,,54,10103.0 +,,,,,,,55,11573.0 +,,,,,,,56,13059.0 +,,,,,,,57,13905.0 +,,,,,,,58,14430.0 +,,,,,,,59,14873.0 +,,,,,,,60,15179.0 +,,,,,,,61,15323.0 +,,,,,,,62,15515.0 +,,,,,,,63,15537.0 +,,,,,,,64,15481.0 +,,,,,,,65,15485.0 +,,,,,,,66,15440.0 +,,,,,,,67,15208.0 +,,,,,,,68,15028.0 +,,,,,,,69,15221.0 +,,,,,,,70,14913.0 +,,,,,,,71,13573.0 +,,,,,,,72,12159.0 +,,,,,,,73,14935.0 +,,,,,,,74,14062.0 +,,,,,,,75,13498.0 +,,,,,,,76,13146.0 +,,,,,,,77,13178.0 +,,,,,,,78,13712.0 +,,,,,,,79,15192.0 +,,,,,,,80,17114.0 +,,,,,,,81,18656.0 +,,,,,,,82,20020.0 +,,,,,,,83,21201.0 +,,,,,,,84,22009.0 +,,,,,,,85,22567.0 +,,,,,,,86,23070.0 +,,,,,,,87,23388.0 +,,,,,,,88,23629.0 +,,,,,,,89,23770.0 +,,,,,,,90,23575.0 +,,,,,,,91,23034.0 +,,,,,,,92,22325.0 +,,,,,,,93,21921.0 +,,,,,,,94,21122.0 +,,,,,,,95,19311.0 +,,,,,,,96,17514.0 +,,,,,,,97,11232.0 +,,,,,,,98,10825.0 +,,,,,,,99,10632.0 +,,,,,,,100,10622.0 +,,,,,,,101,10948.0 +,,,,,,,102,11984.0 +,,,,,,,103,13879.0 +,,,,,,,104,14890.0 +,,,,,,,105,15134.0 +,,,,,,,106,15241.0 +,,,,,,,107,15360.0 +,,,,,,,108,15407.0 +,,,,,,,109,15385.0 +,,,,,,,110,15372.0 +,,,,,,,111,15285.0 +,,,,,,,112,15482.0 +,,,,,,,113,16544.0 +,,,,,,,114,17247.0 +,,,,,,,115,17114.0 +,,,,,,,116,16657.0 +,,,,,,,117,15936.0 +,,,,,,,118,14783.0 +,,,,,,,119,13342.0 +,,,,,,,120,12052.0 diff --git a/test/test_multistage.jl b/test/test_multistage.jl index 574920c699..c7f8d83631 100644 --- a/test/test_multistage.jl +++ b/test/test_multistage.jl @@ -98,4 +98,66 @@ end can_retire_test_result = @test test_can_retire(EP,inputs) write_testlog(test_path,"Testing that the resource with Can_Retire = 0 did not expand capacity",can_retire_test_result) + +function test_update_cumulative_min_ret!() + # Merge the genx_setup with the default settings + settings = GenX.default_settings() + + for ParameterScale ∈ [0,1] + genx_setup["ParameterScale"] = ParameterScale + merge!(settings, genx_setup) + + inputs_dict = Dict() + true_min_retirements = Dict() + + scale_factor = settings["ParameterScale"] == 1 ? GenX.ModelScalingFactor : 1.0 + redirect_stdout(devnull) do + warnerror_logger = ConsoleLogger(stderr, Logging.Warn) + with_logger(warnerror_logger) do + for t in 1:3 + inpath_sub = joinpath(test_path, "cum_min_ret", string("inputs_p",t)) + + true_min_retirements[t] = CSV.read(joinpath(inpath_sub, "resources", "Resource_multistage_data.csv"), DataFrame) + rename!(true_min_retirements[t], lowercase.(names(true_min_retirements[t]))) + GenX.scale_multistage_data!(true_min_retirements[t], scale_factor) + + inputs_dict[t] = Dict() + inputs_dict[t]["Z"] = 1 + GenX.load_demand_data!(settings, inpath_sub, inputs_dict[t]) + GenX.load_resources_data!(inputs_dict[t], settings, inpath_sub, joinpath(inpath_sub, settings["ResourcesFolder"])) + compute_cumulative_min_retirements!(inputs_dict,t) + end + end + end + + for t in 1:3 + # Test that the cumulative min retirements are updated correctly + gen = inputs_dict[t]["RESOURCES"] + @test GenX.min_retired_cap_mw.(gen) == true_min_retirements[t].min_retired_cap_mw + @test GenX.min_retired_energy_cap_mw.(gen) == true_min_retirements[t].min_retired_energy_cap_mw + @test GenX.min_retired_charge_cap_mw.(gen) == true_min_retirements[t].min_retired_charge_cap_mw + @test GenX.min_retired_cap_inverter_mw.(gen) == true_min_retirements[t].min_retired_cap_inverter_mw + @test GenX.min_retired_cap_solar_mw.(gen) == true_min_retirements[t].min_retired_cap_solar_mw + @test GenX.min_retired_cap_wind_mw.(gen) == true_min_retirements[t].min_retired_cap_wind_mw + @test GenX.min_retired_cap_discharge_dc_mw.(gen) == true_min_retirements[t].min_retired_cap_discharge_dc_mw + @test GenX.min_retired_cap_charge_dc_mw.(gen) == true_min_retirements[t].min_retired_cap_charge_dc_mw + @test GenX.min_retired_cap_discharge_ac_mw.(gen) == true_min_retirements[t].min_retired_cap_discharge_ac_mw + @test GenX.min_retired_cap_charge_ac_mw.(gen) == true_min_retirements[t].min_retired_cap_charge_ac_mw + + @test GenX.cum_min_retired_cap_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_mw for i in 1:t) + @test GenX.cum_min_retired_energy_cap_mw.(gen) == sum(true_min_retirements[i].min_retired_energy_cap_mw for i in 1:t) + @test GenX.cum_min_retired_charge_cap_mw.(gen) == sum(true_min_retirements[i].min_retired_charge_cap_mw for i in 1:t) + @test GenX.cum_min_retired_cap_inverter_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_inverter_mw for i in 1:t) + @test GenX.cum_min_retired_cap_solar_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_solar_mw for i in 1:t) + @test GenX.cum_min_retired_cap_wind_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_wind_mw for i in 1:t) + @test GenX.cum_min_retired_cap_discharge_dc_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_discharge_dc_mw for i in 1:t) + @test GenX.cum_min_retired_cap_charge_dc_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_charge_dc_mw for i in 1:t) + @test GenX.cum_min_retired_cap_discharge_ac_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_discharge_ac_mw for i in 1:t) + @test GenX.cum_min_retired_cap_charge_ac_mw.(gen) == sum(true_min_retirements[i].min_retired_cap_charge_ac_mw for i in 1:t) + end + end +end + +test_update_cumulative_min_ret!() + end # module TestMultiStage