Commit 209402da authored by Niina Helistö's avatar Niina Helistö
Browse files

Adding a new constraint q_maxDownward2 and modifying q_rampDownLimit. A small...

Adding a new constraint q_maxDownward2 and modifying q_rampDownLimit. A small change to v_reserve.up to make it work with consumption units as well.

q_maxDownward2: similar to q_maxUpward2 but for v_gen and downward online+offline reserve provision

q_rampDownLimit: do not consider offline reserve provision
parent 3821b6cf
......@@ -27,6 +27,7 @@ Model invest /
// Unit Operation
q_maxDownward
q_maxDownward2
q_maxUpward
q_maxUpward2
* q_maxUpward3
......
......@@ -27,6 +27,7 @@ Model schedule /
// Unit Operation
q_maxDownward
q_maxDownward2
q_maxUpward
q_maxUpward2
* q_maxUpward3
......
......@@ -102,7 +102,11 @@ v_help_inc
// Unit Operation
q_maxDownward
q_maxDownward2
q_maxUpward
q_maxUpward2
q_reserveProvision
q_reserveProvision2
q_startshut
q_startuptype
q_onlineLimit
......
......@@ -57,6 +57,7 @@ equations
q_resDemandLargestInfeedUnit(grid, restype, up_down, node, unit, s, f, t) "N-1 Reserve"
// Unit Operation
q_maxDownward(grid, node, unit, mType, s, f, t) "Downward commitments will not undercut power plant minimum load constraints or maximum elec. consumption"
q_maxDownward2(grid, node, unit, mType, s, f, t) "Downward commitments will not undercut power plant maximum elec. consumption - offline Res"
q_maxUpward(grid, node, unit, mType, s, f, t) "Upward commitments will not exceed maximum available capacity or consumed power"
q_maxUpward2(grid, node, unit, mType, s, f, t) "Upward commitments will not exceed maximum available capacity or consumed power - offline Res"
q_maxUpward3(grid, node, unit, mType, s, f, t) "Upward commitments will not exceed maximum available capacity or consumed power - offline Res"
......
......@@ -211,7 +211,7 @@ q_resDemandLargestInfeedUnit(grid, restypeDirectionNode(restype, 'up', node), un
- vq_resDemand(restype, 'up', node, s, f+df_reserves(node, restype, f, t), t)
- vq_resMissing(restype, 'up', node, s, f+df_reserves(node, restype, f, t), t)${ft_reservesFixed(node, restype, f+df_reserves(node, restype, f, t), t)}
;
* --- Maximum Downward Capacity -----------------------------------------------
* --- Maximum Downward Capacity for Production/Consumption and Online Reserves -----------------------------------------------
q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
${ gnuft(grid, node, unit, f, t)
......@@ -243,7 +243,8 @@ q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
) // END sum(gngnu_constrainedOutputRatio)
// Downward reserve participation
- sum(nuRescapable(restype, 'down', node, unit)${ord(t) < tSolveFirst + p_nReserves(node, restype, 'reserve_length')},
- sum(nuRescapable(restype, 'down', node, unit)${ord(t) < tSolveFirst + p_nReserves(node, restype, 'reserve_length')
and not nuOfflineRescapable(restype, node, unit)},
+ v_reserve(restype, 'down', node, unit, s, f+df_reserves(node, restype, f, t), t) // (v_reserve can be used only if the unit is capable of providing a particular reserve)
) // END sum(nuRescapable)
......@@ -322,6 +323,64 @@ q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
] // END * p_unit(availability)
;
* --- Maximum Downward Capacity for Production/Consumption, Online Reserves and Offline Reserves ---
q_maxDownward2(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 providing
and sum(restype, nuRescapable(restype, 'down', node, unit)) // downward reserves
]
}
and { sum(restype, nuOfflineRescapable(restype, node, unit))} // and it can provide some reserve products although being offline
}..
// Energy generation/consumption
+ v_gen(grid, node, unit, s, f, t)
// Considering output constraints (e.g. cV line)
+ sum(gngnu_constrainedOutputRatio(grid, node, grid_output, node_, unit),
+ p_gnu(grid_output, node_, unit, 'cV')
* v_gen(grid_output, node_, unit, s, f, t)
) // END sum(gngnu_constrainedOutputRatio)
// Downward reserve participation
- sum(nuRescapable(restype, 'down', node, unit)${ord(t) < tSolveFirst + p_nReserves(node, restype, 'reserve_length')},
+ v_reserve(restype, 'down', node, unit, s, f+df_reserves(node, restype, f, t), t)
) // END sum(nuRescapable)
=G= // Must be greater than maximum consumption
// Consuming units
// Available capacity restrictions
- p_unit(unit, 'availability') // Consumption units are also restricted by their (available) capacity
* [
// Capacity factors for flow units
+ sum(flowUnit(flow, unit),
+ ts_cf_(flow, node, f, t, s)
) // END sum(flow)
+ 1${not unit_flow(unit)}
] // END * p_unit(availability)
* [
// Existing capacity
+ p_gnu(grid, node, unit, 'maxCons')
// Investments to new capacity
+ [
+ p_gnu(grid, node, unit, 'unitSizeCons')
]
* [
+ sum(t_invest(t_)${ ord(t_)<=ord(t)
},
+ v_invest_LP(unit, t_)${unit_investLP(unit)}
+ v_invest_MIP(unit, t_)${unit_investMIP(unit)}
) // END sum(t_invest)
] // END * p_gnu(unitSizeCons)
] // END * p_unit(availability)
;
* --- Maximum Upwards Capacity for Production/Consumption and Online Reserves ---
q_maxUpward(gnu(grid, node, unit), msft(m, s, f, t))
......@@ -1170,7 +1229,8 @@ q_rampDownLimit(ms(m, s), gnuft_ramp(grid, node, unit, f, t))
// Ramp speed of the unit?
+ v_genRamp(grid, node, unit, s, f, t)
- sum(nuRescapable(restype, 'down', node, unit)${ord(t) < tSolveFirst + p_nReserves(node, restype, 'reserve_length')},
- sum(nuRescapable(restype, 'down', node, unit)${ord(t) < tSolveFirst + p_nReserves(node, restype, 'reserve_length')
and not nuOfflineRescapable(restype, node, unit)},
+ v_reserve(restype, 'down', node, unit, s, f+df_reserves(node, restype, f, t), t) // (v_reserve can be used only if the unit is capable of providing a particular reserve)
) // END sum(nuRescapable)
/ p_stepLength(m, f, t)
......
......@@ -66,6 +66,7 @@ Option clear = q_resDemand;
// Unit Operation
Option clear = q_maxDownward;
Option clear = q_maxDownward2;
Option clear = q_maxUpward;
Option clear = q_maxUpward2;
Option clear = q_maxUpward3;
......
......@@ -326,8 +326,10 @@ loop((restypeDirectionNode(restype, up_down, node), gn(grid, node), sft(s, f, t)
and not ft_reservesFixed(node, restype, f+df_reserves(node, restype, f, t), t)
}
= min ( p_nuReserves(node, unit, restype, up_down) * [ p_gnu(grid, node, unit, 'maxGen') + p_gnu(grid, node, unit, 'maxCons') ], // Generator + consuming unit res_range limit
v_gen.up(grid, node, unit, s, f, t) - (v_gen.lo(grid, node, unit, s, f, t))${not nuOfflineRescapable(restype, node, unit)} // Generator + consuming unit available unit_elec. output delta
) // END min
v_gen.up(grid, node, unit, s, f, t) - v_gen.lo(grid, node, unit, s, f, t) // Generator + consuming unit available unit_elec. output delta
)${not nuOfflineRescapable(restype, node, unit)} // END min
+ p_nuReserves(node, unit, restype, up_down)${nuOfflineRescapable(restype, node, unit)}
* [ p_gnu(grid, node, unit, 'maxGen') + p_gnu(grid, node, unit, 'maxCons') ]
;
// Reserve transfer upper bounds based on input p_nnReserves data, if investments are disabled
......
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