Commit 37fc3f4e authored by Erkka Rinne's avatar Erkka Rinne
Browse files

Merge branch 'dev' into trtopi_forecastFix

# Conflicts:
#	inc/3c_inputsLoop.gms
parents b0884964 9e287178
......@@ -433,9 +433,13 @@ ft_reservesFixed(node, restype, f_solve(f), t_active(t))
]
}
= yes;
// Calculate sample displacements
Options clear = ds, clear = ds_state;
loop(ms(mSolve, s),
ds(s, t) = -(ord(s) - 1)$(ord(t) = tSolveFirst + msStart(mSolve, s));
loop(ms(mSolve, s)$msStart(msolve, s), // Get all samples with defined start
loop(s_$(msEnd(mSolve, s_) = msStart(mSolve, s)), // Get the previous sample
ds(s, t)$(ord(t) = tSolveFirst + msStart(mSolve, s)) = -(ord(s) - ord(s_));
);
ds_state(gn_state(grid, node), s, t)${not sum(s_, gnss_bound(grid, node, s_, s))
and not sum(s_, gnss_bound(grid, node, s, s_))}
= ds(s, t);
......
......@@ -35,7 +35,7 @@ tt_forecast(t_current(t))
${ ord(t) <= tSolveFirst + tmp }
= yes;
if (ord(tSolve) >= tForecastNext(mSolve) - mSettings(mSolve, 't_forecastJump'), // tForecastNext updated already in periodicLoop!
if (ord(tSolve) = tForecastNext(mSolve) - mSettings(mSolve, 't_forecastJump'), // tForecastNext updated already in periodicLoop!
// Update ts_unit
if (mTimeseries_loop_read(mSolve, 'ts_unit'),
......@@ -432,6 +432,9 @@ following the methodology presented in [1, p. 443]. This avoids a discontinuity
Transm. Distrib., vol. 12, no. 2, pp. 441 - 447, 2018.
$offtext
* Only do smoothing if there are parallel samples
if(card(s_parallel),
* Influx
loop(gn(grid, node)$p_autocorrelation(grid, node, 'ts_influx'),
ts_influx_mean(grid, node, ft(f, t))$mf_central(mSolve, f)
......@@ -487,3 +490,5 @@ loop(flowNode(flow, node)$p_autocorrelation(flow, node, 'ts_cf'),
));
);
);
); // end if(card(s_parallel),
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