Commit b2388752 authored by Erkka Rinne's avatar Erkka Rinne
Browse files

Speedups

parent 9e3efdaf
......@@ -54,8 +54,8 @@ equations
q_resDemand(restype, up_down, node, s, f, t) "Procurement for each reserve type is greater than demand"
q_resDemandLargestInfeedUnit(grid, restype, up_down, node, unit, s, f, t) "N-1 Reserve"
// Unit Operation
q_maxDownward(mType, s, grid, node, unit, f, t) "Downward commitments will not undercut power plant minimum load constraints or maximum elec. consumption"
q_maxUpward(mType, s, grid, node, unit, f, t) "Upward commitments will not exceed maximum available capacity or consumed power"
q_maxDownward(grid, node, unit, mType, s, f, t) "Downward commitments will not undercut power plant minimum load constraints or maximum elec. consumption"
q_maxUpward(grid, node, unit, mType, s, f, t) "Upward commitments will not exceed maximum available capacity or consumed power"
q_reserveProvision(restype, up_down, node, unit, s, f, t) "Reserve provision limited for units"
q_startshut(mType, s, unit, f, t) "Online capacity now minus online capacity in the previous interval is equal to started up minus shut down capacity"
q_startuptype(mType, s, starttype, unit, f, t) "Startup type depends on the time the unit has been non-operational"
......
......@@ -210,7 +210,7 @@ q_resDemandLargestInfeedUnit(grid, restypeDirectionNode(restype, 'up', node), un
;
* --- Maximum Downward Capacity -----------------------------------------------
q_maxDownward(m, s, gnuft(grid, node, unit, f, t))${msft(m, s, f, t)
q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))${gnuft(grid, node, unit, f, t)
and {
[ ord(t) < tSolveFirst + smax(restype, p_nReserves(node, restype, 'reserve_length')) // Unit is either providing
and sum(restype, nuRescapable(restype, 'down', node, unit)) // downward reserves
......@@ -303,7 +303,7 @@ q_maxDownward(m, s, gnuft(grid, node, unit, f, t))${msft(m, s, f, t)
* --- Maximum Upwards Capacity ------------------------------------------------
q_maxUpward(m, s, gnuft(grid, node, unit, f, t))${msft(m, s, f, t)
q_maxUpward(gnu(grid, node, unit), msft(m, s, f, t))${gnuft(grid, node, unit, f, t)
and {
[ ord(t) < tSolveFirst + smax(restype, p_nReserves(node, restype, 'reserve_length')) // Unit is either providing
and sum(restype, nuRescapable(restype, 'up', node, unit)) // upward reserves
......
......@@ -194,20 +194,15 @@ loop(cc(counter),
// Store the interval time steps for each interval block (counter)
tt_block(counter, tt) = yes;
// Initialize tInterval
Option clear = tt_interval;
// If stepsPerInterval equals one, simply use all the steps within the block
if(mInterval(mSolve, 'stepsPerInterval', counter) = 1,
// Initialize tInterval
Option clear = tt_interval;
tt_interval(tt(t)) = yes; // Include all time steps within the block
// If stepsPerInterval exceeds 1 (stepsPerInterval < 1 not defined)
elseif mInterval(mSolve, 'stepsPerInterval', counter) > 1,
// Initialize tInterval
Option clear = tt_interval;
tt_interval(tt(t)) // Select the active time steps within the block
${mod(ord(t) - tSolveFirst - tCounter,
mInterval(mSolve, 'stepsPerInterval', counter)) = 0
......
......@@ -440,8 +440,8 @@ p_msft_probability(msft(mSolve, s, f, t))
* --- Calculate sample displacements ------------------------------------------
Options clear = ds, clear = ds_state;
loop(ss(s, s_),
ds(s, t)$(ord(t) = tSolveFirst + msStart(mSolve, s)) = -(ord(s) - ord(s_));
loop((mst_start(mSolve, s, t), ss(s, s_)),
ds(s, t) = -(ord(s) - ord(s_));
ds_state(gn_state(grid, node), s, t)
${not sum(s__, gnss_bound(grid, node, s__, s))
and not sum(s__, gnss_bound(grid, node, s, s__))} = ds(s, 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