Skip to content

Commit 0b8825a

Browse files
authored
Merge pull request #326 from Vitens/staging
Staging
2 parents ecd84fc + fc05bcb commit 0b8825a

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# DBM
44
Dynamic Bandwidth Monitor\
55
Leak detection method implemented in a real-time data historian\
6-
Copyright (C) 2014-2023 J.H. Fitié, Vitens N.V.
6+
Copyright (C) 2014-2024 J.H. Fitié, Vitens N.V.
77

88
## Description
99
Water company Vitens has created a demonstration site called the Vitens Innovation Playground (VIP), in which new technologies and methodologies are developed, tested, and demonstrated. The projects conducted in the demonstration site can be categorized into one of four themes: energy optimization, real-time leak detection, online water quality monitoring, and customer interaction. In the real-time leak detection theme, a method for leak detection based on statistical demand forecasting was developed.
@@ -109,7 +109,7 @@ DBMDataRef is a custom AVEVA PI Asset Framework data reference which integrates
109109
The `Target` trait returns the original, valid raw measurements, augmented with forecast data for invalid and future data. Data quality is marked as `Substituted` for invalid data replaced by forecast values and for future forecast values, or as `Questionable` for data exceeding `Minimum` and `Maximum` control limits.
110110
![Augmented](img/augmented.png)
111111

112-
For the `Target` trait, DBM also detects and removes incorrect flatlines in the data and replaces them with forecast values, which are then weight adjusted to the original time range total. Data quality is marked as `Substituted` for this data.
112+
For the `Target` trait, DBM also detects and removes incorrect flatlines in the data and, if a reliable forecast can be made, replaces them with forecast values, which are then weight adjusted to the original time range total. Data quality is marked as `Substituted` for this data.
113113

114114
Beginning with PI AF 2018 SP3 Patch 2, all AF plugins must be signed with a valid certificate. Users must ensure any 3rd party or custom plugins are signed with a valid certificate. Digitally signing plugins increases the users' confidence that it is from a trusted entity. AF data references that are not signed could have been tampered with and are potentially dangerous. Therefore, in order to protect its users, AVEVA software enforces that all AF 2.x data reference plugins be signed. Use `sign.bat` to sign the data reference and support assemblies with your pfx certificate file before registering the data reference with PI AF.
115115

src/DBMDataRef/DBMDataRef.vb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
' Dynamic Bandwidth Monitor
22
' 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.
44
'
55
' This file is part of DBM.
66
'
@@ -687,6 +687,7 @@ Namespace Vitens.DynamicBandwidthMonitor
687687
Dim rawValues As AFValues = Nothing
688688
Dim result As DBMResult
689689
Dim iR, iD As Integer ' Iterators for raw values and DBM results.
690+
Dim stats As DBMStatisticsItem
690691

691692
GetValues = New AFValues
692693

@@ -959,12 +960,15 @@ Namespace Vitens.DynamicBandwidthMonitor
959960
GetValues.Item(GetValues.Count-1).Timestamp = timeRange.EndTime
960961
End If
961962

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.
965965
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)
966+
stats = Statistics(results)
967+
If stats.Calibrated Then
968+
GetValues = Deflatline(GetValues, results, Me.Step)
969+
End If
970+
' Annotate the first value with model calibration metrics.
971+
Annotate(GetValues.Item(0), stats.Brief)
968972
End If
969973

970974
' Returns the collection of values for the attribute sorted in increasing

src/dbm/DBMManifest.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
' Dynamic Bandwidth Monitor
22
' 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.
44
'
55
' This file is part of DBM.
66
'
@@ -22,14 +22,14 @@
2222
' returned using the DBM.Version function.
2323

2424

25-
<assembly:System.Reflection.AssemblyVersion("1.80.*")>
25+
<assembly:System.Reflection.AssemblyVersion("1.81.*")>
2626

2727
<assembly:System.Reflection.AssemblyProduct("Dynamic Bandwidth Monitor")>
2828

2929
<assembly:System.Reflection.AssemblyDescription(
3030
"Leak detection method implemented in a real-time data historian")>
3131

3232
<assembly:System.Reflection.AssemblyCopyright(
33-
"Copyright (C) 2014-2023 J.H. Fitié, Vitens N.V.")>
33+
"Copyright (C) 2014-2024 J.H. Fitié, Vitens N.V.")>
3434

3535
<assembly:System.Reflection.AssemblyCompany("Vitens N.V.")>

0 commit comments

Comments
 (0)