Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 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
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
2 changes: 2 additions & 0 deletions cases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ GSw_MGA_CostDelta,MGA: Fraction by which to allow objective function to increase
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|hydro|nuclear|ofswind|onswind|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,
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
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,,,,,,,,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 useful to characterizing the uncertainty in the regional distribution of the results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This method can be useful to characterizing the uncertainty in the regional distribution of the results.
This method can be used to characterize the uncertainty in the regional distribution of the results.

Weights are sampled as discrete values from a support of {-1,1} to allow for simultaneous minimization and maximization.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check, is "support" the right word here? (I'm unfamiliar with this usage but also don't know much stats)


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 hierarhcy file) over which to sample the random weights.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `GSw_MGA_RV_region` (default `r`): Regionality level (specified by hierarhcy file) over which to sample the random weights.
- `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
31 changes: 31 additions & 0 deletions reeds/core/setup/b_inputs.gms
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,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 @@ -6025,6 +6027,35 @@ 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


*TODO: add different handling for other subobjectives with different dimensions
* should we also include error checking?


Comment on lines +6055 to +6058

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to move to issue if you still want to address it (or just remove if it's old)

Suggested change
*TODO: add different handling for other subobjectives with different dimensions
* should we also include error checking?

*================================================================================================
*== h- and szn-dependent sets and parameters (declared here, populated in 2_temporal_params) ===
*================================================================================================
Expand Down
20 changes: 19 additions & 1 deletion reeds/core/setup/d_mga.gms
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,25 @@ 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)}
}
;

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

$elseif.mgaobj %GSw_MGA_Objective% == 'generation'
Equation eq_MGA_Objective "--MW-- Defines generation for MGA" ;
Variable MGA_OBJ "--MWh-- Generation of technology to be minimized/maximied" ;
eq_MGA_Objective$Sw_MGA..
MGA_OBJ
=e=
sum{(i,v,r,h,t)
$[tmodel(t)
$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)}
Comment on lines +29 to +42

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates the next block below; can instead just add * sum{i_subtech$i_subsets(i,i_subtech), mga_weights(r,i_subtech)} to the existing $elseif.mgaobj %GSw_MGA_Objective% == 'generation' block

}
;

Expand Down
Loading
Loading