Mercurial > gemma
changeset 4860:de7aa9230837
Limit interpolation of time ranges for Available Fairway Depths to 1.5h.
This is necessary to prevent interpolation into time ranges where
intentionally no data is provided. (When bottlenecks are "inactive"
no data is provided and gemma shall assume perfect conditions for that
time)
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 04 Dec 2019 15:28:22 +0100 |
parents | 082027fb2d58 |
children | 2ede9ac26ef2 |
files | pkg/controllers/bottlenecks.go |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/bottlenecks.go Wed Dec 04 13:35:34 2019 +0100 +++ b/pkg/controllers/bottlenecks.go Wed Dec 04 15:28:22 2019 +0100 @@ -219,6 +219,11 @@ continue } + if p2.when.Sub(p1.when).Hours() > 1.5 { + // Don't interpolate ranges bigger then one hour + continue + } + lo, hi := maxTime(p1.when, from), minTime(p2.when, to) m1, m2 := access(p1), access(p2)