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

Adding separate useTimeseriesAvailability flag from unit availability time series

parent db4dc263
......@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Added
- solver time and total time separately to r_solveStatus
- option for user to add additional result symbols as input data
- unit availability time series
### Changed
- decreased default penalty value from 10e9 to 10e4 to improve solver default behavior
......
......@@ -327,7 +327,8 @@ param_unit "Set of possible data parameters for units" /
hrop00 * hrop12 "Right border of the incremental heat rates"
section "Possibility to define a no load fuel use for units with zero minimum output"
hrsection "no load fuel use to be defined when using incremental heat rates"
useTimeseries "A flag to use time series form input for unit parameters whenever possible"
useTimeseries "A flag to use efficiency time series form input for unit parameters whenever possible"
useTimeseriesAvailability "A flag to use availability time series form input for unit parameters whenever possible"
investMIP "A flag to make integer investment instead of continous investment"
maxUnitCount "Maximum number of units when making integer investments"
minUnitCount "Minimum number of units when making integer investments"
......
......@@ -203,7 +203,7 @@ unitStarttype(unit, starttypeConstrained)${ p_unit(unit, 'startWarmAfterXhours')
nu_startup(node, unit)$p_uStartupfuel(unit, node, 'fixedFuelFraction') = yes;
// Units with time series data enabled
unit_timeseries(unit)${ p_unit(unit, 'useTimeseries') }
unit_timeseries(unit)${ p_unit(unit, 'useTimeseries') or p_unit(unit, 'useTimeseriesAvailability') }
= yes;
* --- Unit Related Parameters -------------------------------------------------
......
......@@ -562,8 +562,8 @@ q_maxDownward(gnu(grid, node, unit), msft(m, s, f, t))
// Consuming units, greater than maxCons
// Available capacity restrictions
- [
+ p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// Capacity factors for flow units
......@@ -623,8 +623,8 @@ q_maxDownwardOfflineReserve(gnu(grid, node, unit), msft(m, s, f, t))
// Available capacity restrictions
// Consumption units are also restricted by their (available) capacity
- [
+ p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// Capacity factors for flow units
......@@ -699,8 +699,8 @@ q_maxUpward(gnu(grid, node, unit), msft(m, s, f, t))
// Available capacity restrictions
// Generation units are restricted by their (available) capacity
+ [
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// Capacity factor for flow units
......@@ -781,8 +781,8 @@ q_maxUpwardOfflineReserve(gnu(grid, node, unit), msft(m, s, f, t))
// Generation units are restricted by their (available) capacity
+ [
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// Capacity factor for flow units
......@@ -820,10 +820,10 @@ q_fixedFlow(gnu(grid, node, unit_flow(unit)), msft(m, s, f, t))
+ [
// Available capacity restrictions
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
- p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not ts_unit(unit, 'availability', f, t)}
- ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${gnu_output(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${gnu_output(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
- p_unit(unit, 'availability')${gnu_input(grid, node, unit) and not p_unit(unit, 'useTimeseriesAvailability')}
- ts_unit_(unit, 'availability', f, t)${gnu_input(grid, node, unit) and p_unit(unit, 'useTimeseriesAvailability')}
]
* sum(flowUnit(flow, unit), // Capacity factor for flow units
+ ts_cf_(flow, node, s, f, t)
......@@ -866,8 +866,8 @@ q_reserveProvision(gnuRescapable(restypeDirectionGridNode(restype, up_down, grid
]
// Taking into account availability...
* [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// ... and capacity factor for flow units
......@@ -901,8 +901,8 @@ q_reserveProvisionOnline(gnuRescapable(restypeDirectionGridNode(restype, up_down
]
// Taking into account availability...
* [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// ... and capacity factor for flow units
......@@ -3146,8 +3146,8 @@ q_capacityMargin(gn(grid, node), sft(s, f, t))
and p_gnu(grid, node, unit, 'availabilityCapacityMargin')
},
+ [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
* p_gnu(grid, node, unit, 'availabilityCapacityMargin')
* [
......@@ -3173,8 +3173,8 @@ q_capacityMargin(gn(grid, node), sft(s, f, t))
) // END sum(flow)
// Taking into account availability.
* [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
* [
// Output capacity before investments
......
......@@ -194,8 +194,8 @@ v_gen.up(gnu_output(grid, node, unit), sft(s, f, t))${gnuft(grid, node, unit, f,
}
= p_gnu(grid, node, unit, 'capacity')
* [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
;
// Time series capacity factor based max. energy generation if investments disabled
......@@ -207,8 +207,8 @@ v_gen.up(gnu_output(grid, node, unit_flow), sft(s, f, t))${gnuft(grid, node, uni
+ ts_cf_(flow, node, s, f, t)
* p_gnu(grid, node, unit_flow, 'capacity')
* [
+ p_unit(unit_flow, 'availability')${not ts_unit(unit_flow, 'availability', f, t)}
+ ts_unit_(unit_flow, 'availability', f, t)${ts_unit(unit_flow, 'availability', f, t) and unit_timeseries(unit_flow)}
+ p_unit(unit_flow, 'availability')${not p_unit(unit_flow, 'useTimeseriesAvailability')}
+ ts_unit_(unit_flow, 'availability', f, t)${p_unit(unit_flow, 'useTimeseriesAvailability')}
]
) // END sum(flow)
;
......@@ -224,8 +224,8 @@ v_gen.lo(gnu_input(grid, node, unit), sft(s, f, t))${gnuft(grid, node, unit, f,
and not (unit_investLP(unit) or unit_investMIP(unit))}
= - p_gnu(grid, node, unit, 'capacity')
* [
+ p_unit(unit, 'availability')${not ts_unit(unit, 'availability', f, t)}
+ ts_unit_(unit, 'availability', f, t)${ts_unit(unit, 'availability', f, t) and unit_timeseries(unit)}
+ p_unit(unit, 'availability')${not p_unit(unit, 'useTimeseriesAvailability')}
+ ts_unit_(unit, 'availability', f, t)${p_unit(unit, 'useTimeseriesAvailability')}
]
;
......@@ -244,8 +244,8 @@ v_gen.lo(gnu_input(grid, node, unit_flow), sft(s, f, t))${gnuft(grid, node, unit
+ ts_cf_(flow, node, s, f, t)
* p_gnu(grid, node, unit_flow, 'capacity')
* [
+ p_unit(unit_flow, 'availability')${not ts_unit(unit_flow, 'availability', f, t)}
+ ts_unit_(unit_flow, 'availability', f, t)${ts_unit(unit_flow, 'availability', f, t) and unit_timeseries(unit_flow)}
+ p_unit(unit_flow, 'availability')${not p_unit(unit_flow, 'useTimeseriesAvailability')}
+ ts_unit_(unit_flow, 'availability', f, t)${p_unit(unit_flow, 'useTimeseriesAvailability')}
]
) // END sum(flow)
;
......
......@@ -42,8 +42,8 @@ loop(gn(grid,node),
ts_cf(flow, node, f, t) *
p_data2d(grid, unit_flow, 'capacity')
*[
+ p_unit(unit_flow, 'availability')${not ts_unit(unit_flow, 'availability', f, t)}
+ ts_unit_(unit_flow, 'availability', f, t)${ts_unit(unit_flow, 'availability', f, t) and unit_timeseries(unit_flow)}
+ p_unit(unit_flow, 'availability')${not p_unit(unit_flow, 'useTimeseriesAvailability')}
+ ts_unit_(unit_flow, 'availability', f, t)${p_unit(unit_flow, 'useTimeseriesAvailability')}
]
)
) * (13 - abs(ord(t) - ord(t_))) // Weighting
......
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