Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
436ade0
branch transfer finito linkage
Apr 15, 2026
0424508
branch transfer finito linkage
bsergi Apr 16, 2026
3596316
Merge branch 'bs/finito_link' of github.com:ReEDS-Model/ReEDS into bs…
bsergi Apr 16, 2026
e76819c
Merge remote-tracking branch 'origin/main' into bs/finito_link
bsergi Apr 16, 2026
5fd4848
Fix windows bug in outputs for linked ReEDS-FINITO runs
Apr 23, 2026
a2c1935
Merge branch 'main' into bs/finito_link
May 12, 2026
99147d1
Update to autopop_set.py call
May 13, 2026
c06a183
Merge remote-tracking branch 'origin/main' into bs/finito_link
bsergi May 22, 2026
e74e2c4
Merge remote-tracking branch 'origin/main' into bs/finito_link
bsergi May 22, 2026
6c98dde
Update region switches in cases_finito.csv
May 30, 2026
046b21d
Fix bug in report.gms for linked FINITO runs
Jun 2, 2026
8cecf3c
Add comment to report.gms
Jun 3, 2026
b0720c9
Convert USE_ELE_FINITO to busbar load when using in ReEDS
Jun 3, 2026
bf47a9b
error handling for missing finito gdx file
bsergi Jun 8, 2026
eaaaa7e
error handling for finito gdx
bsergi Jun 8, 2026
32c5b48
Merge with main
Jun 9, 2026
877b591
Fix bug in standalone ReEDS outputs by putting if statement around FI…
Jun 9, 2026
86c4093
Update to z54 by default in cases_finito.csv
Jun 9, 2026
74443a6
Remove round statement to align with main
Jun 13, 2026
9688064
Cleaning up unnecessary changes for cleaner comparison to main
Jun 19, 2026
93bd58b
Remove old switch from cases_finito.csv
Jun 29, 2026
d687d47
Remove call to removed finito file
Jun 30, 2026
5aa7540
Revert to main for Canada switch behavior
Jul 2, 2026
ea246a9
Revert to main for rounding of parameters
Jul 2, 2026
88ff50d
Add FINITO case to cases_test.csv
Jul 2, 2026
6310db7
Update FINITO case
Jul 2, 2026
02f14b8
clean up finito_dir entry
bsergi Jul 6, 2026
58f1227
For now, use only rep period load (not stress period load) from FINIT…
Jul 14, 2026
259f9f1
Fix FINITO load inclusion in handoff to PRAS
Jul 14, 2026
c82fbc3
Remove completed TODO item
Jul 14, 2026
27ca6a7
Add USA_fast case settings to FINITO case in cases_test.csv
Jul 14, 2026
8e86fe5
Merge with main
Jul 17, 2026
8f0f564
Fix bug in finito load adjustments
Jul 17, 2026
33717fd
Convert finito reference load to busbar before subtracting
Jul 17, 2026
c04037e
Simplify comment
Jul 17, 2026
c75cc9b
Clip negative loads after subtracting finito reference load, and add …
Jul 17, 2026
449b115
Fix region handling in FINITO-linkage
Jul 19, 2026
7593735
Fix H2 fixed-price bug in ReEDS-FINITO linkage
Jul 22, 2026
92fe3f3
Merge with main
Jul 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ coalscen,"Coal price scenario (inputs\fuelprices\{coalscen}.csv). The options fo
demandscen,Demand scenario (see inputs\load),N/A,AEO_2026_baseline,
dr_shedscen,DR shed scenario,demo_data_January_2025,demo_data_January_2025,
evmcscen,EVMC scenario for load and supply curve and flexibility,Baseline,Baseline,
GSw_FINITO_Link,Switch to enable linkage with FINITO,0; 1,0,
finito_dir,Directory with cloned FINITO repository,N/A,'/path/to/FINITO/directory',
finito_cases_file,"extension of the FINITO cases file including all scenarios to be run, e.g., 'linked' for cases_linked.csv",N/A,linked,
finito_case,Case name for FINITO in {finito_dir}/cases_linked.csv; use 'same' if the scenario name in cases_linked.csv matches the scenario name in the cases file,N/A,BAUfast,
first_year_finito,First year when the FINITO module is enabled,N/A,2018,
geodiscov,Annual discover rates for new geothermal sites,BAU; TI,BAU,
geohydrosupplycurve,Geohydro Supply Curve,ATB_2023,ATB_2023,
egssupplycurve,EGS Supply Curve,ATB_2023; reV,reV,
Expand Down
44 changes: 44 additions & 0 deletions cases_finito.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
,Default Value,ReEDSonly,BAUreg,Reference,Reference-AEO,Reference-HOG,TradeReference,TradeReference-AEO,Trade-HOG,Reference-LowBio,Reference-HighBio,Tax200,Tax200-AEO,NetZero,NetZero-LowBio,NetZero-HighBio,NetZero-SlackLim1500,NetZero-SlackLim1500-CO2Stor-Mid,NetZero-SlackLim1500-CO2Stor-Low,NetZero-SlackLim500-CO2Stor-Low,NetZero-SlackCost2500-CO2Stor-Low,aggreg_54_level
ignore,1,1,0,1,1,1,1,1,1,,,,,,,,,,,,,
GSw_FINITO_Link,1,0,,,,,,,,,,,,,,,,,,,,
finito_dir,/path/to/FINITO/directory,0,,,,,,,,,,,,,,,,,,,,
finito_cases_file,linked,,,,,,,,,,,,,,,,,,,,,
finito_case,BAU,,BAUreg,,BAU-AEO,AEO-HOG,TradeReEDS,TradeReEDS-AEO,TradeReEDS-HOG,BAU-LowBio,BAU-HighBio,,BAU-AEO,NetZero,NetZero-LowBio,NetZero-HighBio,NetZero-SlackLim1500,NetZero-SlackLim1500-CO2Stor-Mid,NetZero-SlackLim1500-CO2Stor-Low,NetZero-SlackLim500-CO2Stor-Low,NetZero-SlackCost2500-CO2Stor-Low,aggreg_54_level
coalscen,AEO_2025_reference,,,,,,,,,,,,,,,,,,,,,
ngscen,AEO_2025_reference,,,,,AEO_2025_HOG,,,AEO_2025_HOG,,,,,,,,,,,,,
uraniumscen,AEO_2025_reference,,,,,,,,,,,,,,,,,,,,,
GSw_Region,country/USA,,st/CO,,,,,,,,,,,,,,,,,,,
GSw_ZoneSet,z54,,,,,,,,,,,,,,,,,,,,,z54
GSw_GasCurve,1,,2,,,,,,,,,,,,,,,,,,,
GSw_gopt,2,,,,,,,,,,,,,,,,,,,,,
GSw_NewValCapShrink,1,,,,,,,,,,,,,,,,,,,,,
endyear,2050,,2035,,,,,,,,,,,,,,,,,,,
yearset,2010_2015_2020..2050..5,,,,,,,,,,,,,,,,,,,,,
first_year_finito,2018,,,,,,,,,,,,,,,,,,,,,
incentives_suffix,obbba,,,,,,,,,,,,,,,,,,,,,
GSw_Upgrades,0,,,,,,,,,,,,,,,,,,,,,
GSw_AnnualCap,0,,,,,,,,,,,,,,,,,,,,,
GSw_AnnualCapScen,start2023_100pct2035,,,,,,,,,,,,,,,,,,,,,
GSw_Clean_Air_Act,0,,,,,,,,,,,,,,,,,,,,,
GSw_CSP,0,,,,,,,,,,,,,,,,,,,,,
GSw_Geothermal,0,,,,,,,,,,,,,,,,,,,,,
GSw_H2,2,,,,,,,,,,,,,,,,,,,,,
GSw_H2_PTC,0,,,,,,,,,,,,,,,,,,,,,
GSw_H2_Demand_Case,BAU,,,,,,,,,,,,,,,,,,,,,
GSw_H2_SMR,1,,,,,,,,,,,,,,,,,,,,,
GSw_H2_Transport,0,,,,,,,,,,,,,,,,,,,,,
GSw_H2Combustion,1,,,,,,,,,,,,,,,,,,,,,
GSw_H2Combustionupgrade,1,,,,,,,,,,,,,,,,,,,,,
GSw_H2CombinedCycle,1,,,,,,,,,,,,,,,,,,,,,
GSw_DAC,1,,,,,,,,,,,,,,,,,,,,,
GSw_BECCS,1,,,,,,,,,,,,,,,,,,,,,
GSw_TCPhaseout,1,,,,,,,,,,,,,,,,,,,,,
GSw_CO2_Detail,1,,,,,,,,,,,,,,,,,,,,,
numhintage,4,,,,,,,,,,,,,,,,,,,,,
GSw_CarbTax,0,,,,,,,,,,,1,1,,,,,,,,,
GSw_CarbTaxOption,default,,,,,,,,,,,t200_2050,t200_2050,,,,,,,,,
GSw_PRM_CapCredit,0,,,,,,,,,,,,,,,,,,,,,
GSw_PRM_StressIterateMax,0,,,,,,,,,,,,,,,,,,,,,
GSw_HourlyNumClusters,9,,,,,,,,,,,,,,,,,,,,,
GSw_HourlyChunkLengthRep,4,,,,,,,,,,,,,,,,,,,,,
GSw_HourlyChunkLengthStress,4,,,,,,,,,,,,,,,,,,,,,
24 changes: 13 additions & 11 deletions cases_test.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
,Default Value,Pacific,USA_defaults,Mid_Case,USA_decarb,github_Pacific,github_Everything,github_MA_county_CC,Pacific_CC,Pacific_weks,Pacific_full_year,Interday_storage,Pacific_2020,Pacific_rep15,WY_county,WECC_county,PJM_county_CC,NYVT_mixed,OR_water,MonteCarlo_Random,MonteCarlo_LHS,Everything,Simple,USA_fast,USA_faster,MultiMetricRA,Pacific_DR,Pacific_MGA,Pacific_LoadSite95,MARICTNYNJPAOH_Offshore,R2P
,Default Value,Pacific,USA_defaults,Mid_Case,USA_decarb,github_Pacific,github_Everything,github_MA_county_CC,Pacific_CC,Pacific_weks,Pacific_full_year,Interday_storage,Pacific_2020,Pacific_rep15,WY_county,WECC_county,PJM_county_CC,NYVT_mixed,OR_water,MonteCarlo_Random,MonteCarlo_LHS,Everything,Simple,USA_fast,USA_faster,MultiMetricRA,Pacific_DR,Pacific_MGA,Pacific_LoadSite95,MARICTNYNJPAOH_Offshore,R2P,FINITO
ignore,1,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_Region,cendiv/Pacific,,country/USA,country/USA,country/USA,,st/ID.WY.NE.IA.IL,st/MA,,,,,,,st/WY,interconnect/western,transreg/PJM,st/NY.VT,st/OR,st/NE.NY.PA,st/NE.NY.PA,st/ID.WY.NE.IA.IL,st/KS,country/USA,country/USA,st/NY.NJ,,,,st/MA.RI.CT.NY.NJ.PA.OH,
endyear,2032,,2050,2050,2050,2029,2060,2026,,,,,,,,,,,2035,2030,2030,2060,2035,2050,2050,2050,,,,,
yearset,,,,,,,2010..2060..10,,,,,,,,,,,,,2010..2050..5,2010..2050..5,2010..2060..10,,2010..2050..5,2010_2025_2050,2010..2050..5,,,,,
GSw_ZoneSet,,,,,,,z54,z3109,,,,,,,z3109,z3109,z3109,PJMcounty,,,,z54,z134,z54,z48,,,,,,
GSw_Region,cendiv/Pacific,,country/USA,country/USA,country/USA,,st/ID.WY.NE.IA.IL,st/MA,,,,,,,st/WY,interconnect/western,transreg/PJM,st/NY.VT,st/OR,st/NE.NY.PA,st/NE.NY.PA,st/ID.WY.NE.IA.IL,st/KS,country/USA,country/USA,st/NY.NJ,,,,st/MA.RI.CT.NY.NJ.PA.OH,,country/USA
endyear,2032,,2050,2050,2050,2029,2060,2026,,,,,,,,,,,2035,2030,2030,2060,2035,2050,2050,2050,,,,,,2050
yearset,,,,,,,2010..2060..10,,,,,,,,,,,,,2010..2050..5,2010..2050..5,2010..2060..10,,2010..2050..5,2010_2025_2050,2010..2050..5,,,,,,2010..2050..5
GSw_ZoneSet,,,,,,,z54,z3109,,,,,,,z3109,z3109,z3109,PJMcounty,,,,z54,z134,z54,z48,,,,,,,z54
GSw_GasCurve,2,,1,1,,,,,,,,,,,,,,,,,,,,1,1,,,,,,
GSw_Geothermal,,,,2,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_GrowthPenalties,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,
Expand Down Expand Up @@ -42,14 +42,14 @@ GSw_CO2_Detail,,,,,,,1,,,,,,,,,,,,,,,1,,,,,,,,,
GSw_DAC,,,,,,,1,,,,,,,,,,,,,,,1,,,,,,,,,
GSw_NoFossilOffsetCDR,,,,,,,1,,,,,,,,,,,,,,,1,,,,,,,,,
GSw_Biopower,,,,,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_HourlyChunkLengthRep,,,,,,,,,,,,,,,,,,,,,,,6,4,4,,,,,,
GSw_HourlyChunkLengthStress,,,,,,,,,,,,,,,,,,,,,,,6,4,4,,,,,,
GSw_HourlyChunkLengthRep,,,,,,,,,,,,,,,,,,,,,,,6,4,4,,,,,,,4
GSw_HourlyChunkLengthStress,,,,,,,,,,,,,,,,,,,,,,,6,4,4,,,,,,,4
GSw_LfillGas,,,,,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_Nuclear,,,,,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_OpRes,,,,,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_StartCost,,,,,,,,,,,,,,,,,,,,,,,0,0,0,,,,,,
GSw_H2,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,,,,
GSw_H2_PTC,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,,,,
GSw_StartCost,,,,,,,,,,,,,,,,,,,,,,,0,0,0,,,,,,,0
GSw_H2,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,,,,,0
GSw_H2_PTC,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,,,,,0
GSw_H2Combustion,,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,
GSw_PRM_StressThresholdMetrics,,,,,,,,,,,,,,,,,,,,,,,,,,NEUE/LOLH/LOLE/LOLD/duration/depth,,,,,
GSw_DRShed,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,
Expand All @@ -63,4 +63,6 @@ pras_existing_unit_size,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_scheduled_outage,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_unitsize_source,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r2x
pras_vre_combine,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
pras_samples,,,,,,10,10,10,,,,,,,,,,,,,,,,10,10,,,,,,
pras_samples,,,,,,10,10,10,,,,,,,,,,,,,,,,10,10,,,,,,,10
GSw_FINITO_Link,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
finito_dir,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/projects/futuregrid/mmowers/FINITO
9 changes: 9 additions & 0 deletions helpers/restart_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import shutil
import subprocess
import argparse
import re
from glob import glob
from pathlib import Path
sys.path.append(str(Path(__file__).parent.parent))
Expand Down Expand Up @@ -95,6 +96,14 @@

