-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new resource type: CCS with solvent storage #795
base: solvent-storage
Are you sure you want to change the base?
Conversation
… in non-representative periods (#781)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_net_revenue.jl
Lines 112 to 113 in f1bbba4
end | |
if !isempty(DC_DISCHARGE) |
[JuliaFormatter] reported by reviewdog 🐶
inputs["omega"]) |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_net_revenue.jl
Lines 121 to 123 in f1bbba4
(value.(EP[:vP_AC_DISCHARGE][AC_DISCHARGE,:]).data * inputs["omega"]) | |
end | |
end |
[JuliaFormatter] reported by reviewdog 🐶
MIN_CAP_GEN_SOLAR = ids_with_policy(gen_VRE_STOR, min_cap_solar, tag = mincap) |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 59 to 60 in f1bbba4
MIN_CAP_GEN_ASYM_DC_DIS = intersect(inputs["VS_ASYM_DC_DISCHARGE"], HAS_MIN_CAP_STOR) | |
MIN_CAP_GEN_ASYM_AC_DIS = intersect(inputs["VS_ASYM_AC_DISCHARGE"], HAS_MIN_CAP_STOR) |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 65 to 66 in f1bbba4
etainverter.(gen[MIN_CAP_GEN_SOLAR]) * | |
(dual.(EP[:cZoneMinCapReq][mincap]))) |
[JuliaFormatter] reported by reviewdog 🐶
dfRegSubRevenue.SubsidyRevenue[MIN_CAP_GEN_WIND] .+= ((value.(EP[:eTotalCap_WIND][MIN_CAP_GEN_WIND]).data) * |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 73 to 75 in f1bbba4
dfRegSubRevenue.SubsidyRevenue[MIN_CAP_GEN_ASYM_DC_DIS] .+= ((value.(EP[:eTotalCapDischarge_DC][MIN_CAP_GEN_ASYM_DC_DIS].data) .* | |
etainverter.(gen[MIN_CAP_GEN_ASYM_DC_DIS])) * | |
(dual.(EP[:cZoneMinCapReq][mincap]))) |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 78 to 79 in f1bbba4
dfRegSubRevenue.SubsidyRevenue[MIN_CAP_GEN_ASYM_AC_DIS] .+= ((value.(EP[:eTotalCapDischarge_AC][MIN_CAP_GEN_ASYM_AC_DIS]).data) * | |
(dual.(EP[:cZoneMinCapReq][mincap]))) |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 82 to 84 in f1bbba4
dfRegSubRevenue.SubsidyRevenue[MIN_CAP_GEN_SYM_DC] .+= ((value.(EP[:eTotalCap_STOR][MIN_CAP_GEN_SYM_DC]).data .* | |
power_to_energy_dc.(gen[MIN_CAP_GEN_SYM_DC]) .* | |
etainverter.(gen[MIN_CAP_GEN_SYM_DC])) * |
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 88 to 89 in f1bbba4
dfRegSubRevenue.SubsidyRevenue[MIN_CAP_GEN_SYM_AC] .+= ((value.(EP[:eTotalCap_STOR][MIN_CAP_GEN_SYM_AC]).data .* | |
power_to_energy_ac.(gen[MIN_CAP_GEN_SYM_AC])) * |
@@ -71,6 +108,12 @@ function hydro_inter_period_linkage!(EP::Model, inputs::Dict) | |||
# Build up inventory can be positive or negative | |||
@variable(EP, vdSOC_HYDRO[y in STOR_HYDRO_LONG_DURATION, w = 1:REP_PERIOD]) | |||
|
|||
# Maximum positive storage inventory change within subperiod | |||
@variable(EP, vdSOC_maxPos_HYDRO[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD] >= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
@variable(EP, vdSOC_maxPos_HYDRO[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD] >= 0) | |
@variable(EP, vdSOC_maxPos_HYDRO[y in STOR_HYDRO_LONG_DURATION, w = 1:REP_PERIOD]>=0) |
# Maximum negative storage inventory change within subperiod | ||
@variable(EP, vdSOC_maxNeg_HYDRO[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD] <= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
# Maximum negative storage inventory change within subperiod | |
@variable(EP, vdSOC_maxNeg_HYDRO[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD] <= 0) | |
# Maximum negative storage inventory change within subperiod | |
@variable(EP, vdSOC_maxNeg_HYDRO[y in STOR_HYDRO_LONG_DURATION, w = 1:REP_PERIOD]<=0) |
@@ -111,4 +154,27 @@ | |||
r in REP_PERIODS_INDEX], | |||
vSOC_HYDROw[y,r]==EP[:vS_HYDRO][y, hours_per_subperiod * dfPeriodMap[r, :Rep_Period_Index]] - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
vSOC_HYDROw[y,r]==EP[:vS_HYDRO][y, hours_per_subperiod * dfPeriodMap[r, :Rep_Period_Index]] - | |
vSOC_HYDROw[y, | |
r]==EP[:vS_HYDRO][y, hours_per_subperiod * dfPeriodMap[r, :Rep_Period_Index]] - |
@constraint(EP, cMaxSoCVarPos_H[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD, t=2:hours_per_subperiod], | ||
vdSOC_maxPos_HYDRO[y,w] >= EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+t] - EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
@constraint(EP, cMaxSoCVarPos_H[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD, t=2:hours_per_subperiod], | |
vdSOC_maxPos_HYDRO[y,w] >= EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+t] - EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+1]) | |
@constraint(EP, | |
cMaxSoCVarPos_H[ | |
y in STOR_HYDRO_LONG_DURATION, w = 1:REP_PERIOD, t = 2:hours_per_subperiod], | |
vdSOC_maxPos_HYDRO[y, | |
w]>=EP[:vS_HYDRO][y, hours_per_subperiod * (w - 1) + t] - | |
EP[:vS_HYDRO][y, hours_per_subperiod * (w - 1) + 1]) |
@constraint(EP, cMaxSoCVarNeg_H[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD, t=2:hours_per_subperiod], | ||
vdSOC_maxNeg_HYDRO[y,w] <= EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+t] - EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
@constraint(EP, cMaxSoCVarNeg_H[y in STOR_HYDRO_LONG_DURATION, w=1:REP_PERIOD, t=2:hours_per_subperiod], | |
vdSOC_maxNeg_HYDRO[y,w] <= EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+t] - EP[:vS_HYDRO][y,hours_per_subperiod*(w-1)+1]) | |
@constraint(EP, | |
cMaxSoCVarNeg_H[ | |
y in STOR_HYDRO_LONG_DURATION, w = 1:REP_PERIOD, t = 2:hours_per_subperiod], | |
vdSOC_maxNeg_HYDRO[y, | |
w]<=EP[:vS_HYDRO][y, hours_per_subperiod * (w - 1) + t] - | |
EP[:vS_HYDRO][y, hours_per_subperiod * (w - 1) + 1]) |
|
||
for t_int in t_interior | ||
t = hours_per_subperiod * (w - 1) + t_int | ||
SOC_t[stor_hydro_long_duration, t_r + t_int - 1] = SOC_t[stor_hydro_long_duration, t_r + t_int - 2] .- 1 ./ efficiency_down.(gen[stor_long_duration]) .* v_P[stor_hydro_long_duration, t] .- v_spill[stor_hydro_long_duration, t] .+ pP_max[stor_hydro_long_duration, t] .* e_total_cap[stor_hydro_long_duration] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
SOC_t[stor_hydro_long_duration, t_r + t_int - 1] = SOC_t[stor_hydro_long_duration, t_r + t_int - 2] .- 1 ./ efficiency_down.(gen[stor_long_duration]) .* v_P[stor_hydro_long_duration, t] .- v_spill[stor_hydro_long_duration, t] .+ pP_max[stor_hydro_long_duration, t] .* e_total_cap[stor_hydro_long_duration] | |
SOC_t[stor_hydro_long_duration, t_r + t_int - 1] = SOC_t[ | |
stor_hydro_long_duration, t_r + t_int - 2] .- | |
1 ./ | |
efficiency_down.(gen[stor_long_duration]) .* | |
v_P[ | |
stor_hydro_long_duration, t] .- v_spill[ | |
stor_hydro_long_duration, t] .+ | |
pP_max[ | |
stor_hydro_long_duration, t] .* e_total_cap[stor_hydro_long_duration] |
rename!(df_SOC_t,auxNew_Names) | ||
CSV.write(joinpath(path, "StorageEvol.csv"), dftranspose(df_SOC_t, false), writeheader=false) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
rename!(df_SOC_t,auxNew_Names) | |
CSV.write(joinpath(path, "StorageEvol.csv"), dftranspose(df_SOC_t, false), writeheader=false) | |
rename!(df_SOC_t, auxNew_Names) | |
CSV.write(joinpath(path, "StorageEvol.csv"), | |
dftranspose(df_SOC_t, false), writeheader = false) |
inputs["pP_Max_Solar"][SOLAR, :] .- | ||
value.(EP[:vP_SOLAR][SOLAR, :]).data) .* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
inputs["pP_Max_Solar"][SOLAR, :] .- | |
value.(EP[:vP_SOLAR][SOLAR, :]).data) .* | |
inputs["pP_Max_Solar"][SOLAR, :] .- | |
value.(EP[:vP_SOLAR][SOLAR, :]).data) .* |
dfNetRevenue.Var_OM_cost_out[WIND] += var_om_cost_per_mwh_wind.(gen_VRE_STOR[(gen_VRE_STOR.wind .!= 0)]) .* | ||
(value.(EP[:vP_WIND][WIND, :]).data * | ||
inputs["omega"]) | ||
dfVreStor[1:VRE_STOR_LENGTH, :EndCapWind] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
dfVreStor[1:VRE_STOR_LENGTH, :EndCapWind] | |
(value.(EP[:vP_SOLAR][SOLAR, :]).data .* |
|
||
dfNetRevenue.Var_OM_cost_out[WIND] += var_om_cost_per_mwh_wind.(gen[WIND]) .* | ||
(value.(EP[:vP_WIND][WIND, :]).data * | ||
inputs["omega"]) | ||
end | ||
if !isempty(DC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
if !isempty(DC) | |
dfVreStor[ | |
1:VRE_STOR_LENGTH, :EndCapWind] |
Co-authored-by: lbonaldo <[email protected]>
Update develop branch with release branch
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Checklist
How this can be tested
An example case "11_three_zones_CCS_solvent_storage" is used in test.
Post-approval checklist for GenX core developers
After the PR is approved