Commit 0f1c9279 authored by Niina Helistö's avatar Niina Helistö
Browse files

Changing results_t_start to t_initializationPeriod (=the number of time steps...

Changing results_t_start to t_initializationPeriod (=the number of time steps in the beginning of the simulation that are solved but not included in the results) and t_omitTrajectories to t_trajectoryHorizon (the number of time steps when start-up and shutdown trajectory constraints are 'active' in the beginning of each solution).
parent f912540a
......@@ -109,13 +109,13 @@ if (mType('building'),
// Define the last time step for each unit aggregation and efficiency level (3a_periodicInit.gms ensures that there is a effLevel until t_horizon)
mSettingsEff('building', 'level1') = inf;
// Define threshold for omitting start-up and shutdown trajectories
mSettings('building', 't_omitTrajectories') = 8761;
// Define the horizon when start-up and shutdown trajectories are considered
mSettings('building', 't_trajectoryHorizon') = 8760;
* --- Define output settings for results --------------------------------------
// Define when to start outputting results - allows to skip an initialization period. Uses ord(t) > results_t_start in the code.
mSettings('building', 'results_t_start') = 1;
// Define the length of the initialization period. Results outputting starts after the period. Uses ord(t) > t_start + t_initializationPeriod in the code.
mSettings('building', 't_initializationPeriod') = 0; // r_state and r_online are stored also for the last step in the initialization period, i.e. ord(t) = t_start + t_initializationPeriod
* --- Control the solver ------------------------------------------------------
......
......@@ -115,13 +115,13 @@ if (mType('invest'),
// Define the last time step for each unit aggregation and efficiency level (3a_periodicInit.gms ensures that there is a effLevel until t_horizon)
mSettingsEff('invest', 'level1') = inf;
// Define threshold for omitting start-up and shutdown trajectories
mSettings('invest', 't_omitTrajectories') = 8761;
// Define the horizon when start-up and shutdown trajectories are considered
mSettings('invest', 't_trajectoryHorizon') = 8760;
* --- Define output settings for results --------------------------------------
// Define when to start outputting results - allows to skip an initialization period. Uses ord(t) > results_t_start in the code.
mSettings('invest', 'results_t_start') = 1;
// Define the length of the initialization period. Results outputting starts after the period. Uses ord(t) > t_start + t_initializationPeriod in the code.
mSettings('invest', 't_initializationPeriod') = 0; // r_state and r_online are stored also for the last step in the initialization period, i.e. ord(t) = t_start + t_initializationPeriod
* --- Control the solver ------------------------------------------------------
......
......@@ -132,13 +132,13 @@ if (mType('schedule'),
mSettingsEff('schedule', 'level1') = 12;
mSettingsEff('schedule', 'level2') = 36;
// Define threshold for omitting start-up and shutdown trajectories
mSettings('schedule', 't_omitTrajectories') = 8761;
// Define the horizon when start-up and shutdown trajectories are considered
mSettings('schedule', 't_trajectoryHorizon') = 8760;
* --- Define output settings for results --------------------------------------
// Define when to start outputting results - allows to skip an initialization period. Uses ord(t) > results_t_start in the code.
mSettings('schedule', 'results_t_start') = 1;
// Define the length of the initialization period. Results outputting starts after the period. Uses ord(t) > t_start + t_initializationPeriod in the code.
mSettings('schedule', 't_initializationPeriod') = 0; // r_state and r_online are stored also for the last step in the initialization period, i.e. ord(t) = t_start + t_initializationPeriod
* --- Control the solver ------------------------------------------------------
......
......@@ -51,8 +51,8 @@ Sets
t_forecastJump, // Number of time steps between each update of the forecasts
// Features
t_omitTrajectories, // Threshold time index for omitting start-up and shutdown trajectories
results_t_start // Time index where results outputting starts
t_trajectoryHorizon, // Length of the horizon when start-up and shutdown trajectories are considered (in time steps)
t_initializationPeriod // Number of time steps in the beginning of the simulation which are solved but the results of which are not stored
/
// Solve info
......
......@@ -531,11 +531,11 @@ Option clear = uft_shutdownTrajectory;
// Determine the intervals when units need to follow start-up and shutdown trajectories.
loop(uft_online(unit, f, t)${ p_u_runUpTimeIntervals(unit) },
uft_startupTrajectory(unit, f, t)${ord(t) < tSolveFirst + mSettings(mSolve, 't_omitTrajectories')}
uft_startupTrajectory(unit, f, t)${ord(t) <= tSolveFirst + mSettings(mSolve, 't_trajectoryHorizon')}
= yes;
); // END loop(uf_online)
loop(uft_online(unit, f, t)${ p_u_shutdownTimeIntervals(unit) },
uft_shutdownTrajectory(unit, f, t)${ord(t) < tSolveFirst + mSettings(mSolve, 't_omitTrajectories')}
uft_shutdownTrajectory(unit, f, t)${ord(t) <= tSolveFirst + mSettings(mSolve, 't_trajectoryHorizon')}
= yes;
); // END loop(uf_online)
......
......@@ -25,32 +25,32 @@ $offtext
* --- Result arrays required by model dynamics --------------------------------
if(tSolveFirst >= mSettings(mSolve, 'results_t_start') - mSettings(mSolve, 't_jump') and firstResultsOutputSolve,
if(tSolveFirst >= mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod') - mSettings(mSolve, 't_jump') and firstResultsOutputSolve,
firstResultsOutputSolve = 0;
r_state(gn_state(grid, node), f_solve, t) $[ord(t) = mSettings(mSolve, 'results_t_start')]
r_state(gn_state(grid, node), f_solve, t) $[ord(t) = mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_state.l(grid, node, f_solve, t);
r_online(unit, f_solve, t)$[unit_online(unit) and ord(t) = mSettings(mSolve, 'results_t_start')]
r_online(unit, f_solve, t)$[unit_online(unit) and ord(t) = mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_online_LP.l(unit, f_solve, t)$unit_online_LP(unit)
+ v_online_MIP.l(unit, f_solve, t)$unit_online_MIP(unit);
);
// Realized state history
r_state(gn_state(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_state(gn_state(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_state.l(grid, node, f, t)
;
// Realized state history - initial state values in samples
r_state(gn_state(grid, node), f_solve(f), t+dt(t))${ ord(t) > mSettings(mSolve, 'results_t_start')
r_state(gn_state(grid, node), f_solve(f), t+dt(t))${ ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')
and sum(ms(mSolve, s), mst_start(mSolve, s, t))
and ft_realized(f, t)
}
= v_state.l(grid, node, f, t+dt(t))
;
// Realized unit online history
r_online(uft_online(unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_online(uft_online(unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_online_LP.l(unit, f, t)${ uft_onlineLP(unit, f, t) }
+ v_online_MIP.l(unit, f, t)${ uft_onlineMIP(unit, f, t) }
;
// Reserve provisions of units
r_reserve(nuRescapable(restype, up_down, node, unit), f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 'results_t_start')] and
r_reserve(nuRescapable(restype, up_down, node, unit), f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')] and
(
mft_nReserves(node, restype, mSolve, f, t) or
sum(f_, df_nReserves(node, restype, f_, t)) or
......@@ -63,7 +63,7 @@ r_reserve(nuRescapable(restype, up_down, node, unit), f_solve(f), t_active(t))${
= v_reserve.l(restype, up_down, node, unit, f, t)
;
// Reserve transfer capacity
r_resTransferRightward(restypeDirectionNode(restype, up_down, from_node), to_node, f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 'results_t_start')] and
r_resTransferRightward(restypeDirectionNode(restype, up_down, from_node), to_node, f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')] and
(
restypeDirectionNode(restype, up_down, to_node)
and [ mft_nReserves(from_node, restype, mSolve, f, t)
......@@ -77,7 +77,7 @@ r_resTransferRightward(restypeDirectionNode(restype, up_down, from_node), to_nod
}
= v_resTransferRightward.l(restype, up_down, from_node, to_node, f, t)
;
r_resTransferLeftward(restypeDirectionNode(restype, up_down, from_node), to_node, f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 'results_t_start')] and
r_resTransferLeftward(restypeDirectionNode(restype, up_down, from_node), to_node, f_solve(f), t_active(t))${ [ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')] and
(
{ restypeDirectionNode(restype, up_down, to_node)
and [ mft_nReserves(from_node, restype, mSolve, f, t)
......@@ -93,29 +93,29 @@ r_resTransferLeftward(restypeDirectionNode(restype, up_down, from_node), to_node
= v_resTransferLeftward.l(restype, up_down, from_node, to_node, f, t)
;
// Unit startup and shutdown history
r_startup(unit, starttype, ft_realized(f, t))${ uft_online(unit, f, t) and [ord(t) > mSettings(mSolve, 'results_t_start')] }
r_startup(unit, starttype, ft_realized(f, t))${ uft_online(unit, f, t) and [ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')] }
= v_startup.l(unit, starttype, f, t)
;
r_shutdown(uft_online(unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_shutdown(uft_online(unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_shutdown.l(unit, f, t)
;
* --- Interesting results -----------------------------------------------------
// Unit generation and consumption
r_gen(gnuft(grid, node, unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_gen(gnuft(grid, node, unit, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_gen.l(grid, node, unit, f, t)
;
// Fuel use of units
r_fuelUse(fuel, uft(unit_fuel, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_fuelUse(fuel, uft(unit_fuel, ft_realized(f, t)))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_fuelUse.l(fuel, unit_fuel, f, t)
;
// Transfer of energy between nodes
r_transfer(gn2n(grid, from_node, to_node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_transfer(gn2n(grid, from_node, to_node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_transfer.l(grid, from_node, to_node, f, t)
;
// Energy spilled from nodes
r_spill(gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_spill(gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_spill.l(grid, node, f, t)
;
// Total Objective function
......@@ -123,15 +123,15 @@ r_totalObj
= r_totalObj + v_obj.l
;
// q_balance marginal values
r_balanceMarginal(gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_balanceMarginal(gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= q_balance.m(grid, node, mSolve, f, t)
;
// q_resDemand marginal values
r_resDemandMarginal(restypeDirectionNode(restype, up_down, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_resDemandMarginal(restypeDirectionNode(restype, up_down, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= q_resDemand.m(restype, up_down, node, f, t)
;
// v_stateSlack values for calculation of realized costs later on
r_stateSlack(gn_stateSlack(grid, node), slack, ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_stateSlack(gn_stateSlack(grid, node), slack, ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_stateSlack.l(grid, node, slack, f, t)
;
// Unit investments
......@@ -150,11 +150,11 @@ r_investTransfer(grid, node, node_, t_invest(t))${ p_gnn(grid, node, node_, 'tra
* --- Feasibility results -----------------------------------------------------
// Dummy generation & consumption
r_qGen(inc_dec, gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_qGen(inc_dec, gn(grid, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= vq_gen.l(inc_dec, grid, node, f, t)
;
// Dummy reserve demand changes
r_qResDemand(restypeDirectionNode(restype, up_down, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 'results_t_start')]
r_qResDemand(restypeDirectionNode(restype, up_down, node), ft_realized(f, t))$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= vq_resDemand.l(restype, up_down, node, f, t)
;
......
......@@ -25,14 +25,14 @@ loop(m,
* --- Realized Individual Costs ----------------------------------------------
// Variable O&M costs
r_gnuVOMCost(gnu_output(grid, node, unit), ft_realizedNoReset(f,t))$[ord(t) > mSettings(m, 'results_t_start')]
r_gnuVOMCost(gnu_output(grid, node, unit), ft_realizedNoReset(f,t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_gen(grid, node, unit, f, t)
* p_unit(unit, 'omCosts');
// Fuel and emission costs during normal operation
r_uFuelEmissionCost(fuel, unit_fuel(unit), ft_realizedNoReset(f,t))${ uFuel(unit, 'main', fuel) and [ord(t) > mSettings(m, 'results_t_start')]}
r_uFuelEmissionCost(fuel, unit_fuel(unit), ft_realizedNoReset(f,t))${ uFuel(unit, 'main', fuel) and [ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]}
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_fuelUse(fuel, unit, f, t)
......@@ -43,7 +43,7 @@ loop(m,
];
// Unit startup costs
r_uStartupCost(unit, ft_realizedNoReset(f,t))${ sum(starttype, unitStarttype(unit, starttype)) and [ord(t) > mSettings(m, 'results_t_start')]}
r_uStartupCost(unit, ft_realizedNoReset(f,t))${ sum(starttype, unitStarttype(unit, starttype)) and [ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]}
= 1e-6 // Scaling to MEUR
* sum(unitStarttype(unit, starttype),
+ r_startup(unit, starttype, f, t)
......@@ -66,7 +66,7 @@ loop(m,
); // END sum(unitStarttype)
// Node state slack costs
r_gnStateSlackCost(gn_stateSlack(grid, node), ft_realizedNoReset(f,t))$[ord(t) > mSettings(m, 'results_t_start')]
r_gnStateSlackCost(gn_stateSlack(grid, node), ft_realizedNoReset(f,t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* sum(slack${ p_gnBoundaryPropertiesForStates(grid, node, slack, 'slackCost') },
......@@ -82,7 +82,7 @@ loop(m,
+ p_storageValue(grid, node, t)
* r_state(grid, node, f, t)
) // END sum(ft_realizedNoReset)
- sum(ft_realizedNoReset(f,t)${ ord(t) = mSettings(m, 'results_t_start') + 1 }, // INITIAL v_state NOT INCLUDED IN THE RESULTS
- sum(ft_realizedNoReset(f,t)${ ord(t) = mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod') }, // INITIAL v_state NOW INCLUDED IN THE RESULTS
+ p_storageValue(grid, node, t)
* r_state(grid, node, f, t)
) // END sum(ft_realizedNoReset)
......@@ -92,28 +92,28 @@ loop(m,
// Total VOM costs
r_gnuTotalVOMCost(gnu_output(grid, node, unit))
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_gnuVOMCost(grid, node, unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
// Total fuel & emission costs
r_uTotalFuelEmissionCost(fuel, unit)${ uFuel(unit, 'main', fuel) }
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_uFuelEmissionCost(fuel, unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
// Total unit startup costs
r_uTotalStartupCost(unit)${ sum(starttype, unitStarttype(unit, starttype)) }
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_uStartupCost(unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
// Total state variable slack costs
r_gnTotalStateSlackCost(gn_stateSlack(grid, node))
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_gnStateSlackCost(grid, node, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
......@@ -145,7 +145,7 @@ loop(m,
* --- Realized Nodal System Costs ---------------------------------------------
// Total realized gn operating costs
r_gnRealizedOperatingCost(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
r_gnRealizedOperatingCost(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= sum(gnu_output(grid, node, unit),
// VOM costs
......@@ -172,7 +172,7 @@ loop(m,
* --- Realized Nodal Energy Consumption ---------------------------------------
// !!! NOTE !!! This is a bit of an approximation at the moment !!!!!!!!!!!!!!!
r_gnConsumption(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
r_gnConsumption(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= p_stepLengthNoReset(m, f, t)
* sum(msft(m, s, f, t), p_msft_probability(m, s, f, t))
* [
......@@ -186,27 +186,30 @@ loop(m,
// Total energy generation
r_gnuTotalGen(gnu_output(grid, node, unit))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_gen(grid, node, unit, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
); // END sum(ft_realizedNoReset)
// Energy generation by fuels
r_genFuel(gn(grid, node), fuel, ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
r_genFuel(gn(grid, node), fuel, ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= sum(uFuel(unit, 'main', fuel)${ gnu_output(grid, node, unit) },
+ r_gen(grid, node, unit, f, t)
); // END sum(uFuel)
// Energy generation by fuels
r_genUnittype(gn(grid, node), unittype, t)$(sum(f,ft_realizedNoReset(f,t)) and sum(unit,gnu_output(grid, node, unit) and [ord(t) > mSettings(m, 'results_t_start')]))
r_genUnittype(gn(grid, node), unittype, t)${ sum(f,ft_realizedNoReset(f,t))
and sum(unit,gnu_output(grid, node, unit))
and [ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
}
= sum(unit${unitUnittype(unit, unittype) and gnu_output(grid, node, unit)},
+ sum(f,r_gen(grid, node, unit, f, t))
); // END sum(unit)
// Total generation on each node by fuels
r_gnTotalGenFuel(gn(grid, node), fuel)
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_genFuel(grid, node, fuel, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -214,7 +217,7 @@ loop(m,
// Total dummy generation/consumption
r_gnTotalqGen(inc_dec, gn(grid, node))
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f,t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_qGen(inc_dec, grid, node, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -224,7 +227,7 @@ loop(m,
// Total sub-unit-hours for units over the simulation
r_uTotalOnline(unit)
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_online(unit, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -235,7 +238,7 @@ loop(m,
= r_gnuTotalGen(grid, node, unit)
/ [
+ (p_gnu(grid, node, unit, 'maxGen') + r_invest(unit)*p_gnu(grid, node, unit, 'unitSizeGen'))
* (mSettings(m, 't_end') - mSettings(m, 'results_t_start') + 1)
* (mSettings(m, 't_end') - (mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')) + 1)
* mSettings(m, 'stepLengthInHours')
]; // END division
......@@ -243,7 +246,7 @@ loop(m,
// Total reserve provisions over the simulation
r_nuTotalReserve(nuRescapable(restype, up_down, node, unit))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_reserve(restype, up_down, node, unit, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -251,7 +254,7 @@ loop(m,
// Total dummy reserve provisions over the simulation
r_nTotalqResDemand(restypeDirectionNode(restype, up_down, node))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_qResDemand(restype, up_down, node, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -261,7 +264,7 @@ loop(m,
// Total transfer of energy between nodes
r_gnnTotalTransfer(gn2n(grid, from_node, to_node))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_transfer(grid, from_node, to_node, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -269,7 +272,7 @@ loop(m,
// Total energy spill from nodes
r_gnTotalSpill(grid, node_spill(node))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_spill(grid, node, f, t)
* p_stepLengthNoReset(m, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
......@@ -282,11 +285,11 @@ loop(m,
* --- Scaling Marginal Values to EUR/MWh --------------------------------------
// Energy balance
r_balanceMarginal(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
r_balanceMarginal(gn(grid, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= 1e6 * r_balanceMarginal(grid, node, f, t);
// Reserve balance
r_resDemandMarginal(restypeDirectionNode(restype, up_down, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
r_resDemandMarginal(restypeDirectionNode(restype, up_down, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= 1e6 * r_resDemandMarginal(restype, up_down, node, f, t);
* --- Total Generation Results ------------------------------------------------
......@@ -319,7 +322,7 @@ r_gTotalqGen(inc_dec, grid)
// Total consumption on each gn over the simulation
r_gnTotalConsumption(gn(grid, node))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_gnConsumption(grid, node, f ,t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
......@@ -363,7 +366,7 @@ r_gnTotalSpillShare(gn(grid, node_spill))${ r_gTotalSpill(grid) }
// Total realized operating costs on each gn over the simulation
r_gnTotalRealizedOperatingCost(gn(grid, node))
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_gnRealizedOperatingCost(grid, node, f ,t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
);
......@@ -453,14 +456,14 @@ r_uTotalOnlinePerUnit(unit)${ p_unit(unit, 'unitCount') }
// Total sub-unit startups over the simulation
r_uTotalStartup(unit, starttype)
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_startup(unit, starttype, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
); // END sum(ft_realizedNoReset)
// Total sub-unit shutdowns over the simulation
r_uTotalShutdown(unit)
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 'results_t_start')],
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_shutdown(unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s))
); // END sum(ft_realizedNoReset)
......@@ -468,7 +471,9 @@ r_uTotalShutdown(unit)
* --- Diagnostic Results ------------------------------------------------------
// Estimated coefficients of performance
d_cop(unit, ft_realizedNoReset(f, t))${ [ord(t) > mSettings(m, 'results_t_start')] and sum(gnu_input(grid, node, unit), 1) }
d_cop(unit, ft_realizedNoReset(f, t))${ [ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
and sum(gnu_input(grid, node, unit), 1)
}
= sum(gnu_output(grid, node, unit),
+ r_gen(grid, node, unit, f, t)
) // END sum(gnu_output)
......@@ -479,7 +484,7 @@ d_cop(unit, ft_realizedNoReset(f, t))${ [ord(t) > mSettings(m, 'results_t_start'
];
// Estimated efficiency
d_eff(unit_fuel(unit), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 'results_t_start')]
d_eff(unit_fuel(unit), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= sum(gnu_output(grid, node, unit),
+ r_gen(grid, node, unit, f, t)
) // END sum(gnu_output)
......
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