#%% Copy additional files if desired
for f in more_copyfiles:
if f.lower().startswith('finito'):
# if file starts with 'finito' append the finito directory
sw = reeds.io.get_switches(case)
if int(sw.GSw_FINITO_Link):
f_copy = re.sub("^finito/", "" , f, flags=re.IGNORECASE)
shutil.copy(os.path.join(sw.finito_dir,f_copy), os.path.join(case,f))
else:
shutil.copy(os.path.join(reeds_path,f), os.path.join(case,f))
shutil.copy(f, Path(case, f))
if copy_reeds:
shutil.copytree(Path(reeds_path, 'reeds'), Path(case, 'reeds'), dirs_exist_ok=True)
Expand Down
11 changes: 11 additions & 0 deletions reeds/core/setup/a_createmodel.gms
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ $setglobal ds /
$endif.unix

$include reeds%ds%core%ds%setup%ds%b_inputs.gms

$ifthene.finito_link %GSw_FINITO_Link% == 1
$include finito%ds%model%ds%finito_input.gms
$include finito%ds%model%ds%finito_vars_eqs.gms
$endif.finito_link

$include reeds%ds%core%ds%setup%ds%c_model.gms

$ifthene.finito_link %GSw_FINITO_Link% == 1
$include finito%ds%model%ds%finito_model.gms
$endif.finito_link

