Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b91d8e0
move files to github.com
atpham88 Apr 16, 2026
261d0f4
use gentech as MGA subobjective instead of all techs
atpham88 Apr 16, 2026
0149846
resolve conflicts
atpham88 Apr 16, 2026
c980617
Update user_guide.md
atpham88 Apr 16, 2026
54fac41
resolve conflicts
atpham88 Apr 16, 2026
864ec0e
Merge branch 'main' into ap_MGA
atpham88 Apr 16, 2026
4edc116
clean up
atpham88 Apr 16, 2026
145d3c2
remove all cap MGA max/min option
atpham88 Apr 16, 2026
6f8216b
add gentech to i_subtech set
atpham88 Apr 16, 2026
ffd3c6f
resolve to pass github tests
atpham88 Apr 16, 2026
255c39f
Update futurefiles.csv
atpham88 Apr 17, 2026
76a989d
Merge branch 'main' into ap_MGA
atpham88 Apr 26, 2026
ab732e8
reduce number of employment output files
atpham88 Apr 27, 2026
ea35ef8
consolidate employment output files
atpham88 Apr 27, 2026
a010fcc
clean up
atpham88 Apr 27, 2026
de30597
clean up
atpham88 Apr 27, 2026
98f2e43
fix construction job-years calculation
atpham88 Apr 27, 2026
13224b8
no longer need encoding when writing log file
atpham88 Apr 28, 2026
2c88390
Merge remote-tracking branch 'origin/ap_MGA' into bs/mga_rv
bsergi May 11, 2026
111be85
Merge branch 'main' into ap_MGA
atpham88 May 12, 2026
a827879
revert changes
atpham88 May 12, 2026
61e2c5d
revert changes
atpham88 May 12, 2026
3e52966
Update log.py
atpham88 May 12, 2026
bb14377
Merge remote-tracking branch 'origin/ap_MGA' into bs/mga_rv
bsergi May 26, 2026
45be271
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi May 26, 2026
11ff01c
fix handling of jtype set for employment factors
bsergi Jun 8, 2026
111fabf
setup of multiple runs for MGA RV and creation of weights
bsergi Jun 8, 2026
303544f
handling of MGA weights in GAMS
bsergi Jun 8, 2026
7aeda82
add MGA random vector test case, group switches
bsergi Jun 8, 2026
eab1b63
remove electrolyzer/dac/smr from gentech
bsergi Jun 8, 2026
81a033a
update switch name for MGA RV approach
bsergi Jun 8, 2026
3a71b8b
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi Jun 8, 2026
e5c225f
fix bug with monte carlo run naming
bsergi Jun 8, 2026
ebc1bb2
remove unneeded files from runfiles.csv
bsergi Jun 8, 2026
5bda41d
reformat and add descriptive names to LHS MGA RV file
bsergi Jun 8, 2026
eeeaad6
draw weights from uniform(-1,1)
bsergi Jun 8, 2026
e05039d
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi Jun 25, 2026
1305692
add option for discrete sampling with MGA random vector
bsergi Jun 25, 2026
69c647b
Merge branch 'main' into bs/mga_rv
bsergi Jul 27, 2026
af1b962
Add option to sample weights at any level in the hierarchy file
bsergi Jul 27, 2026
7085ff9
Move MGA random vector compatibility check up
bsergi Jul 27, 2026
611d2bf
Add details on MGA random vector to user guide
bsergi Jul 27, 2026
71e5ab1
remove "download everything" requirement for MGA random vector
bsergi Jul 27, 2026
ead44e0
revert unrelated change to transmission employment
bsergi Jul 27, 2026
64986af
remove upper case files
bsergi Jul 27, 2026
b6aae52
revert line ending changes
bsergi Jul 27, 2026
6d53b56
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi Jul 30, 2026
3da2f0b
revert runfiles change
bsergi Jul 31, 2026
943b273
Update reeds/input_processing/mcs_sampler.py
bsergi Jul 31, 2026
13f3314
some minor formatting in mcs_sampler.py
bsergi Jul 31, 2026
687f018
Merge branch 'bs/mga_rv' of github.com:ReEDS-Model/ReEDS into bs/mga_rv
bsergi Jul 31, 2026
d8479f4
clean up to user guide
bsergi Jul 31, 2026
9869160
don't require GSw_HourlyClusterAlgorithm=user for MGA RV runs
bsergi Jul 31, 2026
206a199
Add compatability check for MCS and MGA RV
bsergi Jul 31, 2026
c1a8cfa
remove straggler todo item
bsergi Jul 31, 2026
b72a35b
removed duplicated generation block
bsergi Jul 31, 2026
8db167f
move reading of employment factors out of b_inputs.gms
bsergi Aug 4, 2026
5ef0562
pass at using tech-subset-table to determine MGA RV subcategories
bsergi Aug 6, 2026
865f1ed
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi Aug 6, 2026
cf7e8e4
Merge remote-tracking branch 'origin/main' into bs/mga_rv
bsergi Aug 21, 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
6 changes: 4 additions & 2 deletions cases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ GSw_MethaneLeakageScen,Fractional leakage of methane from upstream natural gas p
GSw_MGA_CostDelta,MGA: Fraction by which to allow objective function to increase when using Modeling to Generate Alternatives (MGA is turned off if set to 0; a common choice for MGA is 0.01),float,0,
GSw_MGA_Direction,MGA: Directionality of second optimization,(min|max),min,
GSw_MGA_Objective,MGA: Objective for MGA (uses GSw_MGA_SubObjective to specify technology subset if set to capacity),(capacity|generation|transmission|rasharing|co2|employment),capacity,
GSw_MGA_SubObjective,MGA: Technology subset to minimize or maximize the capacity or generation of (only used for GSw_MGA_Objective=(capacity or generation)),(battery|ccs|coal|dac|fossil|gas|gentech|geo|h2_combustion|h2_gen|hydro|nuclear|ofswind|onswind|pv|re|storage|upv|vre|wind),gentech,
GSw_MGA_SubObjective,MGA: Technology subset to minimize or maximize the capacity or generation of (only used for GSw_MGA_Objective=(capacity or generation); must be a column of tech-subset-table.csv),(battery|bio|ccs|coal|dac|fossil|gas|gentech|geo|h2_combustion|h2_gen|hydro|nuclear|ofswind|onswind|psh|pv|re|storage|upv|vre|wind),gentech,
GSw_MGA_RV_runs,"MGA: Number of samples drawn for the random vector weights that are applied to variables specified in GSw_MGA_Objective and GSw_MGA_SubObjective. Only active when GSw_MGA_CostDelta != 0; set to an integer N>0 to run N ReEDS simulations with sampling (0 disables sampling).",int,0,
Comment thread
bsergi marked this conversation as resolved.
GSw_MGA_RV_region,"MGA: regionality to use with random vector method (active when GSw_MGA_RV_runs>=1)",r; nercr; transreg; transgrp; cendiv; st; interconnect; country; usda_region,r,
GSw_MinCF,Turn on/off regional min CF constraint (applied at i/r level),0; 1,1,
GSw_Mingen,Turn on/off min-gen constraints by r/h/szn,0; 1,0,
GSw_MingenFixed,Turn on/off fixed min-gen constraints,0; 1,1,
Expand Down Expand Up @@ -393,4 +395,4 @@ resource_adequacy_years,_-delimited years to include in resource adequacy calcul
MCS_runs,Number of Monte Carlo simulation runs. Set to 0 to disable MCS. Set to an integer N > 0 to run N ReEDS simulations with sampling.,int,0,
MCS_dist,Name of the `.yaml` file defining the MCS distributions. Use 'default' or a string beginning with 'user' to reference `inputs/userinput/mcs_distributions_{MCS_dist}.yaml`,N/A,default,
MCS_dist_groups,Define the distribution groups to use in a Monte Carlo Simulation. Each entry should refer to a key from `inputs/userinput/mcs_distributions_{MCS_dist}.yaml` with multiple entries separated by a dot (e.g. Example1.Example2.Example3),N/A,tech,
MCS_lhs,Option to use random sampling (0) or latin hypercube sampling (1) for Monte Carlo simulation,0; 1,0,
MCS_lhs,Option to use random sampling (0) or latin hypercube sampling (1) for Monte Carlo simulation (also applies to MGA random vector method when not using discrete sample values),0; 1,0,
133 changes: 67 additions & 66 deletions cases_test.csv
Original file line number Diff line number Diff line change
@@ -1,66 +1,67 @@
,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
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_GasCurve,2,,1,1,,,,,,,,,,,,,,,,,,,,1,1,,,,,,
GSw_Geothermal,,,,2,,,,,,,,,,,,,,,,,,,0,,0,,,,,,
GSw_GrowthPenalties,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_Upstream,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_TransHurdleRate,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,
distpvscen,,,,,stscen2023_mid_case_95_by_2035,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_AnnualCap,,,,,2,,1,,,,,,,,,,,,,,,1,,,,,,,,,
GSw_AnnualCapScen,,,,,start2024_90pct2035_100pct2045,,start2027_95pct2035,,,,,,,,,,,,,,,start2027_95pct2035,,,,,,,,,
GSw_LoadProfiles,,,,,EER2025_100by2050,EER2025_IRAlow,EER2025_IRAlow,EER2025_IRAlow,,,,,historic,,,,,,,,,EER2025_100by2050,,,,,historic,,,,
GSw_NG_CRF_penalty,,,,,ramp_2045,,ramp_2023_2035,,,,,,,,,,,,,,,ramp_2023_2035,,,,,,,,,
GSw_PRM_NetImportLimit,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_RetirePenalty,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_FakeData,,,,,,1,1,1,,,,,,,,,,,,,,,,,,,,,,,
GSw_PRM_CapCredit,,,,,,,,1,1,,,,,,,,1,,,,,,,,,,,,,,
GSw_PRM_scenario,,,,,,,,,static,,,,,,,,static,,,,,,,,,,,,,,
GSw_PRM_UpdateMethod,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,
GSw_HourlyType,,,,,,,,,,wek,year,,,,,,,,,,,,,,,,,,,,
GSw_InterDayLinkage,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,
GSw_HourlyWeatherYears,,,,,,,2012_2013,,,,,,2020,2007_2008_2009_2010_2011_2012_2013_2016_2017_2018_2019_2020_2021_2022_2023,,,,,,,,2012_2013,,,,,2018,,,,
GSw_HourlyClusterMapMethod,,,,,,,,,,,,,,bestfirst,,,,,,,,,,,,,,,,,
GSw_WaterCapacity,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,
GSw_WaterMain,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,
GSw_WaterUse,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,
resource_adequacy_years,,,,,,,2011_2012_2013_2021_2022_2023,,,,,,,,,,,,,,,2011_2012_2013_2021_2022_2023,,,,,,,,,
GSw_HourlyClusterAlgorithm,,,,,,,,,,,,,,,,,,,,user,user,,,,,,,,,,
MCS_runs,,,,,,,,,,,,,,,,,,,,2,2,,,,,,,,,,
MCS_dist_groups,,,,,,,,,,,,,,,,,,,,tech.hydro.nuclear.gas.coal.load_country,upv_tri.nuclear_tri.ng_fuel_price_tri.load_country_unif,,,,,,,,,,
MCS_lhs,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,
GSw_PRM_StressIterateMax,,,,,,,,0,,,,,,,,0,0,,,1,1,,,,,,,,,,
GSw_ReducedResource,,,,,,,1,,,,,,,,,,,,,,,1,,,,,,,,,
GSw_SitingUPV,,,,,,limited,limited,limited,,,,,,,,,,,,,,limited,,,,,,,,,
GSw_SitingWindOfs,,,,,,limited,limited,limited,,,,,,,,,,,,,,open,,,,,,,,,
GSw_SitingWindOns,,,,,,limited,limited,limited,,,,,,,,,,,,,,limited,,,,,,,,,
GSw_TransScen,,,,,,,NTP_MT,,,,,,,,,,,,,,,NTP_MT,,,,,,,,,
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_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_H2Combustion,,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,
GSw_PRM_StressThresholdMetrics,,,,,,,,,,,,,,,,,,,,,,,,,,NEUE/LOLH/LOLE/LOLD/duration/depth,,,,,
GSw_DRShed,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,
GSw_MGA_CostDelta,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.01,,,
GSw_LoadSiteCF,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.95,,
GSw_OffshoreZones,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
GSw_OffshoreBackbone,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
GSw_OffshoreBackflow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
pras_agg_ogs_lfillgas,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
pras_existing_unit_size,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_scheduled_outage,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_unitsize_source,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r2x
pras_vre_combine,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
pras_samples,,,,,,10,10,10,,,,,,,,,,,,,,,,10,10,,,,,,
,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_MGA_RV,Pacific_LoadSite95,MARICTNYNJPAOH_Offshore,R2P
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_GasCurve,2,,1,1,,,,,,,,,,,,,,,,,,,,1,1,,,,,,,
GSw_Geothermal,,,,2,,,,,,,,,,,,,,,,,,,0,,0,,,,,,,
GSw_GrowthPenalties,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_Upstream,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_TransHurdleRate,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,
distpvscen,,,,,stscen2023_mid_case_95_by_2035,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_AnnualCap,,,,,2,,1,,,,,,,,,,,,,,,1,,,,,,,,,,
GSw_AnnualCapScen,,,,,start2024_90pct2035_100pct2045,,start2027_95pct2035,,,,,,,,,,,,,,,start2027_95pct2035,,,,,,,,,,
GSw_LoadProfiles,,,,,EER2025_100by2050,EER2025_IRAlow,EER2025_IRAlow,EER2025_IRAlow,,,,,historic,,,,,,,,,EER2025_100by2050,,,,,historic,,,,,
GSw_NG_CRF_penalty,,,,,ramp_2045,,ramp_2023_2035,,,,,,,,,,,,,,,ramp_2023_2035,,,,,,,,,,
GSw_PRM_NetImportLimit,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_RetirePenalty,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,,,,
GSw_FakeData,,,,,,1,1,1,,,,,,,,,,,,,,,,,,,,,,,,
GSw_PRM_CapCredit,,,,,,,,1,1,,,,,,,,1,,,,,,,,,,,,,,,
GSw_PRM_scenario,,,,,,,,,static,,,,,,,,static,,,,,,,,,,,,,,,
GSw_PRM_UpdateMethod,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,
GSw_HourlyType,,,,,,,,,,wek,year,,,,,,,,,,,,,,,,,,,,,
GSw_InterDayLinkage,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,
GSw_HourlyWeatherYears,,,,,,,2012_2013,,,,,,2020,2007_2008_2009_2010_2011_2012_2013_2016_2017_2018_2019_2020_2021_2022_2023,,,,,,,,2012_2013,,,,,2018,,,,,
GSw_HourlyClusterMapMethod,,,,,,,,,,,,,,bestfirst,,,,,,,,,,,,,,,,,,
GSw_WaterCapacity,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,
GSw_WaterMain,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,
GSw_WaterUse,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,
resource_adequacy_years,,,,,,,2011_2012_2013_2021_2022_2023,,,,,,,,,,,,,,,2011_2012_2013_2021_2022_2023,,,,,,,,,,
GSw_HourlyClusterAlgorithm,,,,,,,,,,,,,,,,,,,,user,user,,,,,,,,,,,
MCS_runs,,,,,,,,,,,,,,,,,,,,2,2,,,,,,,,,,,
MCS_dist_groups,,,,,,,,,,,,,,,,,,,,tech.hydro.nuclear.gas.coal.load_country,upv_tri.nuclear_tri.ng_fuel_price_tri.load_country_unif,,,,,,,,,,,
MCS_lhs,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,
GSw_PRM_StressIterateMax,,,,,,,,0,,,,,,,,0,0,,,1,1,,,,,,,,,,,
GSw_ReducedResource,,,,,,,1,,,,,,,,,,,,,,,1,,,,,,,,,,
GSw_SitingUPV,,,,,,limited,limited,limited,,,,,,,,,,,,,,limited,,,,,,,,,,
GSw_SitingWindOfs,,,,,,limited,limited,limited,,,,,,,,,,,,,,open,,,,,,,,,,
GSw_SitingWindOns,,,,,,limited,limited,limited,,,,,,,,,,,,,,limited,,,,,,,,,,
GSw_TransScen,,,,,,,NTP_MT,,,,,,,,,,,,,,,NTP_MT,,,,,,,,,,
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_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_H2Combustion,,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,
GSw_PRM_StressThresholdMetrics,,,,,,,,,,,,,,,,,,,,,,,,,,NEUE/LOLH/LOLE/LOLD/duration/depth,,,,,,
GSw_DRShed,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,
GSw_MGA_CostDelta,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.01,0.01,,,
GSw_MGA_RV_runs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,
GSw_LoadSiteCF,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.95,,
GSw_OffshoreZones,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
GSw_OffshoreBackbone,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
GSw_OffshoreBackflow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
pras_agg_ogs_lfillgas,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
pras_existing_unit_size,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_scheduled_outage,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
pras_unitsize_source,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r2x
pras_vre_combine,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1
pras_samples,,,,,,10,10,10,,,,,,,,,,,,,,,,10,10,,,,,,,
9 changes: 9 additions & 0 deletions docs/source/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,17 @@ Options are the column names in the `inputs/tech-subset-table.csv` file.

