Commit 266858a8 authored by Niina Helistö's avatar Niina Helistö
Browse files

Fixing a bug in writing r_resDemandLargestInfeedUnit.

parent 5498a1c8
...@@ -79,9 +79,9 @@ loop((restypeDirectionGridNode(restype, up_down, grid, node), sft(s, f, t)) ...@@ -79,9 +79,9 @@ loop((restypeDirectionGridNode(restype, up_down, grid, node), sft(s, f, t))
); );
// Reserve requirement due to N-1 reserve constraint // Reserve requirement due to N-1 reserve constraint
r_resDemandLargestInfeedUnit(restype, up_down, group, f+df_reserves(grid, node, restype, f, t), t) r_resDemandLargestInfeedUnit(restypeDirectionGroup(restype, 'up', group), f+df_reserves(grid, node, restype, f, t), t)
${ sum((gnGroup(grid, node, group), unit_fail), gnuRescapable(restype, up_down, grid, node, unit_fail)) } // Calculate only for groups with units that can fail. ${ sum((gnGroup(grid, node, group), unit_fail), p_gnuReserves(grid, node, unit_fail, restype, 'portion_of_infeed_to_reserve')) } // Calculate only for groups with units that can fail.
= smax(unit_fail(unit_), = smax(unit_fail(unit_)${ sum(gnGroup(grid, node, group), p_gnuReserves(grid, node, unit_, restype, 'portion_of_infeed_to_reserve')) },
+ v_gen.l(grid, node, unit_, s, f, t) + v_gen.l(grid, node, unit_, s, f, t)
* p_gnuReserves(grid, node, unit_, restype, 'portion_of_infeed_to_reserve') * p_gnuReserves(grid, node, unit_, restype, 'portion_of_infeed_to_reserve')
) // END smax(unit_fail) ) // END smax(unit_fail)
......
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