Commit 5cf15d92 authored by Topi Rasku's avatar Topi Rasku
Browse files

Changing the 'p_nuRes2Res(node, unit, restype, up_down, restype)' description...

Changing the 'p_nuRes2Res(node, unit, restype, up_down, restype)' description and function so that the first 'restype' also provides the second 'restype'.
Also moving the 'r_reserve2Reserve' calculation from "4a_outputVariant.gms" to "4b_outputInvariant" for efficiency.
parent d5a228ea
......@@ -101,9 +101,9 @@ q_resDemand(restypeDirectionNode(restype, up_down, node), ft(f, t))
) // END sum(nuft)
// Reserve provision from other reserve categories when they can be shared
+ sum((nuft(node, unit, f, t), restype_)${p_nuRes2Res(node, unit, restype, up_down, restype_)},
+ sum((nuft(node, unit, f, t), restype_)${p_nuRes2Res(node, unit, restype_, up_down, restype)},
+ v_reserve(restype_, up_down, node, unit, f+df_reserves(node, restype_, f, t), t)
* p_nuRes2Res(node, unit, restype, up_down, restype_)
* p_nuRes2Res(node, unit, restype_, up_down, restype)
) // END sum(nuft)
// Reserve provision to this node via transfer links
......@@ -158,9 +158,9 @@ q_resDemand_Infeed(grid, restypeDirectionNode(restype, 'up', node), ft(f, t), un
) // END sum(nuft)
// Reserve provision from other reserve categories when they can be shared
+ sum((nuft(node, unit, f, t), restype_)${p_nuRes2Res(node, unit, restype, 'up', restype_)},
+ sum((nuft(node, unit, f, t), restype_)${p_nuRes2Res(node, unit, restype_, 'up', restype)},
+ v_reserve(restype_, 'up', node, unit, f+df_reserves(node, restype_, f, t), t)
* p_nuRes2Res(node, unit, restype, 'up', restype_)
* p_nuRes2Res(node, unit, restype_, 'up', restype)
) // END sum(nuft)
// Reserve provision to this node via transfer links
......
......@@ -69,15 +69,11 @@ loop((restypeDirectionNode(restype, up_down, node), ft(f, t))
]
}
= + v_reserve.l(restype, up_down, node, unit, f+df_reserves(node, restype, f, t), t)
+ sum(restype_$p_nuRes2Res(node, unit, restype, up_down, restype_),
+ sum(restype_$p_nuRes2Res(node, unit, restype_, up_down, restype),
+ v_reserve.l(restype_, up_down, node, unit, f+df_reserves(node, restype_, f, t), t)
* p_nuRes2Res(node, unit, restype, up_down, restype_)
* p_nuRes2Res(node, unit, restype_, up_down, restype)
);
r_reserve2Reserve(nuRescapable(restype, up_down, node, unit), restype_, f+df_reserves(node, restype_, f, t), t)$p_nuRes2Res(node, unit, restype, up_down, restype_)
= v_reserve.l(restype_, up_down, node, unit, f+df_reserves(node, restype_, f, t), t)
* p_nuRes2Res(node, unit, restype, up_down, restype_);
// Reserve transfer capacity
r_resTransferRightward(restype, up_down, node, to_node, f+df_reserves(node, restype, f, t), t)
${ restypeDirectionNode(restype, up_down, to_node)
......
......@@ -442,6 +442,14 @@ r_totalRealizedCost
r_totalRealizedNetCost
= sum(gn(grid, node), r_gnTotalRealizedNetCost(grid, node));
* --- Reserve Provision Overlap Results ---------------------------------------
// Calculate the overlapping reserve provisions
r_reserve2Reserve(nuRescapable(restype, up_down, node, unit), restype_, ft_realizedNoReset(f, t))
${ p_nuRes2Res(node, unit, restype, up_down, restype_) }
= r_reserve(restype, up_down, node, unit, f, t)
* p_nuRes2Res(node, unit, restype, up_down, restype_);
* --- Total Reserve Provision Results -----------------------------------------
// Total reserve provision in nodes over the simulation
......
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