Commit f383aa1c authored by Niina Helistö's avatar Niina Helistö
Browse files

Adding functionality for a rolling horizon in investment optimization

parent 4c826901
...@@ -126,7 +126,8 @@ r_nTotalReserve ...@@ -126,7 +126,8 @@ r_nTotalReserve
* --- Investment Result Symbols ----------------------------------------------- * --- Investment Result Symbols -----------------------------------------------
// Interesting investment results // Interesting investment results
r_unitInvestment r_invest
r_investTransfer
* --- Dummy and Diagnostic Variable Result Symbols ---------------------------- * --- Dummy and Diagnostic Variable Result Symbols ----------------------------
......
...@@ -128,7 +128,8 @@ Parameters ...@@ -128,7 +128,8 @@ Parameters
* --- Investment Results ------------------------------------------------------ * --- Investment Results ------------------------------------------------------
// Interesting investment results // Interesting investment results
r_unitInvestment(unit) "Number/amount of invested units" r_invest(unit) "Number/amount of invested units"
r_investTransfer(grid, node, node, t) "Amount of invested transfer link capacity"
* --- Dummy Variable Results -------------------------------------------------- * --- Dummy Variable Results --------------------------------------------------
...@@ -155,6 +156,8 @@ Option clear = r_gen; ...@@ -155,6 +156,8 @@ Option clear = r_gen;
Option clear = r_realizedLast; Option clear = r_realizedLast;
Option clear = r_startup; Option clear = r_startup;
Option clear = r_shutdown; Option clear = r_shutdown;
Option clear = r_invest;
Option clear = r_investTransfer;
* ============================================================================= * =============================================================================
* --- Diagnostics Results Arrays ---------------------------------------------- * --- Diagnostics Results Arrays ----------------------------------------------
......
...@@ -228,7 +228,7 @@ $offtext ...@@ -228,7 +228,7 @@ $offtext
) // END sum(ms) ) // END sum(ms)
// Transfer link investment costs // Transfer link investment costs
+ sum(ms(m, s), + sum(ms(m, s)${ sum(msft(m, s, f, t), 1) },
+ sum(t_invest(t)${ord(t) <= msEnd(m, s)}, + sum(t_invest(t)${ord(t) <= msEnd(m, s)},
+ sum(gn2n_directional(grid, from_node, to_node), + sum(gn2n_directional(grid, from_node, to_node),
+ v_investTransfer_LP(grid, from_node, to_node, t)${ not p_gnn(grid, from_node, to_node, 'investMIP') } + v_investTransfer_LP(grid, from_node, to_node, t)${ not p_gnn(grid, from_node, to_node, 'investMIP') }
......
...@@ -163,8 +163,8 @@ loop(cc(counter), ...@@ -163,8 +163,8 @@ loop(cc(counter),
if(mInterval(mSolve, 'intervalLength', counter) = 1, if(mInterval(mSolve, 'intervalLength', counter) = 1,
tt_interval(t_current(t))${ ord(t) >= tSolveFirst + tCounter tt_interval(t_current(t))${ ord(t) >= tSolveFirst + tCounter
and ord(t) < min(tSolveFirst + mInterval(mSolve, 'intervalEnd', counter), tSolveLast) and ord(t) < min(tSolveFirst + mInterval(mSolve, 'intervalEnd', counter), tSolveLast)
and ord(t) > msStart(mSolve, s) + tSolveFirst - 1 // Move the samples along with the dispatch and ord(t) > msStart(mSolve, s)
and ord(t) < msEnd(mSolve, s) + tSolveFirst // Move the samples along with the dispatch and ord(t) <= msEnd(mSolve, s)
} }
= yes; // Include all time steps within the interval = yes; // Include all time steps within the interval
...@@ -224,8 +224,8 @@ loop(cc(counter), ...@@ -224,8 +224,8 @@ loop(cc(counter),
tt_interval(t_current(t))${ ord(t) >= tSolveFirst + tCounter tt_interval(t_current(t))${ ord(t) >= tSolveFirst + tCounter
and ord(t) < min(tSolveFirst + mInterval(mSolve, 'intervalEnd', counter), tSolveLast) and ord(t) < min(tSolveFirst + mInterval(mSolve, 'intervalEnd', counter), tSolveLast)
and mod(ord(t) - tSolveFirst - tCounter, mInterval(mSolve, 'intervalLength', counter)) = 0 and mod(ord(t) - tSolveFirst - tCounter, mInterval(mSolve, 'intervalLength', counter)) = 0
and ord(t) > msStart(mSolve, s) + tSolveFirst - 1 // Move the samples along with the dispatch and ord(t) > msStart(mSolve, s)
and ord(t) < msEnd(mSolve, s) + tSolveFirst // Move the samples along with the dispatch and ord(t) <= msEnd(mSolve, s)
} }
= yes; = yes;
......
...@@ -376,3 +376,23 @@ v_state.fx(grid, node, ft(f,t))${ mft_lastSteps(mSolve, f, t) ...@@ -376,3 +376,23 @@ v_state.fx(grid, node, ft(f,t))${ mft_lastSteps(mSolve, f, t)
+ r_state(grid, node, f_, tSolve) + r_state(grid, node, f_, tSolve)
) // END sum(fRealization) ) // END sum(fRealization)
; ;
// Fix investment results
v_invest_LP.fx(unit_investLP(unit))${ p_unit(unit, 'start') <= tSolveFirst }
= r_invest(unit)
;
v_invest_MIP.fx(unit_investMIP(unit))${ p_unit(unit, 'start') <= tSolveFirst }
= r_invest(unit)
;
v_investTransfer_LP.fx(gn2n_directional(grid, node, node_), t_invest(t))${ not p_gnn(grid, node, node_, 'investMIP')
and p_gnn(grid, node, node_, 'transferCapInvLimit')
and ord(t) <= tSolveFirst
}
= r_investTransfer(grid, node, node_, t)
;
v_investTransfer_MIP.fx(gn2n_directional(grid, node, node_), t_invest(t))${ p_gnn(grid, node, node_, 'investMIP')
and p_gnn(grid, node, node_, 'transferCapInvLimit')
and ord(t) <= tSolveFirst
}
= r_investTransfer(grid, node, node_, t) / p_gnn(grid, node, node_, 'unitSize')
;
...@@ -109,9 +109,17 @@ r_stateSlack(gn_stateSlack(grid, node), slack, ft_realized(f, t)) ...@@ -109,9 +109,17 @@ r_stateSlack(gn_stateSlack(grid, node), slack, ft_realized(f, t))
= v_stateSlack.l(grid, node, slack, f, t) = v_stateSlack.l(grid, node, slack, f, t)
; ;
// Unit investments // Unit investments
r_unitInvestment(unit)${unit_investLP(unit) or unit_investMIP(unit)} r_invest(unit)${unit_investLP(unit) or unit_investMIP(unit)}
= v_invest_LP.l(unit) + v_invest_MIP.l(unit) = v_invest_LP.l(unit) + v_invest_MIP.l(unit)
; ;
// Link investments
r_investTransfer(grid, node, node_, t_invest(t))${ p_gnn(grid, node, node_, 'transferCapInvLimit')
and t_current(t)
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump')
}
= v_investTransfer_LP.l(grid, node, node_, t)
+ v_investTransfer_MIP.l(grid, node, node_, t) * p_gnn(grid, node, node_, 'unitSize')
;
* --- Feasibility results ----------------------------------------------------- * --- Feasibility results -----------------------------------------------------
......
...@@ -200,7 +200,7 @@ loop(m, ...@@ -200,7 +200,7 @@ loop(m,
r_gnuUtilizationRate(gnu_output(grid, node, unit))${r_gnuTotalGen(grid, node, unit)} r_gnuUtilizationRate(gnu_output(grid, node, unit))${r_gnuTotalGen(grid, node, unit)}
= r_gnuTotalGen(grid, node, unit) = r_gnuTotalGen(grid, node, unit)
/ [ / [
+ (p_gnu(grid, node, unit, 'maxGen') + r_unitInvestment(unit)*p_gnu(grid, node, unit, 'unitSizeGen')) + (p_gnu(grid, node, unit, 'maxGen') + r_invest(unit)*p_gnu(grid, node, unit, 'unitSizeGen'))
* (mSettings(m, 't_end') - mSettings(m, 't_start') + 1) * (mSettings(m, 't_end') - mSettings(m, 't_start') + 1)
* mSettings(m, 'intervalInHours') * mSettings(m, 'intervalInHours')
]; // END division ]; // END division
......
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