Users familiar with GAMS can add alternative objective functions to the `d_mga.gms` file and associated options to the `GSw_MGA_Objective` switch in `cases.csv`.

By default the MGA min/max is applied to the sum of the variable across all regions being modeled.
The MGA approach also supports an option to randomly sample of a vector of weights to apply to the regional values of the variable being optimized.
This method can be used to characterize the uncertainty in the regional distribution of the results.
Weights are sampled as discrete values from {-1,1} to allow for simultaneous minimization and maximization.

The MGA random vector capability is controlled by the following switches:
- `GSw_MGA_RV_runs` (default `0`): Number of random samples of weight vectors to draw; corresponds to the number of runs.
- `GSw_MGA_RV_region` (default `r`): Regionality level (specified by hierarchy file) over which to sample the random weights.

Note that this capability is currently only supported when `GSw_MGA_Objective = (capacity or generation)`.
Weights for each run are stored in the `mga_weights` parameter.

## Uncertainty Plots

Expand Down
47 changes: 27 additions & 20 deletions reeds/core/setup/b_inputs.gms
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ $gdxin
set land(r) "land-based (not offshore) zones" ;
land(r)$[not offshore(r)] = yes ;



sets
*The following two sets:
*ban - will remove the technology from being considered, anywhere
Expand Down Expand Up @@ -5356,26 +5358,6 @@ z_rep_op(t) = 0 ;
*====================================
* --- Employment Factors ---
*====================================
* Employment factors of construction and operation of power plants
$onempty
Table employment_factor_plant(i,jtype) "--job-years/MW (construction), job-years/MW-year (fom) or job-years/MWh (vom)-- employment factors of power plants by technology and job type"
$offlisting
$ondelim
$include inputs_case%ds%employment_factor_plant.csv
$offdelim
$onlisting
;
$offempty

