Commit 77493cd4 authored by ran li's avatar ran li Committed by ran li
Browse files

Efficiency of increamental heat rate, still under test and debugging

parent 816848b5
......@@ -47,6 +47,11 @@ Model schedule /
q_conversionSOS2InputIntermediate
q_conversionSOS2Constraint
q_conversionSOS2IntermediateOutput
q_conversionIncHR
q_conversionIncHRMaxGen
q_conversionIncHRBounds1
q_conversionIncHRBounds2
q_conversionIncHRBounds3
q_fuelUseLimit
// Energy Transfer
......
......@@ -70,6 +70,7 @@ p_uCounter_shutdownMax
* Variables
v_obj
v_gen
v_gen_inc
v_genRamp
v_transfer
v_state
......
......@@ -98,7 +98,7 @@ Sets
effLevel "Pre-defined levels for efficiency representation that can start from t_solve + x"
/ level1*level9 /
effSelector "Select equations and lambdas/slope for efficiency calculations"
/ lambda01*lambda12, directOff, directOnLP, directOnMIP / // NOTE! Lambdas required first!
/ lambda01*lambda12, directOff, directOnLP, directOnMIP , incHR/ // NOTE! Lambdas required first!
effDirect(effSelector) "Using direct input to output equation"
/ directOff, directOnLP, directOnMIP /
effDirectOff(effSelector) "Using direct input to output equation without online variable, i.e. constant efficiency"
......@@ -107,8 +107,10 @@ Sets
/ directOnLP, directOnMIP /
effLambda(effSelector) "Lambdas in use for part-load efficiency representation"
/ lambda01*lambda12 /
effIncHR(effSelector) "Using incremental heat rate equation"
/ incHR /
effOnline(effSelector) "Efficiency selectors that use online variables"
/ directOnLP, directOnMIP, lambda01*lambda12 / // IMPORTANT! Online variables are generated based on this, so keep it up to date!
/ directOnLP, directOnMIP, lambda01*lambda12 ,incHR / // IMPORTANT! Online variables are generated based on this, so keep it up to date!
* --- General and Directional Sets --------------------------------------------
......@@ -295,6 +297,8 @@ param_unit "Set of possible data parameters for units" /
eff00 * eff12 "Efficiency of the unit to convert input to output/intermediate product"
opFirstCross "The operating point where the real efficiency curve and approximated efficiency curve cross"
op00 * op12 "Right border of the efficiency point"
hr00 * hr12 "incremental heat rates"
hrop00 * hrop12 "Right border of the incremental heat rates"
section "Possibility to define a no load fuel use for units with zero minimum output"
level1 * level9 "Level of simplification in the part-load efficiency representation"
useTimeseries "A flag to use time series form input for unit parameters whenever possible"
......@@ -353,7 +357,10 @@ eff(param_unit) "Effiency for the corresponding operating point ('op') in the ef
/eff00*eff12/ // IMPORTANT! Has to equal the same param_unit!
lambda "Lambda approximation indeces"
/lambda01*lambda12/ // IMPORTANT! Has to equal effLambda!
hrop(param_unit) "Operating points in the incremental heat rate curves, also functions as index for data points"
/hrop00*hrop12/ // IMPORTANT! Has to equal the same param_unit!
hr(param_unit) "Heat rate for the corresponding operating point ('hrop') in the heat rate curves, also used for data indexing"
/hr00*hr12/ // IMPORTANT! Has to equal the same param_unit!
* --- Counters and Directional Sets -------------------------------------------
// Slack categories
......
......@@ -182,7 +182,9 @@ alias(effDirectOn, effDirectOn_);
alias(effLambda, effLambda_);
alias(lambda, lambda_, lambda__);
alias(op, op_, op__);
alias(hrop, hrop_, hrop__);
alias(eff, eff_, eff__);
alias(hr, hr_, hr__);
alias(fuel, fuel_);
alias(effLevel, effLevel_);
alias(restype, restype_);
......
......@@ -44,6 +44,7 @@ Positive variables
v_investTransfer_LP(grid, node, node, t) "Invested transfer capacity (MW)"
v_online_LP(unit, s, f, t) "Number of sub-units online for 'units' with unit commitment restrictions (LP variant)"
v_invest_LP(unit, t) "Number of invested 'sub-units' (LP variant)"
v_gen_inc(grid, node, unit, hr, s, f, t) "Energy generation in hr block in an interval (MW)"
;
* --- Feasibility control -----------------------------------------------------
......
......@@ -75,6 +75,11 @@ equations
q_conversionSOS2InputIntermediate(s, effSelector, unit, f, t) "Intermediate output when using SOS2 variable based part-load piece-wise linearization"
q_conversionSOS2Constraint(s, effSelector, unit, f, t) "Sum of v_sos2 has to equal v_online"
q_conversionSOS2IntermediateOutput(s, effSelector, unit, f, t) "Output is forced equal with v_sos2 output"
q_conversionIncHR(s, effSelector, unit, f, t) "Conversion of inputs to outputs for incremental heat rates"
q_conversionIncHRMaxGen(grid, node,s, effSelector, unit, f, t) "Max Generating level"
q_conversionIncHRBounds1(grid, node,s, effSelector, unit, f, t) "Heat rate bounds for hr=1"
q_conversionIncHRBounds2(grid, node, s, effSelector, unit, f, t) "Heat rate bounds for hr=2"
q_conversionIncHRBounds3(grid, node, s, effSelector, unit, f, t) "Heat rate bounds for hr=3"
q_fuelUseLimit(s, fuel, unit, f, t) "Fuel use cannot exceed limits"
// Energy Transfer
......
......@@ -948,7 +948,115 @@ q_conversionDirectInputOutput(s, suft(effDirect(effGroup), unit, f, t))$sft(s, f
+ ts_effUnit(effGroup, unit, effGroup, 'section', f, t)
] // END * sum(gnu_output)
;
* --- Incremental Heat Rate Conversion ------------------------------------------
q_conversionIncHR(s, suft(effIncHR(effGroup), unit, f, t))$sft(s, f, t) ..
// Sum over endogenous energy inputs
- sum(gnu_input(grid, node, unit)${not p_gnu(grid, node, unit, 'doNotOutput')},
+ v_gen(grid, node, unit, s, f, t)
) // END sum(gnu_input)
// Sum over fuel energy inputs
+ sum(uFuel(unit, 'main', fuel),
+ v_fuelUse(fuel, unit, s, f, t)
) // END sum(uFuel)
=E=
// Sum over energy outputs
+ sum(gnu_output(grid, node, unit),
+ sum (hr,
v_gen_inc(grid, node, unit, hr, s, f, t) // output of each heat rate segment
* [ // heat rate
p_unit(unit, hr)/3.6 // p/ts?
] // END * v_gen_inc
)) // END sum(gnu_output)
// Consumption of keeping units online (no-load fuel use)
+ sum(gnu_output(grid, node, unit),
+ p_gnu(grid, node, unit, 'unitSizeGen')
) // END sum(gnu_output)
* [ // Unit online state
+ v_online_LP(unit, s, f+df_central(f,t), t)${uft_onlineLP(unit, f, t)}
+ v_online_MIP(unit, s, f+df_central(f,t), t)${uft_onlineMIP(unit, f, t)}
// Run-up and shutdown phase efficiency correction
// Run-up 'online state'
+ 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
+ v_startup(unit, starttype, s, f+df(f, t+dt_trajectory(counter)), t+dt_trajectory(counter))
* p_uCounter_runUpMin(unit, counter)
/ p_unit(unit, 'op00') // Scaling the p_uCounter_runUp using minload
) // END sum(runUpCounter)
) // END sum(unitStarttype)
// Shutdown 'online state'
+ sum(shutdownCounter(unit, counter)${t_active(t+dt_trajectory(counter)) and uft_shutdownTrajectory(unit, f, t)}, // Sum over the shutdown intervals
+ v_shutdown(unit, s, f+df(f, t+dt_trajectory(counter)), t+dt_trajectory(counter))
* p_uCounter_shutdownMin(unit, counter)
/ p_unit(unit, 'op00') // Scaling the p_uCounter_shutdown using minload
) // END sum(shutdownCounter)
] // END * sum(gnu_output)
* [
+ p_effGroupUnit(effGroup, unit, 'section')${not ts_effUnit(effGroup, unit, effIncHR, 'section', f, t)}
+ ts_effUnit(effGroup, unit, effGroup, 'section', f, t)
] // END * sum(gnu_output)
;
* --- Incremental Heat Rate Conversion ------------------------------------------
q_conversionIncHRMaxGen(grid, node, s, suft(effIncHR(effGroup), unit, f, t))$sft(s, f, t)..
v_gen(grid, node, unit, s, f, t)
=E=
// Sum over heat rate segments
sum(hr$(ord (hr) le 3),
v_gen_inc(grid, node, unit, hr, s, f, t)
)// END sum (hr)
;
* --- Incremental Heat Rate Conversion ------------------------------------------
q_conversionIncHRBounds1(grid, node,s, suft(effIncHR(effGroup), unit, f, t))$(sft(s, f, t)) ..
v_gen_inc(grid, node, unit, 'hr00', s, f, t)
=L=
(
p_effUnit(effGroup, unit, effGroup, 'lb')
)
* p_gnu(grid, node, unit, 'maxGen')*v_online_MIP(unit, s, f+df_central(f,t), t)${uft_onlineMIP(unit, f, t)}
;
* --- Incremental Heat Rate Conversion ------------------------------------------
q_conversionIncHRBounds2(grid, node, s, suft(effIncHR(effGroup), unit, f, t)) $(sft(s, f, t)) ..
v_gen_inc(grid, node, unit, 'hr01', s, f, t)
=L=
(
p_effUnit(effGroup, unit, effGroup, 'slope')*p_unit(unit, 'hrop01')
- p_effUnit(effGroup, unit, effGroup, 'slope')*p_unit(unit, 'hrop00')
)
* p_gnu(grid, node, unit, 'maxGen')*v_online_MIP(unit, s, f+df_central(f,t), t)${uft_onlineMIP(unit, f, t)}
;
q_conversionIncHRBounds3(grid, node, s, suft(effIncHR(effGroup), unit, f, t)) $(sft(s, f, t)) ..
v_gen_inc(grid, node, unit, 'hr02', s, f, t)
=L=
(
p_effUnit(effGroup, unit, effGroup, 'slope')*p_unit(unit, 'hrop02')
- p_effUnit(effGroup, unit, effGroup, 'slope')*p_unit(unit, 'hrop01')
)
* p_gnu(grid, node, unit, 'maxGen')*v_online_MIP(unit, s, f+df_central(f,t), t)${uft_onlineMIP(unit, f, t)}
;
* --- SOS2 Efficiency Approximation -------------------------------------------
q_conversionSOS2InputIntermediate(s, suft(effLambda(effGroup), unit, f, t))$sft(s, f, t) ..
......
......@@ -269,6 +269,11 @@ loop(effLevelGroupUnit(effLevel, effSelector, unit)${sum(m, mSettingsEff(m, effL
effGroupSelector(effDirectOn(effSelector), effSelector) = yes;
effGroupSelectorUnit(effDirectOn(effSelector), unit, effSelector) = yes;
// effSelector using IncHR
effGroup(effIncHR(effSelector)) = yes;
effGroupSelector(effIncHR(effSelector), effSelector) = yes;
effGroupSelectorUnit(effIncHR(effSelector), unit, effSelector) = yes;
// effSelector using Lambda
effGroup(effLambda(effSelector)) = yes;
loop(effLambda_${ord(effLambda_) <= ord(effSelector)},
......@@ -399,6 +404,14 @@ loop(effGroupSelectorUnit(effSelector, unit, effSelector_),
); // END loop(eff_,eff__)
); // END loop(op_,op__)
); // END if(effLambda)
// Parameters for incremental heat rates
if(effIncHR(effSelector),
p_effUnit(effSelector, unit, effSelector, 'lb') = p_unit(unit, 'hrop00'); // hrop00 contains the minimum load of the unit
p_effUnit(effSelector, unit, effSelector, 'op') = smax(hrop, p_unit(unit, hrop)); // Maximum operating point
p_effUnit(effSelector, unit, effSelector, 'slope') = 1; // Uses maximum found (nonzero) efficiency. No load heat rate not considered. Approximation
p_effUnit(effSelector, unit, effSelector, 'section') = p_unit(unit, 'section'); // pre-defined
); // END if(effIncHR)
); // END loop(effGroupSelectorUnit)
// Calculate unit wide parameters for each efficiency 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