Skip to content

Commit

Permalink
Add support for the UC_ATTR attribute (#223)
Browse files Browse the repository at this point in the history
Co-authored-by: Siddharth Krishna <[email protected]>
  • Loading branch information
olejandro and siddharth-krishna authored Mar 19, 2024
1 parent cbf88b9 commit a21df91
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 71 deletions.
6 changes: 3 additions & 3 deletions xl2times/config/times-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4535,7 +4535,7 @@
},
{
"name": "UC_ATTR",
"gams-cat": "parameter",
"gams-cat": "md-set",
"indexes": [
"ALL_R",
"UC_N",
Expand All @@ -4547,8 +4547,8 @@
"region",
"uc_n",
"side",
"type",
"uc_n"
"uc_grptype",
"uc_name"
]
},
{
Expand Down
101 changes: 89 additions & 12 deletions xl2times/config/times-sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@
"ENV",
"FIN"
],
"IN_OUT":
[
"IN",
"OUT"
],
"IMPEXP":
[
"EXP",
"IMP"
],
"LIM":
[
"FX",
"LO",
"N",
"UP"
],
"NRG_TYPE": [
"CONSRV",
"FOSSIL",
"FRERENEW",
"ELC",
"HTHEAT",
"LIMRENEW",
"LTHEAT",
"NUCLR",
"RATE",
"RENEN",
"SYNTH"
],
"PRC_GRP":
[
"CHP",
Expand All @@ -29,17 +59,64 @@
"STS",
"XTRACT"
],
"NRG_TYPE": [
"CONSRV",
"FOSSIL",
"FRERENEW",
"ELC",
"HTHEAT",
"LIMRENEW",
"LTHEAT",
"NUCLR",
"RATE",
"RENEN",
"SYNTH"
"SIDE":
[
"LHS",
"RHS"
],
"TSLVL":
[
"ANNUAL",
"SEASON",
"WEEKLY",
"DAYNITE"
],
"UC_GRPTYPE":
[
"ACT",
"CAP",
"COMCON",
"COMNET",
"COMPRD",
"FLO",
"IRE",
"NCAP",
"UCN"
],
"UC_NAME":
[
"BUILDUP",
"CAPACT",
"CAPFLO",
"COST",
"CUMSUM",
"DELIV",
"FLO_COST",
"FLO_DELIV",
"FLO_SUB",
"FLO_TAX",
"EFF",
"GROWTH",
"INVCOST",
"INVSUB",
"INVTAX",
"NCAP_COST",
"NCAP_ISUB",
"NCAP_ITAX",
"NET",
"NEWFLO",
"ONLINE",
"PERDISC",
"PERIOD",
"SUB",
"SYNC",
"TAX",
"YES"
],
"UPT":
[
"COLD",
"WARM",
"HOT"
]
}
4 changes: 1 addition & 3 deletions xl2times/config/times_mapping.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ COM_UNIT[REG,COM,UNITS] = Commodities(Region,Commodity,Unit)
CUR[CUR] = Units(Unit,Type:currency)
DATAYEAR[DATAYEAR,TEXT] = DataYears(Year,Year)
E[DATAYEAR,VALUE] = TimePeriods(Year,E)
IRE_FLO[REG,DATAYEAR,PRC,COM,TSLVL,IE,COM,VALUE] = ~TODO(TODO)
IRE_FLOSUM[REG,DATAYEAR,PRC,COM,TSLVL,IE,COM,IO,VALUE] = ~TODO(Region,Year,Process,Commodity,TimeSlice,TODO-IE,Commodity,TODO-IO,TODO-IRE_FLOSUM)
MILESTONYR[YEAR] = TimePeriods(M)
MODLYEAR[DATAYEAR,TEXT] = ModelYears(Year,Year)
NRG_TMAP[REG,NRG_TYPE,COM] = Commodities(Region,Ctype,Commodity)
Expand All @@ -32,7 +30,7 @@ TOP[REG,PRC,COM,IO] = Topology(Region,Process,Commodity,IO)
TOP_IRE[ALL_REG,COM,ALL_R,C,PRC] = Trade(Origin,IN,Destination,OUT,Process)
TS_GROUP[REG,TSLVL,TS] = TimeSlices(Region,TSLVL,TS)
TS_MAP[REG,PARENT,TS_MAP] = TimeSliceMap(Region,Parent,TimesliceMap)
UC_ATTR[REG,UC_N,SIDE,UC_GRPTYPE,UC_NAME] = ~TODO(Region,UC_N,Side,UC_GRPTYPE,TODO-UC_NAME)
UC_ATTR[REG,UC_N,SIDE,UC_GRPTYPE,UC_NAME] = UserConstraints(Region,Name,Side,Group_Type,UC_Param)
UC_N[UC_N,TEXT] = UserConstraints(Name,Description)
UC_R_EACH[REG,UC_N] = UserConstraints(Region,Name,Reg_Action:R_E)
UC_R_SUM[REG,UC_N] = UserConstraints(Region,Name,Reg_Action:R_S)
Expand Down
Loading

0 comments on commit a21df91

Please sign in to comment.