-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenesysmod_results_sensitivity.gms
489 lines (400 loc) · 41.3 KB
/
genesysmod_results_sensitivity.gms
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
* ###################### genesysmod_results_sensitivity.gms #######################
*
* GENeSYS-MOD v3.1 [Global Energy System Model] ~ March 2022
*
* Based on OSEMOSYS 2011.07.07 conversion to GAMS by Ken Noble, Noble-Soft Systems - August 2012
*
* Updated to newest OSeMOSYS-Version (2016.08) and further improved with additional equations 2016 - 2022
* by Konstantin Löffler, Thorsten Burandt, Karlo Hainsch
*
* #############################################################
*
* Copyright 2020 Technische Universität Berlin and DIW Berlin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* #############################################################
* #############################################################
* ###################### sensitivity outputs ##################
* #############################################################
$ifthen %switch_sensitivity_results_only% == 1
$if not setglobal gdxdir $setglobal gdxdir GdxFiles\
$if not set filename $set filename s_carbonprice_leader
$if not set sensitivity $set sensitivity carbonprice
$if not set sensitivity_identifier $set sensitivity_identifier leader
$if not set elmod_nthhour $set elmod_nthhour 244
$include genesysmod_dec.gms
parameters YearVal
ElectrificationRate
EmissionIntensity
z_ProductionByTechnologyByModeAnnual
YearlyDifferenceMultiplier
powerSubsectorShares;
$GDXin %filename%.gdx
$onUNDF
** Sets
$loadm Region_Full Region Sector Technology Mode_of_Operation Year Fuel ModalType Emission Timeslice Storage
$include genesysmod_subsets.gms
** Parameters
$loadm SpecifiedAnnualDemand EmissionIntensity EmissionsPenalty SpecifiedDemandProfile YearSplit TotalAnnualMaxCapacity CapacityFactor AvailabilityFactor TotalTechnologyModelPeriodActivityUpperLimit
$loadm TotalTechnologyAnnualActivityUpperLimit OperationalLife ResidualCapacity Curtailment GrowthRateTradeCapacity StorageLevelStart StorageMaxChargeRate TechnologyToStorage
$loadm InputActivityRatio z_ProductionByTechnologyByModeAnnual OutputActivityRatio YearVal TradeRoute TagFuelToSector TagElectricTechnology TagTechnologyToSector powerSubsectorShares
** Variables
$load OperatingCost DiscountedOperatingCost
$loadm DiscountedCapitalInvestment DiscountedTechnologyEmissionsPenalty DiscountedNewTradeCapacityCosts DiscountedAnnualTotalTradeCosts
$loadm CapitalInvestment AnnualTechnologyEmissionsPenalty NewTradeCapacityCosts TradeCosts Import GeneralDiscountRate DiscountedSalvageValue SalvageValue
$loadm ElectrificationRate ProductionAnnual ProductionByTechnologyAnnual UseByTechnologyAnnual UseAnnual
$loadm TotalCapacityAnnual TotalTradeCapacity NetTradeAnnual AnnualTechnologyEmission AnnualTotalTradeCosts
** Marginals from Equations
equation E8_RegionalAnnualEmissionsLimit(YEAR_FULL,EMISSION,REGION_FULL);
equation E9_AnnualEmissionsLimit(YEAR_FULL,EMISSION);
$load E8_RegionalAnnualEmissionsLimit E9_AnnualEmissionsLimit
$offUNDF
$endif
* System Costs
* Split by sector and region
* DISCOUNTED
* Power costs - split generation, storage and transmission
parameter output_systemcosts;
output_systemcosts('Discounted System Costs',se,r,y) = sum((t)$(TagTechnologyToSector(t,se)),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted System Costs',se,'Europe',y) = sum((t,r)$(TagTechnologyToSector(t,se)),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted System Costs','Trade',r,y) = DiscountedAnnualTotalTradeCosts.l(y,r)+sum((f,rr),DiscountedNewTradeCapacityCosts.l(y,f,r,rr));
output_systemcosts('Discounted System Costs','Trade','Europe',y) = sum(r,output_systemcosts('Discounted System Costs','Trade',r,y));
output_systemcosts('Discounted System Cost Split','CAPEX',r,y) = sum((t),DiscountedCapitalInvestment.l(y,t,r));
output_systemcosts('Discounted System Cost Split','CAPEX','Europe',y) = sum((t,r),DiscountedCapitalInvestment.l(y,t,r));
output_systemcosts('Discounted System Cost Split','OPEX',r,y) = sum((t),DiscountedOperatingCost.l(y,t,r));
output_systemcosts('Discounted System Cost Split','OPEX','Europe',y) = sum((t,r),DiscountedOperatingCost.l(y,t,r));
output_systemcosts('Discounted System Cost Split','Trade',r,y) = DiscountedAnnualTotalTradeCosts.l(y,r)+sum((f,rr),DiscountedNewTradeCapacityCosts.l(y,f,r,rr));
output_systemcosts('Discounted System Cost Split','Trade','Europe',y) = sum(r,DiscountedAnnualTotalTradeCosts.l(y,r)+sum((f,rr),DiscountedNewTradeCapacityCosts.l(y,f,r,rr)));
output_systemcosts('Discounted Power Costs','Trade',r,y) = sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr)*TradeCosts('Power',r,rr))/((1+GeneralDiscountRate(r))**(YearVal(y)-smin(yy, YearVal(yy))+0.5))+sum((rr),DiscountedNewTradeCapacityCosts.l(y,'Power',r,rr));
output_systemcosts('Discounted Power Costs','Trade','Europe',y) = sum(r,sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr)*TradeCosts('Power',r,rr))/((1+GeneralDiscountRate(r))**(YearVal(y)-smin(yy, YearVal(yy))+0.5))+sum((rr),DiscountedNewTradeCapacityCosts.l(y,'Power',r,rr)));
output_systemcosts('Discounted Power Costs','Generation',r,y) = sum((t)$(TagTechnologyToSector(t,'Power')),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted Power Costs','Generation','Europe',y) = sum((t,r)$(TagTechnologyToSector(t,'Power')),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted Power Costs','Storage',r,y) = sum((t)$(TagTechnologyToSector(t,'Storages')),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted Power Costs','Storage','Europe',y) = sum((t,r)$(TagTechnologyToSector(t,'Storages')),DiscountedCapitalInvestment.l(y,t,r)
+DiscountedOperatingCost.l(y,t,r)-DiscountedSalvageValue.l(y,t,r)+DiscountedTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Discounted Power Costs','Transmission',r,y) = (sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr))/((1+GeneralDiscountRate(r))**(YearVal(y)-smin(yy, YearVal(yy))+0.5)))
+sum(rr,DiscountedNewTradeCapacityCosts.l(y,'Power',r,rr));
output_systemcosts('Discounted Power Costs','Transmission','Europe',y) = sum(r,(sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr))/((1+GeneralDiscountRate(r))**(YearVal(y)-smin(yy, YearVal(yy))+0.5)))
+sum(rr,DiscountedNewTradeCapacityCosts.l(y,'Power',r,rr)));
output_systemcosts('Discounted System Costs','Power','Europe_AT',y)$(output_systemcosts('Discounted System Costs','Power','Europe_AT',y) = 0) = na;
* UNDISCOUNTED
output_systemcosts('Nominal System Costs',se,r,y) = sum((t)$(TagTechnologyToSector(t,se)),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal System Costs',se,'Europe',y) = sum((t,r)$(TagTechnologyToSector(t,se)),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal System Costs','Trade',r,y) = AnnualTotalTradeCosts.l(y,r)+sum((f,rr),NewTradeCapacityCosts.l(y,f,r,rr));
output_systemcosts('Nominal System Costs','Trade','Europe',y) = sum(r,output_systemcosts('Nominal System Costs','Trade',r,y));
output_systemcosts('Nominal System Cost Split','CAPEX',r,y) = sum((t),CapitalInvestment.l(y,t,r));
output_systemcosts('Nominal System Cost Split','CAPEX','Europe',y) = sum((t,r),CapitalInvestment.l(y,t,r));
output_systemcosts('Nominal System Cost Split','OPEX',r,y) = sum((t),OperatingCost.l(y,t,r));
output_systemcosts('Nominal System Cost Split','OPEX','Europe',y) = sum((t,r),OperatingCost.l(y,t,r));
output_systemcosts('Nominal System Cost Split','Trade',r,y) = AnnualTotalTradeCosts.l(y,r)+sum((f,rr),NewTradeCapacityCosts.l(y,f,r,rr));
output_systemcosts('Nominal System Cost Split','Trade','Europe',y) = sum(r,AnnualTotalTradeCosts.l(y,r)+sum((f,rr),NewTradeCapacityCosts.l(y,f,r,rr)));
output_systemcosts('Nominal Power Costs','Trade',r,y) = sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr)) + sum((rr),NewTradeCapacityCosts.l(y,'Power',r,rr));
output_systemcosts('Nominal Power Costs','Trade','Europe',y) = sum(r,sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr)) + sum((rr),NewTradeCapacityCosts.l(y,'Power',r,rr)));
output_systemcosts('Nominal Power Costs','Generation',r,y) = sum((t)$(TagTechnologyToSector(t,'Power')),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal Power Costs','Generation','Europe',y) = sum((t,r)$(TagTechnologyToSector(t,'Power')),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal Power Costs','Storage',r,y) = sum((t)$(TagTechnologyToSector(t,'Storages')),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal Power Costs','Storage','Europe',y) = sum((t,r)$(TagTechnologyToSector(t,'Storages')),CapitalInvestment.l(y,t,r)
+OperatingCost.l(y,t,r)-SalvageValue.l(y,t,r)+AnnualTechnologyEmissionsPenalty.l(y,t,r));
output_systemcosts('Nominal Power Costs','Transmission',r,y) = (sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr)))
+sum(rr,NewTradeCapacityCosts.l(y,'Power',r,rr));
output_systemcosts('Nominal Power Costs','Transmission','Europe',y) = sum(r,(sum((l,rr)$(TradeRoute(y,'Power',r,rr)),Import.l(y,l,'Power',r,rr) * TradeCosts('Power',r,rr)))
+sum(rr,NewTradeCapacityCosts.l(y,'Power',r,rr)));
output_systemcosts('Nominal System Costs','Total',r,y) = sum(se,output_systemcosts('Nominal System Costs',se,r,y))+output_systemcosts('Nominal System Costs','Trade',r,y);
output_systemcosts('Nominal System Costs','Total','Europe',y) = sum(r, output_systemcosts('Nominal System Costs','Total',r,y))+output_systemcosts('Nominal System Costs','Trade','Europe',y);
output_systemcosts('Discounted System Costs','Total',r,y) = sum(se,output_systemcosts('Discounted System Costs',se,r,y))+output_systemcosts('Discounted System Costs','Trade',r,y);
output_systemcosts('Discounted System Costs','Total','Europe',y) = sum(r, output_systemcosts('Discounted System Costs','Total',r,y))+output_systemcosts('Discounted System Costs','Trade','Europe',y);
output_systemcosts('Nominal System Costs','Industry','Europe_AT',y)$(output_systemcosts('Nominal System Costs','Industry','Europe_AT',y) = 0) = na;
* -------
* Electrification rates and volumes (%, TWh of electricity consumed [=production without storages])
* Split per sector and region
parameter output_electrificationrate;
output_electrificationrate('Electrification Rate [%]',se,'Europe',y) = ElectrificationRate(se,y);
output_electrificationrate('Electrification Rate [%]',se,r,y)$(sum(f$(TagFuelToSector(se,f)>0),TagFuelToSector(se,f)*ProductionAnnual.l(y,f,r)) > 0) = sum((f,t)$(ProductionByTechnologyAnnual.l(y,t,f,r) > 0), TagFuelToSector(se,f)*TagElectricTechnology(t)*ProductionByTechnologyAnnual.l(y,t,f,r))/sum((f)$(TagFuelToSector(se,f)>0),TagFuelToSector(se,f)*ProductionAnnual.l(y,f,r));
output_electrificationrate('Electrification Volumes [TWh]',se,r,y) = sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,'Power',r))/3.6;
output_electrificationrate('Electrification Volumes [TWh]',se,'Europe',y) = sum((t,r)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,'Power',r))/3.6;
output_electrificationrate('Electrification Volumes [TWh]','Total',r,y) = sum(se,output_electrificationrate('Electrification Volumes [TWh]',se,r,y));
output_electrificationrate('Electrification Volumes [TWh]','Total','Europe',y) = sum(r,output_electrificationrate('Electrification Volumes [TWh]','Total',r,y));
output_electrificationrate('Electrification Rate [%]','Industry','Europe',y)$(output_electrificationrate('Electrification Rate [%]','Industry','Europe',y) = 0) = na;
* -------
* Final energy demand (TWh)
* Split per sector and region
* Split per technology within each sector
parameter output_finalenergydemand, output_finalenergydemandsector;
*output_finalenergydemand('Final Energy Demand [TWh]',se,r,y) = sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))/3.6;
output_finalenergydemandsector('Final Energy Demand [TWh]',se,r,f,y)$(not CCSFuel(f)) = sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))/3.6;
output_finalenergydemandsector('Final Energy Demand [TWh]','Industry',r,'Power',y) = output_finalenergydemandsector('Final Energy Demand [TWh]','Industry',r,'Power',y)+SpecifiedAnnualDemand(r,'Power',y)*powerSubsectorShares(r,'ind')/3.6;
output_finalenergydemandsector('Final Energy Demand [TWh]','Buildings',r,'Power',y) = output_finalenergydemandsector('Final Energy Demand [TWh]','Buildings',r,'Power',y)+SpecifiedAnnualDemand(r,'Power',y)*(powerSubsectorShares(r,'res')+powerSubsectorShares(r,'com'))/3.6;
output_finalenergydemandsector('Final Energy Demand [TWh]',se,'Europe',f,y)$(not CCSFuel(f)) = sum((r),output_finalenergydemandsector('Final Energy Demand [TWh]',se,r,f,y));
output_finalenergydemandsector('Final Energy Demand [TWh]','Total',r,f,y) = sum(se,output_finalenergydemandsector('Final Energy Demand [TWh]',se,r,f,y));
output_finalenergydemandsector('Final Energy Demand [TWh]','Total','Europe',f,y) = sum(r,output_finalenergydemandsector('Final Energy Demand [TWh]','Total',r,f,y));
output_finalenergydemandsector('Final Energy Demand [TWh]','Power','Europe_AT','Power',y)$(output_finalenergydemandsector('Final Energy Demand [TWh]','Power','Europe_AT','Power',y) = 0) = na;
* -------
* Hydrogen use (% of hydrogen in final energy consumption and TWh)
* Split per sector and region
parameter output_hydrogenuse;
output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,r,y) = (sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,'H2',r)))/3.6;
output_hydrogenuse('Hydrogen Share per Sector [% of Sector]',se,r,y)$(sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,r,y)/sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,r,y) = sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,'Gas_Synth',r));
output_hydrogenuse('Syn-Gas Share per Sector [% of Sector]',se,r,y)$(sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,r,y)/sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,r,y) = sum(t$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,'Powerfuel',r));
output_hydrogenuse('Powerfuels Share per Sector [% of Sector]',se,r,y)$(sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,r,y)/sum((t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,'Europe',y) = sum(r,output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Hydrogen Share per Sector [% of Sector]',se,'Europe',y)$(sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,'Europe',y)/sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,'Europe',y) = sum(r,output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Syn-Gas Share per Sector [% of Sector]',se,'Europe',y)$(sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,'Europe',y)/sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,'Europe',y) = sum(r,output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Powerfuels Share per Sector [% of Sector]',se,'Europe',y)$(sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))) = output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,'Europe',y)/sum((r,t,f)$(TagTechnologyToSector(t,se)),UseByTechnologyAnnual.l(y,t,f,r))*3.6;
output_hydrogenuse('Hydrogen Use per Sector [TWh]','Total (Excl. Storages)',r,y) = sum(se$(not sameas(se, 'Storages')), output_hydrogenuse('Hydrogen Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Hydrogen Use per Sector [TWh]','Total (Excl. Storages)','Europe',y) = sum(r, output_hydrogenuse('Hydrogen Use per Sector [TWh]','Total (Excl. Storages)',r,y));
output_hydrogenuse('Syn-Gas Use per Sector [TWh]','Total (Excl. Storages)',r,y) = sum(se$(not sameas(se, 'Storages')), output_hydrogenuse('Syn-Gas Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Syn-Gas Use per Sector [TWh]','Total (Excl. Storages)','Europe',y) = sum(r, output_hydrogenuse('Syn-Gas Use per Sector [TWh]','Total (Excl. Storages)',r,y));
output_hydrogenuse('Powerfuels Use per Sector [TWh]','Total (Excl. Storages)',r,y) = sum(se$(not sameas(se, 'Storages')), output_hydrogenuse('Powerfuels Use per Sector [TWh]',se,r,y));
output_hydrogenuse('Powerfuels Use per Sector [TWh]','Total (Excl. Storages)','Europe',y) = sum(r, output_hydrogenuse('Powerfuels Use per Sector [TWh]','Total (Excl. Storages)',r,y));
output_hydrogenuse('Hydrogen Use per Sector [TWh]','Power','Europe_AT',y)$(output_hydrogenuse('Hydrogen Use per Sector [TWh]','Power','Europe_AT',y) = 0) = na;
* -------
* Hydrogen and derived production
* Volume by Type of hydrogen production (green grid, green off-grid, blue, import) per region
* Volume of synthetic gases and eFuels from H2"
parameter output_hydrogenproduction;
output_hydrogenproduction('Green Grid Hydrogen Production [TWh]',r,y) = ProductionByTechnologyAnnual.l(y,'X_Electrolysis','H2',r)/3.6;
output_hydrogenproduction('Green Off-grid Hydrogen Production [TWh]',r,y) = sum(OffgridHydrogen, ProductionByTechnologyAnnual.l(y,OffgridHydrogen,'H2',r))/3.6;
output_hydrogenproduction('Blue Hydrogen Production[TWh]',r,y) = ProductionByTechnologyAnnual.l(y,'X_SMR','H2',r)/3.6;
output_hydrogenproduction('Hydrogen Import [TWh]',r,y) = ProductionByTechnologyAnnual.l(y,'Z_Import_H2','H2',r)/3.6;
output_hydrogenproduction('Synthetic Gases from Hydrogen [TWh]',r,y) = sum(f,z_ProductionByTechnologyByModeAnnual(r,'X_Methanation','1',f,y))/3.6;
output_hydrogenproduction('E-Fuels from Hydrogen [TWh]',r,y) = ProductionByTechnologyAnnual.l(y,'X_Powerfuel','Powerfuel',r)/3.6;
output_hydrogenproduction('Losses from Storages [TWh]',r,y) = -1*UseByTechnologyAnnual.l(y,'D_Gas_H2','H2',r)*(1-OutputActivityRatio(r,'D_Gas_H2','H2','2',y))/3.6;
output_hydrogenproduction('Green Grid Hydrogen Production [TWh]','Europe',y) = sum(r,ProductionByTechnologyAnnual.l(y,'X_Electrolysis','H2',r)/3.6);
output_hydrogenproduction('Green Off-grid Hydrogen Production [TWh]','Europe',y) = sum((OffgridHydrogen,r), ProductionByTechnologyAnnual.l(y,OffgridHydrogen,'H2',r))/3.6;
output_hydrogenproduction('Blue Hydrogen Production[TWh]','Europe',y) = sum(r,ProductionByTechnologyAnnual.l(y,'X_SMR','H2',r)/3.6);
output_hydrogenproduction('Hydrogen Import [TWh]','Europe',y) = sum(r,ProductionByTechnologyAnnual.l(y,'Z_Import_H2','H2',r)/3.6);
output_hydrogenproduction('Synthetic Gases from Hydrogen [TWh]','Europe',y) = sum((f,r),z_ProductionByTechnologyByModeAnnual(r,'X_Methanation','1',f,y))/3.6;
output_hydrogenproduction('E-Fuels from Hydrogen [TWh]','Europe',y) = sum(r,ProductionByTechnologyAnnual.l(y,'X_Powerfuel','Powerfuel',r)/3.6);
output_hydrogenproduction('Losses from Storages [TWh]','Europe',y) = -1*sum(r,UseByTechnologyAnnual.l(y,'D_Gas_H2','H2',r)*(1-OutputActivityRatio(r,'D_Gas_H2','H2','2',y))/3.6);
output_hydrogenproduction('Total',r,y) =
output_hydrogenproduction('Green Grid Hydrogen Production [TWh]',r,y) +
output_hydrogenproduction('Green Off-grid Hydrogen Production [TWh]',r,y) +
output_hydrogenproduction('Blue Hydrogen Production[TWh]',r,y) +
output_hydrogenproduction('Hydrogen Import [TWh]',r,y) +
output_hydrogenproduction('Synthetic Gases from Hydrogen [TWh]',r,y) +
output_hydrogenproduction('E-Fuels from Hydrogen [TWh]',r,y) +
output_hydrogenproduction('Losses from Storages [TWh]',r,y);
output_hydrogenproduction('Total','Europe',y) = sum(r,output_hydrogenproduction('Total',r,y));
output_hydrogenproduction('Green Grid Hydrogen Production [TWh]','Europe_AT',y)$(output_hydrogenproduction('Green Grid Hydrogen Production [TWh]','Europe_AT',y) = 0) = na;
* -------
* Power generation
* % Generation from: Solar, wind, hydro, bio, coal, gas, nuclear (incl from CHP, with CCS etc)
* Capacity GW by technology"
parameter output_powergeneration;
output_powergeneration('Power Generation [%]','Solar',r,y) = sum((Solar),ProductionByTechnologyAnnual.l(y,Solar,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Onshore Wind',r,y) = sum((Onshore),ProductionByTechnologyAnnual.l(y,Onshore,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Offshore Wind',r,y) = sum((Offshore),ProductionByTechnologyAnnual.l(y,Offshore,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Hydro',r,y) = sum((Hydro),ProductionByTechnologyAnnual.l(y,Hydro,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Biomass',r,y) = sum((PowerBiomass),ProductionByTechnologyAnnual.l(y,PowerBiomass,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Coal',r,y) = sum((Coal),ProductionByTechnologyAnnual.l(y,Coal,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Oil',r,y) = sum((Oil),ProductionByTechnologyAnnual.l(y,Oil,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Nuclear',r,y) = ProductionByTechnologyAnnual.l(y,'P_Nuclear','Power',r)/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Natural Gas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'1','Power',y))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Biogas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'2','Power',y))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Synthetic Gas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'3','Power',y))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','H2',r,y) = sum((Hydrogen),ProductionByTechnologyAnnual.l(y,Hydrogen,'Power',r))/sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r));
output_powergeneration('Power Generation [%]','Other',r,y) = 1-(
output_powergeneration('Power Generation [%]','Solar',r,y)
+output_powergeneration('Power Generation [%]','Onshore Wind',r,y)
+output_powergeneration('Power Generation [%]','Offshore Wind',r,y)
+output_powergeneration('Power Generation [%]','Hydro',r,y)
+output_powergeneration('Power Generation [%]','Biomass',r,y)
+output_powergeneration('Power Generation [%]','Coal',r,y)
+output_powergeneration('Power Generation [%]','Oil',r,y)
+output_powergeneration('Power Generation [%]','Nuclear',r,y)
+output_powergeneration('Power Generation [%]','Natural Gas',r,y)
+output_powergeneration('Power Generation [%]','Biogas',r,y)
+output_powergeneration('Power Generation [%]','Synthetic Gas',r,y)
+output_powergeneration('Power Generation [%]','H2',r,y));
output_powergeneration('Power Generation [TWh]','Solar',r,y) = sum((Solar),ProductionByTechnologyAnnual.l(y,Solar,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Onshore Wind',r,y) = sum((Onshore),ProductionByTechnologyAnnual.l(y,Onshore,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Offshore Wind',r,y) = sum((Offshore),ProductionByTechnologyAnnual.l(y,Offshore,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Hydro',r,y) = sum((Hydro),ProductionByTechnologyAnnual.l(y,Hydro,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Biomass',r,y) = sum((PowerBiomass),ProductionByTechnologyAnnual.l(y,PowerBiomass,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Coal',r,y) = sum((Coal),ProductionByTechnologyAnnual.l(y,Coal,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Oil',r,y) = sum((Oil),ProductionByTechnologyAnnual.l(y,Oil,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Nuclear',r,y) = ProductionByTechnologyAnnual.l(y,'P_Nuclear','Power',r)/3.6;
output_powergeneration('Power Generation [TWh]','Natural Gas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'1','Power',y))/3.6;
output_powergeneration('Power Generation [TWh]','Biogas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'2','Power',y))/3.6;
output_powergeneration('Power Generation [TWh]','Synthetic Gas',r,y) = sum((Gas),z_ProductionByTechnologyByModeAnnual(r,Gas,'3','Power',y))/3.6;
output_powergeneration('Power Generation [TWh]','H2',r,y) = sum((Hydrogen),ProductionByTechnologyAnnual.l(y,Hydrogen,'Power',r))/3.6;
output_powergeneration('Power Generation [TWh]','Other',r,y) = sum((t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))/3.6-(
output_powergeneration('Power Generation [TWh]','Solar',r,y)
+output_powergeneration('Power Generation [TWh]','Onshore Wind',r,y)
+output_powergeneration('Power Generation [TWh]','Offshore Wind',r,y)
+output_powergeneration('Power Generation [TWh]','Hydro',r,y)
+output_powergeneration('Power Generation [TWh]','Biomass',r,y)
+output_powergeneration('Power Generation [TWh]','Coal',r,y)
+output_powergeneration('Power Generation [TWh]','Oil',r,y)
+output_powergeneration('Power Generation [TWh]','Nuclear',r,y)
+output_powergeneration('Power Generation [TWh]','Natural Gas',r,y)
+output_powergeneration('Power Generation [TWh]','Biogas',r,y)
+output_powergeneration('Power Generation [TWh]','Synthetic Gas',r,y)
+output_powergeneration('Power Generation [TWh]','H2',r,y));
output_powergeneration('Capacity [GW]','Solar',r,y) = sum((Solar)$(sum(m,OutputActivityRatio(r,Solar,'Power',m,y))>0), TotalCapacityAnnual.l(y,Solar,r));
output_powergeneration('Capacity [GW]','Onshore Wind',r,y) = sum((Onshore)$(sum(m,OutputActivityRatio(r,Onshore,'Power',m,y))>0), TotalCapacityAnnual.l(y,Onshore,r));
output_powergeneration('Capacity [GW]','Offshore Wind',r,y) = sum((Offshore)$(sum(m,OutputActivityRatio(r,Offshore,'Power',m,y))>0), TotalCapacityAnnual.l(y,Offshore,r));
output_powergeneration('Capacity [GW]','Hydro',r,y) = sum((Hydro)$(sum(m,OutputActivityRatio(r,Hydro,'Power',m,y))>0), TotalCapacityAnnual.l(y,Hydro,r));
output_powergeneration('Capacity [GW]','Biomass',r,y) = sum((PowerBiomass)$(sum(m,OutputActivityRatio(r,PowerBiomass,'Power',m,y))>0), TotalCapacityAnnual.l(y,PowerBiomass,r));
output_powergeneration('Capacity [GW]','Coal',r,y) = sum((Coal)$(sum(m,OutputActivityRatio(r,Coal,'Power',m,y))>0), TotalCapacityAnnual.l(y,Coal,r));
output_powergeneration('Capacity [GW]','Oil',r,y) = sum((Oil)$(sum(m,OutputActivityRatio(r,Oil,'Power',m,y))>0), TotalCapacityAnnual.l(y,Oil,r));
output_powergeneration('Capacity [GW]','Nuclear',r,y) = TotalCapacityAnnual.l(y,'P_Nuclear',r);
output_powergeneration('Capacity [GW]','Gas',r,y) = sum((Gas)$(sum(m,OutputActivityRatio(r,Gas,'Power',m,y))>0), TotalCapacityAnnual.l(y,Gas,r));
output_powergeneration('Capacity [GW]','H2',r,y) = sum((Hydrogen)$(sum(m,OutputActivityRatio(r,Hydrogen,'Power',m,y))>0), TotalCapacityAnnual.l(y,Hydrogen,r));
output_powergeneration('Power Generation [%]','Solar','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Solar',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Onshore Wind','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Onshore Wind',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Offshore Wind','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Offshore Wind',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Hydro','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Hydro',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Biomass','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Biomass',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Coal','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Coal',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Oil','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Oil',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Nuclear','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Nuclear',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Natural Gas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Natural Gas',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Biogas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Biogas',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Synthetic Gas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Synthetic Gas',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','H2','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','H2',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [%]','Other','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Other',r,y))/sum((r,t)$(not StorageDummies(t)), ProductionByTechnologyAnnual.l(y,t,'Power',r))*3.6;
output_powergeneration('Power Generation [TWh]','Solar','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Solar',r,y));
output_powergeneration('Power Generation [TWh]','Onshore Wind','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Onshore Wind',r,y));
output_powergeneration('Power Generation [TWh]','Offshore Wind','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Offshore Wind',r,y));
output_powergeneration('Power Generation [TWh]','Hydro','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Hydro',r,y));
output_powergeneration('Power Generation [TWh]','Biomass','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Biomass',r,y));
output_powergeneration('Power Generation [TWh]','Coal','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Coal',r,y));
output_powergeneration('Power Generation [TWh]','Oil','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Oil',r,y));
output_powergeneration('Power Generation [TWh]','Nuclear','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Nuclear',r,y));
output_powergeneration('Power Generation [TWh]','Natural Gas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Natural Gas',r,y));
output_powergeneration('Power Generation [TWh]','Biogas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Biogas',r,y));
output_powergeneration('Power Generation [TWh]','Synthetic Gas','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Synthetic Gas',r,y));
output_powergeneration('Power Generation [TWh]','H2','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','H2',r,y));
output_powergeneration('Power Generation [TWh]','Other','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Other',r,y));
output_powergeneration('Power Generation [TWh]','Total',r,y) =
output_powergeneration('Power Generation [TWh]','Solar',r,y) +
output_powergeneration('Power Generation [TWh]','Onshore Wind',r,y) +
output_powergeneration('Power Generation [TWh]','Offshore Wind',r,y) +
output_powergeneration('Power Generation [TWh]','Hydro',r,y) +
output_powergeneration('Power Generation [TWh]','Biomass',r,y) +
output_powergeneration('Power Generation [TWh]','Coal',r,y) +
output_powergeneration('Power Generation [TWh]','Oil',r,y) +
output_powergeneration('Power Generation [TWh]','Nuclear',r,y) +
output_powergeneration('Power Generation [TWh]','Natural Gas',r,y) +
output_powergeneration('Power Generation [TWh]','Biogas',r,y) +
output_powergeneration('Power Generation [TWh]','Synthetic Gas',r,y) +
output_powergeneration('Power Generation [TWh]','H2',r,y) +
output_powergeneration('Power Generation [TWh]','Other',r,y);
output_powergeneration('Power Generation [TWh]','Total','Europe',y) = sum(r,output_powergeneration('Power Generation [TWh]','Total',r,y));
output_powergeneration('Capacity [GW]','Solar','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Solar',r,y));
output_powergeneration('Capacity [GW]','Onshore Wind','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Onshore Wind',r,y));
output_powergeneration('Capacity [GW]','Offshore Wind','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Offshore Wind',r,y));
output_powergeneration('Capacity [GW]','Hydro','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Hydro',r,y));
output_powergeneration('Capacity [GW]','Biomass','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Biomass',r,y));
output_powergeneration('Capacity [GW]','Coal','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Coal',r,y));
output_powergeneration('Capacity [GW]','Oil','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Oil',r,y));
output_powergeneration('Capacity [GW]','Nuclear','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Nuclear',r,y));
output_powergeneration('Capacity [GW]','Gas','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','Gas',r,y));
output_powergeneration('Capacity [GW]','H2','Europe',y) = sum(r,output_powergeneration('Capacity [GW]','H2',r,y));
* -------
* Flexibility
* Build of battery + storage
* DSM if implemented"
parameter output_flexibility;
output_flexibility('Capacity [GW | Power]',r,StorageDummies,y) = TotalCapacityAnnual.l(y,StorageDummies,r);
output_flexibility('Capacity [GW | Power]','Europe',StorageDummies,y) = sum(r,TotalCapacityAnnual.l(y,StorageDummies,r));
output_flexibility('Capacity [GW | Power]','Europe_AT','D_PHS',y)$(output_flexibility('Capacity [GW | Power]','Europe_AT','D_PHS',y) = 0) = na;
output_flexibility('Capacity [GWh | Energy]',r,StorageDummies,y) = TotalCapacityAnnual.l(y,StorageDummies,r)*sum(s,StorageMaxChargeRate(r,s)*TechnologyToStorage(y,'1',StorageDummies,s));
output_flexibility('Capacity [GWh | Energy]','Europe',StorageDummies,y) = sum(r,TotalCapacityAnnual.l(y,StorageDummies,r)*sum(s,StorageMaxChargeRate(r,s)*TechnologyToStorage(y,'1',StorageDummies,s)));
output_flexibility('Capacity [GWh | Energy]','Europe_AT','D_PHS',y)$(output_flexibility('Capacity [GWh | Energy]','Europe_AT','D_PHS',y) = 0) = na;
* -------
* Interconnection
* Interconnection build GW
* Power trade volumes (%, TWh)
**** NET TRADE VOLUMES OR IMPORT / EXPORT?
* Level of import dependency per region"
parameter output_interconnection;
output_interconnection('Transmission Capacity [GW]',r,y) = sum(rr,TotalTradeCapacity.l(y,'Power',r,rr));
output_interconnection('Net Trade Volumes [TWh]',r,y) = NetTradeAnnual.l(y,'Power',r)/3.6;
output_interconnection('Absolute Import Volume [TWh]',r,y) = sum((l,rr), Import.l(y,l,'Power',r,rr));
output_interconnection('Import Dependency [%]',r,y) = (-1)*min(0,NetTradeAnnual.l(y,'Power',r))/(UseAnnual.l(y,'Power',r)-sum(StorageDummies,UseByTechnologyAnnual.l(y,StorageDummies,'Power',r))+SpecifiedAnnualDemand(r,'Power',y));
output_interconnection('Transmission Capacity [GW]','Europe_AT',y)$(output_interconnection('Transmission Capacity [GW]','Europe_AT',y) = 0) = na;
* -------
* Emissions
* Split by sector and region
* Emissions intensity for power per MWh, transport (per km), heat per MWh"
parameter output_emissions2;
output_emissions2('Emissions per Sector [Mt]',se,e,r,y) = sum(t$(TagTechnologyToSector(t,se)),AnnualTechnologyEmission.l(y,t,e,r));
output_emissions2('Emissions per Sector [Mt]',se,e,'Europe',y) = sum(r,output_emissions2('Emissions per Sector [Mt]',se,e,r,y));
output_emissions2('Emission intensity [kg/MWh|km]',se,e,r,y)$(sum(f$(TagFuelToSector(se,f)),SpecifiedAnnualDemand(r,f,y)) > 0) = sum(f$(TagFuelToSector(se,f)), EmissionIntensity(y,r,f,e)*SpecifiedAnnualDemand(r,f,y))/sum(f$(TagFuelToSector(se,f)),SpecifiedAnnualDemand(r,f,y))*(3.6$(not sameas (se,'Transportation'))+1$(sameas (se,'Transportation')));
output_emissions2('Emission intensity [kg/MWh|km]',se,e,'Europe',y)$(sum((r,f)$(TagFuelToSector(se,f)),SpecifiedAnnualDemand(r,f,y)) > 0) = sum((f,r)$(TagFuelToSector(se,f)), EmissionIntensity(y,r,f,e)*SpecifiedAnnualDemand(r,f,y))/sum((f,r)$(TagFuelToSector(se,f)),SpecifiedAnnualDemand(r,f,y))*(3.6$(not sameas (se,'Transportation'))+1$(sameas (se,'Transportation')));
output_emissions2('Emissions per Sector [Mt]','Total',e,r,y) = sum(se,output_emissions2('Emissions per Sector [Mt]',se,e,r,y));
output_emissions2('Emissions per Sector [Mt]','Total',e,'Europe',y) = sum(r,output_emissions2('Emissions per Sector [Mt]','Total',e,r,y));
output_emissions2('Emissions per Sector [Mt]','Power',e,'Europe_AT',y)$(output_emissions2('Emissions per Sector [Mt]','Power',e,'Europe_AT',y) = 0) = na;
* -------
* CO2 price
* CO2 prices (if not modelled as an input)"
parameter output_carbonprice;
output_carbonprice('CO2 price [/Mt]',r,y) = (-1)*E8_RegionalAnnualEmissionsLimit.m(y,'CO2',r)+(-1)*E9_AnnualEmissionsLimit.m(y,'CO2')+EmissionsPenalty(r,'CO2',y);
output_carbonprice('CO2 price [/Mt]',r,'2015') = 0;
output_carbonprice('CO2 price [/Mt]','Europe',y) = (-1)*E9_AnnualEmissionsLimit.m(y,'CO2')+(sum(r,EmissionsPenalty(r,'CO2',y)+(-1)*E8_RegionalAnnualEmissionsLimit.m(y,'CO2',r))/card(r));
output_carbonprice('CO2 price [/Mt]','Europe','2015') = 0;
output_carbonprice('CO2 price [/Mt]','Europe_AT',y)$(output_carbonprice('CO2 price [/Mt]','Europe_AT',y) = 0) = na;
* -------
* Levelized power prices compared to Reference case
* Split by region"
*** TO DO AS SOON AS REFERENCE CASE IS FIXED
* -------
* Some additional CCS statistics
*
parameter output_ccs_stats;
output_ccs_stats('Annual CO2 Sequestered [Mt]',r,t,y)$(UseByTechnologyAnnual.l(y,t,'CCS',r)>0) = UseByTechnologyAnnual.l(y,t,'CCS',r);
output_ccs_stats('Installed CCS Capacities [GW]',r,t,y)$(sum(m,InputActivityRatio(r,t,'CCS',m,y))>0) = TotalCapacityAnnual.l(y,t,r);
output_ccs_stats('Annual CO2 Sequestered [Mt]','Europe_AT','P_Biomass_CCS',y)$(output_ccs_stats('Annual CO2 Sequestered [Mt]','Europe_AT','P_Biomass_CCS',y) = 0) = na;
output_ccs_stats('Installed CCS Capacities [GW]','Europe_AT','P_Biomass_CCS',y)$(output_ccs_stats('Installed CCS Capacities [GW]','Europe_AT','P_Biomass_CCS',y) = 0) = na;
$ifthen %switch_unixPath% == 0
$ifthen %sensitivity% == reference
execute_unload "%gdxdir%\sensitivitydashboard\sensitivity_z_%sensitivity%_%sensitivity_identifier%_%elmod_nthhour%.gdx"
$else
execute_unload "%gdxdir%\sensitivitydashboard\sensitivity_%sensitivity%_%sensitivity_identifier%_%elmod_nthhour%.gdx"
$endif
$else
$ifthen %sensitivity% == reference
execute_unload "%gdxdir%/sensitivitydashboard/sensitivity_z_%sensitivity%_%sensitivity_identifier%_%elmod_nthhour%.gdx"
$else
execute_unload "%gdxdir%/sensitivitydashboard/sensitivity_%sensitivity%_%sensitivity_identifier%_%elmod_nthhour%.gdx"
$endif
$endif
output_systemcosts
output_electrificationrate
output_finalenergydemandsector
output_hydrogenuse
output_hydrogenproduction
output_powergeneration
output_flexibility
output_interconnection
output_emissions2
output_carbonprice
output_ccs_stats
;