1d_results.gms 13.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ontext
This file is part of Backbone.

Backbone is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Backbone is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Backbone.  If not, see <http://www.gnu.org/licenses/>.
$offtext

18
19
20
21
* =============================================================================
* --- Model Results Arrays ----------------------------------------------------
* =============================================================================

22
Parameters
23
24
25
26

* --- Cost Results ------------------------------------------------------------

    // Total Objective Function
27
    r_totalObj(t) "Total accumulated value of the objective function over all solves"
28

Topi Rasku's avatar
Topi Rasku committed
29
    // Unit Operational Cost Components
Topi Rasku's avatar
Topi Rasku committed
30
    r_gnuVOMCost(grid, node, unit, f, t) "Variable O&M costs for energy outputs (MEUR)"
Topi Rasku's avatar
Topi Rasku committed
31
    r_gnuTotalVOMCost(grid, node, unit) "Total gnu VOM costs over the simulation (MEUR)"
32
33
    r_uFuelEmissionCost(node, unit, f, t) "Unit fuel & emission costs for normal operation (MEUR)"
    r_uTotalFuelEmissionCost(commodity, unit) "Total unit fuel & emission costs over the simulation for normal operation (MEUR)"
Topi Rasku's avatar
Topi Rasku committed
34
    r_uStartupCost(unit, f, t) "Unit startup VOM, fuel, & emission costs (MEUR)"
35
    r_uShutdownCost(unit, f, t) "Unit startup VOM, fuel, & emission costs (MEUR)"
Topi Rasku's avatar
Topi Rasku committed
36
37
38
39
    r_uTotalStartupCost(unit) "Total unit startup costs over the simulation (MEUR)"

    // Nodal Cost Components
    r_gnStateSlackCost(grid, node, f, t) "Costs for states requiring slack (MEUR)"
Topi Rasku's avatar
Topi Rasku committed
40
    r_gnTotalStateSlackCost(grid, node) "Total costs for state slacks over the simulation (MEUR)"
Topi Rasku's avatar
Topi Rasku committed
41
    r_gnStorageValueChange(grid, node) "Change in storage values over the simulation (MEUR)"
42
43
    r_gnnVariableTransCost(grid, node_,node, f, t) "Variable Transfer costs (MEUR)"
    r_gnnTotalVariableTransCost(grid, node_, node) "Total Variable Transfer costs over the simulation (MEUR)"
44
45
    r_gnnTransferMarginalValue(grid, from_node, to_node, f, t) "Transfer marginal value (Me) = r_transfer (MW) * r_balanceMarginal (e/MWh)"
    r_gnnTotalTransferMarginalValue(grid, from_node, to_node) "Total ransfer marginal value summed over the simulation (Me)"
Topi Rasku's avatar
Topi Rasku committed
46

Niina Helistö's avatar
Niina Helistö committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    // Investment and Fixed Operation and Maintenance Cost Components
    r_gnuFOMCost(grid, node, unit) "Total gnu fixed O&M costs over the simulation (MEUR)"
    r_gnuUnitInvestmentCost(grid, node, unit) "Total unit investment costs over the simulation (MEUR)"
    r_gnnLinkInvestmentCost(grid, node, node) "Total transfer link investment costs over the simulation (MEUR)"

    // Realized System Operating Costs
    r_gnRealizedOperatingCost(grid, node, f, t) "Realized system operating costs in gn for each t (MEUR)"
    r_gnTotalRealizedOperatingCost(grid, node) "Total realized system operating costs in gn over the simulation (MEUR)"
    r_gnTotalRealizedOperatingCostShare(grid, node) "Total realized system operating cost gn/g shares over the simulation"
    r_gnTotalRealizedNetOperatingCost(grid, node) "Total realized system operating costs in gn over the simulation, minus the increase in storage values (MEUR)"
    r_gTotalRealizedOperatingCost(grid) "Total realized system operating costs in g over the simulation (MEUR)"
    r_gTotalRealizedNetOperatingCost(grid) "Total realized system operating costs in g over the simulation, minus the increase in storage values (MEUR)"
    r_totalRealizedOperatingCost "Total realized system operating costs over the simulation (MEUR)" / 0 /
    r_totalRealizedNetOperatingCost "Total realized system operating costs over the simulation (MEUR)" / 0 /

