Commit 5fe741c1 authored by Niina Helistö's avatar Niina Helistö
Browse files

One gnu_input/output fix in the constraints and updating start-up emission...

One gnu_input/output fix in the constraints and updating start-up emission cost and total emission calculations (issue #107).
parent 78f173fc
......@@ -65,10 +65,10 @@ Parameters
p_groupPolicy(group, param_policy) "Two-dimensional policy data for groups"
p_groupPolicy3D(group, param_policy, *) "Three-dimensional policy data for groups"
p_price(commodity, param_price) "Commodity price parameters"
p_nEmission(node, emission) "Emission contents"
p_nEmission(node, emission) "Emission content (kg/MWh)"
p_uStartupfuel(unit, node, param_unitStartupfuel) "Parameters for startup fuels"
p_uStartupEmission(unit, starttype, emission) "Calculation for startup related emissions"
p_unitEmissionCost(unit, node, emission) "Emission costs for each unit, calculated from input data"
p_unStartup(unit, node, starttype) "Consumption during the start-up (MWh/start-up)"
p_unitEmissionCost(unit, node, emission) "Emission costs for each {unit, node, emission}, calculated from input data (CUR/MWh)"
p_effUnit(effSelector, unit, effSelector, param_eff) "Data for piece-wise linear efficiency blocks"
p_effGroupUnit(effSelector, unit, param_eff) "Unit data specific to a efficiency group (e.g. left border of the unit)"
p_uNonoperational(unit, starttype, min_max) "Non-operational time after being shut down before start up"
......
......@@ -491,7 +491,7 @@ q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
] // END v_online
// Units in run-up phase neet to keep up with the run-up rate
+ p_gnu(grid, node, unit, 'unitSize')$gnu_input(grid, node, unit)
+ p_gnu(grid, node, unit, 'unitSize')$gnu_output(grid, node, unit)
* sum(unitStarttype(unit, starttype)${uft_startupTrajectory(unit, f, t)},
sum(runUpCounter(unit, counter)${t_active(t+dt_trajectory(counter))}, // Sum over the run-up intervals
+ [
......@@ -2777,12 +2777,13 @@ q_emissioncap(group, emission)
+ sum(msft(m, s, f, t),
+ p_msft_Probability(m,s,f,t)
* [
// Time step length dependent emissions
// Time step length dependent emissions - calculated from consumption
+ p_stepLength(m, f, t)
* sum(gnu(grid, node, unit)${gnGroup(grid, node, group) and p_nEmission(node, emission)},
+ v_gen(grid, node, unit, s, f, t)
* p_nEmission(node, emission) / 1e3
) // END sum(gnu, emission)
* sum(gnu_input(grid, node, unit)${gnGroup(grid, node, group) and p_nEmission(node, emission)},
- v_gen(grid, node, unit, s, f, t) // multiply by -1 because consumption is negative
* p_nEmission(node, emission) // kg/MWh
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
) // END sum(gnu_input)
// Start-up emissions
+ sum((uft_online(unit, f, t), starttype)$[unitStarttype(unit, starttype) and p_uStartup(unit, starttype, 'consumption')],
......@@ -2792,7 +2793,11 @@ q_emissioncap(group, emission)
+ v_startup_MIP(unit, starttype, s, f, t)
${ uft_onlineMIP(unit, f, t) }
]
* p_uStartupEmission(unit, starttype, emission)
* sum(nu(node, unit)${p_nEmission(node, emission)},
+ p_unStartup(unit, node, starttype) // MWh/start-up
* p_nEmission(node, emission) // kg/MWh
/ 1e3 // NOTE!!! Conversion to t/MWh from kg/MWh in data
) // END sum(nu, emission)
) // sum(uft_online)
] // END * p_sft_Probability
) // END sum(msft)
......
......@@ -402,13 +402,10 @@ $offtext
+ p_unitEmissionCost(unit, node, emission)
); // END sum(emission)
p_uStartupEmission(unit, starttype, emission)
p_unStartup(unit, node, starttype)$p_uStartupfuel(unit, node, 'fixedFuelFraction')
=
+ sum(node$p_uStartupfuel(unit, node, 'fixedFuelFraction'),
+ p_uStartup(unit, starttype, 'consumption')
* p_uStartupfuel(unit, node, 'fixedFuelFraction')
* * p_nEmission(node, emission) / 1e3 // double multiplication? should be checked
); // END sum(unit, node)
+ p_uStartup(unit, starttype, 'consumption')
* p_uStartupfuel(unit, node, 'fixedFuelFraction');
// Calculating startup cost time series
ts_startupCost_(unit, starttype, tt_interval(t))
......@@ -427,9 +424,9 @@ $offtext
] // END * p_uStartup
) // END sum(commodity)
+ sum((node, emission)$p_unitEmissionCost(unit, node, emission),
+ p_uStartupEmission(unit, starttype, emission)
+ p_unStartup(unit, node, starttype)
* p_unitEmissionCost(unit, node, emission)
)
) // END sum(node, emission)
); // END loop(counter)
......
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