$include reeds%ds%core%ds%setup%ds%d_objective.gms
$include reeds%ds%core%ds%setup%ds%d_mga.gms
$include reeds%ds%core%ds%setup%ds%e_solveprep.gms
11 changes: 9 additions & 2 deletions reeds/core/setup/b_inputs.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,8 @@ set tmodel(t) "years to include in the model",
tfix(t) "years to fix variables over when summing over previous years",
tprev(t,tt) "previous modeled tt from year t",
stfeas(st) "states to include in the model",
tsolved(t) "years that have solved" ;
tsolved(t) "years that have solved",
tfuel(t) "years that use ReEDS fuel supply curve module (otherwise uses supply curves in FINITO)" ;

*following parameters get re-defined when the solve years have been declared
parameter mindiff(t) "minimum difference between t and all other tt that are in tmodel(t)" ;
Expand All @@ -1035,7 +1036,7 @@ tfix(t) = no ;
stfeas(st) = no ;
tprev(t,tt) = no ;
tsolved(t) = no ;

tfuel(t)=no;

*==============================
* Year specification
Expand All @@ -1050,6 +1051,12 @@ tprev(t,tt)$[tmodel_new(t)$tmodel_new(tt)$(tt.val<t.val)] = yes ;
mindiff(t)$tmodel_new(t) = smin{tt$tprev(t,tt), t.val-tt.val} ;
tprev(t,tt)$[tmodel_new(t)$tmodel_new(tt)$(t.val-tt.val<>mindiff(t))] = no ;

