1c_parameters.gms 11.2 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
* --- Internal counters -------------------------------------------------------
Scalars
    errorcount /0/
21
    solveCount /0/
22
23
    tSolveFirst "counter (ord) for the first t in the solve"
    tSolveLast "counter for the last t in the solve"
24
    tCounter "counter for t" /0/
Juha Kiviluoma's avatar
Juha Kiviluoma committed
25
    lastCounter "last member in use of the general counter"
26
    continueLoop "Helper to stop the looping early"
27
    currentForecastLength "Length of the forecast in the curren solve, minimum of unchanging and decreasing forecast lengths"
Juha Kiviluoma's avatar
Juha Kiviluoma committed
28
29
30
31
    count "General counter"
    count_lambda, count_lambda2 "Counter for lambdas"
    cum_slope "Cumulative for slope"
    cum_lambda "Cumulative for lambda"
32
    heat_rate "Heat rate temporary parameter"
Juha Kiviluoma's avatar
Juha Kiviluoma committed
33
    tmp "General temporary parameter"
34
35
    tmp_ "General temporary parameter"
    tmp__ "General temporary parameter"
Topi Rasku's avatar
Topi Rasku committed
36
    tmp_dt "Temporary parameter for evaluating the necessary amount of historical timesteps"
37
38
39
    tmp_dist "Temporary parameter for calculating the distance between operating points"
    tmp_op "Temporary parameter for operating point"
    tmp_count_op "Counting the number of valid operating points in the unit data"
40
    tmp_offset "Offset of sample in time steps"
41
42
    tRealizedLast "counter (ord) for the last realized t in the solve"
    firstResultsOutputSolve /1/;
43
44
;

45
46
* --- Power plant and fuel data -----------------------------------------------
Parameters
47
48
    p_gn(grid, node, param_gn) "Properties for energy nodes"
    p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, param_gnBoundaryProperties) "Properties of different state boundaries and limits"
49
50
    p_gnn(grid, node, node, param_gnn) "Data for interconnections between energy nodes"
    p_gnu(grid, node, unit, param_gnu) "Unit data where energy type matters"
51
    p_gnuBoundaryProperties(grid, node, unit, slack, param_gnuBoundaryProperties) "Properties for unit boundaries where energy type matters"
52
    p_unit(unit, param_unit) "Unit data where energy type does not matter"
53
    p_nReserves(node, restype, *) "Data defining the reserve rules in each node"
54
    p_nuReserves(node, unit, restype, *) "Reserve provision data for units"
55
    p_nnReserves(node, node, restype, up_down) "Reserve provision data for node node connections"
56
    p_nuRes2Res(node, unit, restype, up_down, restype) "The first type of reserve can be used also in the second reserve category (with a possible multiplier)"
57
    p_gnPolicy(grid, node, param_policy, *) "Policy data for grid, node"
58
59
    p_groupPolicy(group, param_policy) "Two-dimensional policy data for groups"
    p_groupPolicy3D(group, param_policy, *) "Three-dimensional policy data for groups"
60
    p_fuelEmission(fuel, emission) "Fuel emission content"
Juha Kiviluoma's avatar
Juha Kiviluoma committed
61
    p_uFuel(unit, param_fuel, fuel, param_unitFuel) "Parameters interacting between units and fuels"
62
    p_unitFuelEmissionCost(unit, fuel, emission) "Emission costs for each unit, calculated from input data"
63
    p_effUnit(effSelector, unit, effSelector, *)  "Data for piece-wise linear efficiency blocks"
64
    p_effGroupUnit(effSelector, unit, *) "Unit data specific to a efficiency group (e.g. left border of the unit)"
65
    p_uNonoperational(unit, starttype, min_max) "Non-operational time after being shut down before start up"
66
    p_uStartup(unit, starttype, cost_consumption) "Startup cost and fuel consumption"
67
    p_u_maxOutputInLastRunUpInterval(unit) "Maximum output in the last interval for the run-up to min. load (p.u.)"
68
    p_u_maxRampSpeedInLastRunUpInterval(unit) "Maximum ramp speed in the last interval for the run-up to min. load (p.u.)"
