Commit 4d9b6063 authored by Niina Helistö's avatar Niina Helistö
Browse files

Implementing maxFuelCons and maxFuelFraction. For main fuels, the parameters...

Implementing maxFuelCons and maxFuelFraction. For main fuels, the parameters function as their names suggest; for start-up fuels, maxFuelCons is not implemented and maxFuelFraction is treated as exact fraction.
parent 3aa1e693
......@@ -42,6 +42,7 @@ Model building /
* q_conversionSOS2InputIntermediate
* q_conversionSOS2Constraint
* q_conversionSOS2IntermediateOutput
* q_fuelUseLimit
// Energy Transfer
q_transfer
......
......@@ -44,6 +44,7 @@ Model invest /
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_fuelUseLimit
// Energy Transfer
q_transfer
......
......@@ -44,6 +44,7 @@ Model schedule /
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_fuelUseLimit
// Energy Transfer
q_transfer
......
......@@ -106,6 +106,7 @@ v_invest_MIP
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_fuelUseLimit
// Energy Transfer
q_transfer
......
......@@ -321,8 +321,8 @@ param_fuel "Parameters for fuels" /
/
param_unitFuel "Parameters for fuel limits in units" /
maxFuelCons "Maximum absolute fuel consumption in a unit"
maxFuelFraction "Maximum share of a fuel in the consumption mix"
maxFuelCons "Maximum absolute fuel consumption in a unit - not used for start-up fuels"
maxFuelFraction "Maximum share of a fuel in the consumption mix - exact share for start-up fuels"
/
param_policy "Set of possible data parameters for grid, node, regulation" /
......
......@@ -155,6 +155,7 @@ alias(effLambda, effLambda_);
alias(lambda, lambda_, lambda__);
alias(op, op_, op__);
alias(eff, eff_, eff__);
alias(fuel, fuel_);
*if(active('rampSched'),
......
......@@ -264,6 +264,10 @@ p_unitFuelEmissionCost(unit_fuel, fuel, emission)${ sum(param_fuel, uFuel(unit_f
) // END sum(gnu_output)
;
// If the start-up fuel fraction is not defined, it equals 1
p_uFuel(uFuel(unit_fuel, 'startup', fuel), 'maxFuelFraction')${ not p_uFuel(unit_fuel, 'startup', fuel, 'maxFuelFraction') }
= 1;
* =============================================================================
* --- Generate Node Related Sets Based on Input Data --------------------------
* =============================================================================
......@@ -406,3 +410,11 @@ loop( unit,
);
);
* Check the start-up fuel fraction related data
loop( unit_fuel(unit)${sum(fuel, uFuel(unit_fuel, 'startup', fuel))},
tmp = ord(unit)
if(sum(fuel, p_uFuel(unit, 'startup', fuel, 'maxFuelFraction')) <> 1,
put log '!!! Error occurred on unit #' tmp;
abort "The sum of 'maxFuelFraction' over start-up fuels needs to be one for all units using start-up fuels!"
);
);
......@@ -65,6 +65,7 @@ equations
q_conversionSOS2InputIntermediate(effSelector, unit, f, t) "Intermediate output when using SOS2 variable based part-load piece-wise linearization"
q_conversionSOS2Constraint(effSelector, unit, f, t) "Sum of v_sos2 has to equal v_online"
q_conversionSOS2IntermediateOutput(effSelector, unit, f, t) "Output is forced equal with v_sos2 output"
q_fuelUseLimit(fuel, unit, f, t) "Fuel use cannot exceed limits"
// Energy Transfer
q_transfer(grid, node, node, f, t) "Rightward and leftward transfer must match the total transfer"
......
......@@ -88,6 +88,7 @@ q_obj ..
// Start-up fuel and emission costs
+ sum(uFuel(unit, 'startup', fuel),
+ p_uStartup(unit, starttype, 'consumption')
* p_uFuel(unit, 'startup', fuel, 'maxFuelFraction')
* [
+ ts_fuelPrice_(fuel, t)
+ sum(emission, // Emission taxes of startup fuel use
......
......@@ -958,6 +958,24 @@ q_conversionSOS2IntermediateOutput(suft(effLambda(effGroup), unit, f, t)) ..
) // END sum(gnu_output)
;
* --- Fuel Use Limitation -----------------------------------------------------
q_fuelUseLimit(fuel, uft(unit, f, t))${ uFuel(unit, 'main', fuel)
and p_uFuel(unit, 'main', fuel, 'maxFuelFraction')
} ..
// Use of the limited fuel
+ v_fuelUse(fuel, unit, f, t)
=L=
// Sum over fuel energy inputs multiplied by the maximum fraction
+ p_uFuel(unit, 'main', fuel, 'maxFuelFraction')
* sum(uFuel(unit, 'main', fuel_),
+ v_fuelUse(fuel_, unit, f, t)
) // END sum(uFuel)
;
* --- Total Transfer Limits ---------------------------------------------------
q_transfer(gn2n_directional(grid, node, node_), ft(f, t)) ..
......@@ -1617,8 +1635,6 @@ q_emissioncap(group, emission)${ p_groupPolicy3D(group, 'emissionCap', emission
+ p_groupPolicy3D(group, 'emissionCap', emission)
;
*q_gnu_group_min_online(
*--- Maximum Energy Share -----------------------------------------------------
q_energyShareMax(group)${ p_groupPolicy(group, 'energyShareMax')
......
......@@ -81,6 +81,7 @@ $iftheni.debug NOT '%debug%' == 'yes'
Option clear = q_conversionSOS2InputIntermediate;
Option clear = q_conversionSOS2Constraint;
Option clear = q_conversionSOS2IntermediateOutput;
Option clear = q_fuelUseLimit;
// Energy Transfer
Option clear = q_transfer;
......
......@@ -221,6 +221,10 @@ $offtext
*v_startup.l(unitStarttype(unit, starttype), f, t)${uft_online(unit, f, t) and not unit_investLP(unit) } = 0;
*v_shutdown.l(unit, f, t)${sum(starttype, unitStarttype(unit, starttype)) and uft_online(unit, f, t) and not unit_investLP(unit) } = 0;
// Fuel use limitations
v_fuelUse.up(fuel, uft(unit, f, t))${p_uFuel(unit, 'main', fuel, 'maxFuelCons')}
= p_uFuel(unit, 'main', fuel, 'maxFuelCons')
;
* --- Energy Transfer Boundaries ----------------------------------------------
......
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