* If FINITO linkage is on, remove all modeled years from tfuel after first_year_finito
* as the FINITO supply curves will be used instead of those in ReEDS;
* otherwise, all modeled years use ReEDS supply curves and are eligible for tfuel
tfuel(t)$[tmodel_new(t)]=yes;
tfuel(t)$[tmodel_new(t)$Sw_FINITO_Link$(t.val>=%first_year_finito%)] = no ;

* In order to fill all necessary dimensions of upgrade techs parameters, we require
* Sw_UpgradeYear in ban(i) to be a modeled year and thus we compute as either
* the GSw_UpgradeYear option or the next modeled years after GSw_UpgradeYear
Expand Down
76 changes: 66 additions & 10 deletions reeds/core/setup/c_model.gms
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ eq_loadcon(r,h,t)$tmodel(t)..
* (the effect is the same but avoiding the h-indexed OP_LOADSITE reduces solve time)
+ OP_LOADSITE(r,h,t)$[Sw_LoadSiteCF$(Sw_LoadSiteCF<1)$val_loadsite(r)]
+ CAP_LOADSITE(r,t)$[(Sw_LoadSiteCF=1)$val_loadsite(r)]

* [plus] load for industrial and converted fuel facilities (FINITO),
* including the PRM for stress periods
* USE_ELE_FINITO is end-use, so divide by (1-distloss) to convert it to busbar
* [MWh/hr = MW]
$ifthene.linked_load Sw_FINITO_Link==1
+ (USE_ELE_FINITO(r,h,t) / (1.0 - distloss))$[t_finito(t)] * (1 + prm(r,t)$h_stress(h))
$endif.linked_load
;