* Employment factors of transmission deployment and flow
parameter employment_factor_inter_transmission(jtype) "--job-years/$ (construction) -- construction employment factors of transmission lines"
/
$offlisting
$ondelim
$include inputs_case%ds%employment_factor_inter_transmission.csv
$offdelim
$onlisting
/ ;

* If upgrade techs, construction employment factor is adjusted by upgrade ratio
* calculated as the ratio of the difference in capital costs between the initial
Expand All @@ -5400,6 +5382,31 @@ employment_factor_plant(i,"construction")
= employment_factor_plant(i,"construction") * upgrade_ratio(i) ;
$endif.upgrade_ef

*====================================
* --- MGA Random Vector Weights ---
*====================================

$ifthene.mgaobj ((sameas(%GSw_MGA_Objective%,capacity))or(sameas(%GSw_MGA_Objective%,generation)))

parameter mga_weights(r,i_subtech) "--unitless-- weight to assign to given MGA subobjective by region" ;

$ifthene.mga_rv (%GSw_MGA_RV_runs%>=1)
parameter mga_weights_in(r,i_subtech)
/
$offlisting
$ondelim
$include inputs_case%ds%mga_weights.csv
$offdelim
$onlisting
/ ;
mga_weights(r,i_subtech) = mga_weights_in(r,i_subtech) ;
$else.mga_rv
mga_weights(r,i_subtech) = 1 ;
$endif.mga_rv

