Commit 3aa1e693 authored by Niina Helistö's avatar Niina Helistö
Browse files

Clarifying comments

parent 50958fa9
......@@ -36,8 +36,8 @@ Sets
t_jump, // Number of time steps realized with each solve
t_horizon, // Length of the simulation horizon in time steps (central forecast)
t_end, // Last time step of the simulation
loadPoint, // load advanced basis; 0 = no basis, 1 = all solves, 2 = first solve
savePoint, // save advanced basis; 0 = no basis, 1 = all solves, 2 = first solve
loadPoint, // Load advanced basis; 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
savePoint, // Save advanced basis; 0 = no basis, 1 = latest solve, 2 = all solves, 3 = first solve
intervalEnd, // Last time step in the block of intervals with the same length
intervalLength, // Number of time steps aggregated within interval
IntervalInHours, // Length of one time step in hours
......@@ -54,7 +54,7 @@ Sets
t_reserveLength, // Length of reserve provision horizon in time steps
t_aggregate, // Unit aggregation threshold time index
t_omitTrajectories, // Threshold time index for omitting start-up and shutdown trajectories
results_t_start // time period where results outputting starts
results_t_start // Time index where results outputting starts
/
// Solve info
......
......@@ -46,11 +46,11 @@ Sets
unit_investLP(unit) "Units with continuous investments allowed"
unit_investMIP(unit) "Units with integer investments allowed"
* --- Nodes -----------------------------------------------------------------
* --- Nodes -------------------------------------------------------------------
node_spill(node) "Nodes that can spill; used to remove v_spill variables where not relevant"
flowNode(flow, node) "Nodes with flows"
* --- Sets bounding geography and units -------------------------------------
* --- Sets bounding geography and units ---------------------------------------
gn(grid, node) "Grids and their nodes"
* NOTE! Should it be possible to permit time-series form upper or lower bounds on states? If so, then gn() needs rethinking.
gn2n(grid, node, node) "All (directional) transfer links between nodes in specific energy grids"
......@@ -72,9 +72,9 @@ Sets
restypeDirection(restype, up_down) "Different combinations of reserve types and directions"
restypeDirectionNode(restype, up_down, node) "Nodes with reserve requirements"
nuRescapable(restype, up_down, node, unit) "Units capable and available to provide particular reserves"
restypeReleasedForRealization(restype) "Reserve types that are released for the realized time periods"
restypeReleasedForRealization(restype) "Reserve types that are released for the realized time intervals"
* --- Sets to define time, forecasts and samples -----------------------------------------------
* --- Sets to define time, forecasts and samples ------------------------------
$$include 'input/timeAndSamples.inc'
m(mType) "model(s) in use"
t_full(t) "Full set of time steps in the current model"
......@@ -123,14 +123,14 @@ Sets
effLevelGroupUnit(effLevel, effSelector, unit) "What efficiency selectors are in use for each unit at each efficiency representation level"
effGroupSelectorUnit(effSelector, unit, effSelector) "Group name for efficiency selector set, e.g. Lambda02 contains Lambda01 and Lambda02"
* --- Sets used for grouping of units, transfer links, nodes, etc.
* --- Sets used for grouping of units, transfer links, nodes, etc. ------------
group "A group of units, transfer links, nodes, etc."
uGroup(unit, group) "Units in particular groups"
gnuGroup(grid, node, unit, group) "Combination of grids, nodes and units in particular groups"
gn2nGroup(grid, node, node, group) "Transfer links in particular groups"
gnGroup(grid, node, group) "Combination of grids and nodes in particular groups"
* --- Set of timeseries that will be read from files between solves
* --- Set of timeseries that will be read from files between solves -----------
mTimeseries_loop_read(mType, timeseries) "Those time series that will be read between solves"
;
* Set initial values to avoid errors when checking if parameter contents have been loaded from input data
......
......@@ -25,7 +25,7 @@ Scalars
lastCounter "last member in use of the general counter"
ts_length "Length of time series (t)"
continueLoop "Helper to stop the looping early"
intervalLength "Legnth of the interval to be calculated, considering end of modelling period"
* intervalLength "Length of the interval to be calculated, considering end of modelling period" // redundant
currentForecastLength "Length of the forecast in the curren solve, minimum of unchanging and decreasing forecast lengths"
count "General counter"
count_lambda, count_lambda2 "Counter for lambdas"
......
......@@ -155,6 +155,7 @@ unit_fuel(unit)${ sum(fuel, uFuel(unit, 'main', fuel)) }
// Units with special startup properties
// All units can cold start (default start category)
// NOTE! Juha needs to check why not all units can cold start
unitStarttype(unit, starttype('cold'))${ p_unit(unit, 'startCostCold')
or p_unit(unit, 'startFuelConsCold')
or p_unit(unit, 'rampSpeedToMinLoad')
......
......@@ -327,6 +327,7 @@ loop(m,
p_ut_runUp(unit, t)${ord(t) = 1} = p_unit(unit,'op00');
// Not all units can cold start?
// NOTE! Juha needs to check why not all units can cold start
unitStarttype(unit, 'cold') = no;
unitStarttype(unit, 'cold')${ p_unit(unit, 'startCostCold')
or p_unit(unit, 'startFuelConsCold')
......
......@@ -496,7 +496,7 @@ p_msft_probability(msft(mSolve, s, f, t))
* --- Displacements for start-up and shutdown decisions -----------------------
* -----------------------------------------------------------------------------
// Calculate dtt: displacement needed to reach any previous time period
// Calculate dtt: displacement needed to reach any previous time interval
// (needed to calculate dt_toStartup and dt_toShutdown)
Option clear = dtt;
dtt(t_active(t),t_activeNoReset(t_))${ ord(t_) <= ord(t) }
......@@ -504,18 +504,18 @@ dtt(t_active(t),t_activeNoReset(t_))${ ord(t_) <= ord(t) }
* --- Start-up decisions ------------------------------------------------------
// Calculate dt_toStartup: in case the unit becomes online in the current time period,
// displacement needed to reach the time period where the unit was started up
// Calculate dt_toStartup: in case the unit becomes online in the current time interval,
// displacement needed to reach the time interval where the unit was started up
Option clear = dt_toStartup;
loop(unit$(p_u_runUpTimeIntervals(unit)),
loop(t_active(t)${sum(f_solve(f), uft_startupTrajectory(unit, f, t))},
tmp = 1;
loop(t_activeNoReset(t_)${ ord(t_) > ord(t) - p_u_runUpTimeIntervals(unit) // time periods after the start up
and ord(t_) <= ord(t) // time periods before and including the current time period
loop(t_activeNoReset(t_)${ ord(t_) > ord(t) - p_u_runUpTimeIntervals(unit) // time intervals after the start up
and ord(t_) <= ord(t) // time intervals before and including the current time interval
and tmp = 1
},
if (-dtt(t,t_) < p_u_runUpTimeIntervals(unit), // if the displacement between the two time periods is smaller than the number of time periods required for start-up phase
dt_toStartup(unit, t) = dtt(t,t_ + dt_noReset(t_)); // the displacement to the active or realized time period just before the time period found
if (-dtt(t,t_) < p_u_runUpTimeIntervals(unit), // if the displacement between the two time intervals is smaller than the number of time steps required for start-up phase
dt_toStartup(unit, t) = dtt(t,t_ + dt_noReset(t_)); // the displacement to the active or realized time interval just before the time interval found
tmp = 0;
);
);
......@@ -529,18 +529,18 @@ loop(unit$(p_u_runUpTimeIntervals(unit)),
* --- Shutdown decisions ------------------------------------------------------
// Calculate dt_toShutdown: in case the generation of the unit becomes zero in
// the current time period, displacement needed to reach the time period where
// the current time interval, displacement needed to reach the time interval where
// the shutdown decisions was made
Option clear = dt_toShutdown;
loop(unit$(p_u_shutdownTimeIntervals(unit)),
loop(t_active(t)${sum(f_solve(f), uft_shutdownTrajectory(unit, f, t))},
tmp = 1;
loop(t_activeNoReset(t_)${ ord(t_) > ord(t) - p_u_shutdownTimeIntervals(unit) // time periods after the shutdown decision
and ord(t_) <= ord(t) // time periods before and including the current time period
loop(t_activeNoReset(t_)${ ord(t_) > ord(t) - p_u_shutdownTimeIntervals(unit) // time intervals after the shutdown decision
and ord(t_) <= ord(t) // time intervals before and including the current time interval
and tmp = 1
},
if (-dtt(t,t_) < p_u_shutdownTimeIntervals(unit), // if the displacement between the two time periods is smaller than the number of time periods required for shutdown phase
dt_toShutdown(unit, t) = dtt(t,t_ + dt_noReset(t_)); // the displacement to the active or realized time period just before the time period found
if (-dtt(t,t_) < p_u_shutdownTimeIntervals(unit), // if the displacement between the two time intervals is smaller than the number of time steps required for shutdown phase
dt_toShutdown(unit, t) = dtt(t,t_ + dt_noReset(t_)); // the displacement to the active or realized time interval just before the time interval found
tmp = 0;
);
);
......
......@@ -20,13 +20,13 @@ $offtext
* =============================================================================
// Fix non-flow unit reserves ahead of time
// Upper bound can be supplemented from the tertiary reserves when realized.
v_reserve.fx(nuRescapable(restype, up_down, node, unit), f_solve(f), t_active(t))${ mft_nReserves(node, restype, mSolve, f, t) // This set contains the combination of reserve types and time periods that should be fixed
v_reserve.fx(nuRescapable(restype, up_down, node, unit), f_solve(f), t_active(t))${ mft_nReserves(node, restype, mSolve, f, t) // This set contains the combination of reserve types and time intervals that should be fixed
and ord(t) > mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and not unit_flow(unit) // NOTE! Units using flows can change their reserve (they might not have as much available in real time as they had bid)
}
= v_reserve.l(restype, up_down, node, unit, f, t);
vq_resDemand.fx(restypeDirectionNode(restype, up_down, node), f_solve(f), t_active(t))${ mft_nReserves(node, restype, mSolve, f, t) // This set contains the combination of reserve types and time periods that should be fixed
vq_resDemand.fx(restypeDirectionNode(restype, up_down, node), f_solve(f), t_active(t))${ mft_nReserves(node, restype, mSolve, f, t) // This set contains the combination of reserve types and time intervals that should be fixed
and ord(t) > mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
}
= vq_resDemand.l(restype, up_down, node, f, t);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment