Add new resource type: CCS with solvent storage#795
Add new resource type: CCS with solvent storage#795qluo0320github wants to merge 47 commits intosolvent-storagefrom
Conversation
Update Julia version requirements and recommendations
… in non-representative periods (#781)
There was a problem hiding this comment.
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
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_net_revenue.jl
Lines 121 to 123 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 59 to 60 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 65 to 66 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 73 to 75 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 78 to 79 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 82 to 84 in f1bbba4
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/write_outputs/write_subsidy_revenue.jl
Lines 88 to 89 in f1bbba4
| @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.
[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.
[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 @@ function hydro_inter_period_linkage!(EP::Model, inputs::Dict) | |||
| 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.
[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.
[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.
[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.
[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.
[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.
[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.
[JuliaFormatter] reported by reviewdog 🐶
| dfVreStor[1:VRE_STOR_LENGTH, :EndCapWind] | |
| (value.(EP[:vP_SOLAR][SOLAR, :]).data .* |
| (value.(EP[:vP_WIND][WIND, :]).data * | ||
| inputs["omega"]) | ||
| end | ||
| if !isempty(DC) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| if !isempty(DC) | |
| dfVreStor[ | |
| 1:VRE_STOR_LENGTH, :EndCapWind] |
Co-authored-by: lbonaldo <bonaldo.luca12@gmail.com>
Release v0.4.2
Update develop branch with release branch
Fix CRM formulation for asymmetric storage with operational reserves.
…820) This PR creates links from the Thermal page to the fuels page for piecewise linear cost curve
Patch Release v0.4.3
Update develop branch with `release\v0.4.3` branch
* Access variables directly rather than with EP[:_] * Eliminate repeated/branching logic Reduces three possible @constraint calls to one, in a single higher-level function --------- Co-authored-by: lbonaldo <bonaldo.luca12@gmail.com>
Update `develop` branch with hotfix 827. A new patch version is released.
* Add Allam Cycle with Liquid Oxygen Storage * Add duration constraints on LOX of allam cycle * Add policy-related constraints to allam cycle; add UC * Add doc for Allam Cycle inputs * Add test for Allam Cycle module --------- Co-authored-by: Fangwei Cheng <fc4uk@virginia.edu>
Co-authored-by: Luca Bonaldo <39280783+lbonaldo@users.noreply.github.com>
…840) Fix small bug where if a resource lifetime is not an integer, the multi stage code will not work.
…capacity (#836) This PR adds a constraint (as suggested by @patrickbryant) which attempts to prevent fast charging/discharging of storage batteries within a time step by enforcing a maximum charging rate capped at the storage capacity, less, the SOC from the last time step.
Performance improvements by using `add_to_expression!` instead of `+=`. This is a followup on `#815`. --------- Co-authored-by: lbonaldo <bonaldo.luca12@gmail.com>
This commit replaces `$` with `USD` to fix formatting/display of the documentation. As the dollar sign is also used for denoting math mode in LaTeX/Markdown, it can cause rendering issues if not escaped.
|
Closed in favor of #854. |
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