Commit d0ce6c7e authored by Tomi J. Lindroos's avatar Tomi J. Lindroos
Browse files

Merge branch 'dev_fix_#130-132' into 'dev'

Dev fix #130 132

See merge request !10
parents cf325220 72bd5c12
......@@ -124,6 +124,17 @@ r_uTotalOnlinePerUnit
r_uTotalStartup
r_uTotalShutdown
* --- Emissions Results -----------------------------------------------
// Unit level emissions
r_emissions
// Emission sums
r_nuTotalEmissions
r_nTotalEmissions
r_uTotalEmissions
r_totalEmissions
* --- Reserve Provision Result Symbols ----------------------------------------
// Reserve provision results required for model structure !!!!!!!!!!!!!!!!!!!!!
......
......@@ -119,6 +119,19 @@ Parameters
r_gnTotalConsumptionShare(grid, node) "Total consumption gn/g share"
r_gTotalConsumption(grid) "Total consumption of energy in g over the simulation (MWh)"
* --- Emissions Results -------------------------------------------------------
// Unit level emissions
r_emissions (node, emission, unit, f, t) "Emissions from units (tCO2)"
// Emission sums
r_nuTotalEmissions (node, unit, emission) "Total emissions from units (tCO2)"
r_nTotalEmissions(node, emission) "Emissions in gn (tCO2)"
r_uTotalEmissions(unit, emission) "Emissions in gn (tCO2)"
r_totalEmissions (emission) "Summed emissions (tCO2)"
* --- Unit Online State Results -----------------------------------------------
// Online results required for model structure
......
......@@ -28,7 +28,7 @@ loop(m,
r_gnuVOMCost(gnu(grid, node, unit), ft_realizedNoReset(f,t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_gen(grid, node, unit, f, t)
* abs(r_gen(grid, node, unit, f, t))
* p_gnu(grid, node, unit, 'vomCosts');
// Fuel and emission costs during normal operation
......@@ -36,12 +36,8 @@ loop(m,
= 1e-6 // Scaling to MEUR
* p_stepLengthNoReset(m, f, t)
* r_fuelUse(commodity, unit, f, t)
* [ // Fuel price when input
+ p_price(commodity, 'price')${p_price(commodity, 'useConstant') and un_commodity_in(unit, commodity)}
+ ts_price(commodity, t)${p_price(commodity, 'useTimeSeries') and un_commodity_in(unit, commodity)}
// Fuel price when output
- p_price(commodity, 'price')${p_price(commodity, 'useConstant') and un_commodity_out(unit, commodity)}
- ts_price(commodity, t)${p_price(commodity, 'useTimeSeries') and un_commodity_out(unit, commodity)}
* [ + p_price(commodity, 'price')$p_price(commodity, 'useConstant')
+ ts_price(commodity, t)$p_price(commodity, 'useTimeSeries')
// Emission costs
+ sum(emission, p_unitEmissionCost(unit, commodity, emission))
];
......@@ -266,6 +262,37 @@ loop(m,
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
); // END sum(ft_realizedNoReset)
* --- Emission Results --------------------------------------------------------
// Emissions of units (only for commodities, not including startup fuels)
r_emissions(commodity, emission, unit, ft_realizedNoReset(f,t))$ {un_commodity(unit, commodity) and [ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]}
= + p_stepLengthNoReset(m, f, t)
* r_fuelUse(commodity, unit, f, t)
* p_nEmission(commodity, emission)
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
;
// Emission sums
r_nuTotalEmissions (commodity, unit, emission)
= sum(ft_realizedNoReset(f, t)$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')],
+ r_emissions(commodity, emission, unit, f, t)
* sum(msft_realizedNoReset(m, s, f, t), p_msProbability(m, s) * p_msWeight(m, s))
)
;
r_nTotalEmissions(commodity, emission)
= sum(unit, r_nuTotalEmissions (commodity, unit, emission))
;
r_uTotalEmissions(unit, emission)
= sum(commodity, r_nuTotalEmissions (commodity, unit, emission))
;
r_totalEmissions (emission)
= sum(commodity, r_nTotalEmissions(commodity, emission))
;
* --- Total Unit Online Results -----------------------------------------------
// Total sub-unit-hours for units over the simulation
......
Markdown is supported
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