* ---------------------------------------------------------------------------
Expand Down Expand Up @@ -2882,7 +2890,7 @@ eq_national_gen(t)$[tmodel(t)$national_gen_frac(t)$Sw_GenMandate]..
* ---------------------------------------------------------------------------

*gas used from each bin is the sum of all gas used
eq_gasused(cendiv,h,t)$[tmodel(t)$((Sw_GasCurve=0) or (Sw_GasCurve=3))]..
eq_gasused(cendiv,h,t)$[tmodel(t)$tfuel(t)$((Sw_GasCurve=0) or (Sw_GasCurve=3))]..

sum{gb,GASUSED(cendiv,gb,h,t) }

Expand All @@ -2899,7 +2907,7 @@ eq_gasused(cendiv,h,t)$[tmodel(t)$((Sw_GasCurve=0) or (Sw_GasCurve=3))]..
* ---------------------------------------------------------------------------

* gas from each bin needs to less than its capacity
eq_gasbinlimit(cendiv,gb,t)$[tmodel(t)$(Sw_GasCurve=0)]..
eq_gasbinlimit(cendiv,gb,t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=0)]..

gaslimit(cendiv,gb,t)

Expand All @@ -2910,7 +2918,7 @@ eq_gasbinlimit(cendiv,gb,t)$[tmodel(t)$(Sw_GasCurve=0)]..