69
70
    p_u_runUpTimeIntervals(unit) "Time steps required for the run-up phase"
    p_u_runUpTimeIntervalsCeil(unit) "Ceiling of time steps required for the run-up phase"
71
    p_uCounter_runUp(unit, counter) "Output for the time steps where the unit is being started up to the minimum load (minimum output in the last interval) (p.u.)"
72
    p_u_maxOutputInFirstShutdownInterval(unit) "Maximum output in the first interval for the shutdown from min. load (p.u.)"
73
    p_u_shutdownTimeIntervals(unit) "Time steps required for the shutdown phase"
74
75
    p_u_shutdownTimeIntervalsCeil(unit) "Floor of time steps required for the shutdown phase"
    p_uCounter_shutdown(unit, counter) "Output for the time steps where the unit is being shut down from the minimum load (minimum output in the first interval) (p.u.)"
76
77
// Time dependent unit & fuel parameters
    ts_unit(unit, *, f, t) "Time dependent unit data, where energy type doesn't matter"
78
    ts_effUnit(effSelector, unit, effSelector, *, f, t) "Time dependent data for piece-wise linear efficiency blocks"
79
    ts_effGroupUnit(effSelector, unit, *, f, t) "Time dependent efficiency group unit data"
80
81
// Alias used for interval aggregation
    ts_unit_(unit, *, f, t)
82
83
84
85
;

* --- Probability -------------------------------------------------------------
Parameters
86
87
    p_msWeight(mType, s) "Weight of sample"
    p_msProbability(mType, s) "Probability to reach sample conditioned on anchestor samples"
88
    p_msProbability_orig(mType, s) "Original probabilities of samples in model"
89
90
    p_mfProbability(mType, f) "Probability of forecast"
    p_msft_probability(mType, s, f, t) "Probability of forecast"
91
    p_sProbability(s) "Probability of sample"
92
93
94
95
96
97
;

Scalar p_sWeightSum "Sum of sample weights";

* --- Model structure ---------------------------------------------------------
Parameters
98
    // Time displacement arrays
99
    dt(t) "Displacement needed to reach the previous time interval (in time steps)"
100
    dt_circular(t) "Circular t displacement if the time series data is not long enough to cover the model horizon"
101
102
103
104
105
106
107
    dt_next(t) "Displacement needed to reach the next time interval (in time steps)"
    dtt(t, t) "Displacement needed to reach any previous time interval (in time steps)"
    dt_toStartup(unit, t) "Displacement from the current time interval to the time interval where the unit was started up in case online variable changes from 0 to 1 (in time steps)"
    dt_toShutdown(unit, t) "Displacement from the current time interval to the time interval where the shutdown phase began in case generation becomes 0 (in time steps)"
    dt_starttypeUnitCounter(starttype, unit, counter) "Displacement needed to account for starttype constraints (in time steps)"
    dt_downtimeUnitCounter(unit, counter) "Displacement needed to account for downtime constraints (in time steps)"
    dt_uptimeUnitCounter(unit, counter) "Displacement needed to account for uptime constraints (in time steps)"
108
    dt_trajectory(counter) "Run-up/shutdown trajectory time index displacement"
109
    dt_sampleOffset(*, node, *, s) "Time offset to make periodic time series data (for grid/flow, unit, label) to go into different samples"
110
111

    // Forecast displacement arrays
112
113
    df(f, t) "Displacement needed to reach the realized forecast on the current time step"
    df_central(f, t) "Displacement needed to reach the central forecast - this is needed when the forecast tree gets reduced in dynamic equations"
114
    df_reserves(node, restype, f, t) "Forecast index displacement needed to reach the realized forecast when committing reserves"
115

116
117
118
119
    // Sample displacement arrays
    ds(s, t) "Displacement needed to reach the sample of previous time step"
    ds_state(grid, node, s, t) "Displacement needed to reach the sample of previous time step at this node"

120
    // Temporary displacement arrays
121
    ddt(t) "Temporary time displacement array"
