Commit 99aecde1 authored by Topi Rasku's avatar Topi Rasku
Browse files

Issue #65: *v_shutdown* separated into *v_shutdown_LP* and *v_shutdown_MIP*.

parent bf80b4e6
......@@ -81,7 +81,8 @@ v_online_LP
v_online_MIP
v_startup_LP
v_startup_MIP
v_shutdown
v_shutdown_LP
v_shutdown_MIP
v_genRampUpDown
v_transferRightward
v_transferLeftward
......
......@@ -24,6 +24,7 @@ Free variables
;
Integer variables
v_startup_MIP(unit, starttype, s, f, t) "Sub-units started up after/during an interval (p.u.), (MIP variant)"
v_shutdown_MIP(unit, s, f, t) "Sub-units shut down after/during an interval (p.u.) (MIP variant)"
v_online_MIP(unit, s, f, t) "Number of sub-units online for units with unit commitment restrictions"
v_invest_MIP(unit, t) "Number of invested sub-units"
v_investTransfer_MIP(grid, node, node, t) "Number of invested transfer links"
......@@ -37,7 +38,7 @@ SOS2 variables
Positive variables
v_fuelUse(fuel, unit, s, f, t) "Fuel use of a unit during an interval (MWh_fuel)"
v_startup_LP(unit, starttype, s, f, t) "Sub-units started up after/during an interval (p.u.), (LP variant)"
v_shutdown(unit, s, f, t) "Sub-units shut down after/during an interval (p.u.)"
v_shutdown_LP(unit, s, f, t) "Sub-units shut down after/during an interval (p.u.) (LP variant)"
v_genRampUpDown(grid, node, unit, slack, s, f, t) "Change in energy generation or consumption over an interval, separated into different 'slacks' (MW/h)"
v_spill(grid, node, s, f, t) "Spill of energy from storage node during an interval (MWh)"
v_transferRightward(grid, node, node, s, f, t) "Average electricity transmission level from the first node to the second node during an interval (MW)"
......
......@@ -114,7 +114,13 @@ q_obj ..
// Shut-down costs, initial shutdown free?
+ sum(uft_online(unit, f, t),
+ v_shutdown(unit, s, f, t) * p_uShutdown(unit, 'cost')
+ p_uShutdown(unit, 'cost')
* [
+ v_shutdown_LP(unit, s, f, t)
${ uft_onlineLP(unit, f, t) }
+ v_shutdown_MIP(unit, s, f, t)
${ uft_onlineMIP(unit, f, t) }
]
) // END sum(uft_online)
// Ramping costs
......
This diff is collapsed.
......@@ -38,7 +38,8 @@ Option clear = v_sos2;
Option clear = v_fuelUse;
Option clear = v_startup_LP;
Option clear = v_startup_MIP;
Option clear = v_shutdown;
Option clear = v_shutdown_LP;
Option clear = v_shutdown_MIP;
Option clear = v_genRampUpDown;
Option clear = v_spill;
Option clear = v_transferRightward;
......
......@@ -253,11 +253,17 @@ v_startup_MIP.up(unitStarttype(unit, starttype), sft(s, f, t))
= p_unit(unit, 'unitCount');
// v_shutdown cannot exceed unitCount
v_shutdown.up(unit, sft(s, f, t))${uft_online(unit, f, t)
and not unit_investLP(unit)
and not unit_investMIP(unit)}
= p_unit(unit, 'unitCount')
;
v_shutdown_LP.up(unit, sft(s, f, t))
${ uft_onlineLP(unit, f, t)
and not unit_investLP(unit)
and not unit_investMIP(unit)}
= p_unit(unit, 'unitCount');
// v_shutdown cannot exceed unitCount
v_shutdown_MIP.up(unit, sft(s, f, t))
${ uft_onlineMIP(unit, f, t)
and not unit_investLP(unit)
and not unit_investMIP(unit)}
= p_unit(unit, 'unitCount');
// !!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// The following limits are extremely slow, and shouldn't strictly be required.
......@@ -459,7 +465,8 @@ loop((mft_start(mSolve, f, t), ms_initial(mSolve, s)),
// Startup and shutdown variables are not applicable at the first time step
v_startup_LP.fx(unitStarttype(unit_online_LP, starttype), s, f, t) = 0;
v_startup_MIP.fx(unitStarttype(unit_online_MIP, starttype), s, f, t) = 0;
v_shutdown.fx(unit, s, f, t) = 0;
v_shutdown_LP.fx(unit_online_LP, s, f, t) = 0;
v_shutdown_MIP.fx(unit_online_LP, s, f, t) = 0;
else // For all other solves, fix the initial state values based on previous results.
......@@ -490,10 +497,12 @@ if( tSolveFirst <> mSettings(mSolve, 't_start'), // Avoid rewriting the fixes on
${ ord(t) <= tSolveFirst } // Only fix previously realized time steps
= r_startup(unit, starttype, f, t);
v_shutdown.fx(unit, sft_realizedNoReset(s, f, t_active(t)))
${ ord(t) <= tSolveFirst // Only fix previously realized time steps
and unit_online(unit) // Check if the unit has an online variable on the first effLevel
}
v_shutdown_LP.fx(unit_online_LP(unit), sft_realizedNoReset(s, f, t_active(t)))
${ ord(t) <= tSolveFirst } // Only fix previously realized time steps
= r_shutdown(unit, f, t);
v_shutdown_MIP.fx(unit_online_MIP(unit), sft_realizedNoReset(s, f, t_active(t)))
${ ord(t) <= tSolveFirst } // Only fix previously realized time steps
= r_shutdown(unit, f, t);
v_online_MIP.fx(unit, sft_realizedNoReset(s, f, t_active(t)))
......
......@@ -53,7 +53,8 @@ loop(sft_realized(s, f, t),
+ v_startup_MIP.l(unit, starttype, s, f, t)${ uft_onlineMIP(unit, f, t) }
;
r_shutdown(uft_online(unit, f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_shutdown.l(unit, s, f, t)
= v_shutdown_LP.l(unit, s, f, t)${ uft_onlineLP(unit, f, t) }
+ v_shutdown_MIP.l(unit, s, f, t)${ uft_onlineMIP(unit, 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