|
1 | 1 | ' Dynamic Bandwidth Monitor
|
2 | 2 | ' Leak detection method implemented in a real-time data historian
|
3 |
| -' Copyright (C) 2014-2023 J.H. Fitié, Vitens N.V. |
| 3 | +' Copyright (C) 2014-2024 J.H. Fitié, Vitens N.V. |
4 | 4 | '
|
5 | 5 | ' This file is part of DBM.
|
6 | 6 | '
|
@@ -687,6 +687,7 @@ Namespace Vitens.DynamicBandwidthMonitor
|
687 | 687 | Dim rawValues As AFValues = Nothing
|
688 | 688 | Dim result As DBMResult
|
689 | 689 | Dim iR, iD As Integer ' Iterators for raw values and DBM results.
|
| 690 | + Dim statistics As DBMStatisticsItem |
690 | 691 |
|
691 | 692 | GetValues = New AFValues
|
692 | 693 |
|
@@ -959,12 +960,13 @@ Namespace Vitens.DynamicBandwidthMonitor
|
959 | 960 | GetValues.Item(GetValues.Count-1).Timestamp = timeRange.EndTime
|
960 | 961 | End If
|
961 | 962 |
|
962 |
| - ' For the Target values, if there are more than two results, check for and |
963 |
| - ' remove flatlines, and annotate the first value with model calibration |
964 |
| - ' metrics. |
| 963 | + ' For the Target values, if there are more than two results and a |
| 964 | + ' reliable forecast can be made, check for and remove flatlines, and |
| 965 | + ' annotate the first value with model calibration metrics. |
965 | 966 | If Attribute.Trait Is LimitTarget And results.Count > 2 Then
|
966 |
| - GetValues = Deflatline(GetValues, results, Me.Step) |
967 |
| - Annotate(GetValues.Item(0), Statistics(results).Brief) |
| 967 | + statistics = Statistics(results) |
| 968 | + If statistics.Calibrated Then GetValues = Deflatline(GetValues, results, Me.Step) |
| 969 | + Annotate(GetValues.Item(0), statistics.Brief) |
968 | 970 | End If
|
969 | 971 |
|
970 | 972 | ' Returns the collection of values for the attribute sorted in increasing
|
|
0 commit comments