62
63
64
65
66
67
    // Realized System Fixed Costs
    r_gnTotalRealizedFixedCost(grid, node) "Total realized system fixed costs in gn over the simulation (MEUR)"
    r_gnTotalRealizedFixedCostShare(grid, node) "Total realized system fixed cost gn/g shares over the simulation"
    r_gTotalRealizedFixedCost(grid) "Total realized system fixed costs in g over the simulation (MEUR)"
    r_totalRealizedFixedCost "Total realized system fixed costs over the simulation (MEUR)" / 0 /

68
69
70
    // Realized System Costs
    r_gnTotalRealizedCost(grid, node) "Total realized system costs in gn over the simulation (MEUR)"
    r_gnTotalRealizedCostShare(grid, node) "Total realized system cost gn/g shares over the simulation"
71
    r_gnTotalRealizedNetCost(grid, node) "Total realized system costs in gn over the simulation, minus the increase in storage values (MEUR)"
72
    r_gTotalRealizedCost(grid) "Total realized system costs in g over the simulation (MEUR)"
73
    r_gTotalRealizedNetCost(grid) "Total realized system costs in g over the simulation, minus the increase in storage values (MEUR)"
74
    r_totalRealizedCost "Total realized system costs over the simulation (MEUR)" / 0 /
75
    r_totalRealizedNetCost "Total realized system costs over the simulation (MEUR)" / 0 /
76
77
78
79

* --- Node Results ------------------------------------------------------------

    // State variable results, required for model structure
80
    r_state(grid, node, f, t) "Node state at time step t"
81
    // State variable slack values
82
    r_stateSlack(grid, node, slack, f, t) "Note state slack at time step t"
83

84
    // Energy transfer and spill variable results
85
    r_transfer(grid, from_node, to_node, f, t) "Energy transfer (MW)"
86
87
    r_transferRightward(grid, from_node, to_node, f, t) "Energy transfer from first node to second node (MW)"
    r_transferLeftward(grid, to_node, from_node, f, t) "Energy transfer from second node to first node (MW)"
88
    r_spill(grid, node, f, t) "Spill of energy from storage node during time interval (MWh)"
89
90

    // Interesting node related results
91
    r_balanceMarginal(grid, node, f, t) "Marginal values of the q_balance equation"
92
93
94
95
    r_gnnTotalTransfer(grid, node, node) "Total amount of energy transferred between gnn over the simulation (MWh)"
    r_gnTotalSpill(grid, node) "Total spilled energy from gn over the simulation (MWh)"
    r_gnTotalSpillShare(grid, node) "Total spilled energy gn/g share"
    r_gTotalSpill(grid) "Total spilled energy from gn over the simulation (MWh)"
96

97
98
99
100
* --- Energy Generation/Consumption Results -----------------------------------

    // Results required for model structure
    r_gen(grid, node, unit, f, t) "Energy generation for a unit (MW)"
101
    r_gen_gnUnittype(grid, node, unittype) "Energy generation for each unittype in each node (MWh)"
102
103

    // Fuel use results
104
    r_fuelUse(node, unit, f, t) "Fuel use of units"
105
    r_genFuel(grid, node, *, f, t) "Energy generation/consumption based on fuels / flows (MW)"
106
    r_genUnittype(grid, node, unittype, f, t) "Energy generation/consumption for each unittype (MW)"