122
123
    ddf(f) "Temporary forecast displacement array"
    ddf_(f) "Temporary forecast displacement array"
124

125
    // Other
126
    p_slackDirection(slack) "+1 for upward slacks and -1 for downward slacks"
127
128
129
130
    tForecastNext(mType) "When the next forecast will be available (ord time)"
    aaSolveInfo(mType, t, solveInfoAttributes) "Stores information about the solve status"
    msStart(mType, s) "Start point of samples: first time step in the sample"
    msEnd(mType, s) "End point of samples: first time step not in the sample"
131
    tOrd(t) "Order of t"
132
133
134
135
;

* --- Stochastic data parameters ----------------------------------------------
Parameters
136
    // Used mostly for raw data storage
137
138
139
    ts_influx(grid, node, f, t) "External power inflow/outflow during a time step (MWh/h)"
    ts_cf(flow, node, f, t) "Available capacity factor time series (p.u.)"
    ts_reserveDemand(restype, up_down, node, f, t) "Reserve demand in region in the time step (MW)"
140
    ts_node(grid, node, param_gnBoundaryTypes, f, t) "Fix the states of a node according to time-series form exogenous input ([v_state])"
141
    ts_fuelPriceChange(fuel, t) "Initial fuel price and consequent changes in fuel price (EUR/MWh)"
142
    ts_fuelPrice(fuel, t) "Fuel price time series (EUR/MWh)"
143
    ts_unavailability(unit, t) "Unavailability of a unit in the time step (p.u.)"
144

145
    // Aliases used in the equations after interval aggregation
146
    // NOTE: Sample dimension has to be last because of the scenario reduction algorithm
147
148
149
150
151
    ts_influx_(grid, node, f, t, s) "Mean external power inflow/outflow during a time step (MWh/h)"
    ts_cf_(flow, node, f, t, s) "Mean available capacity factor time series (p.u.)"
    ts_reserveDemand_(restype, up_down, node, f, t) "Mean reserve demand in region in the time step (MW)"
    ts_node_(grid, node, param_gnBoundaryTypes, f, t, s) "Mean value of ts_node"
    ts_fuelPrice_(fuel, t) "Mean fuel price time during time step (EUR/MWh)"
152

153
    // Aliases used for updating data in inputsLoop.gms
154
155
156
157
158
159
160
161
162
    ts_unit_update(unit, *, f, t)
    ts_effUnit_update(effSelector, unit, effSelector, *, f, t)
    ts_effGroupUnit_update(effSelector, unit, *, f, t)
    ts_influx_update(grid, node, f, t)
    ts_cf_update(flow, node, f, t)
    ts_reserveDemand_update(restype, up_down, node, f, t)
    ts_node_update(grid, node, param_gnBoundaryTypes, f, t)
    ts_fuelPriceChange_update(fuel, t)
    ts_unavailability_update(unit, t)
163

164
    // Help parameters for calculating smoothening of time series
165
166
167
168
    ts_influx_mean(grid, node, f, t) "Mean of ts_influx over samples"
    ts_influx_std(grid, node, f, t)  "Standard deviation of ts_influx over samples"
    ts_cf_mean(flow, node, f, t) "Mean of ts_cf over samples (p.u.)"
    ts_cf_std(flow, node, f, t) "Standard deviation of ts_cf over samples (p.u.)"
169

170
    p_autocorrelation(*, node, timeseries) "Autocorrelation of time series for the grid/flow, node and time series type (lag = 1 time step)"
171
172
173
174

    // Bounds for scenario smoothening
    p_tsMinValue(node, timeseries)
    p_tsMaxValue(node, timeseries)
175
176
177
178
;

* --- Other time dependent parameters -----------------------------------------
Parameters
Juha Kiviluoma's avatar
Juha Kiviluoma committed
179
    p_storageValue(grid, node, t) "Value of stored something at the end of a time step"
180
181
    p_stepLength(mType, f, t) "Length of an interval in hours"
    p_stepLengthNoReset(mType, f, t) "Length of an interval in hours - includes also lengths of previously realized intervals"
182
;