-
Notifications
You must be signed in to change notification settings - Fork 0
/
OSeMOSYS-preprocessing.txt
307 lines (293 loc) · 35.4 KB
/
OSeMOSYS-preprocessing.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
###############
# Sets #
###############
#
set COMMODITY;
set EMISSION;
set MODE_OF_OPERATION;
set REGION;
set STORAGE;
set TECHNOLOGY;
set TIMESLICE;
set YEAR;
set UDC;
#set MODEperTECHNOLOGY{TECHNOLOGY} within MODE_OF_OPERATION;
#set MODExTECHNOLOGYperFUELout{COMMODITY} within MODE_OF_OPERATION cross TECHNOLOGY;
#set MODExTECHNOLOGYperFUELin{COMMODITY} within MODE_OF_OPERATION cross TECHNOLOGY;
#set MODExTECHNOLOGYperSTORAGEto{STORAGE} within MODE_OF_OPERATION cross TECHNOLOGY;
#set MODExTECHNOLOGYperSTORAGEfrom{STORAGE} within MODE_OF_OPERATION cross TECHNOLOGY;
#set MODExTECHNOLOGYperEMISSION{e in EMISSION} within MODE_OF_OPERATION cross TECHNOLOGY;
#
#####################
# Parameters #
#####################
#
param ResultsPath, symbolic default 'results';
param AccumulatedAnnualDemand{r in REGION, f in COMMODITY, y in YEAR};
param AnnualEmissionLimit{r in REGION, e in EMISSION, y in YEAR};
param AnnualExogenousEmission{r in REGION, e in EMISSION, y in YEAR};
param AvailabilityFactor{r in REGION, t in TECHNOLOGY, y in YEAR};
param CapacityFactor{r in REGION, t in TECHNOLOGY, l in TIMESLICE, y in YEAR};
param CapacityOfOneTechnologyUnit{r in REGION, t in TECHNOLOGY, y in YEAR};
param CapacityToActivityUnit{r in REGION, t in TECHNOLOGY};
param CapitalCost{r in REGION, t in TECHNOLOGY, y in YEAR};
param CapitalCostStorage{r in REGION, s in STORAGE, y in YEAR};
param DiscountRate{r in REGION};
param EmissionActivityRatio{r in REGION, t in TECHNOLOGY, e in EMISSION, m in MODE_OF_OPERATION, y in YEAR};
param EmissionsPenalty{r in REGION, e in EMISSION, y in YEAR};
param FixedCost{r in REGION, t in TECHNOLOGY, y in YEAR};
param InputActivityRatio{r in REGION, t in TECHNOLOGY, f in COMMODITY, m in MODE_OF_OPERATION, y in YEAR};
param InputToNewCapacityRatio{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR};
param InputToTotalCapacityRatio{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR};
param ModelPeriodEmissionLimit{r in REGION, e in EMISSION};
param ModelPeriodExogenousEmission{r in REGION, e in EMISSION};
param OperationalLife{r in REGION, t in TECHNOLOGY};
param OperationalLifeStorage{r in REGION, s in STORAGE};
param OutputActivityRatio{r in REGION, t in TECHNOLOGY, f in COMMODITY, m in MODE_OF_OPERATION, y in YEAR};
param REMinProductionTarget{r in REGION, y in YEAR};
param RETagFuel{r in REGION, f in COMMODITY, y in YEAR};
param RETagTechnology{r in REGION, t in TECHNOLOGY, y in YEAR};
param ReserveMargin{r in REGION, y in YEAR};
param ReserveMarginTagFuel{r in REGION, f in COMMODITY, y in YEAR};
param ReserveMarginTagTechnology{r in REGION, t in TECHNOLOGY, y in YEAR};
param ResidualCapacity{r in REGION, t in TECHNOLOGY, y in YEAR};
param SpecifiedAnnualDemand{r in REGION, f in COMMODITY, y in YEAR};
param SpecifiedDemandProfile{r in REGION, f in COMMODITY, l in TIMESLICE, y in YEAR};
param TechnologyActivityByModeLowerLimit{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR};
param TechnologyActivityByModeUpperLimit{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR};
param TechnologyActivityDecreaseByModeLimit{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR};
param TechnologyActivityIncreaseByModeLimit{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR};
param TotalAnnualMaxCapacity{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalAnnualMaxCapacityInvestment{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalAnnualMinCapacity{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalAnnualMinCapacityInvestment{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalTechnologyAnnualActivityLowerLimit{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalTechnologyAnnualActivityUpperLimit{r in REGION, t in TECHNOLOGY, y in YEAR};
param TotalTechnologyModelPeriodActivityLowerLimit{r in REGION, t in TECHNOLOGY};
param TotalTechnologyModelPeriodActivityUpperLimit{r in REGION, t in TECHNOLOGY};
param TradeRoute{r in REGION, rr in REGION, f in COMMODITY, y in YEAR};
param VariableCost{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR};
param YearSplit{l in TIMESLICE, y in YEAR};
param UDCMultiplierTotalCapacity{r in REGION, t in TECHNOLOGY, u in UDC, y in YEAR};
param UDCMultiplierNewCapacity{r in REGION, t in TECHNOLOGY, u in UDC, y in YEAR};
param UDCMultiplierActivity{r in REGION, t in TECHNOLOGY, u in UDC, y in YEAR};
param UDCConstant{r in REGION, u in UDC, y in YEAR};
param UDCTag{r in REGION, u in UDC};
#
########## Fuel->Technology Connections #############
set MODExTECHNOLOGYperFUELout{f in COMMODITY} within MODE_OF_OPERATION cross TECHNOLOGY
:= {m in MODE_OF_OPERATION, t in TECHNOLOGY : exists{r in REGION, y in YEAR} OutputActivityRatio[r,t,f,m,y] <> 0};
set MODExTECHNOLOGYperFUELin{f in COMMODITY} within MODE_OF_OPERATION cross TECHNOLOGY
:= {m in MODE_OF_OPERATION, t in TECHNOLOGY : exists{r in REGION, y in YEAR} InputActivityRatio[r,t,f,m,y] <> 0};
#set MODExTECHNOLOGYperSTORAGEto{s in STORAGE} within MODE_OF_OPERATION cross TECHNOLOGY
# := {m in MODE_OF_OPERATION, t in TECHNOLOGY : exists{r in REGION} TechnologyToStorage[r,t,s,m] > 0};
#set MODExTECHNOLOGYperSTORAGEfrom{s in STORAGE} within MODE_OF_OPERATION cross TECHNOLOGY
# := {m in MODE_OF_OPERATION, t in TECHNOLOGY : exists{r in REGION} TechnologyFromStorage[r,t,s,m] > 0};
#set TIMESLICEofSEASON{ls in SEASON} within TIMESLICE := {l in TIMESLICE : Conversionls[l,ls] = 1};
#set TIMESLICEofDAYTYPE{ld in DAYTYPE} within TIMESLICE := {l in TIMESLICE : Conversionld[l,ld] = 1};
#set TIMESLICEofDAILYTIMEBRACKET{lh in DAILYTIMEBRACKET} within TIMESLICE := {l in TIMESLICE : Conversionlh[l,lh] = 1};
#set TIMESLICEofSDB{ls in SEASON, ld in DAYTYPE, lh in DAILYTIMEBRACKET} within TIMESLICE := TIMESLICEofSEASON[ls] inter TIMESLICEofDAYTYPE[ld] inter TIMESLICEofDAILYTIMEBRACKET[lh];
set MODExTECHNOLOGYperEMISSION{e in EMISSION} within MODE_OF_OPERATION cross TECHNOLOGY
:= {m in MODE_OF_OPERATION, t in TECHNOLOGY : exists{r in REGION, y in YEAR} EmissionActivityRatio[r,t,e,m,y] <> 0};
set MODEperTECHNOLOGY{t in TECHNOLOGY} within MODE_OF_OPERATION
:= {m in MODE_OF_OPERATION : (exists {f in COMMODITY} (m, t) in MODExTECHNOLOGYperFUELout[f] union MODExTECHNOLOGYperFUELin[f]) or
#(exists {s in STORAGE} (m, t) in MODExTECHNOLOGYperSTORAGEto[s] union MODExTECHNOLOGYperSTORAGEfrom[s]) or
(exists {e in EMISSION} (m, t) in MODExTECHNOLOGYperEMISSION[e])};
##########################
# Model Variables #
##########################
#
var AccumulatedNewCapacity{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var AnnualEmissions{r in REGION, e in EMISSION, y in YEAR};
var AnnualFixedOperatingCost{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var AnnualTechnologyEmission{r in REGION, t in TECHNOLOGY, e in EMISSION, y in YEAR};
var AnnualTechnologyEmissionByMode{r in REGION, t in TECHNOLOGY, e in EMISSION, m in MODE_OF_OPERATION, y in YEAR};
var AnnualVariableOperatingCost{r in REGION, t in TECHNOLOGY, y in YEAR};
var CapitalInvestment{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var Demand{r in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR} >= 0;
var DiscountedSalvageValue{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var DiscountedTechnologyEmissionsPenalty{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var InputToNewCapacity{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var InputToTotalCapacity{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var NewCapacity{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var NewStorageCapacity{r in REGION, s in STORAGE, y in YEAR} >= 0;
var NumberOfNewTechnologyUnits{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var ProductionByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var ProductionByTechnologyAnnual{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var RateOfActivity{r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR} >= 0;
var RateOfProductionByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var RateOfProductionByTechnologyByMode{r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} >= 0;
var RateOfTotalActivity{r in REGION, t in TECHNOLOGY, l in TIMESLICE, y in YEAR} >= 0;
var RateOfUseByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var RateOfUseByTechnologyByMode{r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} >= 0;
var SalvageValue{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var SalvageValueStorage{r in REGION, s in STORAGE, y in YEAR} >= 0;
var TotalAnnualTechnologyActivityByMode{r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR} >= 0;
var TotalCapacityAnnual{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var TotalTechnologyAnnualActivity{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0;
var TotalTechnologyModelPeriodActivity{r in REGION, t in TECHNOLOGY};
var Trade{r in REGION, rr in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR};
var UseByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
var UseByTechnologyAnnual{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} >= 0;
#
######################
# Objective Function #
######################
#
minimize cost: sum{r in REGION, t in TECHNOLOGY, y in YEAR} ((((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*FixedCost[r,t,y] + sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y])/((1+DiscountRate[r])^(y-min{yy in YEAR} min(yy)+0.5))+CapitalCost[r,t,y] * NewCapacity[r,t,y]/((1+DiscountRate[r])^(y-min{yy in YEAR} min(yy)))+DiscountedTechnologyEmissionsPenalty[r,t,y]-DiscountedSalvageValue[r,t,y]) + sum{r in REGION, s in STORAGE, y in YEAR} (CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/((1+DiscountRate[r])^(y-min{yy in YEAR} min(yy))));
#
#####################
# Constraints #
#####################
#
# Common_Equations
#s.t. Acc1_FuelProductionByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * YearSplit[l,y] = ProductionByTechnology[r,l,t,f,y];
#s.t. Acc2_FuelUseByTechnology{r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y] * YearSplit[l,y] = UseByTechnology[r,l,t,f,y];
s.t. Acc3_AverageAnnualRateOfActivity{r in REGION, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR}: sum{l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] = TotalAnnualTechnologyActivityByMode[r,t,m,y];
s.t. CAa1_TotalNewCapacity{r in REGION, t in TECHNOLOGY, y in YEAR}:AccumulatedNewCapacity[r,t,y] = sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy];
s.t. CAa2_TotalAnnualCapacity{r in REGION, t in TECHNOLOGY, y in YEAR}: ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) = TotalCapacityAnnual[r,t,y];
s.t. CAa5_TotalNewCapacity{r in REGION, t in TECHNOLOGY, y in YEAR: CapacityOfOneTechnologyUnit[r,t,y]<>0}: CapacityOfOneTechnologyUnit[r,t,y]*NumberOfNewTechnologyUnits[r,t,y] = NewCapacity[r,t,y];
s.t. CC1_UndiscountedCapitalInvestment{r in REGION, t in TECHNOLOGY, y in YEAR}: CapitalCost[r,t,y] * NewCapacity[r,t,y] = CapitalInvestment[r,t,y];
s.t. E2_AnnualEmissionProduction{r in REGION, t in TECHNOLOGY, e in EMISSION, y in YEAR}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t]: EmissionActivityRatio[r,t,e,m,y]<>0} EmissionActivityRatio[r,t,e,m,y]*RateOfActivity[r,l,t,m,y]*YearSplit[l,y] = AnnualTechnologyEmission[r,t,e,y];
s.t. EBa10_EnergyBalanceEachTS4{r in REGION, rr in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR}: Trade[r,rr,l,f,y] = -Trade[rr,r,l,f,y];
#s.t. EBa1_RateOfFuelProduction1{r in REGION, l in TIMESLICE, f in COMMODITY, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR}: RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] = RateOfProductionByTechnologyByMode[r,l,t,m,f,y];
#s.t. EBa2_RateOfFuelProduction2{r in REGION, l in TIMESLICE, f in COMMODITY, t in TECHNOLOGY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] = RateOfProductionByTechnology[r,l,t,f,y] ;
#s.t. EBa4_RateOfFuelUse1{r in REGION, l in TIMESLICE, f in COMMODITY, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR}: RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y] = RateOfUseByTechnologyByMode[r,l,t,m,f,y];
#s.t. EBa5_RateOfFuelUse2{r in REGION, l in TIMESLICE, f in COMMODITY, t in TECHNOLOGY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y] = RateOfUseByTechnology[r,l,t,f,y];
s.t. NCC1_TotalAnnualMaxNewCapacityConstraint{r in REGION, t in TECHNOLOGY, y in YEAR}: NewCapacity[r,t,y] <= TotalAnnualMaxCapacityInvestment[r,t,y];
s.t. NCC2_TotalAnnualMinNewCapacityConstraint{r in REGION, t in TECHNOLOGY, y in YEAR: TotalAnnualMinCapacityInvestment[r,t,y]>0}: NewCapacity[r,t,y] >= TotalAnnualMinCapacityInvestment[r,t,y];
s.t. OC1_OperatingCostsVariable{r in REGION, t in TECHNOLOGY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y] = AnnualVariableOperatingCost[r,t,y];
s.t. OC2_OperatingCostsFixedAnnual{r in REGION, t in TECHNOLOGY, y in YEAR}: ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*FixedCost[r,t,y] = AnnualFixedOperatingCost[r,t,y];
s.t. SI6_SalvageValueStorageAtEndOfPeriod1{r in REGION, s in STORAGE, y in YEAR: (y+OperationalLifeStorage[r,s]-1) <= (max{yy in YEAR} max(yy))}: 0 = SalvageValueStorage[r,s,y];
s.t. SV3_SalvageValueAtEndOfPeriod3{r in REGION, t in TECHNOLOGY, y in YEAR: (y + OperationalLife[r,t]-1) <= (max{yy in YEAR} max(yy))}: SalvageValue[r,t,y] = 0;
s.t. SV4_SalvageValueDiscountedToStartYear{r in REGION, t in TECHNOLOGY, y in YEAR}: DiscountedSalvageValue[r,t,y] = SalvageValue[r,t,y]/((1+DiscountRate[r])^(1+max{yy in YEAR} max(yy)-min{yy in YEAR} min(yy)));
s.t. TAC1_TotalModelHorizonTechnologyActivity{r in REGION, t in TECHNOLOGY}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t], y in YEAR} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] = TotalTechnologyModelPeriodActivity[r,t];
#
# InputToCapacityRatios
s.t. EBb4_EnergyBalanceEachYear4_ICR{r in REGION, f in COMMODITY, y in YEAR}: sum{(m,t) in MODExTECHNOLOGYperFUELout[f], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y]*YearSplit[l,y] >= sum{(m,t) in MODExTECHNOLOGYperFUELin[f], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y]*YearSplit[l,y] + sum{l in TIMESLICE, rr in REGION} Trade[r,rr,l,f,y]*TradeRoute[r,rr,f,y] + AccumulatedAnnualDemand[r,f,y] + sum{t in TECHNOLOGY} InputToNewCapacity [r, t, f, y] + sum{t in TECHNOLOGY} InputToTotalCapacity [r, t, f, y];
s.t. INC1_InputToNewCapacity{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR: InputToNewCapacityRatio [r, t, f, y] <> 0}: InputToNewCapacityRatio [r, t, f, y] * NewCapacity [r, t, y] = InputToNewCapacity [r, t, f, y];
s.t. ITC1_InputToTotalCapacity{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR: InputToTotalCapacityRatio [r, t, f, y] <> 0}: InputToTotalCapacityRatio [r, t, f, y] * TotalCapacityAnnual [r, t, y] = InputToTotalCapacity [r, t, f, y];
#
# Long_Code_Equations
s.t. AAC1_TotalAnnualTechnologyActivity{r in REGION, t in TECHNOLOGY, y in YEAR}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] = TotalTechnologyAnnualActivity[r,t,y];
s.t. CAa3_TotalActivityOfEachTechnology{r in REGION, t in TECHNOLOGY, l in TIMESLICE, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y] = RateOfTotalActivity[r,t,l,y];
s.t. E1_AnnualEmissionProductionByMode{r in REGION, t in TECHNOLOGY, e in EMISSION, m in MODEperTECHNOLOGY[t], y in YEAR}: EmissionActivityRatio[r,t,e,m,y]*sum{l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]=AnnualTechnologyEmissionByMode[r,t,e,m,y];
#
# Mode_specific
s.t. LU1_TechnologyActivityByModeUL{r in REGION, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR: TechnologyActivityByModeUpperLimit[r,t,m,y] <> 0}: TotalAnnualTechnologyActivityByMode[r,t,m,y] <= TechnologyActivityByModeUpperLimit[r,t,m,y];
s.t. LU2_TechnologyActivityByModeLL{r in REGION, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR}: TotalAnnualTechnologyActivityByMode[r,t,m,y] >= TechnologyActivityByModeLowerLimit[r,t,m,y];
s.t. LU3_TechnologyActivityIncreaseByMode{r in REGION, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR, yy in YEAR: y-yy == 1 && TechnologyActivityIncreaseByModeLimit[r,t,m,yy] <> 0}: TotalAnnualTechnologyActivityByMode[r,t,m,y] <= (1 + TechnologyActivityIncreaseByModeLimit[r,t,m,yy]) * TotalAnnualTechnologyActivityByMode[r,t,m,yy];
s.t. LU4_TechnologyActivityDecreaseByMode{r in REGION, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t], y in YEAR, yy in YEAR: y-yy == 1 && TechnologyActivityDecreaseByModeLimit[r,t,m,yy] <> 0}: TotalAnnualTechnologyActivityByMode[r,t,m,y] >= (1 - TechnologyActivityDecreaseByModeLimit[r,t,m,yy]) * TotalAnnualTechnologyActivityByMode[r,t,m,yy];
#
# Short_Code_Equations
s.t. AAC2_TotalAnnualTechnologyActivityUpperLimit{r in REGION, t in TECHNOLOGY, y in YEAR}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] <= TotalTechnologyAnnualActivityUpperLimit[r,t,y] ;
s.t. AAC3_TotalAnnualTechnologyActivityLowerLimit{r in REGION, t in TECHNOLOGY, y in YEAR: TotalTechnologyAnnualActivityLowerLimit[r,t,y]>0}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] >= TotalTechnologyAnnualActivityLowerLimit[r,t,y] ;
s.t. CAa4_Constraint_Capacity{r in REGION, l in TIMESLICE, t in TECHNOLOGY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y] <= ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*CapacityFactor[r,t,l,y]*CapacityToActivityUnit[r,t];
s.t. CAb1_PlannedMaintenance{r in REGION, t in TECHNOLOGY, y in YEAR}: sum{l in TIMESLICE} sum{m in MODEperTECHNOLOGY[t]} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] <= sum{l in TIMESLICE} (((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*CapacityFactor[r,t,l,y]*YearSplit[l,y])* AvailabilityFactor[r,t,y]*CapacityToActivityUnit[r,t];
s.t. E5_DiscountedEmissionsPenaltyByTechnology{r in REGION, t in TECHNOLOGY, y in YEAR}: sum{e in EMISSION, l in TIMESLICE, (m,tt) in MODExTECHNOLOGYperEMISSION[e]: t=tt} EmissionActivityRatio[r,t,e,m,y]*RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*EmissionsPenalty[r,e,y]/((1+DiscountRate[r])^(y-min{yy in YEAR} min(yy)+0.5)) = DiscountedTechnologyEmissionsPenalty[r,t,y];
s.t. E6_EmissionsAccounting1{r in REGION, e in EMISSION, y in YEAR}: sum{l in TIMESLICE, t in TECHNOLOGY, m in MODEperTECHNOLOGY[t]: EmissionActivityRatio[r,t,e,m,y]<>0} EmissionActivityRatio[r,t,e,m,y]*RateOfActivity[r,l,t,m,y]*YearSplit[l,y] = AnnualEmissions[r,e,y];
s.t. E8_AnnualEmissionsLimit{r in REGION, e in EMISSION, y in YEAR}: sum{l in TIMESLICE, (m,t) in MODExTECHNOLOGYperEMISSION[e]} EmissionActivityRatio[r,t,e,m,y]*RateOfActivity[r,l,t,m,y]*YearSplit[l,y]+AnnualExogenousEmission[r,e,y] <= AnnualEmissionLimit[r,e,y];
s.t. E9_ModelPeriodEmissionsLimit{r in REGION, e in EMISSION}: sum{l in TIMESLICE, (m,t) in MODExTECHNOLOGYperEMISSION[e], y in YEAR} EmissionActivityRatio[r,t,e,m,y]*RateOfActivity[r,l,t,m,y]*YearSplit[l,y] + ModelPeriodExogenousEmission[r,e] <= ModelPeriodEmissionLimit[r,e] ;
s.t. EBa11_EnergyBalanceEachTS5{r in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR}: sum{(m,t) in MODExTECHNOLOGYperFUELout[f]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y]*YearSplit[l,y] >= SpecifiedAnnualDemand[r,f,y]*SpecifiedDemandProfile[r,f,l,y] + sum{(m,t) in MODExTECHNOLOGYperFUELin[f]} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y]*YearSplit[l,y] + sum{rr in REGION} Trade[r,rr,l,f,y]*TradeRoute[r,rr,f,y];
s.t. EBa9_EnergyBalanceEachTS3{r in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR}: SpecifiedAnnualDemand[r,f,y]*SpecifiedDemandProfile[r,f,l,y] = Demand[r,l,f,y];
s.t. EBb4_EnergyBalanceEachYear4{r in REGION, f in COMMODITY, y in YEAR}: sum{(m,t) in MODExTECHNOLOGYperFUELout[f], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y]*YearSplit[l,y] >= sum{(m,t) in MODExTECHNOLOGYperFUELin[f], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y]*YearSplit[l,y] + sum{l in TIMESLICE, rr in REGION} Trade[r,rr,l,f,y]*TradeRoute[r,rr,f,y] + AccumulatedAnnualDemand[r,f,y];
#s.t. RE1_FuelProductionByTechnologyAnnual{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * YearSplit[l,y] = ProductionByTechnologyAnnual[r,t,f,y];
s.t. RE4_EnergyConstraint{r in REGION, y in YEAR}:REMinProductionTarget[r,y]*sum{l in TIMESLICE, f in COMMODITY} sum{(m,t) in MODExTECHNOLOGYperFUELout[f]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y]*RETagFuel[r,f,y] <= sum{f in COMMODITY, (m,t) in MODExTECHNOLOGYperFUELout[f], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * YearSplit[l,y]*RETagTechnology[r,t,y];
#s.t. RE5_FuelUseByTechnologyAnnual{r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR}: sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*InputActivityRatio[r,t,f,m,y]*YearSplit[l,y] = UseByTechnologyAnnual[r,t,f,y];
s.t. RM3_ReserveMargin_Constraint{r in REGION, l in TIMESLICE, y in YEAR}: sum{f in COMMODITY, (m,t) in MODExTECHNOLOGYperFUELout[f]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * ReserveMarginTagFuel[r,f,y] * ReserveMargin[r,y]<= sum {t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] * CapacityToActivityUnit[r,t];
s.t. SV1_SalvageValueAtEndOfPeriod1{r in REGION, t in TECHNOLOGY, y in YEAR: (y + OperationalLife[r,t]-1) > (max{yy in YEAR} max(yy)) && DiscountRate[r]>0}: SalvageValue[r,t,y] = CapitalCost[r,t,y]*NewCapacity[r,t,y]*(1-(((1+DiscountRate[r])^(max{yy in YEAR} max(yy) - y+1)-1)/((1+DiscountRate[r])^OperationalLife[r,t]-1)));
s.t. SV2_SalvageValueAtEndOfPeriod2{r in REGION, t in TECHNOLOGY, y in YEAR: (y + OperationalLife[r,t]-1) > (max{yy in YEAR} max(yy)) && DiscountRate[r]=0}: SalvageValue[r,t,y] = CapitalCost[r,t,y]*NewCapacity[r,t,y]*(1-(max{yy in YEAR} max(yy) - y+1)/OperationalLife[r,t]);
s.t. TAC2_TotalModelHorizonTechnologyActivityUpperLimit{r in REGION, t in TECHNOLOGY}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t], y in YEAR} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] <= TotalTechnologyModelPeriodActivityUpperLimit[r,t] ;
s.t. TAC3_TotalModelHorizonTechnologyActivityLowerLimit{r in REGION, t in TECHNOLOGY: TotalTechnologyModelPeriodActivityLowerLimit[r,t]>0}: sum{l in TIMESLICE, m in MODEperTECHNOLOGY[t], y in YEAR} RateOfActivity[r,l,t,m,y]*YearSplit[l,y] >= TotalTechnologyModelPeriodActivityLowerLimit[r,t] ;
s.t. TCC1_TotalAnnualMaxCapacityConstraint{r in REGION, t in TECHNOLOGY, y in YEAR}: ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) <= TotalAnnualMaxCapacity[r,t,y];
s.t. TCC2_TotalAnnualMinCapacityConstraint{r in REGION, t in TECHNOLOGY, y in YEAR: TotalAnnualMinCapacity[r,t,y]>0}: ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) >= TotalAnnualMinCapacity[r,t,y];
#s.t. UDC1_UserDefinedConstraints{r in REGION, u in UDC, y in YEAR: UDCTag[r,u] <> 0 && UDCTag[r,u] <> -1}:
#sum{t in TECHNOLOGY}UDCMultiplier[r,t,u,y]*TotalCapacityAnnual[r,t,y] >= UDCConstant[r,u,y];
#s.t. UDC2_UserDefinedConstraints{r in REGION, u in UDC, y in YEAR: UDCTag[r,u] = 0}:
#sum{t in TECHNOLOGY}UDCMultiplier[r,t,u,y]*TotalCapacityAnnual[r,t,y] = UDCConstant[r,u,y];
# User-defined constraints
s.t. UDC1_UserDefinedConstraintInequality{r in REGION, u in UDC, y in YEAR: UDCTag[r,u] = 0}:
sum{t in TECHNOLOGY}UDCMultiplierTotalCapacity[r,t,u,y]*TotalCapacityAnnual[r,t,y] +
sum{t in TECHNOLOGY}UDCMultiplierNewCapacity[r,t,u,y]*NewCapacity[r,t,y] +
sum{t in TECHNOLOGY}UDCMultiplierActivity[r,t,u,y]*TotalTechnologyAnnualActivity[r,t,y] <= UDCConstant[r,u,y];
s.t. UDC2_UserDefinedConstraintEquality{r in REGION, u in UDC, y in YEAR: UDCTag[r,u] = 1}:
sum{t in TECHNOLOGY}UDCMultiplierTotalCapacity[r,t,u,y]*TotalCapacityAnnual[r,t,y] +
sum{t in TECHNOLOGY}UDCMultiplierNewCapacity[r,t,u,y]*NewCapacity[r,t,y] +
sum{t in TECHNOLOGY}UDCMultiplierActivity[r,t,u,y]*TotalTechnologyAnnualActivity[r,t,y] = UDCConstant[r,u,y];
#
#####################
#
solve;
#
#####################
#
################
# Output #
################
#
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/AccumulatedNewCapacity.csv" : r, t, y, AccumulatedNewCapacity[r, t, y];
#table tout {r in REGION, e in EMISSION, y in YEAR} OUT "CSV" "res/csv/AnnualEmissions.csv" : r, e, y, AnnualEmissions[r, e, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/AnnualFixedOperatingCost.csv" : r, t, y, AnnualFixedOperatingCost[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY, e in EMISSION, y in YEAR} OUT "CSV" "res/csv/AnnualTechnologyEmission.csv" : r, t, e, y, AnnualTechnologyEmission[r, t, e, y];
#table tout {r in REGION, t in TECHNOLOGY, e in EMISSION, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" "res/csv/AnnualTechnologyEmissionByMode.csv" : r, t, e, m, y, AnnualTechnologyEmissionByMode[r, t, e, m, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/AnnualVariableOperatingCost.csv" : r, t, y, AnnualVariableOperatingCost[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/CapitalInvestment.csv" : r, t, y, CapitalInvestment[r, t, y];
#table tout {r in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/Demand.csv" : r, l, f, y, Demand[r, l, f, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/DiscountedSalvageValue.csv" : r, t, y, DiscountedSalvageValue[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/DiscountedTechnologyEmissionsPenalty.csv" : r, t, y, DiscountedTechnologyEmissionsPenalty[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/InputToNewCapacity.csv" : r, t, f, y, InputToNewCapacity[r, t, f, y];
#table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/InputToTotalCapacity.csv" : r, t, f, y, InputToTotalCapacity[r, t, f, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/NewCapacity.csv" : r, t, y, NewCapacity[r, t, y];
#table tout {r in REGION, s in STORAGE, y in YEAR} OUT "CSV" "res/csv/NewStorageCapacity.csv" : r, s, y, NewStorageCapacity[r, s, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/NumberOfNewTechnologyUnits.csv" : r, t, y, NumberOfNewTechnologyUnits[r, t, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/ProductionByTechnology.csv" : r, l, t, f, y, ProductionByTechnology[r, l, t, f, y];
#table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/ProductionByTechnologyAnnual.csv" : r, t, f, y, ProductionByTechnologyAnnual[r, t, f, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" "res/csv/RateOfActivity.csv" : r, l, t, m, y, RateOfActivity[r, l, t, m, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/RateOfProductionByTechnology.csv" : r, l, t, f, y, RateOfProductionByTechnology[r, l, t, f, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/RateOfProductionByTechnologyByMode.csv" : r, l, t, m, f, y, RateOfProductionByTechnologyByMode[r, l, t, m, f, y];
#table tout {r in REGION, t in TECHNOLOGY, l in TIMESLICE, y in YEAR} OUT "CSV" "res/csv/RateOfTotalActivity.csv" : r, t, l, y, RateOfTotalActivity[r, t, l, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/RateOfUseByTechnology.csv" : r, l, t, f, y, RateOfUseByTechnology[r, l, t, f, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/RateOfUseByTechnologyByMode.csv" : r, l, t, m, f, y, RateOfUseByTechnologyByMode[r, l, t, m, f, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/SalvageValue.csv" : r, t, y, SalvageValue[r, t, y];
#table tout {r in REGION, s in STORAGE, y in YEAR} OUT "CSV" "res/csv/SalvageValueStorage.csv" : r, s, y, SalvageValueStorage[r, s, y];
#table tout {r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" "res/csv/TotalAnnualTechnologyActivityByMode.csv" : r, t, m, y, TotalAnnualTechnologyActivityByMode[r, t, m, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/TotalCapacityAnnual.csv" : r, t, y, TotalCapacityAnnual[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" "res/csv/TotalTechnologyAnnualActivity.csv" : r, t, y, TotalTechnologyAnnualActivity[r, t, y];
#table tout {r in REGION, t in TECHNOLOGY} OUT "CSV" "res/csv/TotalTechnologyModelPeriodActivity.csv" : r, t, TotalTechnologyModelPeriodActivity[r, t];
#table tout {r in REGION, rr in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/Trade.csv" : r, rr, l, f, y, Trade[r, rr, l, f, y];
#table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" "res/csv/UseByTechnology.csv" : r, l, t, f, y, UseByTechnology[r, l, t, f, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/AccumulatedNewCapacity.csv" : r, t, y, AccumulatedNewCapacity[r, t, y];
table tout {r in REGION, e in EMISSION, y in YEAR} OUT "CSV" ResultsPath & "/AnnualEmissions.csv" : r, e, y, AnnualEmissions[r, e, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/AnnualFixedOperatingCost.csv" : r, t, y, AnnualFixedOperatingCost[r, t, y];
table tout {r in REGION, t in TECHNOLOGY, e in EMISSION, y in YEAR} OUT "CSV" ResultsPath & "/AnnualTechnologyEmission.csv" : r, t, e, y, AnnualTechnologyEmission[r, t, e, y];
table tout {r in REGION, t in TECHNOLOGY, e in EMISSION, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" ResultsPath & "/AnnualTechnologyEmissionByMode.csv" : r, t, e, m, y, AnnualTechnologyEmissionByMode[r, t, e, m, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/AnnualVariableOperatingCost.csv" : r, t, y, AnnualVariableOperatingCost[r, t, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/CapitalInvestment.csv" : r, t, y, CapitalInvestment[r, t, y];
table tout {r in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/Demand.csv" : r, l, f, y, Demand[r, l, f, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/DiscountedSalvageValue.csv" : r, t, y, DiscountedSalvageValue[r, t, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/DiscountedTechnologyEmissionsPenalty.csv" : r, t, y, DiscountedTechnologyEmissionsPenalty[r, t, y];
table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/InputToNewCapacity.csv" : r, t, f, y, InputToNewCapacity[r, t, f, y];
table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/InputToTotalCapacity.csv" : r, t, f, y, InputToTotalCapacity[r, t, f, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/NewCapacity.csv" : r, t, y, NewCapacity[r, t, y];
table tout {r in REGION, s in STORAGE, y in YEAR} OUT "CSV" ResultsPath & "/NewStorageCapacity.csv" : r, s, y, NewStorageCapacity[r, s, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/NumberOfNewTechnologyUnits.csv" : r, t, y, NumberOfNewTechnologyUnits[r, t, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/ProductionByTechnology.csv" : r, l, t, f, y, ProductionByTechnology[r, l, t, f, y];
table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/ProductionByTechnologyAnnual.csv" : r, t, f, y, ProductionByTechnologyAnnual[r, t, f, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" ResultsPath & "/RateOfActivity.csv" : r, l, t, m, y, RateOfActivity[r, l, t, m, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/RateOfProductionByTechnology.csv" : r, l, t, f, y, RateOfProductionByTechnology[r, l, t, f, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/RateOfProductionByTechnologyByMode.csv" : r, l, t, m, f, y, RateOfProductionByTechnologyByMode[r, l, t, m, f, y];
table tout {r in REGION, t in TECHNOLOGY, l in TIMESLICE, y in YEAR} OUT "CSV" ResultsPath & "/RateOfTotalActivity.csv" : r, t, l, y, RateOfTotalActivity[r, t, l, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/RateOfUseByTechnology.csv" : r, l, t, f, y, RateOfUseByTechnology[r, l, t, f, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, m in MODE_OF_OPERATION, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/RateOfUseByTechnologyByMode.csv" : r, l, t, m, f, y, RateOfUseByTechnologyByMode[r, l, t, m, f, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/SalvageValue.csv" : r, t, y, SalvageValue[r, t, y];
table tout {r in REGION, s in STORAGE, y in YEAR} OUT "CSV" ResultsPath & "/SalvageValueStorage.csv" : r, s, y, SalvageValueStorage[r, s, y];
table tout {r in REGION, t in TECHNOLOGY, m in MODE_OF_OPERATION, y in YEAR} OUT "CSV" ResultsPath & "/TotalAnnualTechnologyActivityByMode.csv" : r, t, m, y, TotalAnnualTechnologyActivityByMode[r, t, m, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/TotalCapacityAnnual.csv" : r, t, y, TotalCapacityAnnual[r, t, y];
table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/TotalTechnologyAnnualActivity.csv" : r, t, y, TotalTechnologyAnnualActivity[r, t, y];
table tout {r in REGION, t in TECHNOLOGY} OUT "CSV" ResultsPath & "/TotalTechnologyModelPeriodActivity.csv" : r, t, TotalTechnologyModelPeriodActivity[r, t];
table tout {r in REGION, rr in REGION, l in TIMESLICE, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/Trade.csv" : r, rr, l, f, y, Trade[r, rr, l, f, y];
table tout {r in REGION, l in TIMESLICE, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/UseByTechnology.csv" : r, l, t, f, y, UseByTechnology[r, l, t, f, y];
table tout {r in REGION, t in TECHNOLOGY, f in COMMODITY, y in YEAR} OUT "CSV" ResultsPath & "/UseByTechnologyAnnual.csv" : r, t, f, y, UseByTechnologyAnnual[r, t, f, y];
#table tout {r in REGION, t in TECHNOLOGY, y in YEAR} OUT "CSV" ResultsPath & "/DPATHTEST.csv" : r, t, y, AccumulatedNewCapacity[r, t, y];
#
end;