$endif.mgaobj


*================================================================================================
*== h- and szn-dependent sets and parameters (declared here, populated in 2_temporal_params) ===
*================================================================================================
Expand Down
4 changes: 3 additions & 1 deletion reeds/core/setup/d_mga.gms
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ eq_MGA_Objective$Sw_MGA..
$[tmodel(t)
$valcap(i,v,r,t)
$%GSw_MGA_SubObjective%(i)],
CAP(i,v,r,t)
CAP(i,v,r,t)
* sum{i_subtech$i_subsets(i,i_subtech), mga_weights(r,i_subtech)}
}
;

Expand All @@ -38,6 +39,7 @@ eq_MGA_Objective$Sw_MGA..
$valgen(i,v,r,t)
$%GSw_MGA_SubObjective%(i)],
GEN(i,v,r,h,t) * hours(h)
* sum{i_subtech$i_subsets(i,i_subtech), mga_weights(r,i_subtech)}
}
;

Expand Down
28 changes: 22 additions & 6 deletions reeds/input_processing/copy_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,24 @@ def write_miscellaneous_files(
ef_trans = pd.read_csv(
os.path.join(reeds_path,'inputs','employment','employment_factor_inter_transmission.csv'),
index_col=0)
ef_trans[ef_trans.index == sw['GSw_EmploymentFactor']].T.round(8).to_csv(
os.path.join(inputs_case,'employment_factor_inter_transmission.csv'),header=False)
ef_trans = ef_trans[ef_trans.index == sw['GSw_EmploymentFactor']].T.round(8)
ef_trans.index.name = 'jtype'
ef_trans = ef_trans.rename(columns={sw['GSw_EmploymentFactor']:'Value'})
reeds.io.write_to_inputs_h5(
ef_trans, 'employment_factor_inter_transmission', inputs_case, gamstype='parameter',
comment='--job-years/$ (construction)-- construction employment factors of transmission lines',
)

# Plant employment factors:
employment_factor_plant = pd.read_csv(
os.path.join(inputs_case, 'employment_factor_plant.csv'), index_col=0
).rename_axis('i').reset_index().melt(id_vars='i', var_name='jtype', value_name='Value')

reeds.io.write_to_inputs_h5(
employment_factor_plant, 'employment_factor_plant', inputs_case, gamstype='parameter',
comment='--job-years/MW (construction), job-years/MW-year (fom) or job-years/MWh (vom)-- '
'employment factors of power plants by technology and job type',
)

# Add this_year to years_until_endogenous to generate the tech-specific firstyear parameter
scalars = reeds.io.get_scalars(full=True)
Expand Down Expand Up @@ -1341,10 +1357,10 @@ def main(reeds_path, inputs_case):

# ---- Set up logger ----
tic = datetime.datetime.now()
log = reeds.log.makelog(
scriptname=__file__,
logpath=os.path.join(inputs_case,'..','gamslog.txt'),
)
# log = reeds.log.makelog(
# scriptname=__file__,
# logpath=os.path.join(inputs_case,'..','gamslog.txt'),
# )

print('Starting copy_files.py')
main(reeds_path, inputs_case)
Expand Down
Loading
Loading