Commit 17e9ce6d authored by Dana Kirchem's avatar Dana Kirchem
Browse files

Changed 'ts_nodeState' to 'ts_node' for clarification (since penalty time...

Changed 'ts_nodeState' to 'ts_node' for clarification (since penalty time series should also be implemented, which does not refer to the node state)
parent 6b97001d
......@@ -159,7 +159,7 @@ Sets
ts_influx
ts_cf
ts_reserveDemand
ts_nodeState
ts_node
ts_fuelPriceChange
ts_fuelPrice
ts_unavailability
......
......@@ -127,7 +127,7 @@ Parameters
ts_influx(grid, node, f, t) "External power inflow/outflow during a time step (MWh/h)"
ts_cf(flow, node, f, t) "Available capacity factor time series (p.u.)"
ts_reserveDemand(restype, up_down, node, f, t) "Reserve demand in region in the time step (MW)"
ts_nodeState(grid, node, param_gnBoundaryTypes, f, t) "Fix the states of a node according to time-series form exogenous input ([v_state])"
ts_node(grid, node, param_gnBoundaryTypes, f, t) "Fix the states of a node according to time-series form exogenous input ([v_state])"
ts_fuelPriceChange(fuel, t) "Initial fuel price and consequent changes in fuel price (EUR/MWh)"
ts_fuelPrice(fuel, t) "Fuel price time series (EUR/MWh)"
ts_unavailability(unit, t) "Unavailability of a unit in the time step (p.u.)"
......@@ -137,7 +137,7 @@ Parameters
ts_influx_temp(grid, node, f, t)
ts_cf_(flow, node, f, t)
ts_reserveDemand_(restype, up_down, node, f, t)
ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
ts_node_(grid, node, param_gnBoundaryTypes, f, t)
ts_fuelPrice_(fuel, t)
;
......
......@@ -53,7 +53,7 @@ $loaddc p_fuelEmission
$loaddc ts_cf
$loaddc ts_fuelPriceChange
$loaddc ts_influx
$loaddc ts_nodeState
$loaddc ts_node
$loaddc t_invest
$loaddc group
$loaddc uGroup
......
......@@ -1151,7 +1151,7 @@ q_stateSlack(gn_stateSlack(grid, node), slack, ft(f, t))${ p_gnBoundaryProperti
* [
+ v_state(grid, node, f, t)
- p_gnBoundaryPropertiesForStates(grid, node, slack, 'constant')$p_gnBoundaryPropertiesForStates(grid, node, slack, 'useConstant')
- ts_nodeState_(grid, node, slack, f, t)$p_gnBoundaryPropertiesForStates(grid, node, slack, 'useTimeSeries')
- ts_node_(grid, node, slack, f, t)$p_gnBoundaryPropertiesForStates(grid, node, slack, 'useTimeSeries')
] // END * p_slackDirection
;
......@@ -1166,7 +1166,7 @@ q_stateUpwardLimit(gn_state(grid, node), mft(m, f, t))${ sum(gn2gnu(grid, nod
+ [
// Upper boundary of the variable
+ p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'constant')${p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'useConstant')}
+ ts_nodeState_(grid, node, 'upwardLimit', f, t)${p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'useTimeseries')}
+ ts_node_(grid, node, 'upwardLimit', f, t)${p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'useTimeseries')}
// Investments
+ sum(gnu(grid, node, unit),
......@@ -1242,7 +1242,7 @@ q_stateDownwardLimit(gn_state(grid, node), mft(m, f, t))${ sum(gn2gnu(grid, nod
// Lower boundary of the variable
- p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'constant')${p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'useConstant')}
- ts_nodeState_(grid, node, 'downwardLimit', f, t)${p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'useTimeseries')}
- ts_node_(grid, node, 'downwardLimit', f, t)${p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'useTimeseries')}
] // END Headroom
* [
// Conversion to energy
......
......@@ -102,7 +102,7 @@ $offtext
// Calculate the length of the time series data (based on realized forecast)
loop(gn(grid, node),
tmp = max(sum((mf_realization(m, f), t)${ ts_influx(grid, node, f, t) }, 1), tmp); // Find the maximum length of the given influx time series
tmp = max(sum((mf_realization(m, f), t)${ ts_nodeState(grid, node, 'reference', f, t) }, 1), tmp); // Find the maximum length of the given node state time series
tmp = max(sum((mf_realization(m, f), t)${ ts_node(grid, node, 'reference', f, t) }, 1), tmp); // Find the maximum length of the given node state time series
); // END loop(gn)
); // END loop(m)
......
......@@ -31,7 +31,7 @@ loop(mTimeseries_loop_read(mSolve, timeseries)${ord(tSolve) >= tForecastNext(mSo
if (mTimeseries_loop_read(mSolve, 'ts_influx'), execute_load ts_influx);
if (mTimeseries_loop_read(mSolve, 'ts_cf'), execute_load ts_cf);
if (mTimeseries_loop_read(mSolve, 'ts_reserveDemand'), execute_load ts_reserveDemand);
if (mTimeseries_loop_read(mSolve, 'ts_nodeState'), execute_load ts_nodeState);
if (mTimeseries_loop_read(mSolve, 'ts_node'), execute_load ts_node);
if (mTimeseries_loop_read(mSolve, 'ts_fuelPriceChange'), execute_load ts_fuelPriceChange);
if (mTimeseries_loop_read(mSolve, 'ts_unavailability'), execute_load ts_unavailability);
);
......
......@@ -118,7 +118,7 @@ $iftheni.debug NOT '%debug%' == 'yes'
Option clear = ts_cf_;
Option clear = ts_unit_;
Option clear = ts_reserveDemand_;
Option clear = ts_nodeState_;
Option clear = ts_node_;
$endif.debug
......@@ -222,8 +222,8 @@ loop(cc(counter),
// Reserve demand relevant only up until reserve_length
ts_reserveDemand_(restypeDirectionNode(restype, up_down, node), ft(f_solve, tt_interval(t)))${ ord(t) <= tSolveFirst + p_nReserves(node, restype, 'reserve_length') }
= ts_reserveDemand(restype, up_down, node, f_solve, t+dt_circular(t));
ts_nodeState_(gn_state(grid, node), param_gnBoundaryTypes, ft(f_solve, tt_interval(t)))${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= ts_nodeState(grid, node, param_gnBoundaryTypes, f_solve, t+dt_circular(t));
ts_node_(gn_state(grid, node), param_gnBoundaryTypes, ft(f_solve, tt_interval(t)))${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= ts_node(grid, node, param_gnBoundaryTypes, f_solve, t+dt_circular(t));
// Fuel price time series
ts_fuelPrice_(fuel, tt_interval(t))
= ts_fuelPrice(fuel, t+dt_circular(t));
......@@ -291,8 +291,8 @@ loop(cc(counter),
ts_reserveDemand_(restypeDirectionNode(restype, up_down, node), f_solve, t)${ ord(t) <= tSolveFirst + p_nReserves(node, restype, 'reserve_length') }
= sum(tt(t_), ts_reserveDemand(restype, up_down, node, f_solve, t_+dt_circular(t_)))
/ p_stepLength(mSolve, f_solve, t);
ts_nodeState_(gn_state(grid, node), param_gnBoundaryTypes, f_solve, t)${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= sum(tt(t_), ts_nodeState(grid, node, param_gnBoundaryTypes, f_solve, t_+dt_circular(t_)))
ts_node_(gn_state(grid, node), param_gnBoundaryTypes, f_solve, t)${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= sum(tt(t_), ts_node(grid, node, param_gnBoundaryTypes, f_solve, t_+dt_circular(t_)))
/ p_stepLength(mSolve, f_solve, t);
// Fuel price time series
ts_fuelPrice_(fuel, t)
......
......@@ -49,14 +49,14 @@ v_state.fx(gn_state(grid, node), ft(f, t))${ p_gn(grid, node, 'boundAll')
v_state.up(gn_state(grid, node), ft(f, t))${ p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'useTimeSeries')
and not df_central(f,t)
}
= ts_nodeState_(grid, node, 'upwardLimit', f, t)
= ts_node_(grid, node, 'upwardLimit', f, t)
* p_gnBoundaryPropertiesForStates(grid, node, 'upwardLimit', 'multiplier')
;
// Lower bound
v_state.lo(gn_state(grid, node), ft(f, t))${ p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'useTimeSeries')
and not df_central(f,t)
}
= ts_nodeState_(grid, node, 'downwardLimit', f, t)
= ts_node_(grid, node, 'downwardLimit', f, t)
* p_gnBoundaryPropertiesForStates(grid, node, 'downwardLimit', 'multiplier')
;
// Fixed value
......@@ -64,7 +64,7 @@ v_state.fx(gn_state(grid, node), ft(f, t))${ p_gn(grid, node, 'boundAll')
and p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'useTimeSeries')
and not df_central(f,t)
}
= ts_nodeState_(grid, node, 'reference', f, t)
= ts_node_(grid, node, 'reference', f, t)
* p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'multiplier')
;
......@@ -92,7 +92,7 @@ v_spill.lo(gn(grid, node_spill), ft(f, t))${ p_gnBoundaryPropertiesForStates(
* p_gnBoundaryPropertiesForStates(grid, node_spill, 'minSpill', 'multiplier')
;
v_spill.lo(gn(grid, node_spill), ft(f, t))${ p_gnBoundaryPropertiesForStates(grid, node_spill, 'minSpill', 'useTimeSeries') }
= ts_nodeState_(grid, node_spill, 'minSpill', f, t)
= ts_node_(grid, node_spill, 'minSpill', f, t)
* p_gnBoundaryPropertiesForStates(grid, node_spill, 'minSpill', 'multiplier')
;
v_spill.up(gn(grid, node_spill), ft(f, t))${ p_gnBoundaryPropertiesForStates(grid, node_spill, 'maxSpill', 'constant') }
......@@ -100,7 +100,7 @@ v_spill.up(gn(grid, node_spill), ft(f, t))${ p_gnBoundaryPropertiesForStates(
* p_gnBoundaryPropertiesForStates(grid, node_spill, 'maxSpill', 'multiplier')
;
v_spill.up(gn(grid, node_spill), ft(f, t))${ p_gnBoundaryPropertiesForStates(grid, node_spill, 'maxSpill', 'useTimeSeries') }
= ts_nodeState_(grid, node_spill, 'maxSpill', f, t)
= ts_node_(grid, node_spill, 'maxSpill', f, t)
* p_gnBoundaryPropertiesForStates(grid, node_spill, 'maxSpill', 'multiplier')
;
......@@ -395,7 +395,7 @@ loop(mft_start(mSolve, f, t),
v_state.fx(gn_state(grid, node), f, t)${ p_gn(grid, node, 'boundStart')
and p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'useTimeSeries') // !!! NOTE !!! The check fails if value is zero
}
= ts_nodeState(grid, node, 'reference', f, t) // NOTE!!! ts_nodeState_ doesn't contain initial values so using raw data instead.
= ts_node(grid, node, 'reference', f, t) // NOTE!!! ts_nodeState_ doesn't contain initial values so using raw data instead.
* p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'multiplier');
// Initial online status for units
......
......@@ -66,6 +66,6 @@ v_state.fx(grid, node, ft(f,t))${ mft_lastSteps(mSolve, f, t)
and p_gn(grid, node, 'boundEnd')
and p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'useTimeSeries')
}
= ts_nodeState_(grid, node, 'reference', f, t)
= ts_node_(grid, node, 'reference', f, t)
* p_gnBoundaryPropertiesForStates(grid, node, 'reference', 'multiplier');
$offtext
......@@ -170,10 +170,10 @@ d_capacityFactor(flowNode(flow, node), f_solve(f), t_active(t))${ sum(flowUnit(f
;
// Temperature forecast for examining the error
d_nodeState(gn_state(grid, node), param_gnBoundaryTypes, f_solve(f), t_active(t))${ p_gnBoundaryPropertiesForStates(grid, node, param_gnBoundaryTypes, 'useTimeseries') }
= ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
+ ts_nodeState(grid, node, param_gnBoundaryTypes, f, t)${ not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t) }
- 1e-3${ not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
and not ts_nodeState_(grid, node, param_gnBoundaryTypes, f, t)
= ts_node_(grid, node, param_gnBoundaryTypes, f, t)
+ ts_node(grid, node, param_gnBoundaryTypes, f, t)${ not ts_node_(grid, node, param_gnBoundaryTypes, f, t) }
- 1e-3${ not ts_node_(grid, node, param_gnBoundaryTypes, f, t)
and not ts_node_(grid, node, param_gnBoundaryTypes, f, t)
}
;
......
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