Commit dfba09f9 authored by Niina Helistö's avatar Niina Helistö
Browse files

Merge branch 'nhniina_FastFrequencyReserve' into dev

parents 933695d7 0c5fe503
......@@ -87,6 +87,7 @@ Sets
restypeReleasedForRealization(restype) "Reserve types that are released for the realized time intervals"
offlineRes (restype) "Reserve types where offline reserve provision possible"
offlineResUnit (unit) "Units where offline reserve provision possible"
restype_inertia(restype) "Reserve types where the requirement can also be fulfilled with the inertia of synchronous machines"
* --- Sets to define time, forecasts and samples ------------------------------
$$include '%input_dir%/timeAndSamples.inc'
......
......@@ -42,6 +42,7 @@ $ifthen exist '%input_dir%/inputData.gdx'
$$loaddc restype
$$loaddc restypeDirection
$$loaddc restypeReleasedForRealization
$$loaddc restype_inertia
$$loaddc p_groupReserves
$$loaddc p_groupReserves3D
$$loaddc p_groupReserves4D
......
......@@ -254,6 +254,18 @@ $ifthen exist '%input_dir%/restypeReleasedForRealization3.gdx'
$$gdxin
$endif
$ifthen exist '%input_dir%/restype_inertia2.gdx'
$$gdxin '%input_dir%/restype_inertia2.gdx'
$$loaddcm restype_inertia
$$gdxin
$endif
$ifthen exist '%input_dir%/restype_inertia3.gdx'
$$gdxin '%input_dir%/restype_inertia3.gdx'
$$loaddcm restype_inertia
$$gdxin
$endif
$ifthen exist '%input_dir%/p_groupReserves2.gdx'
$$gdxin '%input_dir%/p_groupReserves2.gdx'
$$loaddcm p_groupReserves
......
......@@ -107,7 +107,7 @@ equations
q_boundCyclic(grid, node, s, s, mType) "Cyclic node state bound for the first and the last states of samples"
// Policy
q_inertiaMin(group, s, f, t) "Minimum inertia in a group of nodes"
q_inertiaMin(restype, up_down, group, s, f, t) "Minimum inertia in a group of nodes"
q_instantaneousShareMax(group, s, f, t) "Maximum instantaneous share of generation and controlled import from a group of units and links"
q_constrainedOnlineMultiUnit(group, s, f, t) "Constrained number of online units for a group of units"
q_capacityMargin(grid, node, s, f, t) "There needs to be enough capacity to cover energy demand plus a margin"
......
......@@ -94,6 +94,7 @@ q_resDemand(restypeDirectionGroup(restype, up_down, group), sft(s, f, t))
${ ord(t) < tSolveFirst + p_groupReserves(group, restype, 'reserve_length')
and not [ restypeReleasedForRealization(restype)
and sft_realized(s, f, t)]
and not restype_inertia(restype)
} ..
// Reserve provision by capable units on this group
......@@ -2544,13 +2545,18 @@ q_boundCyclic(gnss_bound(gn_state(grid, node), s_, s), m)
*--- Minimum Inertia ----------------------------------------------------------
q_inertiaMin(group, sft(s, f, t))
${ p_groupPolicy(group, 'kineticEnergyMin')
q_inertiaMin(restypeDirectionGroup(restype_inertia, up_down, group), sft(s, f, t))
${ ord(t) < tSolveFirst + p_groupReserves(group, restype_inertia, 'reserve_length')
and not [ restypeReleasedForRealization(restype_inertia)
and sft_realized(s, f, t)]
and p_groupPolicy(group, 'ROCOF')
and p_groupPolicy(group, 'defaultFrequency')
} ..
// Kinectic energy in the system
+ sum(gnu_output(grid, node, unit)${ p_gnu(grid, node, unit, 'unitSizeGen')
and gnGroup(grid, node, group)
// Rotational energy in the system
+ p_groupPolicy(group, 'ROCOF')*2
* [
+ sum(gnu(grid, node, unit)${ gnGroup(grid, node, group)
and gnuft(grid, node, unit, f, t)
},
+ p_gnu(grid, node, unit, 'inertia')
......@@ -2561,13 +2567,24 @@ q_inertiaMin(group, sft(s, f, t))
+ v_online_MIP(unit, s, f+df_central(f,t), t)
${uft_onlineMIP(unit, f, t)}
+ v_gen(grid, node, unit, s, f, t)${not uft_online(unit, f, t)}
/ p_gnu(grid, node, unit, 'unitSizeGen')
/ (p_gnu(grid, node, unit, 'unitSizeGen') - p_gnu(grid, node, unit, 'unitSizeCons'))
] // * p_gnu
) // END sum(gnu_output)
) // END sum(gnu)
] // END * p_groupPolicy
=G=
+ p_groupPolicy(group, 'kineticEnergyMin')
// Demand for rotational energy / fast frequency reserve
+ p_groupPolicy(group, 'defaultFrequency')
* [
+ p_groupReserves(group, restype_inertia, up_down)
- sum(gnu(grid, node, unit)${ gnGroup(grid, node, group)
and gnuft(grid, node, unit, f, t)
and gnuRescapable(restype_inertia, up_down, grid, node, unit)
},
+ v_reserve(restype_inertia, up_down, grid, node, unit, s, f, t)
) // END sum(gnu)
] // END * p_groupPolicy
;
*--- Maximum Share of Instantaneous Generation --------------------------------
......
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