107
108
109
110
    r_gnTotalGenFuel(grid, node, commodity) "Total energy generation in gn per fuel over the simulation (MWh)"
    r_gnTotalGenFuelShare(grid, node, commodity) "Total energy generation fuel consumption gn/g share"
    r_gTotalGenFuel(grid, commodity) "Total energy generation in g per fuel over the simulation (MWh)"
    r_totalGenFuel(commodity) "Total overall energy generation/consumption per fuel over the simulation (MWh)"
111

112
113
114
115
116
117
118
119
120
121
122
    // Interesting energy generation results
    r_gnuTotalGen(grid, node, unit) "Total energy generation in gnu over the simulation (MWh)"
    r_gnuTotalGenShare(grid, node, unit) "Total energy generation gnu/gn share"
    r_gnTotalGen(grid, node) "Total energy generation in gn over the simulation (MWh)"
    r_gnTotalGenShare(grid, node) "Total energy generation gn/g share"
    r_gTotalGen(grid) "Total energy generation in g over the simulation (MWh)"

    // Approximate utilization rates
    r_gnuUtilizationRate(grid, node, unit) "Approximate utilization rates of gnus over the simulation"

    // Interesting energy consumption results
123
124
    r_gnConsumption(grid, node, f, t) "Consumption of energy in gn for each t (MWh)"
    r_gnTotalConsumption(grid, node) "Total consumption of energy in gn over the simulation (MWh)"
125
    r_gnTotalConsumptionShare(grid, node) "Total consumption gn/g share"
126
    r_gTotalConsumption(grid) "Total consumption of energy in g over the simulation (MWh)"
127

128
129
130
131
132
133
134

* --- Emissions Results -------------------------------------------------------

    // Unit level emissions
    r_emissions (node, emission, unit, f, t) "Emissions from units (tCO2)"

    // Emission sums
135
136
137
138
    r_nuTotalEmissions (node, unit, emission) "node unit total emissions (tCO2)"
    r_nTotalEmissions(node, emission) "node total emissions (tCO2)"
    r_uTotalEmissions(unit, emission) "unit total emissions (tCO2)"
    r_totalEmissions (emission) "Total emissions (tCO2)"
139
140


141
142
143
* --- Unit Online State Results -----------------------------------------------

    // Online results required for model structure
144
145
146
    r_online(unit, f, t) "Sub-units online"
    r_startup(unit, starttype, f, t) "Sub-units started up"
    r_shutdown(unit, f, t) "Sub-units shut down"
147
148
149

    // Interesting unit online results
    r_uTotalOnline(unit) "Total online sub-unit-hours of units over the simulation"
150
    r_uTotalOnlinePerUnit(unit) "Total unit online hours per sub-unit over the simulation"
151

152
153
154
155
    // Interesting unit startup and shutdown results
    r_uTotalStartup(unit, starttype) "Number of sub-unit startups over the simulation"
    r_uTotalShutdown(unit) "Number of sub-unit shutdowns over the simulation"

156
157
158
* --- Reserve Provision Results -----------------------------------------------

    // Reserve provision results required for model structure
159
160
161
162
    r_reserve(restype, up_down, grid, node, unit, f, t) "Unit capacity reserved for providing reserve of specific type (MW)"
    r_resTransferRightward(restype, up_down, grid, node, node, f, t) "Electricity transmission capacity from the first node to the second node reserved for providing reserves (MW)"
    r_resTransferLeftward(restype, up_down, grid, node, node, f, t) "Electricity transmission capacity from the second node to the first node reserved for providing reserves (MW)"
    r_reserve2Reserve(restype, up_down, grid, node, unit, restype, f, t) "Reserve provided for another reserve category (MW) (also included in r_reserve - this is just for debugging)"
163
164

    // Interesting reserve results
165
    r_resDemandMarginal(restype, up_down, group, f, t) "Marginal values of the q_resDemand equation"
