Commit 1564a5ec authored by Erkka Rinne's avatar Erkka Rinne
Browse files

Clear data from removed samples

Also minor edits to smoothing calculation
parent 75282356
......@@ -466,7 +466,7 @@ if(active(mSolve, 'scenred'),
$$include 'inc/scenred.gms'
);
* --- Smooting of stochastic sceanrios ---------------------------------------
* --- Smooting of stochastic scenarios ----------------------------------------
$ontext
First calculate standard deviation for over all samples, then smoothen the scenarios
following the methodology presented in [1, p. 443]. This avoids a discontinuity
......@@ -491,9 +491,9 @@ loop(gn(grid, node)$p_autocorrelation(grid, node, 'ts_influx'),
// Do smoothing
loop(mst_end(ms_initial(mSolve, s_), t_),
ts_influx_(grid, node, ft(f, t), s)$(ts_influx_std(grid, node, f, t_+dt_circular(t_))
and sft(s, f, t)
and not ms_initial(mSolve, s))
ts_influx_(grid, node, f, t, s)$(ts_influx_std(grid, node, f, t_+dt_circular(t_))
and sft(s, f, t)
and not ms_initial(mSolve, s))
= min(p_tsMaxValue(node, 'ts_influx'), max(p_tsMinValue(node, 'ts_influx'),
ts_influx_(grid, node, f, t, s)
+ (ts_influx_(grid, node, f, t_, s_)
......@@ -519,9 +519,9 @@ loop(flowNode(flow, node)$p_autocorrelation(flow, node, 'ts_cf'),
// Do smoothing
loop(mst_end(ms_initial(mSolve, s_), t_),
ts_cf_(flow, node, ft(f, t), s)$(ts_cf_std(flow, node, f, t_+dt_circular(t_))
and sft(s, f, t)
and not ms_initial(mSolve, s))
ts_cf_(flow, node, f, t, s)$(ts_cf_std(flow, node, f, t_+dt_circular(t_))
and sft(s, f, t)
and not ms_initial(mSolve, s))
= min(p_tsMaxValue(node, 'ts_cf'), max(p_tsMinValue(node, 'ts_cf'),
ts_cf_(flow, node, f, t, s)
+ (ts_cf_(flow, node, f, t_, s_)
......
......@@ -34,6 +34,11 @@ s_active(s) = p_sProbability(s);
msft(mSolve, s, f, t)$msft(mSolve, s, f, t) = s_active(s);
sft(s, f, t)$sft(s, f, t) = s_active(s);
* Clear data from removed samples
ts_influx_(gn, ft, s)$(not s_active(s)) = 0;
ts_cf_(flowNode, ft, s)$(not s_active(s)) = 0;
else
put log "!!! No scenario reduction setting given, skipping scenario reduction!"/;
);
......
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