* ---------------------------------------------------------------------------

eq_gasbinlimit_nat(gb,t)$[tmodel(t)$(Sw_GasCurve=3)]..
eq_gasbinlimit_nat(gb,t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=3)]..

gaslimit_nat(gb,t)

Expand All @@ -2923,7 +2931,7 @@ eq_gasbinlimit_nat(gb,t)$[tmodel(t)$(Sw_GasCurve=3)]..

* ---------------------------------------------------------------------------

eq_gasaccounting_regional(cendiv,t)$[tmodel(t)$(Sw_GasCurve=1)]..
eq_gasaccounting_regional(cendiv,t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=1)]..

sum{fuelbin, VGASBINQ_REGIONAL(fuelbin,cendiv,t) }

Expand All @@ -2936,7 +2944,7 @@ eq_gasaccounting_regional(cendiv,t)$[tmodel(t)$(Sw_GasCurve=1)]..

* ---------------------------------------------------------------------------

eq_gasaccounting_national(t)$[tmodel(t)$(Sw_GasCurve=1)]..
eq_gasaccounting_national(t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=1)]..

sum{fuelbin,VGASBINQ_NATIONAL(fuelbin,t) }

Expand All @@ -2949,7 +2957,7 @@ eq_gasaccounting_national(t)$[tmodel(t)$(Sw_GasCurve=1)]..

* ---------------------------------------------------------------------------

eq_gasbinlimit_regional(fuelbin,cendiv,t)$[tmodel(t)$(Sw_GasCurve=1)]..
eq_gasbinlimit_regional(fuelbin,cendiv,t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=1)]..

Gasbinwidth_regional(fuelbin,cendiv,t)

Expand All @@ -2960,7 +2968,7 @@ eq_gasbinlimit_regional(fuelbin,cendiv,t)$[tmodel(t)$(Sw_GasCurve=1)]..

* ---------------------------------------------------------------------------

eq_gasbinlimit_national(fuelbin,t)$[tmodel(t)$(Sw_GasCurve=1)]..
eq_gasbinlimit_national(fuelbin,t)$[tmodel(t)$tfuel(t)$(Sw_GasCurve=1)]..

