Commit b3560042 authored by Topi Rasku's avatar Topi Rasku
Browse files

Adding a possibility to use constant fuel prices instead of time series ones....

Adding a possibility to use constant fuel prices instead of time series ones. NOTE! Contains a 'trick' to avoid additional inputs for convenience.
parent cd1aba03
......@@ -318,6 +318,12 @@ param_fuel "Parameters for fuels" /
startup "Startup fuel of the unit, if exists. Can be the same as main fuel - consumption using startupFuelCons"
/
param_fuelPrice "Paramters for fuel prices" /
fuelPrice "Fuel price (EUR/MWh)"
useConstant "Flag to use constant data for fuels"
useTimeSeries "Flag to use time series form data for fuels"
/
param_unitFuel "Parameters for fuel limits in units" /
maxFuelCons "Maximum absolute fuel consumption in a unit - not used for start-up fuels"
maxFuelFraction "Maximum share of a fuel in the consumption mix" //only for main fuels
......
......@@ -57,6 +57,7 @@ Parameters
p_gnPolicy(grid, node, param_policy, *) "Policy data for grid, node"
p_groupPolicy(group, param_policy) "Two-dimensional policy data for groups"
p_groupPolicy3D(group, param_policy, *) "Three-dimensional policy data for groups"
p_fuelPrice(fuel, param_fuelPrice) "Fuel price parameters"
p_fuelEmission(fuel, emission) "Fuel emission content"
p_uFuel(unit, param_fuel, fuel, param_unitFuel) "Parameters interacting between units and fuels"
p_unitFuelEmissionCost(unit, fuel, emission) "Emission costs for each unit, calculated from input data"
......
......@@ -54,6 +54,7 @@ $loaddc gngnu_constrainedOutputRatio
$loaddc emission
$loaddc p_fuelEmission
$loaddc ts_cf
*$loaddc p_fuelPrice // Disabled for convenience, see line 278-> ("Determine Fuel Price Representation")
$loaddc ts_fuelPriceChange
$loaddc ts_influx
$loaddc ts_node
......@@ -274,6 +275,29 @@ p_unitFuelEmissionCost(unit_fuel, fuel, emission)${ sum(param_fuel, uFuel(unit_f
p_uFuel(uFuel(unit_fuel, 'startup', fuel), 'fixedFuelFraction')${ not p_uFuel(unit_fuel, 'startup', fuel, 'fixedFuelFraction') }
= 1;
* =============================================================================
* --- Determine Fuel Price Representation -------------------------------------
* =============================================================================
// Use either constant or time series for fuel prices depending on 'ts_fuelPriceChange'
// Should be handled separately by 'p_fuelPrice' also being included in the input data,
// but this is more convenient for now as no changes to inputs are required
// Determine if fuel prices require a time series representation or not
loop(fuel,
// Find the steps with changing fuel prices
option clear = tt;
tt(t)${ ts_fuelPriceChange(fuel, t) } = yes;
// If only up to a single value
if(sum(tt, 1) <= 1,
p_fuelPrice(fuel, 'useConstant') = 1; // Use a constant for fuel prices
p_fuelPrice(fuel, 'fuelPrice') = sum(tt, ts_fuelpriceChange(fuel, tt)) // Determine the price as the only value in the time series
// If multiple values found, use time series
else
p_fuelPrice(fuel, 'useTimeSeries') = 1;
); // END if(sum(1))
); // END loop(fuel)
* =============================================================================
* --- Generate Node Related Sets Based on Input Data --------------------------
* =============================================================================
......
......@@ -44,7 +44,8 @@ q_obj ..
+ sum(uFuel(unit, 'main', fuel)${uft(unit, f, t)},
+ v_fuelUse(fuel, unit, s, f, t)
* [
+ ts_fuelPrice_(fuel ,t)
+ p_fuelPrice(fuel, 'fuelPrice')${ p_fuelPrice(fuel, 'useConstant') }
+ ts_fuelPrice_(fuel ,t)${ p_fuelPrice(fuel, 'useTimeSeries') }
+ sum(emission, // Emission taxes
+ p_unitFuelEmissionCost(unit, fuel, emission)
)
......@@ -97,7 +98,8 @@ q_obj ..
+ p_uStartup(unit, starttype, 'consumption')
* p_uFuel(unit, 'startup', fuel, 'fixedFuelFraction')
* [
+ ts_fuelPrice_(fuel, t)
+ p_fuelPrice(fuel, 'fuelPrice')${ p_fuelPrice(fuel, 'useConstant') }
+ ts_fuelPrice_(fuel, t)${ p_fuelPrice(fuel, 'useTimeseries') }
+ sum(emission, // Emission taxes of startup fuel use
+ p_unitFuelEmissionCost(unit, fuel, emission)
) // END sum(emission)
......
......@@ -571,7 +571,7 @@ loop(m,
* --- Calculating fuel price time series --------------------------------------
loop(fuel,
loop(fuel${ p_fuelPrice(fuel, 'useTimeSeries') },
// Determine the time steps where the prices change
Option clear = tt;
tt(t)${ ts_fuelPriceChange(fuel ,t) }
......
......@@ -37,7 +37,8 @@ loop(m,
* p_stepLengthNoReset(m, f, t)
* r_fuelUse(fuel, unit, f, t)
* [ // Fuel price
+ ts_fuelPrice(fuel, t)
+ p_fuelPrice(fuel, 'fuelPrice')${ p_fuelPrice(fuel, 'useConstant') }
+ ts_fuelPrice(fuel, t)${ p_fuelPrice(fuel, 'useTimeSeries') }
// Emission costs
+ sum(emission, p_unitFuelEmissionCost(unit, fuel, emission))
];
......@@ -55,7 +56,8 @@ loop(m,
+ p_uStartup(unit, starttype, 'consumption')
* p_uFuel(unit, 'startup', fuel, 'fixedFuelFraction')
* [ // Fuel price
+ ts_fuelPrice(fuel, t)
+ p_fuelPrice(fuel, 'fuelPrice')${ p_fuelPrice(fuel, 'useConstant') }
+ ts_fuelPrice(fuel, t)${ p_fuelPrice(fuel, 'useTimeSeries') }
// Emission costs
+ sum(emission, // Emission taxes
+ p_unitFuelEmissionCost(unit, fuel, emission)
......
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