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

Adding a new constraint to handle annual (or other long-term) production and consumption limits.

Issue #137
parent 997ffc28
......@@ -83,6 +83,7 @@ Model building /
* q_capacityMargin
* q_constrainedCapMultiUnit
* q_emissioncap
* q_energyMax
* q_energyShareMax
* q_energyShareMin
* q_ReserveShareMax
......
......@@ -83,6 +83,7 @@ Model invest /
q_capacityMargin
q_constrainedCapMultiUnit
q_emissioncap
q_energyMax
q_energyShareMax
q_energyShareMin
q_ReserveShareMax
......
......@@ -83,6 +83,7 @@ Model schedule /
q_capacityMargin
* q_constrainedCapMultiUnit
* q_emissioncap
* q_energyMax
* q_energyShareMax
* q_energyShareMin
q_ReserveShareMax
......
......@@ -353,6 +353,8 @@ param_policy "Set of possible data parameters for groups or grid, node, regulati
emissionTax "Emission tax (EUR/tonne)"
emissionCap "Emission limit (tonne)"
instantaneousShareMax "Maximum instantaneous share of generation and import from a particular group of units and transfer links"
energyMax "Maximum energy production or consumption from a particular group of units over samples"
energyMaxVgenSign "Sign for v_gen in the maximum energy constraint - use -1 when you need a minimum energy constraint (then also energyMax should be negative)"
energyShareMax "Maximum energy share of generation from a particular group of units"
energyShareMin "Minimum energy share of generation from a particular group of units"
constrainedCapMultiplier "Multiplier a(i) for unit investments in equation Sum(i, a(i)*v_invest(i)) <= b"
......
......@@ -116,6 +116,7 @@ equations
q_capacityMargin(grid, node, s, f, t) "There needs to be enough capacity to cover energy demand plus a margin"
q_constrainedCapMultiUnit(group) "Constrained unit number ratios and sums for a group of units"
q_emissioncap(group, emission) "Limit for emissions"
q_energyMax(group) "Maximum energy production or consumption from a group of units"
q_energyShareMax(group) "Maximum energy share of generation and import from a group of units"
q_energyShareMin(group) "Minimum energy share of generation and import from a group of units"
q_ReserveShareMax(group, restype, up_down, group, s, f, t) "Maximum reserve share of a group of units"
......
......@@ -2519,7 +2519,7 @@ q_inertiaMin(restypeDirectionGroup(restype_inertia, up_down, group), sft(s, f, t
and sft_realized(s, f, t)]
and p_groupPolicy(group, 'ROCOF')
and p_groupPolicy(group, 'defaultFrequency')
and p_groupPolicy(group, 'staticInertia')
and p_groupPolicy(group, 'staticInertia')
} ..
// Rotational energy in the system
......@@ -2823,6 +2823,40 @@ q_emissioncap(group, emission)
+ p_groupPolicy3D(group, 'emissionCap', emission)
;
*--- Maximum Energy -----------------------------------------------------------
q_energyMax(group)
${ p_groupPolicy(group, 'energyMax')
} ..
+ sum(msft(m, s, f, t)${sGroup(s, group)},
+ p_msft_Probability(m,s,f,t)
* p_stepLength(m, f, t)
* [
+ 1${not p_groupPolicy(group, 'energyMaxVgenSign')}
+ p_groupPolicy(group, 'energyMaxVgenSign') // Multiply by -1 in order to convert to minimum energy constraint
]
* [
// Production of units in the group
+ sum(gnu_output(grid, node, unit)${ gnuGroup(grid, node, unit, group)
and gnuft(grid, node, unit, f, t)
},
+ v_gen(grid, node, unit, s, f, t)
) // END sum(gnu)
// Consumption of units in the group
+ sum(gnu_input(grid, node, unit)${ gnuGroup(grid, node, unit, group)
and gnuft(grid, node, unit, f, t)
},
- v_gen(grid, node, unit, s, f, t)
) // END sum(gnu)
] // END * p_stepLength
) // END sum(msft)
=L=
+ p_groupPolicy(group, 'energyMax') // Use negative energyMax value if you need a "minimum energy" equation
;
*--- Maximum Energy Share -----------------------------------------------------
q_energyShareMax(group)
......
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