Gasbinwidth_national(fuelbin,t)

Expand All @@ -2974,10 +2982,10 @@ eq_gasbinlimit_national(fuelbin,t)$[tmodel(t)$(Sw_GasCurve=1)]..
*==============================
* -- Bioenergy Supply Curve --
*==============================
* defer to FINITO representation when models are linked

* ---------------------------------------------------------------------------

eq_bioused(r,t)$[sum{(i,v)$(bio(i) or cofire(i)), valgen(i,v,r,t) }$tmodel(t)]..
eq_bioused(r,t)$[sum{(i,v)$(bio(i) or cofire(i)), valgen(i,v,r,t) }$tmodel(t)$tfuel(t)]..

sum{bioclass, BIOUSED(bioclass,r,t) }

Expand All @@ -2996,7 +3004,7 @@ eq_bioused(r,t)$[sum{(i,v)$(bio(i) or cofire(i)), valgen(i,v,r,t) }$tmodel(t)]..
* ---------------------------------------------------------------------------

* biomass consumption limit is annual
eq_biousedlimit(bioclass,usda_region,t)$tmodel(t)..
eq_biousedlimit(bioclass,usda_region,t)$[tmodel(t)$tfuel(t)]..

biosupply(usda_region,bioclass,"cap")

Expand Down Expand Up @@ -3566,6 +3574,11 @@ eq_h2_demand(p,t)$[(sameas(p,"H2"))$tmodel(t)$(yeart(t)>=h2_demand_start)$(Sw_H2
+ sum{(i,v,r,h)$[valgen(i,v,r,t)$h2_combustion(i)$h_rep(h)],
GEN(i,v,r,h,t) * hours(h) * h2_combustion_intensity * heat_rate(i,v,r,t)
}

* hydrogen demand from indusrty (FINITO): FINITO demand [MMBtu/yr] * conversion [metric tons-H2/MMBtu-H2]
$ifthene.linked_h2_nat Sw_FINITO_Link==1
+ [sum{(r,h)$h_rep(h), hours(h) * USE_H2_FINITO(r,h,t) * h2_metric_tons_per_mmbtu }]$t_finito(t)
$endif.linked_h2_nat
;

* ---------------------------------------------------------------------------
Expand Down Expand Up @@ -3597,6 +3610,11 @@ eq_h2_demand_regional(r,h,t)
+ sum{(i,v)$[valgen(i,v,r,t)$h2_combustion(i)],
GEN(i,v,r,h,t) * h2_combustion_intensity * heat_rate(i,v,r,t)
}

* regional hydrogen demand for industry (FINITO)
$ifthene.linked_h2_reg Sw_FINITO_Link==1
+ [ USE_H2_FINITO(r,h,t) * h2_metric_tons_per_mmbtu ]$t_finito(t)
$endif.linked_h2_reg
;

* ---------------------------------------------------------------------------
Expand Down Expand Up @@ -3839,6 +3857,11 @@ eq_co2_capture(r,h,t)

* capture from DAC
+ sum{(i,v)$[dac(i)$valcap(i,v,r,t)$i_p(i,"DAC")], PRODUCE("DAC",i,v,r,h,t) }$Sw_DAC
* (ReEDS-FINITO) capture from industry [metric_tons-CO2/hr]:
* calculation: hours_per_year [yrs/hr] * capture [scaled_metric_tons-CO2/yr] / co2_scale [scaled_metric_tons-CO2/metric_tons-CO2]
$ifthene.linked_co2_capture Sw_FINITO_Link==1
+ [CAPTURE_CO2EM(r,h,t) / co2_scale]$[t_finito(t)$h_rep(h)]
$endif.linked_co2_capture
;

* ---------------------------------------------------------------------------
Expand Down Expand Up @@ -3868,6 +3891,11 @@ eq_co2_spurline_caplimit(r,cs,h,t)$[Sw_CO2_Detail$r_cs(r,cs)$tmodel(t)$(yeart(t)
=g=

CO2_STORED(r,cs,h,t)
* (ReEDS-FINITO) extraction of CO2 [metric_tons-CO2/hr]
* calculation: hours_per_year [yrs/hr] * (1 / co2_scale [scaled_metric_tons-CO2/metric_tons-CO2]) * use [scaled_metric_tons-CO2/yr]
$ifthene.linked_co2_spurline_caplimit Sw_FINITO_Link==1
+ [ (1 / co2_scale) * EXTRACT_CO2_CS(cs,r,h,t) ]$[h_rep(h)$t_finito(t)]
$endif.linked_co2_spurline_caplimit
;

* ---------------------------------------------------------------------------
Expand All @@ -3887,6 +3915,18 @@ eq_co2_sink(r,h,t)$[tmodel(t)$Sw_CO2_Detail$(yeart(t)>=co2_detail_startyr)]..

* net trade
+ sum{rr$co2_routes(r,rr), CO2_FLOW(rr,r,h,t) - CO2_FLOW(r,rr,h,t) }

* (ReEDS-FINITO) extraction - use of CO2 [metric_tons-CO2/hr]
*calculation: hours_per_year [yrs/hr] * (1 / co2_scale [scaled_metric_tons-CO2/metric_tons-CO2]) * extraction/use [scaled_metric_tons-CO2/yr]
$ifthene.linked_co2_sink Sw_FINITO_Link==1
+ (1 / co2_scale) * [
* extraction from all cs sites in r
+ sum{cs$[csfeas(cs)$r_cs(r,cs)], EXTRACT_CO2_CS(cs,r,h,t)}
* total use of CO2, equivalent to supply
- USE_CO2(r,h,t)
]$[h_rep(h)$t_finito(t)]
$endif.linked_co2_sink

;

* ---------------------------------------------------------------------------
Expand All @@ -3900,6 +3940,14 @@ eq_co2_injection_limit(cs,h,t)$[Sw_CO2_Detail$tmodel(t)$(yeart(t)>=co2_detail_st

* must exceed metric tons per hour entering storage
sum{r$r_cs(r,cs), CO2_STORED(r,cs,h,t) }



* (ReEDS-FINITO) extraction of CO2 for use [metric_tons-CO2/hr]
* calculation: hours_per_year [yrs/hr] * (1 / co2_scale [scaled_metric_tons-CO2/metric_tons-CO2]) * use [scaled_metric_tons-CO2/yr]
$ifthene.linked_co2_injection_limit Sw_FINITO_Link==1
+ (1 / co2_scale) * sum{r$[r_cs(r,cs)], EXTRACT_CO2_CS(cs,r,h,t) }$[h_rep(h)$t_finito(t)]
$endif.linked_co2_injection_limit
;

* ---------------------------------------------------------------------------
Expand All @@ -3916,6 +3964,14 @@ eq_co2_cumul_limit(cs,t)$[tmodel(t)$Sw_CO2_Detail$(yeart(t)>=co2_detail_startyr)
$[(yeart(tt)<=yeart(t))$(tmodel(tt) or tfix(tt))$(yeart(tt)>=co2_detail_startyr)
$r_cs(r,cs)$h_rep(h)],
yearweight(tt) * hours(h) * CO2_STORED(r,cs,h,tt) }

* (ReEDS-FINITO) cumulative amount extracted over time
$ifthene.linked_co2_storage_cumul_limit Sw_FINITO_Link==1
- sum{(r,h,tt)
$[(yeart(tt)<=yeart(t))$(tmodel(tt) or tfix(tt))$(yeart(tt)>=co2_detail_startyr)
$r_cs(r,cs)$(tfuel(tt))],
yearweight(tt) * hours(h) * EXTRACT_CO2_CS(cs,r,h,tt) }$[t_finito(t)]
$endif.linked_co2_storage_cumul_limit
;
* ---------------------------------------------------------------------------

Expand Down
Loading
Loading