166
167
168
169
    r_gnuTotalReserve(restype, up_down, grid, node, unit) "Total gnu reserve provision over the simulation (MW*h)"
    r_gnuTotalReserveShare(restype, up_down, grid, node, unit) "Total gnu/group reserve provision share over the simulation"
    r_groupTotalReserve(restype, up_down, group) "Total reserve provisions in groups over the simulation (MW*h)"
    r_resDemandLargestInfeedUnit(restype, up_down, group, f, t) "Reserve Demand from the loss of largest infeed unit"
170

171
172
173
* --- Investment Results ------------------------------------------------------

    // Interesting investment results
174
    r_invest(unit) "Number/amount of invested sub-units"
Niina Helistö's avatar
Niina Helistö committed
175
    r_investTransfer(grid, node, node, t) "Amount of invested transfer link capacity"
176

177
178
179
180
181
* --- Group results -----------------------------------------------------------

    // gnTotalgen in units that belong to gnuGroups over the simulation
    r_gnTotalGenGnuGroup(grid, node, group) "gnTotalGen in units that belong to gnuGroup (MWh)"

182
183
184
185
* --- Dummy Variable Results --------------------------------------------------

    // Results regarding solution feasibility
    r_qGen(inc_dec, grid, node, f, t) "Dummy energy generation (increase) or consumption (generation decrease) to ensure equation feasibility (MW)"
186
187
    r_gnTotalqGen(inc_dec, grid, node) "Total dummy energy generation/consumption in gn over the simulation (MWh)."
    r_gTotalqGen(inc_dec, grid) "Total dummy energy generation/consumption in g over the simulation (MWh)."
188
189
    r_qResDemand(restype, up_down, group, f, t) "Dummy to decrease demand for a reserve (MW) before reserve commitment"
    r_qResMissing(restype, up_down, group, f, t) "Dummy to decrease demand for a reserve (MW) after reserve commitment"
190
    r_groupTotalqResDemand(restype, up_down, group) "Total dummy reserve provisions in the group over the simulation"
191
    r_qCapacity(grid, node, f, t) "Dummy capacity to ensure capacity margin equation feasibility (MW)"
192
193
    r_solveStatus(t, solve_info) "Information about the solve"

Topi Rasku's avatar
Topi Rasku committed
194
; // END PARAMETER DECLARATION
195

196
197
Scalar r_realizedLast "Order of last realised time step";

198
199
* --- Initialize a few of the results arrays, required by model structure -----

200
Option clear = r_totalObj;
201
202
Option clear = r_state;
Option clear = r_online;
203
Option clear = r_reserve;
204
205
Option clear = r_resTransferRightward;
Option clear = r_resTransferLeftward;
206
207
Option clear = r_gen;
Option clear = r_realizedLast;
Niina Helistö's avatar
Niina Helistö committed
208
209
Option clear = r_startup;
Option clear = r_shutdown;
Niina Helistö's avatar
Niina Helistö committed
210
211
Option clear = r_invest;
Option clear = r_investTransfer;
212
Option clear = r_qResDemand;
213
Option clear = r_resDemandLargestInfeedUnit;
214

215
216
217
218
* =============================================================================
* --- Diagnostics Results Arrays ----------------------------------------------
* =============================================================================

219
220
// Only include these if '--diag=yes' given as a command line argument
$iftheni.diag '%diag%' == yes
221
Parameters
222
223
    d_cop(unit, f, t) "Coefficients of performance of conversion units"
    d_eff(unit, f, t) "Efficiency of generation units using fuel"
224
    d_capacityFactor(flow, node, s, f, t) "Diagnostic capacity factors (accounting for GAMS plotting error)"
225
    d_nodeState(grid, node, param_gnBoundaryTypes, s, f, t) "Diagnostic temperature forecasts (accounting for GAMS plotting error)"
226
    d_influx(grid, node, s, f, t) "Diagnostic influx forecasts (accounting for GAMS plotting error)"
227
    d_state(grid, node, scenario, f, t) "Diagnostic state results in each scenario"
228
    d_ts_scenarios(timeseries, *, node, scenario, f, t) "Diagnostic time series values in scenarios"
229
;
230
$endif.diag